/* =========================================================
   Themes — ten complete looks for the public site
   =========================================================
   Loaded AFTER site.css. Each block does two jobs:

     1. re-points the design tokens (colour, radius, fonts, shadows)
     2. overrides the handful of component rules whose *shape* changes
        (borders, radii, heading treatment, nav chrome, button geometry)

   Step 2 is what makes these themes rather than palettes. Add a theme by
   copying a block, giving it a new [data-theme="…"] key, and registering
   that key in app/themes.py.

   Tokens a theme may set (defaults live in site.css :root):
     colour   --accent --bg --bg-alt --surface --surface-2 --fg --fg-2
              --fg-3 --line --line-2 --shadow-sm --shadow --shadow-lg --ring
     shape    --radius --border-w --border-color --card-radius --btn-radius
              --chip-radius --card-shadow --card-hover-shadow --card-hover-lift
     type     --font --serif --mono --heading-font --heading-weight
              --heading-transform --heading-spacing --display-spacing
              --kicker-color --kicker-transform --kicker-spacing
              --btn-weight --btn-text-transform
     chrome   --nav-bg --nav-blur --nav-height --body-bg-image --glow
   ========================================================= */

/* ---------------------------------------------------------
   1 · Editorial Light — the original house style
   --------------------------------------------------------- */
[data-theme="light"] {
  --accent: #4f46e5;
  --heading-font: var(--font);
}

/* ---------------------------------------------------------
   2 · Midnight — deep charcoal, indigo accent
   --------------------------------------------------------- */
[data-theme="dark"] {
  --accent: #6366f1;
  --bg: #08080b;
  --bg-alt: #0d0d12;
  --surface: #101015;
  --surface-2: #14141a;
  --fg: #f4f4f6;
  --fg-2: #a9a9b6;
  --fg-3: #71717f;
  --line: #1e1e26;
  --line-2: #2a2a34;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 6px 20px -6px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85);
  --radius: 14px;
}

/* ---------------------------------------------------------
   3 · Brutalist — hard edges, offset ink shadows
   --------------------------------------------------------- */
[data-theme="brutalist"] {
  --accent: #ff4d00;
  --bg: #f5f1e8;
  --bg-alt: #ece5d8;
  --surface: #ffffff;
  --surface-2: #f7f3ea;
  --fg: #111111;
  --fg-2: #333333;
  --fg-3: #6b6b6b;
  --line: #111111;
  --line-2: #111111;
  --radius: 0px;
  --border-w: 2px;
  --border-color: #111111;
  --card-radius: 0px;
  --btn-radius: 0px;
  --chip-radius: 0px;
  --card-shadow: 4px 4px 0 #111111;
  --card-hover-shadow: 7px 7px 0 #111111;
  --card-hover-lift: -2px;
  --shadow-sm: 2px 2px 0 #111111;
  --shadow: 4px 4px 0 #111111;
  --shadow-lg: 8px 8px 0 #111111;
  --heading-weight: 800;
  --heading-transform: uppercase;
  --heading-spacing: -.01em;
  --display-spacing: -.02em;
  --kicker-spacing: .14em;
  --btn-weight: 700;
  --btn-text-transform: uppercase;
  --nav-bg: #f5f1e8;
  --nav-blur: none;
  --glow: none;
}
[data-theme="brutalist"] .hero-headline { background: none; -webkit-text-fill-color: currentColor; color: var(--fg); font-family: var(--font); font-style: normal; }
[data-theme="brutalist"] .icon-btn { border-radius: 0; border-width: 2px; border-color: var(--fg); }
[data-theme="brutalist"] .portrait,
[data-theme="brutalist"] .about-photo,
[data-theme="brutalist"] .card-media { border-radius: 0; box-shadow: var(--shadow); }
[data-theme="brutalist"] .facts { border-width: 2px; border-color: var(--fg); border-radius: 0; }
[data-theme="brutalist"] .facts > div { border-right: 2px solid var(--fg); }
[data-theme="brutalist"] .tl-marker { border-radius: 0; border-width: 3px; }
[data-theme="brutalist"] .awards li { border-width: 2px; border-radius: 0; }
[data-theme="brutalist"] .tl-dates em { border-radius: 0; border-width: 2px; }
[data-theme="brutalist"] .field input,
[data-theme="brutalist"] .field textarea { border-width: 2px; border-radius: 0; }

/* ---------------------------------------------------------
   4 · Soft UI — extruded surfaces, no borders
   --------------------------------------------------------- */
[data-theme="neumorph"] {
  --accent: #5b7cfa;
  --bg: #e6e9ef;
  --bg-alt: #e6e9ef;
  --surface: #e6e9ef;
  --surface-2: #e6e9ef;
  --fg: #3d4658;
  --fg-2: #5a6376;
  --fg-3: #8891a3;
  --line: #d3d8e0;
  --line-2: #d3d8e0;
  --radius: 22px;
  --border-w: 0px;
  --border-color: transparent;
  --card-radius: 22px;
  --btn-radius: 16px;
  --chip-radius: 12px;
  --card-shadow: 8px 8px 18px #c3c7cf, -8px -8px 18px #ffffff;
  --card-hover-shadow: 11px 11px 24px #bfc3cb, -11px -11px 24px #ffffff;
  --card-hover-lift: 0px;
  --shadow-sm: 4px 4px 9px #cdd1d8, -4px -4px 9px #ffffff;
  --shadow: 8px 8px 18px #c3c7cf, -8px -8px 18px #ffffff;
  --shadow-lg: 14px 14px 30px #bcc0c8, -14px -14px 30px #ffffff;
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  --heading-weight: 700;
  --heading-spacing: -.02em;
  --nav-bg: #e6e9ef;
  --nav-blur: none;
  --glow: none;
}
[data-theme="neumorph"] .nav { border-bottom: 0; box-shadow: 0 6px 14px -10px rgba(60, 70, 90, .5); }
[data-theme="neumorph"] .card { border: 0; }
[data-theme="neumorph"] .card:hover { transform: none; }
[data-theme="neumorph"] .card-media { margin: 0 0 .2rem; border-radius: 16px; }
[data-theme="neumorph"] .icon-btn { border: 0; box-shadow: var(--shadow-sm); }
[data-theme="neumorph"] .icon-btn:hover { box-shadow: var(--shadow); }
[data-theme="neumorph"] .btn-ghost { border: 0; box-shadow: var(--shadow-sm); }
[data-theme="neumorph"] .btn-primary { box-shadow: 8px 8px 18px #c3c7cf, -6px -6px 14px #ffffff; }
[data-theme="neumorph"] .field input,
[data-theme="neumorph"] .field textarea { border: 0; box-shadow: inset 4px 4px 9px #c9ced6, inset -4px -4px 9px #ffffff; background: var(--bg); }
[data-theme="neumorph"] .facts { border: 0; background: transparent; gap: .7rem; }
[data-theme="neumorph"] .facts > div { border-radius: 16px; box-shadow: var(--shadow-sm); }
[data-theme="neumorph"] .awards li { border: 0; box-shadow: var(--shadow-sm); }
[data-theme="neumorph"] .chip li { border: 0; box-shadow: 2px 2px 5px #cdd1d8, -2px -2px 5px #ffffff; }
[data-theme="neumorph"] .portrait,
[data-theme="neumorph"] .about-photo { box-shadow: var(--shadow-lg); }
[data-theme="neumorph"] .hero-headline { background: none; -webkit-text-fill-color: currentColor; color: var(--accent); }

/* ---------------------------------------------------------
   5 · Glass — frosted panels over a gradient
   --------------------------------------------------------- */
[data-theme="glass"] {
  --accent: #7c5cff;
  --bg: #eef1ff;
  --bg-alt: #e6e9ff;
  --surface: rgba(255, 255, 255, .58);
  --surface-2: rgba(255, 255, 255, .42);
  --fg: #1b1b2b;
  --fg-2: #45455c;
  --fg-3: #7c7c96;
  --line: rgba(255, 255, 255, .75);
  --line-2: rgba(124, 92, 255, .35);
  --radius: 20px;
  --border-w: 1px;
  --border-color: rgba(255, 255, 255, .7);
  --card-radius: 20px;
  --btn-radius: 14px;
  --card-shadow: 0 12px 40px -18px rgba(80, 60, 180, .5);
  --card-hover-shadow: 0 22px 60px -20px rgba(80, 60, 180, .55);
  --shadow-sm: 0 2px 10px -4px rgba(80, 60, 180, .35);
  --shadow: 0 14px 44px -20px rgba(80, 60, 180, .5);
  --shadow-lg: 0 34px 80px -30px rgba(80, 60, 180, .55);
  --heading-weight: 650;
  --body-bg-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(124, 92, 255, .38), transparent 60%),
    radial-gradient(1000px 620px at 92% 4%, rgba(56, 189, 248, .34), transparent 58%),
    radial-gradient(900px 700px at 50% 110%, rgba(236, 72, 153, .26), transparent 60%);
  --nav-bg: rgba(255, 255, 255, .5);
  --nav-blur: saturate(180%) blur(22px);
}
[data-theme="glass"] body { background-attachment: fixed; }
[data-theme="glass"] .card,
[data-theme="glass"] .skill-group,
[data-theme="glass"] .awards li,
[data-theme="glass"] .form { backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
[data-theme="glass"] .nav { border-bottom: 1px solid rgba(255, 255, 255, .5); }
[data-theme="glass"] .sec.alt { background: rgba(255, 255, 255, .28); }
[data-theme="glass"] .contact { background: rgba(255, 255, 255, .28); }
[data-theme="glass"] .icon-btn { backdrop-filter: blur(12px); background: rgba(255, 255, 255, .5); }
[data-theme="glass"] .hero-headline { background: linear-gradient(120deg, var(--fg) 20%, var(--accent) 60%, #38bdf8); -webkit-background-clip: text; background-clip: text; }

/* ---------------------------------------------------------
   6 · Terminal — phosphor green on black, monospaced
   --------------------------------------------------------- */
[data-theme="terminal"] {
  --accent: #39ff88;
  --bg: #0b0f0b;
  --bg-alt: #0e130e;
  --surface: #0f1410;
  --surface-2: #131a14;
  --fg: #d6ffe0;
  --fg-2: #8fd6a5;
  --fg-3: #5f8f6f;
  --line: rgba(57, 255, 136, .22);
  --line-2: rgba(57, 255, 136, .4);
  --radius: 4px;
  --font: var(--mono);
  --heading-font: var(--mono);
  --border-w: 1px;
  --border-color: rgba(57, 255, 136, .28);
  --card-radius: 4px;
  --btn-radius: 4px;
  --chip-radius: 3px;
  --card-shadow: 0 0 0 1px rgba(57, 255, 136, .18), 0 0 22px -8px rgba(57, 255, 136, .45);
  --card-hover-shadow: 0 0 0 1px rgba(57, 255, 136, .4), 0 0 30px -6px rgba(57, 255, 136, .6);
  --card-hover-lift: 0px;
  --shadow-sm: 0 0 12px -6px rgba(57, 255, 136, .5);
  --shadow: 0 0 24px -8px rgba(57, 255, 136, .5);
  --shadow-lg: 0 0 60px -18px rgba(57, 255, 136, .55);
  --heading-weight: 600;
  --heading-transform: uppercase;
  --heading-spacing: .02em;
  --display-spacing: 0;
  --kicker-transform: lowercase;
  --kicker-spacing: .06em;
  --btn-weight: 600;
  --btn-text-transform: uppercase;
  --nav-bg: rgba(11, 15, 11, .82);
  --nav-blur: blur(10px);
}
[data-theme="terminal"] body { font-variant-ligatures: none; }
[data-theme="terminal"] .kicker::before { content: "> "; color: var(--accent); }
[data-theme="terminal"] .kicker { letter-spacing: .06em; }
[data-theme="terminal"] .hero-headline { background: none; -webkit-text-fill-color: currentColor; color: var(--accent); font-family: var(--mono); font-style: normal; text-shadow: 0 0 18px rgba(57, 255, 136, .45); }
[data-theme="terminal"] .hero-name::before { content: "$ "; color: var(--fg-3); }
[data-theme="terminal"] .brand .dot { border-radius: 0; box-shadow: 0 0 12px rgba(57, 255, 136, .8); }
[data-theme="terminal"] .pulse { border-radius: 0; }
[data-theme="terminal"] .btn-primary { color: #04150b; }
[data-theme="terminal"] .btn-primary:hover { box-shadow: 0 0 24px -4px rgba(57, 255, 136, .8); }
[data-theme="terminal"] .tl-marker { border-radius: 0; box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(57, 255, 136, .7); }
[data-theme="terminal"] .portrait::after { mix-blend-mode: screen; }
[data-theme="terminal"] .ava { border-radius: 3px; }
[data-theme="terminal"] .quote figcaption img { border-radius: 3px; }

/* ---------------------------------------------------------
   7 · Retro Print — warm paper, chunky serif, flat shadows
   --------------------------------------------------------- */
[data-theme="retro"] {
  --accent: #c2410c;
  --bg: #fdf6e3;
  --bg-alt: #f6ecd4;
  --surface: #fffdf5;
  --surface-2: #fbf4e2;
  --fg: #2b2118;
  --fg-2: #55463a;
  --fg-3: #8a7a68;
  --line: #e2d5bb;
  --line-2: #cdbb99;
  --radius: 6px;
  --heading-font: var(--serif);
  --heading-weight: 400;
  --heading-spacing: -.01em;
  --display-spacing: -.02em;
  --border-w: 1px;
  --border-color: #d8c8a8;
  --card-radius: 6px;
  --btn-radius: 6px;
  --chip-radius: 4px;
  --card-shadow: 3px 3px 0 rgba(43, 33, 24, .16);
  --card-hover-shadow: 5px 5px 0 rgba(43, 33, 24, .24);
  --card-hover-lift: -2px;
  --shadow-sm: 2px 2px 0 rgba(43, 33, 24, .12);
  --shadow: 4px 4px 0 rgba(43, 33, 24, .16);
  --shadow-lg: 6px 6px 0 rgba(43, 33, 24, .2);
  --kicker-color: #a33a10;
  --btn-weight: 600;
  --body-bg-image:
    repeating-linear-gradient(0deg, rgba(43, 33, 24, .022) 0 1px, transparent 1px 4px);
  --nav-bg: #fdf6e3;
  --nav-blur: none;
}
[data-theme="retro"] h1, [data-theme="retro"] h2, [data-theme="retro"] h3 { font-family: var(--serif); font-weight: 400; }
[data-theme="retro"] .hero-headline { font-family: var(--serif); font-style: italic; background: none; -webkit-text-fill-color: currentColor; color: var(--accent); }
[data-theme="retro"] .quote blockquote { font-size: 1.2rem; }
[data-theme="retro"] .nav { border-bottom: 1px solid var(--line-2); }
[data-theme="retro"] .icon-btn { border-radius: 6px; }

/* ---------------------------------------------------------
   8 · Magazine — big serif headlines, hairline rules
   --------------------------------------------------------- */
[data-theme="magazine"] {
  --accent: #b91c1c;
  --bg: #ffffff;
  --bg-alt: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --fg: #141414;
  --fg-2: #3d3d3d;
  --fg-3: #767676;
  --line: #e4e4e4;
  --line-2: #141414;
  --radius: 2px;
  --heading-font: var(--serif);
  --heading-weight: 400;
  --heading-spacing: -.02em;
  --display-spacing: -.03em;
  --border-w: 1px;
  --border-color: #e4e4e4;
  --card-radius: 0px;
  --btn-radius: 2px;
  --chip-radius: 2px;
  --card-shadow: none;
  --card-hover-shadow: none;
  --card-hover-lift: 0px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --kicker-color: var(--accent);
  --kicker-spacing: .22em;
  --btn-weight: 600;
  --btn-text-transform: uppercase;
  --nav-blur: none;
  --nav-bg: #ffffff;
}
[data-theme="magazine"] h1 { font-size: clamp(2.9rem, 7vw, 5.2rem); }
[data-theme="magazine"] h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
[data-theme="magazine"] .sec-head { border-bottom: 2px solid var(--fg); padding-bottom: .8rem; max-width: none; }
[data-theme="magazine"] .sec-head h2 { margin-bottom: 0; }
[data-theme="magazine"] .kicker { display: flex; align-items: center; gap: .7rem; }
[data-theme="magazine"] .kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }
[data-theme="magazine"] .hero-headline { background: none; -webkit-text-fill-color: currentColor; color: var(--fg); font-style: normal; }
[data-theme="magazine"] .card { border: 0; border-top: 3px solid var(--fg); border-radius: 0; padding: 1.2rem 0 1.4rem; }
[data-theme="magazine"] .card:hover { transform: none; border-color: var(--accent); }
[data-theme="magazine"] .card-media { margin: 0 0 .4rem; border-radius: 0; }
[data-theme="magazine"] .grid.cards { gap: 0 2rem; }
[data-theme="magazine"] .icon-btn { border-radius: 0; border-color: var(--fg); }
[data-theme="magazine"] .portrait, [data-theme="magazine"] .about-photo { border-radius: 0; box-shadow: none; border: 1px solid var(--line); }
[data-theme="magazine"] .facts { border-radius: 0; border-left: 0; border-right: 0; }
[data-theme="magazine"] .awards li { border-radius: 0; border-left: 0; border-right: 0; }
[data-theme="magazine"] .tl-marker { border-radius: 0; border-color: var(--fg); }
[data-theme="magazine"] .chip li { border-radius: 0; }
[data-theme="magazine"] .nav { border-bottom: 2px solid var(--fg); }

/* ---------------------------------------------------------
   9 · Playful — rounded, pastel, a little bouncy
   --------------------------------------------------------- */
[data-theme="playful"] {
  --accent: #ec4899;
  --bg: #fff7fb;
  --bg-alt: #fdeef6;
  --surface: #ffffff;
  --surface-2: #fff2f8;
  --fg: #2a1a33;
  --fg-2: #5c4a66;
  --fg-3: #9484a0;
  --line: #f6d9ea;
  --line-2: #f0b8d6;
  --radius: 24px;
  --heading-weight: 800;
  --heading-spacing: -.03em;
  --display-spacing: -.04em;
  --border-w: 2px;
  --border-color: #f6d9ea;
  --card-radius: 26px;
  --btn-radius: 999px;
  --chip-radius: 999px;
  --card-shadow: 0 10px 26px -14px rgba(236, 72, 153, .5);
  --card-hover-shadow: 0 20px 40px -16px rgba(236, 72, 153, .6);
  --card-hover-lift: -6px;
  --shadow-sm: 0 3px 10px -5px rgba(236, 72, 153, .45);
  --shadow: 0 12px 30px -14px rgba(236, 72, 153, .5);
  --shadow-lg: 0 30px 60px -24px rgba(236, 72, 153, .55);
  --kicker-color: #db2777;
  --kicker-spacing: .12em;
  --btn-weight: 700;
  --body-bg-image:
    radial-gradient(760px 420px at 8% 0%, rgba(236, 72, 153, .12), transparent 62%),
    radial-gradient(680px 420px at 96% 6%, rgba(56, 189, 248, .14), transparent 60%),
    radial-gradient(700px 520px at 50% 108%, rgba(250, 204, 21, .16), transparent 60%);
  --nav-bg: rgba(255, 247, 251, .8);
}
[data-theme="playful"] .card:hover { transform: translateY(var(--card-hover-lift)) rotate(-.4deg); }
[data-theme="playful"] .btn:hover { transform: translateY(-2px) scale(1.03); }
[data-theme="playful"] .icon-btn { border-radius: 50%; border-width: 2px; }
[data-theme="playful"] .icon-btn:hover { transform: translateY(-1px) rotate(-8deg); }
[data-theme="playful"] .hero-headline { background: linear-gradient(120deg, #ec4899, #8b5cf6 55%, #38bdf8); -webkit-background-clip: text; background-clip: text; }
[data-theme="playful"] .portrait { border-radius: 30px; }
[data-theme="playful"] .facts { border-radius: 26px; border-width: 2px; }
[data-theme="playful"] .awards li { border-radius: 18px; border-width: 2px; }
[data-theme="playful"] .svc-ic, [data-theme="playful"] .aw-ic { border-radius: 50%; }
[data-theme="playful"] .field input,
[data-theme="playful"] .field textarea { border-width: 2px; border-radius: 18px; }
[data-theme="playful"] .pulse { background: #ec4899; }
[data-theme="playful"] .pulse::after { background: #ec4899; }

/* ---------------------------------------------------------
   10 · Noir Luxe — near-black, gold hairlines, wide tracking
   --------------------------------------------------------- */
[data-theme="lux"] {
  --accent: #c8a45c;
  --bg: #0b0b0c;
  --bg-alt: #0f0f11;
  --surface: #121214;
  --surface-2: #17171a;
  --fg: #f3efe6;
  --fg-2: #b3ad9f;
  --fg-3: #7d776b;
  --line: rgba(200, 164, 92, .22);
  --line-2: rgba(200, 164, 92, .45);
  --radius: 2px;
  --heading-font: var(--serif);
  --heading-weight: 400;
  --heading-transform: uppercase;
  --heading-spacing: .1em;
  --display-spacing: .06em;
  --border-w: 1px;
  --border-color: rgba(200, 164, 92, .28);
  --card-radius: 2px;
  --btn-radius: 2px;
  --chip-radius: 2px;
  --card-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9);
  --card-hover-shadow: 0 26px 60px -28px rgba(200, 164, 92, .35);
  --card-hover-lift: -2px;
  --shadow-sm: 0 2px 10px -6px rgba(0, 0, 0, .9);
  --shadow: 0 18px 46px -28px rgba(0, 0, 0, .95);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 1);
  --kicker-color: var(--accent);
  --kicker-spacing: .3em;
  --btn-weight: 500;
  --btn-text-transform: uppercase;
  --nav-bg: rgba(11, 11, 12, .9);
  --nav-blur: blur(12px);
}
[data-theme="lux"] h1, [data-theme="lux"] h2, [data-theme="lux"] h3 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
[data-theme="lux"] h1 { line-height: 1.25; }
[data-theme="lux"] .hero-headline { background: none; -webkit-text-fill-color: currentColor; color: var(--accent); font-style: normal; letter-spacing: .06em; }
[data-theme="lux"] .hero-name { letter-spacing: .3em; text-transform: uppercase; font-size: .34em; color: var(--fg-3); }
[data-theme="lux"] .btn { letter-spacing: .14em; font-size: .8rem; }
[data-theme="lux"] .btn-primary { color: #0b0b0c; }
[data-theme="lux"] .kicker::after { content: ""; display: block; width: 40px; height: 1px; background: var(--accent); margin-top: .55rem; }
[data-theme="lux"] .nav-links a { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
[data-theme="lux"] .tl-marker { border-color: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(200, 164, 92, .25); }
[data-theme="lux"] .portrait, [data-theme="lux"] .about-photo { border: 1px solid var(--line-2); }
[data-theme="lux"] .facts { border-radius: 0; }
[data-theme="lux"] .awards li { border-radius: 0; }
[data-theme="lux"] .brand { letter-spacing: .16em; text-transform: uppercase; font-size: .86rem; }
