/* ============================================================
   suryanath.com — Bento Modern
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --bg: #FAFAF9;
    --surface: #FFFFFF;
    --surface-2: #F3F3F1;
    --border: #E7E5E1;
    --text: #111110;
    --muted: #66655F;
    --accent: #FF5A1F;
    --accent-text: #C2410C;
    --on-accent: #111110;
    --live: #16A34A;
    --shadow: 0 1px 2px rgba(17, 17, 16, .04), 0 8px 24px -12px rgba(17, 17, 16, .12);
    --shadow-hover: 0 2px 4px rgba(17, 17, 16, .05), 0 18px 40px -16px rgba(17, 17, 16, .22);

    --radius: 24px;
    --radius-sm: 14px;
    --gap: 14px;
    --wrap: 1200px;

    --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0B0B0C;
        --surface: #141416;
        --surface-2: #1C1C1F;
        --border: #27272B;
        --text: #F2F2F0;
        --muted: #A1A09B;
        --accent: #FF6A33;
        --accent-text: #FF8A5C;
        --on-accent: #0B0B0C;
        --live: #22C55E;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-hover: 0 18px 40px -16px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0B0B0C;
    --surface: #141416;
    --surface-2: #1C1C1F;
    --border: #27272B;
    --text: #F2F2F0;
    --muted: #A1A09B;
    --accent: #FF6A33;
    --accent-text: #FF8A5C;
    --on-accent: #0B0B0C;
    --live: #22C55E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-hover: 0 18px 40px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--accent); }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

/* ---------- Primitives ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted);
}

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-live { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.dot-rec { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.status { display: inline-flex; align-items: center; gap: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 999px;
    font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
    transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; font-size: 17px; transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--text); }

.tile {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
a.tile:hover,
button.tile:hover,
.tile.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.tile h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; }
.tile h3 { font-size: 17px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.tile-icon { font-size: 22px; color: var(--accent); display: block; margin: 18px 0 10px; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 16px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand img { border-radius: 8px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
    padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--muted);
    transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
    .nav-actions { margin-left: auto; }
    .menu-btn { display: inline-grid; }
    .nav-cta { display: none; }
    .nav-links {
        position: absolute; top: 68px; left: 12px; right: 12px;
        flex-direction: column; gap: 2px; padding: 8px;
        background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
        box-shadow: var(--shadow-hover);
        opacity: 0; visibility: hidden; transform: translateY(-6px);
        transition: opacity .2s, transform .2s var(--ease), visibility .2s;
    }
    .nav-links.open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: 12px 14px; font-size: 16px; color: var(--text); }
}

/* ---------- Hero bento ---------- */
.hero { padding-top: 16px; }

.bento { display: grid; gap: var(--gap); }

.hero-bento {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "intro intro intro photo"
        "intro intro intro photo"
        "asu   zaper stage stage"
        "tutor now   stage stage"
        "skills skills skills skills";
}
.t-intro  { grid-area: intro; }
.t-photo  { grid-area: photo; }
.t-asu    { grid-area: asu; }
.t-zaper  { grid-area: zaper; }
.t-stage  { grid-area: stage; }
.t-tutor  { grid-area: tutor; }
.t-now    { grid-area: now; }
.t-skills { grid-area: skills; }

.t-intro { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.t-intro h1 {
    font-size: clamp(40px, 7vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 700;
    margin: 18px 0 14px;
}
.typing { font-size: clamp(15px, 1.8vw, 18px); color: var(--accent-text); min-height: 1.6em; }
.caret {
    display: inline-block; width: 9px; height: 1.1em; margin-left: 3px; vertical-align: -3px;
    background: var(--accent); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lede { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 58ch; margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.t-photo { padding: 0; overflow: hidden; min-height: 380px; background: var(--surface-2); }
/* absolute so the tall source image never dictates row height */
.t-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* On-stage video tile */
.t-stage {
    padding: 0; overflow: hidden; min-height: 300px; cursor: pointer; text-align: left;
    background: #111; border-color: transparent; color: #fff;
}
.t-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.72) 100%);
}
.stage-copy { position: absolute; inset: auto 0 0 0; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.eyebrow.on-media { color: rgba(255,255,255,.85); }
.stage-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stage-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #fff; opacity: .9; }
.t-stage:hover .stage-link i { transform: translateX(3px); }
.stage-link i { transition: transform .2s var(--ease); }

/* Skills */
.t-skills { padding: 20px 24px; }
.skills-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.skills { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.skill {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 12px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid transparent; cursor: pointer; text-align: left;
    transition: border-color .2s, transform .2s var(--ease);
}
.skill:hover { border-color: var(--border); transform: translateY(-2px); }
.skill img { width: 28px; height: 28px; flex: none; }
.skill span { font-weight: 600; font-size: 15px; }

/* Hero responsive */
@media (max-width: 999px) {
    .hero-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "intro intro"
            "photo asu"
            "photo zaper"
            "stage stage"
            "tutor now"
            "skills skills";
    }
    .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .hero-bento {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "intro" "photo" "asu" "zaper" "stage" "tutor" "now" "skills";
    }
    .t-photo { min-height: 0; aspect-ratio: 4 / 5; }
    .t-stage { min-height: 260px; }
    .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-head .small { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(72px, 10vw, 120px); }
.section-head { margin-bottom: 28px; max-width: 640px; }
.section-head h2 {
    font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.04em; font-weight: 700;
    margin: 10px 0 10px;
}
.section-head .muted { font-size: 17px; }

/* Work */
.work-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.col-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 8px; }
.col-title .small { margin-left: auto; font-weight: 400; }
.rows li {
    display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: start;
    padding: 16px 0; border-top: 1px solid var(--border);
}
.rows li:first-child { border-top: 0; }
.row-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--accent); font-size: 18px;
}
.row-title { font-weight: 600; }
.row-org { color: var(--muted); font-weight: 400; }
.row-text { color: var(--muted); font-size: 15px; margin-top: 2px; }
.pill {
    font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; white-space: nowrap;
    color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent);
}
@media (max-width: 800px) { .work-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
    .rows li { grid-template-columns: 40px 1fr; }
    .rows .pill { grid-column: 2; justify-self: start; }
}

/* Music */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.vcard {
    display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden;
    cursor: pointer; text-align: left;
}
.vthumb { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vcard:hover .vthumb img { transform: scale(1.04); }
.vplay {
    position: absolute; left: 14px; bottom: 14px;
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--on-accent); font-size: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.3);
    transition: transform .25s var(--ease);
}
.vplay i { margin-left: 3px; }
.vcard:hover .vplay { transform: scale(1.08); }
.vdur {
    position: absolute; right: 12px; bottom: 12px;
    font-family: var(--mono); font-size: 12px; color: #fff;
    background: rgba(0,0,0,.62); padding: 3px 8px; border-radius: 8px;
}
.vmeta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 16px; }
.vtitle { font-weight: 600; font-size: 15px; }
.vbadge {
    position: absolute; left: 14px; top: 14px;
    font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    background: rgba(0,0,0,.6); color: #fff; padding: 5px 10px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 7px;
}

.vcard.featured { grid-column: span 2; grid-row: span 2; }
.vcard.featured .vthumb { aspect-ratio: auto; flex: 1; min-height: 280px; }
.vcard.featured .vplay { width: 64px; height: 64px; font-size: 30px; left: 22px; bottom: 22px; }
.vcard.featured .vtitle { font-size: 18px; }

@media (max-width: 899px) {
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vcard.featured { grid-row: auto; }
    .vcard.featured .vthumb { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
}
@media (max-width: 559px) {
    .video-grid { grid-template-columns: minmax(0, 1fr); }
    .vcard.featured { grid-column: auto; }
}

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-art { aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.project-art svg { width: 100%; height: 100%; }
.project-body { padding: 22px 24px 26px; }
.project-body h3 { font-size: 22px; letter-spacing: -.02em; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.project-body h3 i { font-size: 16px; color: var(--accent-text); transition: transform .25s var(--ease); }
.project:hover h3 i { transform: translate(2px, -2px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

.art-solar { background: #0E0E12; }
.art-solar .sun { fill: var(--accent); }
.art-solar .orbit { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.art-solar .planet { fill: #F2F2F0; }

.art-mario { background: #6EA8FF; }
.art-mario .ground { fill: #C4642A; }
.art-mario .bricks rect { fill: #B5502A; stroke: #7A2F14; stroke-width: 2; }
.art-mario .qblock { fill: #F5B21B; stroke: #9C6B08; stroke-width: 2; }
.art-mario .pipe { fill: #2FA84F; stroke: #145C27; stroke-width: 2; }
.art-mario .hero { fill: #E0301E; }
.art-mario .coin { fill: #FFD84A; }
.art-mario .hero-jump { animation: jump 2.4s var(--ease) infinite; }
@keyframes jump { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-52px); } }

@media (max-width: 720px) { .project-grid { grid-template-columns: minmax(0, 1fr); } }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.mini { padding: 22px; }
.mini-icon { font-size: 24px; color: var(--accent); display: block; margin-bottom: 14px; line-height: 1; }
.mini-icon.glyph { font-size: 28px; }
.mini p { font-size: 15px; margin-top: 4px; }
@media (max-width: 899px) { .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* Next */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); counter-reset: none; }
.step-num { display: inline-block; font-size: 13px; color: var(--accent-text); margin-bottom: 26px; }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact { padding: clamp(28px, 6vw, 64px); text-align: left; }
.contact h2 { font-size: clamp(44px, 8vw, 96px); line-height: .95; letter-spacing: -.05em; font-weight: 700; margin: 14px 0 12px; }
.contact > .muted { font-size: 17px; max-width: 48ch; }
.contact-mail {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
    font-size: clamp(22px, 4vw, 36px); font-weight: 600; letter-spacing: -.03em;
    border-bottom: 2px solid var(--accent); padding-bottom: 4px;
    overflow-wrap: anywhere;
}
.contact-mail i { font-size: .7em; color: var(--accent-text); transition: transform .25s var(--ease); }
.contact-mail:hover i { transform: translate(3px, -3px); }

/* Footer */
.footer {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding-top: 40px; padding-bottom: 40px; color: var(--muted); font-size: 14px;
}
.footer a:hover { color: var(--text); }

/* ---------- Dialogs ---------- */
.dialog {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); color: var(--text);
    padding: 0; max-width: min(560px, calc(100vw - 32px)); width: 100%;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
.dialog::backdrop { background: rgba(10, 10, 12, .55); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.skill-dialog { padding: 26px; }
.dialog-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 24px; letter-spacing: -.02em; }
.dialog-head .icon-btn { margin-left: auto; }
.skill-dialog p + p { margin-top: 12px; }
.skill-dialog > p { color: var(--muted); }

.player {
    max-width: min(1100px, calc(100vw - 24px)); background: #0B0B0C; color: #fff; border-color: #222;
}
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; }
.player-bar h2 { font-size: 17px; font-weight: 600; }
.player-bar .small { color: #A1A09B; }
.player .icon-btn { background: #1C1C1F; border-color: #333; color: #fff; }
.player-stage { position: relative; background: #000; }
.player-stage video {
    width: 100%; height: auto; max-height: calc(100dvh - 120px); aspect-ratio: 16 / 9;
    object-fit: contain; background: #000;
}
.player-stage video.portrait { aspect-ratio: 9 / 16; width: auto; margin-inline: auto; height: calc(100dvh - 120px); }
.player-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.14); color: #fff; font-size: 20px;
    display: grid; place-items: center; backdrop-filter: blur(6px);
    transition: background .2s;
}
.player-nav:hover { background: rgba(255,255,255,.28); }
.player-nav.prev { left: 12px; }
.player-nav.next { right: 12px; }
@media (max-width: 599px) {
    .player { max-width: 100vw; border-radius: 0; margin: auto 0; }
    .player-nav { top: auto; bottom: 64px; transform: none; }
}

/* ---------- Reveal ---------- */
/* keyframes (not transitions) so the hover lift on tiles keeps working afterwards */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}
