/* Desktop typography system: three voices (Space Grotesk / Inter / JetBrains Mono), one size scale, soft tile gradients.
   Every rule below is scoped to html:not(.phone-mode), so the phone UI is untouched. Edit the tokens in :root to retune. */
:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* one scale: use only these */
  --t-xs: .8125rem;   /* 13px  labels, tags, pills, meta */
  --t-sm: .9375rem;   /* 15px  card text, nav, buttons */
  --t-base: 1rem;     /* 16px  body */
  --t-md: 1.125rem;   /* 18px  card titles */
  --t-lg: 1.375rem;   /* 22px  hero role */
  --t-xl: clamp(1.75rem, 1.3rem + 1.3vw, 2.3rem);    /* section titles */
  --t-hero: clamp(2.75rem, 1.5rem + 3.7vw, 4.5rem);  /* name */
  --lh-tight: 1.12; --lh-snug: 1.3; --lh-body: 1.65;
}
@property --g { syntax: "<number>"; inherits: false; initial-value: .14; }

html:not(.phone-mode) body { font-family: var(--font-text); font-size: var(--t-base); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-optical-sizing: auto; }
html:not(.phone-mode) h1,
html:not(.phone-mode) h2,
html:not(.phone-mode) h3,
html:not(.phone-mode) h4 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.02em; text-wrap: balance; }
html:not(.phone-mode) p,
html:not(.phone-mode) li { text-wrap: pretty; }
html:not(.phone-mode) .mono { font-family: var(--font-mono); }
html:not(.phone-mode) .logo { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; }
html:not(.phone-mode) .nav__link { font-size: var(--t-sm); font-weight: 500; letter-spacing: .005em; }
html:not(.phone-mode) .btn { font-family: var(--font-text); font-size: var(--t-sm); font-weight: 500; letter-spacing: .005em; }
/* hero */
html:not(.phone-mode) .hero__hello { font: 500 var(--t-xs)/1.2 var(--font-mono); letter-spacing: .04em; }
html:not(.phone-mode) .hero__title { font-size: var(--t-hero); font-weight: 300; line-height: 1.02; letter-spacing: -.035em; }
html:not(.phone-mode) .hero__title .grad { font-weight: 700; }
html:not(.phone-mode) .hero__role { font-size: var(--t-lg); font-weight: 500; line-height: var(--lh-snug); letter-spacing: -.01em; margin: 1rem 0 1.1rem; min-height: 1.4em; }
html:not(.phone-mode) .hero__desc { font-size: 1.0625rem; line-height: 1.7; max-width: 54ch; }
html:not(.phone-mode) .chip { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 500; }
html:not(.phone-mode) .stats { gap: 2.25rem; }
html:not(.phone-mode) .stat__row { display: flex; align-items: baseline; gap: .45rem; }
html:not(.phone-mode) .stat__pre { font: 500 var(--t-xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
html:not(.phone-mode) .stat__num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
html:not(.phone-mode) .stat__plus { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1; margin-left: -.3rem; }
html:not(.phone-mode) .stat p { font: 400 var(--t-xs)/1.5 var(--font-mono); letter-spacing: .01em; color: var(--muted); margin-top: .5rem; }
/* sections + cards */
html:not(.phone-mode) .section__title { font-size: var(--t-xl); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
html:not(.phone-mode) .section__title .mono { font: 500 var(--t-xs)/1 var(--font-mono); letter-spacing: .06em; }
html:not(.phone-mode) .section__desc { font-size: var(--t-base); line-height: var(--lh-body); }
html:not(.phone-mode) .card h3 { font-size: var(--t-md); font-weight: 600; line-height: var(--lh-snug); letter-spacing: -.015em; }
html:not(.phone-mode) .card p { font-size: var(--t-sm); line-height: 1.65; }
html:not(.phone-mode) .pill { font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 400; letter-spacing: .01em; }
html:not(.phone-mode) .tags li { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0; }
html:not(.phone-mode) .exp p,
html:not(.phone-mode) .timeline .card p { max-width: 70ch; }
html:not(.phone-mode) .timeline .card .pill { margin-bottom: .6rem; }
html:not(.phone-mode) .project__link { font-size: var(--t-sm); font-weight: 500; }
html:not(.phone-mode) .marquee__track span { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; color: rgba(180, 192, 230, .24); -webkit-text-stroke: 0; }
html:not(.phone-mode) .marquee__track span:hover { color: var(--secondary); -webkit-text-stroke: 0; }
html:not(.phone-mode) .gh__title { font-size: var(--t-md); }
html:not(.phone-mode) .repo h4 { font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; }
html:not(.phone-mode) .repo p { font-size: var(--t-sm); }
html:not(.phone-mode) .repo__meta { font-family: var(--font-mono); font-size: var(--t-xs); }
html:not(.phone-mode) .field input,
html:not(.phone-mode) .field textarea { font-size: var(--t-base); padding-top: 1.4rem; padding-bottom: .55rem; }
html:not(.phone-mode) .field label { font-size: var(--t-sm); }
html:not(.phone-mode) .field input:focus + label,
html:not(.phone-mode) .field textarea:focus + label,
html:not(.phone-mode) .field input:not(:placeholder-shown) + label,
html:not(.phone-mode) .field textarea:not(:placeholder-shown) + label { font-size: var(--t-xs); }
html:not(.phone-mode) .footer { font-size: var(--t-sm); }
/* tile gradients: ONE palette per section, identical on every tile in it, so rows never look uneven.
   Each palette is two colours (--c1 top-left glow, --c2 bottom-right glow). The glows have a fixed pixel size,
   so a short card and a tall card look exactly the same. Hover strengthens them. */
html:not(.phone-mode) .card { --c1: 92, 142, 255; --c2: 180, 108, 255; --acc: var(--c1); --g: .16;
  background: radial-gradient(circle 300px at 0% 0%, rgba(var(--c1), var(--g)), transparent 72%), radial-gradient(circle 260px at 100% 100%, rgba(var(--c2), calc(var(--g) * .7)), transparent 72%), var(--bg-alt);
  box-shadow: inset 0 1px 0 rgba(var(--c1), .3), var(--shadow); transition: border-color .3s, box-shadow .3s, --g .35s ease; }
html:not(.phone-mode) .card:hover { --g: .26; border-color: rgba(var(--c1), .6); }
html:not(.phone-mode) body.light .card { --g: .11; }
html:not(.phone-mode) body.light .card:hover { --g: .18; }
html:not(.phone-mode) #projects .card { --c1: 255, 30, 45; --c2: 150, 15, 40; --tag: 255, 255, 255; --tag-a: .08; --ico: 92, 142, 255; }
html:not(.phone-mode) #skills .card { --c1: 0, 229, 255; --c2: 92, 142, 255; }
html:not(.phone-mode) #achievements .card { --c1: 255, 120, 170; --c2: 180, 108, 255; --acc: 255, 184, 77; }
html:not(.phone-mode) #experience .card { --c1: 0, 229, 255; --c2: 92, 142, 255; }
html:not(.phone-mode) #education .card { --c1: 61, 220, 151; --c2: 0, 229, 255; }
html:not(.phone-mode) #research .card { --c1: 180, 108, 255; --c2: 92, 142, 255; }
html:not(.phone-mode) .project__icon,
html:not(.phone-mode) .exp__icon,
html:not(.phone-mode) .skill h3 i,
html:not(.phone-mode) .ach i { color: rgb(var(--ico, var(--acc))); }
html:not(.phone-mode) .card .pill { color: rgb(var(--acc)); border-color: rgba(var(--acc), .38); }
html:not(.phone-mode) .card .tags li { background: rgba(var(--tag, var(--acc)), var(--tag-a, .14)); }
