/* ==========================================================================
   Jay Desai — Portfolio
   Design system: editorial dark + gold (see design-system/jay-desai-portfolio/MASTER.md)
   Fonts: Playfair Display (display) / Inter (body)
   ========================================================================== */

:root {
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-xs: .25rem; --space-sm: .5rem; --space-md: 1rem; --space-lg: 1.5rem;
  --space-xl: 2rem; --space-2xl: 3rem; --space-3xl: 4rem;

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1180px;
}

/* Dark is the default (the brand look) */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-2: #141110;
  --card: rgba(255, 255, 255, .035);
  --card-hover: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .10);
  --fg: #fafaf9;
  --muted: #a8a29e;           /* 7.7:1 on bg */
  --accent: #e0b04a;          /* gold, 9.6:1 on bg */
  --accent-strong: #f0c564;
  --on-accent: #1c1917;
  --glass: rgba(20, 17, 16, .62);
  --glow: rgba(224, 176, 74, .16);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --grain-opacity: .06;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf9;
  --bg-2: #f1efec;
  --card: rgba(255, 255, 255, .75);
  --card-hover: #fff;
  --border: rgba(28, 25, 23, .13);
  --fg: #0c0a09;
  --muted: #57534e;           /* 7.4:1 on bg */
  --accent: #8a5206;          /* 6.1:1 on bg */
  --accent-strong: #6f4204;
  --on-accent: #ffffff;
  --glass: rgba(250, 250, 249, .72);
  --glow: rgba(161, 98, 7, .13);
  --shadow: 0 20px 40px -22px rgba(28, 25, 23, .28);
  --grain-opacity: .035;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 1rem; }
.muted { color: var(--muted); }
.ic { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, var(--glow), transparent 65%); animation: drift 26s ease-in-out infinite alternate; }
.b2 { width: 38vmax; height: 38vmax; right: -10vmax; top: 38vh; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%); animation: drift 32s ease-in-out infinite alternate-reverse; }
.grain {
  position: absolute; inset: 0; opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.1); } }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--border);
}

/* ---------- Navigation ---------- */
.nav-wrap { position: fixed; top: .85rem; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding-inline: 1rem; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(100%, 860px); padding: .45rem .5rem .45rem 1rem; border-radius: 999px; box-shadow: var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 600; letter-spacing: .01em; min-height: 44px; }
.mono { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--font-display); font-style: italic; font-size: .95rem; }
.brand-name { display: none; }
.nav-links { display: none; align-items: center; gap: .15rem; }
.nav-links a { display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--muted); transition: color .2s, background-color .2s; min-height: 44px; line-height: 1.7; }
.nav-links a:hover { color: var(--fg); background: var(--card); }
.nav-links a.active { color: var(--fg); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.nav-actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--fg); cursor: pointer; transition: background-color .2s, border-color .2s; }
.icon-btn:hover { background: var(--card); border-color: var(--border); }
.ic-moon { display: none; }
:root[data-theme="light"] .ic-sun { display: none; }
:root[data-theme="light"] .ic-moon { display: block; }
.icon-btn .ic { width: 1.25rem; height: 1.25rem; }

.burger { position: relative; width: 20px; height: 14px; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger i:first-child { top: 2px; } .burger i:last-child { top: 10px; }
.menu-btn[aria-expanded="true"] .burger i:first-child { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:last-child { top: 6px; transform: rotate(-45deg); }

/* Mobile menu */
@media (max-width: 859px) {
  .nav-links {
    position: absolute; top: calc(100% + .6rem); left: 1rem; right: 1rem;
    display: flex; flex-direction: column; align-items: stretch; gap: .15rem;
    padding: .6rem; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-2); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: .85rem 1rem; font-size: 1rem; }
}
@media (min-width: 860px) {
  .brand-name { display: inline; }
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px; border: 1px solid transparent; font: 500 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s, color .25s; }
.btn-sm { min-height: 44px; padding: .6rem 1.15rem; font-size: .88rem; }
.btn-lg { min-height: 54px; padding: .9rem 1.7rem; }
.btn-gold { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-gold:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 14px 30px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); background: var(--card); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .ic { transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translate(2px, -2px); }
.btn:has(use[href="#i-down"]):hover .ic { transform: translateY(2px); }

/* ---------- Type ---------- */
.display { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 6.2vw, 4.9rem); line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
.display-sm { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
.h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 54ch; }
.kicker { display: inline-flex; align-items: center; gap: .7rem; font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); padding: .4rem .9rem .4rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); margin-bottom: 1.5rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); position: relative; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 7.5rem 0 4rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-copy .lead { margin-top: 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.social { display: flex; gap: .5rem; margin-top: 2rem; }
.social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: color .2s, border-color .2s, transform .25s var(--ease), background-color .2s; }
.social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); background: var(--card); }
.social .ic { width: 1.2rem; height: 1.2rem; }

.portrait { position: relative; justify-self: center; width: min(78vw, 400px); }
.arch { position: relative; aspect-ratio: 4 / 5; border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg-2); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 30%; transform: scale(1.12); }
.arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12, 10, 9, .45)); }
.ring { position: absolute; inset: -14px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px 999px 34px 34px; z-index: -1; transform: rotate(3deg); }
.chip { position: absolute; display: inline-flex; flex-direction: column; gap: 0; padding: .55rem .95rem; border-radius: 14px; font-size: .78rem; line-height: 1.3; color: var(--muted); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.chip b { color: var(--fg); font-size: .95rem; font-weight: 600; }
.chip-a { left: -8%; bottom: 16%; }
.chip-b { right: -6%; top: 14%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-9px); } }

.scroll-cue { position: absolute; left: 50%; bottom: 1.4rem; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--border); border-radius: 14px; display: none; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.9s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; gap: 4rem; }
  .portrait { width: 100%; max-width: 420px; justify-self: end; }
  .scroll-cue { display: block; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--border); background: color-mix(in srgb, var(--bg-2) 70%, transparent); overflow: hidden; padding-block: 1.1rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; }
.marquee li { display: flex; align-items: center; white-space: nowrap; font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--muted); }
.marquee li::after { content: "✦"; font-style: normal; font-size: .6em; color: var(--accent); margin-inline: 1.6rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2rem; }
.about-body { display: grid; gap: 1.2rem; color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.about-body p:first-child { color: var(--fg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.stat { padding: 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); display: flex; flex-direction: column-reverse; gap: .5rem; }
.stat dd { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1; color: var(--accent); }
.stat dt { font-size: .8rem; line-height: 1.4; color: var(--muted); }
@media (min-width: 900px) { .about-grid { grid-template-columns: .8fr 1.2fr; gap: 4rem; } }

/* ---------- Cards (with pointer spotlight) ---------- */
.card { position: relative; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); transition: border-color .3s, background-color .3s, transform .4s var(--ease), box-shadow .4s; }
.spot { overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%); }
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--card-hover); }

/* ---------- Experience ---------- */
.exp-grid { display: grid; gap: 2.5rem; }
.exp-head .muted { margin-top: 1.2rem; max-width: 38ch; }
.timeline { position: relative; display: grid; gap: 1.4rem; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 1px; background: linear-gradient(var(--accent), var(--border) 30%, var(--border)); }
.tl-item { position: relative; display: grid; gap: .6rem; }
.tl-item::before { content: ""; position: absolute; left: calc(-1.4rem - 4.5px); top: .55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-meta time { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.tl-card { padding: 1.5rem; }
.tl-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.org { margin-top: .3rem; font-weight: 500; }
.org span { font-weight: 400; color: var(--muted); }
.tl-card ul { margin-top: 1rem; display: grid; gap: .55rem; color: var(--muted); font-size: .96rem; }
.tl-card li { position: relative; padding-left: 1.1rem; }
.tl-card li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .8; }
.path { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--border); font-size: .85rem; color: var(--muted); }
.tag { font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (min-width: 900px) {
  .exp-grid { grid-template-columns: .8fr 1.2fr; gap: 4rem; }
  .exp-head { position: sticky; top: 7rem; align-self: start; }
}

/* ---------- Work (bento) ---------- */
.bento { display: grid; gap: 1.1rem; }
.proj { padding: 1.7rem; display: flex; flex-direction: column; gap: .75rem; min-height: 100%; }
.proj:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.proj-no { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--accent); }
.proj h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.2; }
.proj-when { font-size: .82rem; letter-spacing: .04em; color: var(--muted); }
.proj p:not(.proj-when) { color: var(--muted); font-size: .96rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .6rem; }
.tags li, .chips li { font-size: .78rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.link { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; min-height: 44px; margin-top: .2rem; font-weight: 500; font-size: .92rem; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--accent); padding-block: .5rem .15rem; transition: color .2s, gap .25s var(--ease); }
.link:hover { color: var(--accent); gap: .7rem; }
.more { margin-top: 2rem; text-align: center; color: var(--muted); }
.more a { color: var(--accent); }
.p-lg h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.p-lg p:not(.proj-when) { font-size: 1.02rem; max-width: 46ch; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .p-lg { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .p-lg { grid-column: span 4; }
  .p-md { grid-column: span 2; }
  .p-half { grid-column: span 3; }
}

/* ---------- Skills ---------- */
.skills { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.skill { padding: 1.5rem; }
.skill h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { transition: color .2s, border-color .2s, background-color .2s; }
.skill:hover .chips li { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; gap: 3rem; }
.edu { display: grid; gap: 1.6rem; margin-top: 2rem; }
.edu li { padding-left: 1.2rem; border-left: 1px solid var(--accent); }
.edu time { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.edu h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; line-height: 1.3; margin-top: .3rem; }
.edu p { color: var(--muted); font-size: .95rem; margin-top: .3rem; }
.certs { display: grid; gap: .7rem; margin-top: 1.4rem; }
.certs .card { padding: 1rem 1.2rem; display: grid; gap: .1rem; border-radius: var(--radius-sm); }
.certs .card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateX(4px); }
.certs span { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.certs b { font-weight: 500; }
.certs em { font-family: var(--font-body); font-size: .82rem; color: var(--muted); }
@media (min-width: 900px) { .cred-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Contact ---------- */
.contact-card { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(1.8rem, 5vw, 4rem); box-shadow: var(--shadow); }
.contact-card::before { content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -15%; top: -40%; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.contact-card > * { position: relative; }
.contact-card .lead { margin-top: 1.2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.form { display: grid; gap: 1.1rem; margin-top: 2.6rem; padding-top: 2.2rem; border-top: 1px solid var(--border); }
.field { display: grid; gap: .45rem; }
.field label { font-size: .85rem; font-weight: 500; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--fg); background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem 1rem; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.field [aria-invalid="true"] { border-color: #ef4444; }
.err { color: #f87171; font-size: .82rem; }
:root[data-theme="light"] .err { color: #b91c1c; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-foot small { font-size: .82rem; }
@media (min-width: 720px) {
  .form { grid-template-columns: 1fr 1fr; }
  .form .full { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer a { display: inline-block; padding-block: .6rem; text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- DigiSpace feature card + contact note (v2) ---------- */
.proj.feature { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.proj.feature h3 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.proj.feature p:not(.proj-when) { font-size: 1.05rem; max-width: 62ch; }
.p-full { grid-column: 1 / -1; }
.contact-note { margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.contact-note b { color: var(--fg); font-weight: 500; }
