/* =====================================================================
   Anurag Kulharia — Portfolio
   1. Tokens  2. Base  3. Navigation  4. Mobile menu  5. Contact dialog
   6. Sections  7. Case-study page  8. Responsive  9. Motion / a11y
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  --ink: #0E0E0E;
  --ink-2: #1B1B1B;
  --lime: #D2F31B;
  --green: #6DB51F;
  --paper: #E8E8E8;
  --white: #fff;
  --muted: #8a8a8a;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  
  --display: clamp(4.2rem, 14.1vw, 12.7rem);
  --radius-xl: 40px;
  --radius-lg: 32px;
  --nav-h: 64px;
  --nav-top: 16px;
  --wrap: 1280px;
  --pad: clamp(20px, 5.55vw, 80px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; line-height: 1.5;
  color: var(--ink); background: var(--ink); -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:target { scroll-margin-top: 0; }

main { overflow-x: clip; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* One focus ring that is visible on BOTH dark and light backgrounds */
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); border-radius: 8px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 20px; background: var(--lime); color: var(--ink); font-weight: 600; border-radius: 999px; transition: top .2s var(--ease); }
.skip-link:focus { top: 16px; }

/* Grain texture from the design (white noise on dark, black noise on light) */
.grain-dark  { background-color: var(--ink-2); background-image: url('../assets/grain-white.png'); background-size: 192px; }
.grain-light { background-color: var(--paper); background-image: url('../assets/grain-black.png'); background-size: 192px; }

/* Hand-lettered script labels are SVG images exported from the Figma file */
.script-img { display: block; max-width: none; height: auto; pointer-events: none; user-select: none; }
.display { font-size: clamp(4.2rem, 13.7vw, 12.3rem); font-weight: 800; line-height: .95; letter-spacing: -.025em; }

/* Figma-style selection frame used throughout the design */
.frame { position: relative; border: 1px dashed var(--frame, #fff); --frame: rgba(255,255,255,.75); }
.frame--light { --frame: rgba(14,14,14,.55); }
.frame > .h { position: absolute; width: 16px; height: 16px; border-radius: 2px; background: var(--hc, #fff); pointer-events: none; }
.frame--light > .h { --hc: var(--ink); }
.frame > .h.tl { left: -9px; top: -9px; } .frame > .h.tr { right: -9px; top: -9px; }
.frame > .h.bl { left: -9px; bottom: -9px; } .frame > .h.br { right: -9px; bottom: -9px; }
.frame > .h.tm { left: calc(50% - 8px); top: -9px; } .frame > .h.bm { left: calc(50% - 8px); bottom: -9px; }
.frame::after {
  content: ''; position: absolute; right: -38px; bottom: -42px; width: 30px; height: 30px; pointer-events: none;
  background: var(--hc, #fff);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.5 3.5h-2.5v5.5h5.5v-2.5L22 12l-3.5 3.5V13H13v5.5h2.5L12 22l-3.5-3.5H11V13H5.5v2.5L2 12l3.5-3.5V11H11V5.5H8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.5 3.5h-2.5v5.5h5.5v-2.5L22 12l-3.5 3.5V13H13v5.5h2.5L12 22l-3.5-3.5H11V13H5.5v2.5L2 12l3.5-3.5V11H11V5.5H8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.frame--light::after { background: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; font-size: 1rem; font-weight: 500; transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s; }
.btn svg { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.btn--dark { background: #0B0B0B; color: #fff; }
.btn--dark:hover { background: #222; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.btn--dark:hover svg { transform: translate(2px, -2px); }
.btn--dark:active { transform: translateY(0); }
.btn--lime { background: var(--lime); color: var(--ink); font-weight: 600; }
.btn--lime:hover { background: #e4ff4a; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(210,243,27,.28); }
.btn--lime:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* ---------- 3. NAVIGATION ----------
   Rules applied: few items (Hick/Miller: 5 links + 1 CTA), grouped by purpose,
   CTA visually dominant (hierarchy), 44px+ targets (Fitts), always visible while
   scrolling (visibility), current-section indicator (feedback / orientation),
   consistent on every page, high contrast, keyboard + screen-reader friendly. */
.site-header { position: fixed; z-index: 60; top: var(--nav-top); left: 0; right: 0; pointer-events: none; }
.nav {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: min(var(--wrap), calc(100% - 32px)); height: var(--nav-h); margin-inline: auto; padding: 0 10px 0 12px;
  border-radius: 999px; background: rgba(14,14,14,.8);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 32px rgba(0,0,0,.28);
  transition: background .3s, box-shadow .3s;
}
.nav__progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--lime); transform-origin: left; transform: scaleX(var(--progress, 0)); }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: #fff; font-weight: 600; letter-spacing: -.01em; border-radius: 999px; }
.nav__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--ink); font-weight: 700; font-size: .95rem; transition: transform .3s var(--ease); }
.nav__brand:hover .nav__mark { transform: rotate(-8deg) scale(1.05); }
.nav__brand-text { white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; color: #cfcfcf; font-size: .95rem; font-weight: 500; transition: color .2s, background .2s; }
.nav__link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav__link[aria-current="true"], .nav__link[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.nav__link[aria-current="true"]::after, .nav__link[aria-current="page"]::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--lime); }
.nav__cta { min-height: 44px; padding: 0 22px; font-size: .95rem; }
.nav__right { display: flex; align-items: center; gap: 8px; }

.nav__toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); position: relative; }
.nav__toggle span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: #fff; transition: transform .3s var(--ease), opacity .2s; }
.nav__toggle span:nth-child(1) { top: 17px; } .nav__toggle span:nth-child(2) { top: 23px; } .nav__toggle span:nth-child(3) { top: 29px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 4. MOBILE MENU ---------- */
.drawer { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; padding: calc(var(--nav-top) + var(--nav-h) + 28px) var(--pad) max(28px, env(safe-area-inset-bottom)); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
.drawer.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.drawer__list { counter-reset: n; }
.drawer__link { display: flex; align-items: baseline; gap: 16px; min-height: 64px; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; transition: color .2s, padding .25s var(--ease); }
.drawer__link::before { counter-increment: n; content: '0' counter(n); font-size: .8rem; font-weight: 500; color: var(--lime); letter-spacing: .05em; }
.drawer__link:hover, .drawer__link[aria-current="true"], .drawer__link[aria-current="page"] { color: var(--lime); padding-left: 12px; }
.drawer__foot { margin-top: auto; padding-top: 32px; display: grid; gap: 14px; }
.drawer__foot .btn { justify-content: center; min-height: 56px; font-size: 1.05rem; }
.drawer__mini { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: #bdbdbd; font-size: .9rem; }
.drawer__mini a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- 5. CONTACT DIALOG ---------- */
.contact-dialog { width: calc(100% - 32px); max-width: 520px; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.contact-dialog::backdrop { background: rgba(8,8,8,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.contact-dialog[open] { animation: pop .35s var(--ease); }
.contact-dialog[open]::backdrop { animation: fade .3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.contact-card { position: relative; padding: clamp(24px, 5vw, 36px); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 40px 90px rgba(0,0,0,.5); }
.contact-card__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; transition: background .2s, transform .25s var(--ease); }
.contact-card__close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
.contact-card__close svg { width: 16px; height: 16px; }
.contact-card__who { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-right: 52px; }
.contact-card__avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--lime); overflow: hidden; }
.contact-card__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.contact-card__name { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.contact-card__role { color: #bdbdbd; font-size: .9rem; }
.contact-card__title { color: var(--lime); font-size: clamp(2.1rem, 8vw, 2.8rem); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; }
.contact-card__lead { margin: 10px 0 24px; color: #d6d6d6; font-weight: 300; }
.contact-rows { display: grid; gap: 12px; }
.contact-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border-radius: 22px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.contact-row__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--ink); }
.contact-row__icon svg { width: 20px; height: 20px; }
.contact-row__label { display: block; color: #a9a9a9; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.contact-row__value { display: block; min-height: 24px; font-weight: 500; font-size: 1.02rem; word-break: break-word; }
.contact-row__value:hover { color: var(--lime); text-decoration: underline; text-underline-offset: 4px; }
.copy-btn { min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: transparent; font-size: .85rem; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.copy-btn:hover { background: rgba(255,255,255,.12); }
.copy-btn.is-done { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.contact-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.contact-card__actions .btn { justify-content: center; }
.contact-card__toast { min-height: 1.4em; margin-top: 10px; text-align: center; font-size: .85rem; color: var(--lime); }

/* ---------- 6. SECTIONS ---------- */
/* Hero */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-start; min-height: min(65.5vw, 943px); padding: 140px var(--pad) 90px; overflow: hidden; background-color: var(--ink); }
.hero__glow { position: absolute; left: 62%; top: 50%; width: min(620px, 60vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(210,243,27,.2), rgba(210,243,27,0)); filter: blur(30px); pointer-events: none; }
.hero__frame { position: relative; width: min(1240px, 100%); margin-inline: auto; min-height: min(40.3vw, 580px); padding: min(4.3vw, 62px) min(4.2vw, 60px) 24px; }
.hero__eyebrow { font-size: clamp(1.45rem, 3.2vw, 2.9rem); line-height: 1.2; font-weight: 600; color: #7a7a7a; letter-spacing: -.01em; }
.hero__eyebrow span { color: #fff; }
.hero__title { margin: 0; }
.hero__word { display: block; margin-top: min(-.35vw, -5px); font-size: clamp(3.4rem, 17.9vw, 16.1rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; background: linear-gradient(180deg, #f6f6f6 8%, #6f6f6f 92%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero__name { position: absolute; right: min(3.1vw, 45px); top: min(16.8vw, 242px); }
.hero__name img { width: min(55.8vw, 804px); }
.hero__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; margin: min(4.6vw, 66px) auto 0; color: #bdbdbd; font-weight: 300; font-size: clamp(.85rem, 1.56vw, 1.4rem); }
.hero__tags li + li::before { content: '·'; margin: 0 clamp(10px, 1.6vw, 22px); color: #8a8a8a; }
.hero__scroll { display: none; position: absolute; right: var(--pad); bottom: 28px; min-height: 44px; align-items: center; color: #fff; font-size: .95rem; }

/* About */
.about { position: relative; overflow: hidden; min-height: min(62.5vw, 900px); }
.about__grid { padding-top: min(11.5vw, 166px); }
.about__text { max-width: 700px; padding-bottom: 72px; }
.about__intro { display: flex; flex-wrap: wrap; align-items: center; gap: 0 min(1.8vw, 26px); margin-top: min(2.8vw, 40px); font-size: clamp(1.3rem, 2.5vw, 2.25rem); line-height: 1.2; }
.about__intro strong { font-weight: 600; }
.about__me img { width: min(14vw, 202px); transform: translateY(-10px); }
.about__greet { margin-top: min(4.3vw, 62px); font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 600; line-height: 1.2; }
.about__copy { margin-top: min(1.9vw, 27px); max-width: 28.6em; font-size: clamp(1.05rem, 1.56vw, 1.4rem); font-weight: 300; line-height: 1.6; }
.about__avatar { position: absolute; right: max(0px, calc((100% - 1440px) / 2)); bottom: 0; width: min(46.3vw, 667px); height: min(60.8vw, 876px); overflow: hidden; pointer-events: none; }
.about__avatar img { width: 100%; height: auto; max-width: none; margin-top: -15.14%; transform: scaleX(-1); }

/* Table of contents */
.toc { padding: min(4.6vw, 66px) 0 min(9.1vw, 131px); }
.toc__title { position: relative; padding-top: min(2.3vw, 33px); }
.toc__pre { position: absolute; left: -.5vw; top: 0; z-index: 1; }
.toc__pre img { width: min(21.2vw, 305px); }
.toc__pre img { width: min(21.2vw, 305px); }
.toc__title .display { position: relative; display: block; font-size: clamp(4rem, 12.3vw, 11rem); }
.toc__frame { margin-top: min(7.9vw, 114px); padding: min(1.7vw, 24px); }
.toc__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.toc__item { position: relative; display: block; min-height: min(19.5vw, 280px); padding: min(6.7vw, 96px) min(2.5vw, 36px) 20px; border-radius: 24px; transition: background .3s, transform .3s var(--ease); }
.toc__num { position: absolute; left: min(2.5vw, 36px); top: min(.55vw, 8px); font-size: clamp(4.4rem, 11.2vw, 10.1rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: #d0d0d0; transition: color .3s; }
.toc__label { position: relative; display: block; font-size: clamp(1.45rem, 2.85vw, 2.55rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.toc__tag { position: relative; display: block; margin: 4px 0 0 min(9.2vw, 132px); }
.toc__tag img { width: min(11.1vw, 160px); }
.toc__tag--folio img { width: min(7.7vw, 111px); }
.toc__item:hover { background: rgba(255,255,255,.55); transform: translateY(-4px); }
.toc__item:hover .toc__num { color: rgba(109,181,31,.4); }

/* Category banner (dark) */
.banner { display: flex; flex-direction: column; align-items: center; padding: min(9vw, 130px) var(--pad) min(8.3vw, 120px); text-align: center; }
.banner__frame { width: min(1016px, 100%); padding: min(3.7vw, 53px) clamp(16px, 4vw, 48px); }
.banner__title { color: var(--lime); font-size: clamp(3rem, 11.8vw, 10.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.banner__title--long { font-size: clamp(2.3rem, 6.45vw, 5.8rem); }
.banner__lead { max-width: 29em; margin: min(4.2vw, 60px) auto 0; color: #f0f0f0; font-size: clamp(1.05rem, 1.83vw, 1.65rem); font-weight: 300; line-height: 1.5; }

/* Projects */
.projects { padding: min(5.2vw, 75px) 0 clamp(40px, 6vw, 90px); }
.project + .project { margin-top: clamp(90px, 12vw, 190px); }
.project__title { display: flex; align-items: flex-end; flex-wrap: wrap; font-size: clamp(3rem, 9.2vw, 8.4rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.project__suffix { flex: none; margin-left: min(-4.1vw, -59px); margin-bottom: -.09em; }
.project__suffix img { width: min(14.9vw, 215px); }
.project__suffix--app img { width: min(11.3vw, 162px); }
.project__grid { display: grid; grid-template-columns: minmax(0, 1fr) min(54.2vw, 780px); gap: 0; align-items: center; margin-top: clamp(28px, 4vw, 56px); }
.project__info { padding-right: clamp(0px, 2.8vw, 40px); }
.project__name { color: var(--green); font-size: clamp(1.6rem, 2.6vw, 2.35rem); font-weight: 600; line-height: 1.2; }
.project__type { margin-top: 6px; font-style: italic; color: #333; }
.project__desc { margin-top: 20px; max-width: 22.5em; font-size: clamp(1rem, 1.33vw, 1.2rem); font-weight: 400; line-height: 1.6; }
.project__tools-title { margin-top: 34px; color: var(--green); font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 600; }
.project__tools { margin: 10px 0 34px; }
.project__tools li { position: relative; padding-left: 15px; font-size: 1.08rem; line-height: 1.75; }
.project__tools li::before { content: '•'; position: absolute; left: 0; color: #555; }
.project__media { display: block; overflow: hidden; border-radius: var(--radius-xl); box-shadow: 0 30px 60px rgba(0,0,0,.18); transition: transform .5s var(--ease), box-shadow .5s; }
.project__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.project__media:hover { transform: translateY(-6px); box-shadow: 0 40px 80px rgba(0,0,0,.24); }
.project__media:hover img { transform: scale(1.03); }

/* Brand cards */
.projects--brand { padding-top: clamp(60px, 8vw, 110px); }
.brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 36px); }
.brand-card { position: relative; display: flex; flex-direction: column; padding: clamp(14px, 2vw, 24px); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 24px 50px rgba(0,0,0,.12); transition: transform .4s var(--ease), box-shadow .4s; }
.brand-card:hover { transform: translateY(-6px); box-shadow: 0 34px 70px rgba(0,0,0,.18); }
.brand-card__media { flex: none; display: grid; place-items: center; aspect-ratio: 2 / 1; min-height: 0; overflow: hidden; padding: 0 0 18px; }
.brand-card__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-card__media img.is-round { width: 81%; height: 100%; border-radius: 28px; object-fit: cover; }
.brand-card__media--white img { width: min(86%, 430px); height: auto; }
.brand-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 8px 4px; border-top: 1px solid #e3e3e3; }
.brand-card__name { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 700; line-height: 1.2; }
.brand-card__type { margin-top: 2px; font-size: .92rem; font-style: italic; color: #444; }
.brand-card__go { position: static; display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: #0B0B0B; color: #fff; transition: transform .3s var(--ease), background .3s; }
.brand-card__go::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); }   /* whole card is the click target */
.brand-card__go svg { width: 14px; height: 14px; }
.brand-card:hover .brand-card__go { transform: rotate(45deg); background: var(--green); }
.brand-card:focus-within { outline: 3px solid var(--lime); outline-offset: 4px; box-shadow: 0 0 0 6px var(--ink); }
.brand-card__go:focus-visible { outline: none; box-shadow: none; }

/* Let's Connect */
.connect { padding: clamp(90px, 11vw, 160px) var(--pad) clamp(36px, 5vw, 64px); text-align: center; overflow-x: clip; }
.connect .banner__frame { width: min(1112px, 100%); margin-inline: auto; padding-block: min(1.8vw, 26px); }
.connect .banner__title { font-size: clamp(2.6rem, 9.5vw, 8.6rem); }
.connect .banner__lead { max-width: 31em; font-size: clamp(1.05rem, 2vw, 1.8rem); }
.connect__bar { padding-inline: 0; display: grid; gap: 12px; margin-top: clamp(40px, 6vw, 90px); text-align: left; }
.connect__top { justify-self: end; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; color: #e8e8e8; font-size: clamp(.9rem, 1.1vw, 1.05rem); transition: color .2s; }
.connect__top:hover { color: var(--lime); }
.connect__details { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; }
.connect__details a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-size: clamp(1.05rem, 1.84vw, 1.65rem); font-weight: 500; transition: color .2s; }
.connect__details a:hover { color: var(--lime); text-decoration: underline; text-underline-offset: 5px; }

/* Reveal on scroll (only when JS is active) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 7. CASE-STUDY PAGE ---------- */
.case { background: var(--ink); color: #fff; min-height: 100vh; }
.case__head { padding: clamp(120px, 14vw, 190px) var(--pad) clamp(36px, 5vw, 64px); }
.case__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #a9a9a9; font-size: .92rem; }
.case__crumbs a { display: inline-flex; align-items: center; min-height: 44px; transition: color .2s; }
.case__crumbs a:hover { color: var(--lime); }
.case__title { margin-top: 6px; color: var(--lime); font-size: clamp(2.8rem, 8.4vw, 7.4rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.case__suffix { display: inline-block; margin-left: .1em; vertical-align: -.12em; }
.case__suffix img { width: auto; height: .62em; filter: brightness(0) invert(1); }
.case__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 760px; margin-top: clamp(24px, 4vw, 48px); }
.case__meta dt { color: #8f8f8f; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.case__meta dd { margin: 4px 0 0; font-weight: 500; }
.case__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4vw, 40px); }
.case__strip { width: min(1440px, 100%); margin-inline: auto; background: #111; }
.case__strip img { width: 100%; height: auto; }
.case__soon { display: grid; justify-items: center; gap: 22px; padding: clamp(40px, 6vw, 80px) var(--pad); text-align: center; }
.case__soon img { width: min(900px, 100%); border-radius: var(--radius-xl); box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.case__soon p { max-width: 34em; color: #d6d6d6; font-weight: 300; font-size: 1.15rem; }
.case__pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: clamp(40px, 6vw, 90px) var(--pad); max-width: calc(var(--wrap) + var(--pad) * 2); margin-inline: auto; }
.case__pager a { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 22px 26px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-lg); transition: background .25s, border-color .25s, transform .3s var(--ease); }
.case__pager a:hover { background: rgba(255,255,255,.06); border-color: var(--lime); transform: translateY(-3px); }
.case__pager small { color: #9a9a9a; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.case__pager b { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; }
.case__pager .next { text-align: right; align-items: flex-end; }
.case__foot { padding: 28px var(--pad) 48px; text-align: center; color: #8f8f8f; font-size: .9rem; }

/* ---------- 8. RESPONSIVE ---------- */
/* Selection-frame handles must never poke outside the screen */
@media (max-width: 1240px) {
  .frame::after { right: 0; bottom: -34px; width: 22px; height: 22px; }
  .frame > .h.tl, .frame > .h.bl { left: -8px; } .frame > .h.tr, .frame > .h.br { right: -8px; }
}
/* Tablet + mobile navigation: collapse links into the menu */
@media (max-width: 1080px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav { padding-right: 8px; }
}
@media (min-width: 1081px) { .drawer { display: none; } }

@media (max-width: 960px) {
  .about { min-height: 0; }
  .about__grid { padding-top: 120px; }
  .about__text { padding-bottom: 36px; }
  .about__avatar { position: relative; right: auto; width: min(100%, 560px); height: auto; aspect-ratio: 667 / 876; margin: 0 0 0 auto; }
  .project__grid { grid-template-columns: 1fr; }
  .project__media { order: -1; }
  .project__desc { max-width: 36em; }
  .hero__scroll { display: inline-flex; }
}
@media (min-width: 721px) { .banner__title { white-space: nowrap; } }
@media (max-width: 960px) { .project__info { padding-right: 0; } .project__grid { gap: 28px; } }
@media (max-width: 720px) {
  .frame > .h { width: 10px; height: 10px; }
  .frame > .h.tl, .frame > .h.bl { left: -5px; } .frame > .h.tr, .frame > .h.br { right: -5px; }
  .frame > .h.tl, .frame > .h.tr { top: -5px; } .frame > .h.bl, .frame > .h.br { bottom: -5px; }
  .frame > .h.tm { top: -5px; left: calc(50% - 5px); } .frame > .h.bm { bottom: -5px; left: calc(50% - 5px); }
  .banner__frame, .connect .banner__frame { padding: 28px 12px; }
  .banner__lead { margin-top: 56px; }
  :root { --nav-top: 10px; --nav-h: 60px; --radius-xl: 28px; --radius-lg: 26px; }
  .nav { width: calc(100% - 20px); gap: 12px; }
  .nav__brand-text { display: none; }
  .hero { padding-top: 120px; justify-content: flex-start; min-height: 100svh; }
  .hero__frame { margin-top: 12vh; }
  .hero__frame { min-height: 66vw; padding: 15vw 5vw 24px; }
  .hero__word { font-size: 19vw; margin-top: 0; }
  .hero__name { right: 3vw; top: 41vw; }
  .hero__name img { width: 52vw; }
  .about__me img { width: 120px; }
  .toc__pre img { width: 38vw; }
  .toc__title { padding-top: 14vw; }
  .hero__tags { font-size: .82rem; margin-top: 48px; }
  .toc__list { grid-template-columns: 1fr; }
  .toc__item { min-height: 150px; padding-top: 64px; }
  .toc__num { font-size: 5.6rem; }
  .toc__tag { margin-left: 120px; }
  .toc__tag img { width: 120px; } .toc__tag--folio img { width: 90px; }
  .project__suffix { margin-left: -6vw; } .project__suffix img { width: 28vw; } .project__suffix--app img { width: 22vw; }
  .toc__frame { margin-top: 56px; }
  .brand-grid { grid-template-columns: 1fr; }
  .connect__details { flex-direction: column; align-items: flex-start; gap: 0; }
  .case__meta { grid-template-columns: 1fr 1fr; }
  .case__pager { grid-template-columns: 1fr; }
  .contact-card__actions { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 44px 1fr; }
  .contact-row .copy-btn { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .hero__eyebrow { font-size: 1.15rem; }
}

/* ---------- 9. MOTION / A11Y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (hover: none) { .project__media:hover, .brand-card:hover, .toc__item:hover { transform: none; } }
