/* ==========================================================================
   Themes: dark (default) and light, switched by data-theme on <html>.
   Loaded after site.css. Dark overrides the tokens and the few rules that
   used ink as a background; light keeps site.css's own pattern (dark footer
   and reflection bands on a light page) with its own tokens.
   ========================================================================== */

/* ---------- dark (default) ---------- */
:root {
    --paper: #0a0a0c;
    --paper-2: #131317;
    --white: #17171b;
    --ink: #f3eff2;
    --ink-soft: #aaa3a9;
    --line: #3a363d;

    --display: #f98fbf;          /* soft, light pink, 9:1 on --paper */
    --band: #9e1f5c;             /* richer berry, 6.9:1 with --band-ink */
    --tab-active: #2b1420;
    --hero-glow: rgba(240, 86, 154, .20);
    --hero-glow-2: rgba(158, 31, 92, .16);
}
html:not([data-theme="light"]) { color-scheme: dark; }

/* sections that used ink as their background stay dark, a step off black */
html:not([data-theme="light"]) :is(.dark, .site-footer, .cs-video, .cs-cover--dark, .cs-cover video, .gcard-img--dark) { background: #000; color: var(--ink); }
html:not([data-theme="light"]) .site-footer { border-top: 1px solid var(--line); }
html:not([data-theme="light"]) :is(.say-hi, .next .section-title, .reflection .section-title) { color: var(--ink); }
.ai-flow b.key { color: #111; }

/* ---------- light ---------- */
:root[data-theme="light"] {
    --paper: #f7f4f0;
    --paper-2: #efebe5;
    --white: #ffffff;
    --ink: #1a1719;              /* 16:1 on --paper */
    --ink-soft: #5d5754;         /* 6.5:1 */
    --line: #d8d2cb;

    --display: #c42a72;          /* deeper pink so it reads on light: 4.9:1 */
    --band: #9e1f5c;
    --tab-active: #f5dbe7;
    --hero-glow: rgba(249, 143, 191, .30);
    --hero-glow-2: rgba(196, 42, 114, .05);
    color-scheme: light;
}
/* the dark footer / reflection bands keep their light type */
:root[data-theme="light"] :is(.site-footer, .dark) { --line: #3a363d; }

body { background: var(--paper); }

/* no flat circles in this version */
.circle { display: none; }

/* ---------- hero with the 3D scene ---------- */
.hero {
    background:
        radial-gradient(60% 60% at 50% 34%, var(--hero-glow), transparent 70%),
        radial-gradient(40% 50% at 10% 90%, var(--hero-glow-2), transparent 70%),
        var(--paper);
}
.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; pointer-events: none; }
.hero-copy { z-index: 2; }

/* Centred, one-screen hero: the 3D "HELLO" on top, then name, role, statement.
   (The copy stays first in the HTML so it is read first.) */
.hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    align-items: stretch;
    min-height: calc(100svh - var(--tabs-h));
    max-height: 1100px;
    text-align: center;
}
.hero-hello { order: -1; position: relative; width: 100%; min-height: clamp(220px, 44svh, 560px); display: grid; place-items: center; }
.hero-copy { padding: 0 var(--gutter) clamp(28px, 6svh, 64px); display: flex; flex-direction: column; align-items: center; }
.hero-title--name { font-size: clamp(2.4rem, 4.2vw, 3.8rem); letter-spacing: .01em; color: var(--ink); }
.hero-sub--role { margin-top: .9em; }
.hero-statement { margin: clamp(.9rem, 2.4svh, 1.6rem) auto 0; max-width: 24em; }
.hero .hero-actions { justify-content: center; margin-top: clamp(1.1rem, 3svh, 2rem); }

/* An image of the exact first 3D frame shows instantly; the live scene fades in
   over it once every model, texture and shader is ready, so the switch is invisible. */
.hello-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: opacity .5s ease .15s; }
.hero-3d { opacity: 0; transition: opacity .5s ease; }
.hero.is-live .hero-3d { opacity: 1; }
.hero.is-live .hello-poster { opacity: 0; }
@media (max-width: 960px) {
    .hero { min-height: 0; grid-template-rows: auto auto; }
    .hero-hello { min-height: clamp(240px, 38svh, 360px); margin: 16px 0 8px; }
}
@media (max-width: 640px) {
    /* one-row HELLO on phones: a shorter stage, so the text moves up under it */
    .hero-hello { min-height: clamp(150px, 44vw, 230px); margin: 28px 0 12px; }
    .hero-copy { padding-top: 0; }
}

/* ---------- 3D asterisks across the page ---------- */
.ast-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
.ast-3d .asterisk svg { visibility: hidden; }          /* drawn in chrome by asterisks3d.js */
.ast-3d .hero:not(.has-3d) .asterisk svg { visibility: visible; }
.ast-3d .say-hi span { color: transparent; }


/* on black, the solid button's berry hover needs light text (dark-on-berry fails contrast) */
.pill--solid:hover { color: var(--band-ink); }

/* "Who I am" on the berry band reads in white, not black, in both themes */
.who-title { color: var(--band-ink); }

/* scroll cue under the hero: people didn't scroll after "See my works", so invite them down */
.scroll-cue {
    display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
    margin-top: clamp(1.2rem, 3.4svh, 2.2rem); padding: 10px 18px;
    color: var(--ink-soft); text-decoration: none; border-radius: 999px;
}
.scroll-cue .mono { font-size: .72rem; }
.scroll-cue svg { width: 26px; height: 26px; color: var(--display); animation: cue 1.8s ease-in-out infinite; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--ink); }
.scroll-cue:focus-visible { outline: 2px solid var(--display); outline-offset: 4px; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ---------- phones ---------- */
@media (max-width: 640px) {
    /* tab labels were ~10px; readable now, tighter tracking so "My research" still fits */
    .nav a { font-size: .72rem; letter-spacing: .04em; }
    /* bands sized for desktop left big empty blocks on a phone */
    .statement { min-height: 0; padding: 132px var(--gutter) 88px; }
    .statement .asterisk--a { width: 64px; height: 64px; top: 36px; left: var(--gutter); }   /* sits above the text, not on it */
    .who .asterisk--a { width: 96px; height: 96px; }
    .who { min-height: 0; }
    .who-inner { padding-top: 132px; }
    /* long project names ("Hepsisurada →") no longer run off the edge */
    .next-project .display { font-size: clamp(2.8rem, 12vw, 5rem); flex-wrap: wrap; }
    /* small text links get a finger-sized hit area */
    .text-link { display: inline-block; padding-block: 10px; }
    /* tiny uppercase labels (meta, captions, badges) up to ~12px */
    dt, .cs-cap, .strip-hint, .gcard-meta, .sev, .text-link, .scroll-cue .mono, .hero .mono,
    .work-meta dt, .cs-meta dt, .play .mono, .entry .entry-links a { font-size: .76rem; }
}

/* logos and artwork drawn on white keep their white card, or black-on-transparent art disappears */
.cs-fig .frame.frame--pad, .figs .frame.frame--pad, .frame.frame--pad, .cs-cover.cs-cover--pad { background: #faf7f2; }

/* Armoni products: pin each image inside its 4:5 card so "contain" really fits
   (the tall juice bottle was overflowing and getting cropped) */
.products .frame { position: relative; }
.products .frame img { position: absolute; inset: 0; width: 100%; height: 100%; }
.products .frame:not(.frame--cover) img { padding: 6%; }

/* side-project gallery: cards a little smaller (~85%) */
.gcard { width: clamp(240px, 24vw, 340px); }
.gcard--wide { width: clamp(290px, 37vw, 530px); }
.gcard-img { height: clamp(260px, 37vh, 375px); }
.gcard--tall .gcard-img { height: clamp(320px, 49vh, 495px); }

/* ---------- theme switch, right end of the tab bar ---------- */
.nav { grid-template-columns: repeat(4, 1fr) var(--tabs-h); }
.theme-toggle {
    appearance: none; border: 0; border-left: var(--hair); background: none; color: var(--ink);
    height: var(--tabs-h); display: grid; place-items: center; cursor: pointer; padding: 0;
    transition: background .2s;
}
.theme-toggle:hover { background: var(--paper-2); }
.theme-toggle:focus-visible { outline: 3px solid var(--display); outline-offset: -5px; }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; grid-area: 1 / 1; transition: opacity .25s, transform .35s; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
/* dark shows the sun (go light); light shows the moon (go dark) */
:root[data-theme="light"] .theme-toggle .i-sun,
:root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
@media (max-width: 640px) {
    .nav { grid-template-columns: repeat(4, 1fr) 46px; }
    .nav a { font-size: .68rem; letter-spacing: .02em; }
    .theme-toggle svg { width: 19px; height: 19px; }
}
