/* ================================================================
   1. TOKENS
   ================================================================ */
:root {
  --ink: #1d1020;
  --text: #2b1830;
  --muted: #5a4860;
  --plum: #3a1e3b;
  --accent: #d6588f;
  --blush: #fbe3ec;
  --cream: #fffaf6;
  --display: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --pad: 48px;
  color-scheme: light;
}
@media (max-width: 1024px) { :root { --pad: 32px; } }
@media (max-width: 600px)  { :root { --pad: 22px; } }

/* ================================================================
   2. BASE
   ================================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font: 400 17px/1.6 var(--body); color: var(--text); background: var(--cream); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
section, article { scroll-margin-top: 0; }
.inner { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
em.serif { font: italic 400 1.08em/1 var(--serif); color: var(--accent); letter-spacing: -0.01em; }
.label { display: block; font: 600 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* ================================================================
   3. HERO
   ================================================================ */
.hero { background: linear-gradient(160deg, #fff3f8 0%, #fffaf6 50%, #f5efff 100%); padding-bottom: clamp(56px, 7vw, 96px); overflow: hidden; }

.wordmark { font: 800 26px/1 var(--display); letter-spacing: -0.045em; text-decoration: none; }
.wordmark span { color: var(--accent); }
.header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px var(--pad); }
.header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.header nav a { font: 500 15px var(--body); text-decoration: none; padding: 10px 2px; border-bottom: 1.5px solid transparent; transition: border-color .2s ease, color .2s ease; }
.header nav a:hover { color: var(--accent); border-color: var(--accent); }

.intro { padding: clamp(8px, 2.5vw, 32px) var(--pad) clamp(20px, 2.4vw, 32px); max-width: 1240px; margin: 0 auto; }
.intro h1 { font: 800 clamp(40px, 5.4vw, 82px)/1.04 var(--display); letter-spacing: -0.045em; }
.intro h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.intro h1 .line > span { display: inline-block; }
.intro p { margin-top: 16px; font-size: clamp(17px, 1.4vw, 20px); max-width: 30em; color: var(--muted); }

/* ================================================================
   4. KEYBOARD (YAS / MIN with E as Enter, 656 × 312, scaled to fit)
   ================================================================ */
.kb-wrap { --s: 1; position: relative; height: calc(312px * var(--s) + 24px); max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.kb { position: absolute; top: 6px; left: 50%; width: 656px; height: 312px; transform: translateX(-50%) scale(var(--s)); transform-origin: top center; }
.key { position: absolute; left: var(--x); top: var(--y); width: var(--w, 146px); height: var(--h, 161px); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.key:focus-visible { outline: none; }
.key:focus-visible .base { outline: 4px solid var(--accent); outline-offset: 4px; }
.base { position: absolute; inset: 0; border: 2px solid rgba(29,16,32,.22); border-radius: 36px; background: var(--base); box-shadow: 0 5px 0 rgba(29,16,32,.18), inset 0 -10px 0 rgba(0,0,0,.1); transition: transform .18s ease, box-shadow .18s ease; pointer-events: none; }
.face { position: absolute; left: 10px; right: 10px; top: 6px; bottom: 33px; border: 2px solid rgba(29,16,32,.18); border-radius: 28px; background: var(--face); transition: transform .18s ease; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px 6px; overflow: hidden; }
.face::after { content: ""; position: absolute; inset: 0 0 auto; height: 42%; border-radius: 26px 26px 50% 50%; background: rgba(255,255,255,.32); pointer-events: none; }
.seam { position: absolute; bottom: 22px; width: 18px; height: 2px; background: rgba(29,16,32,.25); pointer-events: none; }
.seam.l { left: 4px; transform: rotate(40deg); } .seam.r { right: 4px; transform: rotate(-40deg); }
.cap { position: relative; z-index: 1; font: 600 11px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; }
.letter { position: relative; z-index: 1; font: 800 74px/0.9 var(--display); letter-spacing: -0.05em; }
.key.enter .face { display: block; }
.key.enter .cap { position: absolute; left: 16px; top: 14px; }
.key.enter .arrow { position: absolute; z-index: 1; right: 16px; top: 34px; width: 80px; height: 80px; }
.key.enter .letter { position: absolute; left: 74px; bottom: 6px; }   /* sits right next to N */
.row-top { z-index: 1; } .enter { z-index: 2; } .row-bottom { z-index: 3; }
.key:hover .face, .key:focus-visible .face { transform: translateY(8px); }
.key:active .base { transform: translateY(5px); box-shadow: 0 0 0 rgba(29,16,32,.18), inset 0 -10px 0 rgba(0,0,0,.1); }
.key:active .face { transform: translateY(13px); }
.key.auto .face { transform: translateY(13px); transition-duration: .14s; }
.key.auto .base { transform: translateY(4px); box-shadow: 0 1px 0 rgba(29,16,32,.18), inset 0 -10px 0 rgba(0,0,0,.1); transition-duration: .14s; }

/* ================================================================
   5. ABOUT
   ================================================================ */
.about { padding: clamp(96px, 12vw, 170px) 0; }
.about .big { font: 600 clamp(28px, 3.4vw, 50px)/1.2 var(--display); letter-spacing: -0.03em; max-width: 22em; }
.about .big .w { display: inline-block; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.fact { background: #fff; border: 2px solid var(--ink); border-radius: 24px; padding: 24px 24px 20px; box-shadow: 0 5px 0 var(--ink); }
.fact b { display: block; font: 800 clamp(38px, 3.8vw, 56px)/1 var(--display); letter-spacing: -0.04em; margin-bottom: 10px; }
.fact > span { font-size: 15px; color: var(--muted); }
.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; scroll-margin-top: 40px; }
.edu div { border-radius: 24px; padding: 22px 24px; background: var(--blush); }
.edu b { display: block; font: 800 20px/1.25 var(--display); letter-spacing: -0.02em; }
.edu span { font-size: 15px; color: var(--muted); }

/* ================================================================
   6. WORK (project panels stack on top of each other on desktop)
   ================================================================ */
.work-head { padding-bottom: clamp(40px, 5vw, 64px); }
.work-head h2 { font: 800 clamp(52px, 8vw, 128px)/0.95 var(--display); letter-spacing: -0.05em; white-space: nowrap; }
.project { padding: clamp(72px, 8vw, 100px) 0; background: var(--bg); color: var(--fg, var(--text)); }
.project.dark { --bg: var(--plum); --fg: #fbeff5; }
.project.blush { --bg: var(--blush); }
.project.cream { --bg: var(--cream); }
.project .inner { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.project.flip .inner { grid-template-columns: 1.35fr 1fr; }
.project.flip .text { order: 2; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font: 600 13px var(--body); padding: 6px 14px; border-radius: 99px; border: 2px solid currentColor; }
.tag.fill { background: var(--accent); border-color: var(--accent); color: #fff; }
.project h3 { font: 800 clamp(42px, 4.8vw, 72px)/1 var(--display); letter-spacing: -0.04em; margin: 18px 0 0; }
.bubble { margin-top: 26px; background: #fff; color: var(--text); border: 2px solid var(--ink); border-radius: 26px 26px 26px 6px; padding: 22px 24px; box-shadow: 0 5px 0 var(--ink); font-size: 18px; }

.bubble p.swap { opacity: 0; transform: translateY(6px); }
.dots { display: flex; gap: 6px; margin-top: 14px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(29,16,32,.18); transition: background-color .3s ease, width .3s ease; }
.dots i.on { width: 20px; border-radius: 99px; background: var(--accent); }
.bubble .result { margin-top: 12px; padding-top: 12px; border-top: 2px dashed rgba(29,16,32,.2); font-weight: 600; }
.visit { display: inline-flex; gap: 6px; margin-top: 24px; font-weight: 600; text-underline-offset: 5px; }
.visit:hover { color: var(--accent); }

/* Laptop + phone: identical size in every project */
.devices { position: relative; padding: 0 64px 44px 0; width: 100%; }
.devices { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.devices:hover { transform: translateY(-10px) rotate(-.6deg); }
.laptop { background: #140a14; border-radius: 16px 16px 0 0; padding: 12px; box-shadow: 0 40px 70px -24px rgba(20,10,20,.45); }
.laptop img { width: 100%; aspect-ratio: 16 / 9.6; object-fit: cover; object-position: top center; border-radius: 4px; background: #fff; }
.lbase { height: 14px; margin: 0 -26px; background: linear-gradient(#3b2a37, #1d121b); border-radius: 0 0 16px 16px; }
.phone { position: absolute; right: 0; bottom: 0; width: 26%; background: #140a14; border-radius: 26px; padding: 7px; box-shadow: 0 30px 50px rgba(20,10,20,.4); }
.phone img { width: 100%; aspect-ratio: 9 / 18; object-fit: cover; object-position: top center; border-radius: 20px; background: #fff; }

@media (min-width: 900px) and (min-height: 700px) {
  .project { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; box-shadow: 0 -24px 48px -24px rgba(29,16,32,.25); }
  .project .inner { width: 100%; }
}

/* ================================================================
   7. SKILLS
   ================================================================ */
.skills { position: relative; z-index: 2; background: var(--blush); padding: clamp(96px, 12vw, 160px) 0; }
.skills h2 { font: 800 clamp(42px, 5vw, 72px)/1 var(--display); letter-spacing: -0.04em; margin-bottom: 36px; }
.skills { overflow: hidden; }
.sk-sub { margin-top: 10px; color: var(--muted); }
.line-stage { position: relative; height: 330px; margin-top: 28px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); }
.line-stage.grabbing { cursor: grabbing; }
.rope { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rope path { fill: none; stroke: #c9b8c6; stroke-width: 2; }
.cards { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.card { position: absolute; top: 0; left: 0; width: 176px; height: 168px; border-radius: 18px; background: var(--bg); border: 1px solid rgba(29,16,32,.06);
  box-shadow: 0 10px 24px -14px rgba(29,16,32,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transform-origin: 50% 0; will-change: transform; text-align: center; padding: 18px 12px 12px; }
.card .pin { position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px; background: #111; border-radius: 6px; }
.card .pin::after { content: ""; position: absolute; left: 7px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.card .ico { width: 62px; height: 62px; border-radius: 50%; background: rgba(29,16,32,.06); display: grid; place-items: center; margin-bottom: 10px; }
.card .ico svg { width: 28px; height: 28px; }
.card .ico b { font: 800 18px var(--display); color: var(--plum); }
.card strong { font: 700 16px var(--display); letter-spacing: -0.02em; color: var(--text); }
.card small { font-size: 13px; color: var(--muted); }
/* Reduced motion: no line, just a tidy wrapping row */
.still .rope { display: none; }
.still.line-stage { height: auto; -webkit-mask-image: none; mask-image: none; }
.still .cards { position: static; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; padding: 0 var(--pad); }
.still .card { position: relative; }

/* ================================================================
   8. CONTACT
   ================================================================ */
.contact { position: relative; z-index: 2; background: var(--plum); color: #fbeff5; padding: clamp(110px, 13vw, 180px) 0 40px; overflow: hidden; }
.contact h2 { font: 800 clamp(56px, 9vw, 150px)/0.98 var(--display); letter-spacing: -0.05em; }
.contact h2 em.serif { color: #ffb3d1; }
.contact .row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-top: 48px; }
.contact p { font-size: 19px; opacity: .9; }
.email { display: inline-block; margin-top: 10px; font: 600 clamp(20px, 2.2vw, 28px)/1.3 var(--body); color: #ffb3d1; text-underline-offset: 6px; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.email:hover { color: #fff; }
.more { display: flex; gap: 22px; font-size: 16px; }
.more a { text-underline-offset: 4px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(80px, 10vw, 130px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; opacity: .7; }
.contact :focus-visible { outline-color: #ffb3d1; }


/* ================================================================
   12. BUILT FOR EVERY SCREEN
   ================================================================ */
.screens { position: relative; z-index: 2; overflow: hidden; padding: clamp(110px, 12vw, 160px) 0 90px; text-align: center; background: #fffaf6; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.blob.a { width: 520px; height: 520px; background: #ffc2db; top: -140px; left: -120px; }
.blob.b { width: 460px; height: 460px; background: #d7d0ff; top: 20px; right: -140px; animation-duration: 23s; }
.blob.c { width: 420px; height: 420px; background: #ffe27a; bottom: -200px; left: 38%; opacity: .35; animation-duration: 27s; }
@keyframes drift { 50% { transform: translate(70px, 50px) scale(1.12); } 100% { transform: translate(-40px, 80px) scale(.95); } }
.screens .inner { position: relative; }
.screens h2 { font: 800 clamp(44px, 6.4vw, 96px)/1.04 var(--display); letter-spacing: -0.045em; max-width: 12em; margin: 0 auto; }
.screens h2 .w { display: inline-block; }
.hl { background: #3b6df5; color: #fff; padding: 0 .14em; }
.screens .sub { max-width: 34em; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.carousel { --gap: 230px; --cw: 186px; position: relative; height: 600px; margin-top: 56px; }
.ccard { position: absolute; top: 50%; left: 50%; width: var(--cw); aspect-ratio: 9 / 17; padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: #fff;
  box-shadow: none; cursor: pointer; transform: translate(calc(-50% + var(--i) * var(--gap)), -50%) rotate(var(--r));
  transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease, outline-color .3s ease; outline: 3px solid transparent; outline-offset: 4px; }
.ccard:first-child, .ccard:last-child { opacity: .45; }
.carousel.prefan .ccard { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }
.ccard { transition-delay: calc(max(var(--i), -1 * var(--i)) * 70ms); }
.ccard:hover, .ccard.on { transition-delay: 0ms; }
.ccard:hover { transform: translate(calc(-50% + var(--i) * var(--gap)), calc(-50% - 10px)) rotate(0deg); opacity: 1; }
.ccard.on { outline-color: var(--accent); }
.phone-big { box-shadow: 0 30px 50px -24px rgba(29,16,32,.4); }
.ccard img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.phone-big { position: absolute; z-index: 3; top: 50%; left: 50%; width: 270px; aspect-ratio: 9 / 19.5; transform: translate(-50%, -50%); background: #140a14; border-radius: 44px; padding: 11px; box-shadow: 0 40px 70px -20px rgba(29,16,32,.5); }
.phone-big .island { position: absolute; z-index: 3; top: 20px; left: 50%; width: 88px; height: 26px; margin-left: -44px; background: #000; border-radius: 99px; }
.phone-big .clock { position: absolute; z-index: 3; top: 22px; left: 34px; font: 600 13px var(--body); color: #fff; mix-blend-mode: difference; }
.pscreen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #fff; }
.pscreen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .5s ease; }
.pscreen img.show { opacity: 1; animation: browse 8s ease-in-out infinite alternate; }
@keyframes browse { 0%, 15% { object-position: center top; } 85%, 100% { object-position: center bottom; } }
.carr { display: none; position: absolute; z-index: 5; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: var(--text); color: #fff; font: 700 26px/1 var(--body); cursor: pointer; }
.carr.prev { left: calc(50% - 150px); } .carr.next { right: calc(50% - 150px); }
.carr:hover { background: var(--accent); }
.now { position: relative; margin-top: 18px; font-weight: 500; }
.now a { color: var(--accent); text-underline-offset: 4px; }

@media (max-width: 899px) {
}
@media (prefers-reduced-motion: reduce) { .blob, .pscreen img.show { animation: none; } }

@media (max-width: 899px) {
  .carousel { --gap: 104px; --cw: 92px; height: 400px; margin-top: 28px; }
  .phone-big { width: 170px; border-radius: 30px; padding: 7px; }
  .phone-big .island { top: 13px; width: 56px; height: 17px; margin-left: -28px; }
  .phone-big .clock { top: 14px; left: 22px; font-size: 10px; }
  .pscreen { border-radius: 24px; }
  .carr { display: grid; place-items: center; }
  .carr.prev { left: calc(50% - 132px); } .carr.next { right: calc(50% - 132px); }
  .ccard { border-radius: 14px; }
}

/* ================================================================
   9. MOBILE
   ================================================================ */
@media (max-width: 899px) {
  .project .inner, .project.flip .inner { grid-template-columns: 1fr; gap: 32px; }
  .project.flip .text { order: 0; }
  .facts, .edu { grid-template-columns: 1fr; }
  .card { width: 112px; height: 112px; padding: 12px 8px 8px; border-radius: 18px; }
  .card .ico { width: 42px; height: 42px; margin-bottom: 6px; }
  .card .ico svg { width: 20px; height: 20px; }
  .card .ico b { font-size: 14px; }
  .card strong { font-size: 13px; }
  .card small { font-size: 11px; line-height: 1.2; }
  .line-stage { height: 170px; margin-top: 8px; }
  .skills { padding: 72px 0 40px; }
  .skills h2 { margin-bottom: 10px; }
  .devices { padding: 0 44px 34px 0; }
  .work-head h2 { white-space: normal; }
}
@media (max-width: 480px) { .header nav a:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}


/* ================================================================
   15. ONE CUTE STYLE
   Bolder pastel colours (taken from the keyboard), solid fills,
   no gradients, no hard outlines, no shadows under boxes.
   ================================================================ */
:root {
  --rose: #ff9ec4;      /* pink, like the Y and N keys */
  --lilac: #bfa6ff;     /* lilac, like the A and I keys */
  --butter: #ffd04d;    /* gold, like the E key */
  --peach: #ffb08f;     /* coral, like the M key */
  --berry: #d6336c;     /* strong pink for buttons and highlights */
  --cream: #fff3e8;
  --accent: #d6336c;
}
body { background: var(--cream); }

/* Hero: one solid colour */
.hero { background: var(--cream); }

/* Labels: soft solid pills */
.label { display: inline-flex; align-items: center; gap: 8px; width: fit-content; background: rgba(255,255,255,.7); color: var(--text); border: 0;
  border-radius: 99px; padding: 7px 14px; box-shadow: none; font-size: 12px; margin-bottom: 18px; }
.label::before { content: "✦"; color: var(--berry); font-size: 13px; }

/* Tags and buttons: solid fills, no borders or shadows */
.tag { border: 0; background: rgba(255,255,255,.75); color: var(--text); }
.tag.fill { background: var(--berry); color: #fff; }
.visit, .now a, .more a { display: inline-flex; align-items: center; gap: 6px; background: var(--text); color: #fff; border: 0; border-radius: 99px;
  padding: 11px 20px; box-shadow: none; text-decoration: none; font-weight: 600; transition: background-color .2s ease, transform .2s ease; }
.visit:hover, .now a:hover, .more a:hover { background: var(--berry); color: #fff; transform: translateY(-2px); box-shadow: none; }

/* About */
.about { background: #fff; }
.fact { border: 0; box-shadow: none; background: var(--rose); }
.fact:nth-child(2) { background: var(--lilac); }
.fact:nth-child(3) { background: var(--butter); }
.fact > span { color: var(--text); opacity: .8; }
.edu div { border: 0; box-shadow: none; background: var(--cream); }

/* Projects: bold pastel pages, no divider lines or shadows */
.project { border-top: 0; box-shadow: none !important; }
.project.pv1 { --bg: var(--lilac); }
.project.pv2 { --bg: var(--rose); }
.project.pv3 { --bg: var(--butter); }
.bubble { border: 0; box-shadow: none; background: #fff; }
.laptop, .phone { outline: 0; }

/* Every screen: solid background, no blurry blobs */
.screens { background: #ffffff; border-top: 0; }
.screens .ccard { outline: 1px solid rgba(43,24,48,.1); outline-offset: 0; }
.screens .ccard.on { outline: 3px solid var(--berry); outline-offset: 3px; }
.blob { display: none; }
.hl { background: #3b6df5; color: #fff; border: 0; border-radius: 0; box-shadow: none; padding: 0 .14em; transform: none; }

/* Skills: washing line */
.skills { background: var(--cream); border-top: 0; }
.card { border: 0; border-radius: 22px; box-shadow: none; }
.card .pin { background: var(--berry); border: 0; border-radius: 50%; width: 20px; height: 20px; top: -10px; margin-left: -10px; }
.card .pin::after { left: 7px; top: 6px; width: 6px; height: 6px; background: #fff; }
.card .ico { background: #fff; border: 0; }
.rope path { stroke: rgba(43,24,48,.45); stroke-width: 2; }
.line-stage { -webkit-mask-image: none; mask-image: none; }

/* Contact: solid lilac */
.contact { background: var(--rose); color: var(--text); border-top: 0; }
.contact h2 em.serif { color: var(--berry); }
.contact p { opacity: 1; color: var(--text); }
.email { display: inline-block; background: var(--berry); color: #fff; border: 0; border-radius: 99px; padding: 13px 26px; box-shadow: none;
  text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.email:hover { color: #fff; background: var(--text); transform: translateY(-2px); }
.footer { border-top-color: rgba(43,24,48,.15); opacity: 1; color: var(--text); }
.contact :focus-visible { outline-color: var(--berry); }
em.serif { color: var(--berry); }

/* ================================================================
   16. PROJECT PAGES: text and highlight tiles on one side,
   a big laptop and phone on the other
   ================================================================ */
.project .inner.pj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: clamp(36px, 5vw, 72px); align-items: center; width: 100%; }
.project.flip .inner.pj { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.project.flip .pj-text { order: 2; }
.pj-text .tags { margin-bottom: 4px; }
.pj-text .tag { font-size: 15px; padding: 8px 16px; }
.pj-text h3 { font: 800 clamp(42px, 4.6vw, 70px)/1 var(--display); letter-spacing: -0.045em; margin: 16px 0 0; }
.pj-intro { font: 600 clamp(18px, 1.5vw, 21px)/1.4 var(--display); margin: 14px 0 0; letter-spacing: -0.01em; }
.tiles { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles li { background: #fff; border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; }
.ti { grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; background: var(--berry); color: #fff; display: grid; place-items: center; }
.ti svg { width: 19px; height: 19px; }
.tiles b { font: 700 15.5px/1.2 var(--display); letter-spacing: -0.01em; }
.tiles small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.pj-text .visit { margin-top: 22px; }
.project .devices { padding: 0 80px 50px 0; }
.project .phone { width: 27%; border-radius: 34px; padding: 8px; }
.project .phone img { border-radius: 27px; }
@media (max-width: 899px) {
  .project .inner.pj, .project.flip .inner.pj { grid-template-columns: 1fr; }
  .project.flip .pj-text { order: 0; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles li { padding: 12px; grid-template-columns: 30px 1fr; }
  .ti { width: 30px; height: 30px; border-radius: 10px; }
  .project .devices { padding: 0 50px 34px 0; }
}

/* ================================================================
   17. PHONES: full-screen hero and full-screen project pages
   ================================================================ */
@media (max-width: 899px) {
  .hero { min-height: 100svh; display: flex; flex-direction: column; padding-bottom: 28px; }
  .hero .intro { width: 100%; margin-top: auto; }
  .hero .kb-wrap { width: 100%; margin-top: 36px; margin-bottom: auto; }

  .project { height: 240svh; padding: 0; overflow: clip; position: relative; }
  .project .inner.pj, .project.flip .inner.pj { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 0; padding: 40px 20px 20px; }
  .project.flip .pj-text { order: 0; }
  .pj-text .tag { font-size: 13px; padding: 6px 13px; }
  .pj-text h3 { font-size: 34px; margin-top: 10px; }
  .pj-intro { font-size: 16px; margin-top: 6px; }
  .tiles { margin-top: 14px; gap: 8px; }
  .tiles li { padding: 10px; border-radius: 14px; }
  .tiles b { font-size: 13.5px; }
  .tiles small { font-size: 11.5px; }
  .pj-text .visit { margin-top: 14px; padding: 9px 16px; font-size: 14px; }
  .project .devices { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0; margin-top: 22px; }
  .project .devices > * { grid-area: 1 / 1; }
  .project .lbase { display: none; }
  .project .laptop { width: 100%; }
  .project .phone { position: relative; right: auto; bottom: auto; height: 100%; width: auto; max-width: 80%; aspect-ratio: 9 / 19.5; }
  .project .phone img { height: 100%; aspect-ratio: auto; }
  .js-motion .project .phone { opacity: 0; }
}

/* ================================================================
   18. PHONES: compact About, project pages with the laptop above the tiles
   ================================================================ */
@media (max-width: 899px) {
  .about { padding: 64px 0 56px; }
  .about .big { font-size: 24px; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
  .fact { padding: 14px 10px 12px; border-radius: 16px; }
  .fact b { font-size: 24px; margin-bottom: 4px; }
  .fact > span { font-size: 11.5px; line-height: 1.3; display: block; }
  .edu { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .edu div { padding: 12px 16px; border-radius: 16px; }
  .edu b { font-size: 15px; }
  .edu span { font-size: 13px; }

  /* 5. project pages: title, then the screens, then the tiles */
  .project .inner.pj, .project.flip .inner.pj { padding: 34px 20px 18px; }
  .pj-text { display: contents; }
  .pj-text .tags { order: 1; }
  .pj-text h3 { order: 2; }
  .pj-intro { order: 3; }
  .project .devices { order: 4; flex: none; height: 34svh; margin: 16px 0 14px; }
  .tiles { order: 5; margin-top: 0; }
  .pj-text .visit { order: 6; align-self: flex-start; margin-top: 14px; }
  .project .inner.pj, .project.flip .inner.pj { align-items: stretch; }
  .project .laptop { width: min(100%, calc(34svh * 1.5)); height: auto; padding: 8px; border-radius: 12px 12px 6px 6px; }
  .project .laptop img { width: 100%; height: auto; aspect-ratio: 16 / 9.6; }
  .project .devices { grid-template-rows: minmax(0, 1fr); overflow: visible; }
  .project .phone { height: 34svh; width: auto; max-width: 60%; aspect-ratio: 9 / 19.5; }
  .project .phone img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
  .project .phone { border-radius: 20px; padding: 5px; }
  .project .phone img { border-radius: 15px; }
  .project .phone::before { content: ''; position: absolute; z-index: 2; top: 9px; left: 50%; width: 30%; height: 8px; transform: translateX(-50%); background: #140a14; border-radius: 99px; }
}
