/* =============================================================
   EMIL HÜSEYNOV — FULL-STACK PORTFOLIO
   Concept: a request travelling the lifecycle of a backend system
   (client → api → services → data → compute → response).
   Pure hand-written CSS. No frameworks, no CDNs. Google Fonts only.
   ============================================================= */

/* ---------- TOKENS ---------- */
:root {
    /* engineered, semantic palette — warm signal vs cool nodes on blue-ink */
    --ink:        #0C1016;
    --ink-2:      #0F141C;
    --surface:    #141A24;
    --surface-2:  #18202B;
    --line:       #232C38;
    --line-2:     #2E3947;

    --text:       #E6EBF2;
    --text-dim:   #8A97A8;
    --text-mute:  #5A6677;

    --signal:     #F2B05E;   /* warm — the request signal / primary accent */
    --signal-2:   #F6C885;
    --node:       #5FB3C4;   /* cool — system nodes, links, structure */
    --node-2:     #8FD0DB;
    --ok:         #6BCB8B;   /* 200 OK / live status */

    --signal-glow: rgba(242, 176, 94, 0.35);
    --node-glow:   rgba(95, 179, 196, 0.30);

    /* type */
    --f-display: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif;
    --f-body:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-mono:    'IBM Plex Mono', ui-monospace, monospace;

    /* space + shape */
    --max: 1220px;
    --pad: 26px;
    --rail: 96px;            /* left gutter for the system spine on desktop */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--f-body);
    background: var(--ink);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* subtle engineered backdrop: faint blueprint grid, no glow blobs */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 96px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 96px 100%;
    opacity: 0.18;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
    pointer-events: none;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--signal); color: var(--ink); }

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

main { position: relative; }

section { position: relative; padding: 120px 0; }

/* ---------- SHARED: layer eyebrow + section title ---------- */
.layer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--node);
}
.layer::before {
    content: '';
    width: 8px; height: 8px;
    border: 1.5px solid var(--node);
    transform: rotate(45deg);
}
.layer .tag {
    color: var(--text-mute);
}

.s-head { margin-bottom: 56px; max-width: 760px; }
.s-head .title {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin-top: 18px;
}
.s-head .sub {
    margin-top: 18px;
    color: var(--text-dim);
    font-size: 17px;
    max-width: 620px;
}
.s-head .sub a { color: var(--node); border-bottom: 1px solid currentColor; }

.accent { color: var(--signal); }

/* =============================================================
   SYSTEM SPINE (fixed left rail + travelling signal)
   ============================================================= */
.spine {
    position: fixed;
    top: 0; left: 0;
    width: var(--rail);
    height: 100vh;
    z-index: 40;
    pointer-events: none;
    display: flex;
    justify-content: center;
}
.spine-track {
    position: relative;
    width: 2px;
    height: calc(100vh - 200px);
    margin-top: 120px;
    background: linear-gradient(var(--line) 0%, var(--line-2) 50%, var(--line) 100%);
}
.spine-node {
    position: absolute;
    left: 50%;
    width: 11px; height: 11px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: var(--ink);
    border: 1.5px solid var(--line-2);
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.spine-node.active {
    border-color: var(--signal);
    background: var(--signal);
    box-shadow: 0 0 0 4px var(--ink), 0 0 14px var(--signal-glow);
}
.spine-node .lbl {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    transform-origin: left center;
    font-family: var(--f-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-mute);
    white-space: nowrap;
    transition: color 0.4s var(--ease);
}
.spine-node.active .lbl { color: var(--signal); }

/* the travelling request packet */
.spine-signal {
    position: absolute;
    left: 50%; top: 0;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--signal);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px 2px var(--signal-glow);
    will-change: transform;
}
.spine-signal::after { /* trailing tail */
    content: '';
    position: absolute;
    left: 50%; bottom: 100%;
    transform: translateX(-50%);
    width: 2px; height: 46px;
    background: linear-gradient(to top, var(--signal), transparent);
    opacity: 0.7;
}

/* top progress bar (mobile / small screens) */
.progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--signal);
    z-index: 60;
    display: none;
    will-change: transform;
}

/* =============================================================
   NAV
   ============================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    height: 66px;
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--ink) 78%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.brand .mono {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border: 1.5px solid var(--signal);
    color: var(--signal);
    font-family: var(--f-mono);
    font-size: 13px;
    border-radius: var(--r-sm);
}

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
    position: relative;
    font-family: var(--f-mono);
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--text-dim);
    padding: 8px 12px;
    transition: color 0.25s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: 4px;
    height: 1.5px;
    background: var(--signal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--text-dim);
    border: 1px solid var(--line-2);
    border-radius: 40px;
    padding: 6px 13px;
}
.status .led {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 0 var(--ok);
    animation: led 2.4s infinite;
}
@keyframes led {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107,203,139,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(107,203,139,0); }
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
    z-index: 70;
}
.burger span { width: 22px; height: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .3s ease; }

/* =============================================================
   HERO
   ============================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero-field {        /* meaningful ambient data lanes (canvas) */
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    border: 1px solid var(--line-2);
    border-radius: 40px;
    padding: 7px 15px;
    margin-bottom: 30px;
}
.hero-status .led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: led 2.4s infinite; }

.hero-name {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 8vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
}
.hero-name .hello {
    display: block;
    font-family: var(--f-mono);
    font-weight: 400;
    font-size: clamp(13px, 1.5vw, 16px);
    letter-spacing: 0.04em;
    color: var(--node);
    margin-bottom: 14px;
    text-transform: none;
}
.hero-name .ln2 { color: var(--text); }

.hero-role {
    margin-top: 24px;
    font-family: var(--f-mono);
    font-size: clamp(14px, 1.7vw, 18px);
    color: var(--text);
    letter-spacing: 0.01em;
}
.hero-role .sep { color: var(--signal); margin: 0 6px; }

.hero-desc {
    margin-top: 22px;
    max-width: 520px;
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.75;
}
.hero-desc b { color: var(--text); font-weight: 600; }

.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 14px 24px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--signal); color: var(--ink); }
.btn-primary:hover { background: var(--signal-2); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--node); color: var(--node); }

/* hero portrait as a "client" node */
.hero-photo {
    position: relative;
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    padding: 10px;
    background: var(--surface);
}
.hero-photo::before { /* corner ticks */
    content: '';
    position: absolute; inset: -1px;
    border-radius: var(--r-md);
    background:
        linear-gradient(var(--signal),var(--signal)) left top / 14px 1px no-repeat,
        linear-gradient(var(--signal),var(--signal)) left top / 1px 14px no-repeat,
        linear-gradient(var(--signal),var(--signal)) right bottom / 14px 1px no-repeat,
        linear-gradient(var(--signal),var(--signal)) right bottom / 1px 14px no-repeat;
    pointer-events: none;
}
.hero-photo .meta {
    position: absolute;
    top: 18px; left: 18px;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--ink);
    background: var(--signal);
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
}
.hero-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 18%;
    border-radius: var(--r-sm);
    filter: grayscale(1) contrast(1.05) brightness(0.95);
    transition: filter 0.5s var(--ease);
}
.hero-photo:hover img { filter: grayscale(0.1) contrast(1.02); }

/* =============================================================
   ABOUT
   ============================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: start;
}
.about h2 {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 18px 0 26px;
}
.about p { color: var(--text-dim); font-size: 16.5px; line-height: 1.8; margin-bottom: 18px; max-width: 560px; }
.about p b { color: var(--node); font-weight: 600; }

/* Developer.cs code element */
.code {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--ink-2);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.code-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    font-family: var(--f-mono);
    font-size: 12.5px;
    color: var(--text-mute);
}
.code-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.code-bar .dot:nth-child(1){ background:#E8665E; } .code-bar .dot:nth-child(2){ background:#E8B45E; } .code-bar .dot:nth-child(3){ background:#6BCB8B; }
.code-bar .file { margin-left: 10px; }
.code-body {
    padding: 22px 20px;
    font-family: var(--f-mono);
    font-size: 13.5px;
    line-height: 1.95;
    white-space: pre;
    overflow-x: auto;
    min-height: 252px;
}
.code-body .caret { color: var(--signal); animation: caret 1s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }
.tk-kw { color: #7AA2D6; }    /* keyword */
.tk-ty { color: #5FB3C4; }    /* type */
.tk-fn { color: var(--signal); } /* member */
.tk-st { color: #9CCF8E; }    /* string */
.tk-op { color: var(--text-dim); }
.tk-cm { color: var(--text-mute); font-style: italic; }

/* telemetry stats */
.telemetry {
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    padding: 18px 20px;
}
.telemetry .t-head {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-mute);
    margin-bottom: 16px;
}
.telemetry .t-head .live { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.telemetry .t-head .live::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--ok); }
.metric { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 14px; padding: 9px 0; }
.metric + .metric { border-top: 1px solid var(--line); }
.metric .m-label { font-family: var(--f-mono); font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.metric .m-bar { height: 6px; background: var(--ink); border-radius: 3px; overflow: hidden; }
.metric .m-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--node), var(--signal)); border-radius: 3px; transition: width 1.1s var(--ease); }
.metric .m-val { font-family: var(--f-mono); font-size: 15px; color: var(--text); min-width: 48px; text-align: right; }
.metric .m-val small { color: var(--text-dim); font-size: 12px; }

/* =============================================================
   STACK
   ============================================================= */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.stack-card {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    padding: 24px 22px 26px;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}
.stack-card:hover { border-color: var(--node); background: var(--surface-2); transform: translateY(-4px); }
.stack-card h3 {
    font-family: var(--f-mono);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--node);
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.stack-card h3 .idx { color: var(--text-mute); }
.stack-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.stack-card li {
    display: flex; align-items: center; gap: 11px;
    font-size: 14.5px; color: var(--text-dim);
    transition: color 0.2s ease, transform 0.2s ease;
}
.stack-card li::before {
    content: ''; width: 6px; height: 6px; flex-shrink: 0;
    background: var(--line-2); transform: rotate(45deg);
    transition: background 0.2s ease;
}
.stack-card li:hover { color: var(--text); transform: translateX(3px); }
.stack-card li:hover::before { background: var(--signal); }

/* =============================================================
   WEBSITES — premium cards w/ real screenshots + tilt
   ============================================================= */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.site {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color 0.3s ease, box-shadow 0.35s var(--ease);
}
.site:hover { border-color: var(--node); box-shadow: 0 30px 70px rgba(0,0,0,0.5); }
.site-shot {
    position: relative;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    transform: translateZ(20px);
}
.site-chrome {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    font-family: var(--f-mono); font-size: 12px; color: var(--text-mute);
    border-bottom: 1px solid var(--line);
}
.site-chrome .d { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.site-chrome .url { margin-left: 8px; color: var(--text-dim); }
.site-shot-img { height: 230px; overflow: hidden; background: var(--ink-2); }
.site-shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s var(--ease); }
.site:hover .site-shot-img img { transform: scale(1.04); }

.site-body { padding: 24px 24px 26px; transform: translateZ(35px); }
.site-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--ok); margin-bottom: 14px;
}
.site-badge::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--ok); }
.site-body h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.site-body p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; margin-bottom: 18px; }
.site-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.site-tags span { font-family: var(--f-mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 4px; padding: 4px 9px; }
.site-visit {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--f-mono); font-size: 13px; color: var(--signal);
    transition: gap 0.25s var(--ease);
}
.site-visit svg { width: 14px; height: 14px; }
.site-visit:hover { gap: 14px; }

/* =============================================================
   PROJECTS
   ============================================================= */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.proj {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    padding: 28px 28px 30px;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}
.proj::after { /* hover signal line */
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px; background: var(--signal);
    transform: scaleY(0); transform-origin: top;
    transition: transform 0.35s var(--ease);
}
.proj:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-4px); }
.proj:hover::after { transform: scaleY(1); }
.proj .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.proj .endpoint { font-family: var(--f-mono); font-size: 11.5px; color: var(--node); letter-spacing: 0.02em; }
.proj .method { font-family: var(--f-mono); font-size: 10.5px; color: var(--signal); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 7px; text-transform: uppercase; }
.proj h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.proj p { color: var(--text-dim); font-size: 14px; line-height: 1.65; margin-bottom: 18px; }
.proj .tags { display: flex; flex-wrap: wrap; gap: 7px; }
.proj .tags span { font-family: var(--f-mono); font-size: 11px; color: var(--text-mute); }
.proj .tags span:not(:last-child)::after { content: '·'; margin-left: 7px; color: var(--line-2); }

/* =============================================================
   EXPERIENCE
   ============================================================= */
.exp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.exp {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    padding: 38px 34px;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.exp:hover { border-color: var(--line-2); background: var(--surface-2); }
.exp .tagline { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--node); margin-bottom: 18px; }
.exp h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; margin-bottom: 16px; }
.exp p { color: var(--text-dim); font-size: 15px; line-height: 1.75; }

/* =============================================================
   CONTACT
   ============================================================= */
.contact { text-align: center; }
.contact h2 {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 20px 0 0;
}
.contact .mail {
    display: inline-block;
    margin-top: 30px;
    font-family: var(--f-mono);
    font-size: clamp(15px, 3vw, 23px);
    color: var(--text);
    position: relative;
}
.contact .mail::after { content:''; position:absolute; left:0; right:0; bottom:-4px; height:2px; background: var(--signal); transform: scaleX(0); transform-origin:left; transition: transform .35s var(--ease); }
.contact .mail:hover { color: var(--signal); }
.contact .mail:hover::after { transform: scaleX(1); }
.contact .links { margin-top: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.contact .links a {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--f-mono); font-size: 13px; color: var(--text-dim);
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 12px 20px;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}
.contact .links a svg { width: 16px; height: 16px; }
.contact .links a:hover { color: var(--node); border-color: var(--node); transform: translateY(-3px); }

/* =============================================================
   FOOTER + scroll-to-top
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--text-mute); }
.footer b { color: var(--signal); font-weight: 400; }

.to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background: var(--signal); color: var(--ink);
    border: none; border-radius: var(--r-sm); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s var(--ease);
    z-index: 45;
}
.to-top svg { width: 18px; height: 18px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* =============================================================
   CUSTOM CURSOR (fine pointer only)
   ============================================================= */
.cursor, .cursor-dot { display: none; }
@media (hover: hover) and (pointer: fine) {
    .cursor {
        position: fixed; top: 0; left: 0; z-index: 999;
        width: 34px; height: 34px; margin: -17px 0 0 -17px;
        border: 1.5px solid var(--node); border-radius: 50%;
        pointer-events: none; display: block;
        transition: width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease), border-color .2s ease, background .2s ease;
        will-change: transform;
        mix-blend-mode: difference;
    }
    .cursor.hot { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-color: var(--signal); background: rgba(242,176,94,0.08); }
    .cursor-dot {
        position: fixed; top: 0; left: 0; z-index: 999;
        width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
        background: var(--signal); border-radius: 50%;
        pointer-events: none; display: block; will-change: transform;
    }
}

/* =============================================================
   REVEAL + A11Y
   ============================================================= */
.skip {
    position: absolute; left: 16px; top: -60px; z-index: 1000;
    background: var(--signal); color: var(--ink); font-family: var(--f-mono);
    font-size: 13px; padding: 10px 16px; border-radius: var(--r-sm);
    transition: top .2s ease;
}
.skip:focus { top: 14px; }

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

.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* orchestrated hero load intro (no flash: hidden only when JS is present) */
.js .hero [data-load] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
}
.js .hero.loaded [data-load] { opacity: 1; transform: none; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1080px) {
    :root { --rail: 0px; }
    .spine { display: none; }
    .progress { display: block; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
    section { padding: 90px 0; }
    .nav-links {
        position: fixed; inset: 0 0 0 auto; width: min(80vw, 340px);
        flex-direction: column; justify-content: center; gap: 6px;
        background: var(--ink-2); border-left: 1px solid var(--line);
        transform: translateX(100%); transition: transform .35s var(--ease); padding: 40px;
    }
    .nav-links.open { transform: none; }
    .nav-links a { font-size: 16px; }
    .nav .status { display: none; }
    .burger { display: flex; }
    .burger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
    .burger.open span:nth-child(2){ opacity: 0; }
    .burger.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

    .hero { min-height: auto; padding: 110px 0 70px; }
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .hero-photo { max-width: 320px; }
    .about-grid { grid-template-columns: 1fr; gap: 44px; }
    .sites-grid, .proj-grid, .exp-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    :root { --pad: 18px; }
    .stack-grid { grid-template-columns: 1fr; }
    .site-shot-img { height: 190px; }
    .footer .wrap { flex-direction: column; text-align: center; }
    .to-top { bottom: 16px; right: 16px; }
}

/* =============================================================
   REDUCED MOTION — calm static fallback for everything
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; }
    .js .hero [data-load] { opacity: 1; transform: none; }
    .spine-signal, .hero-field, .progress { display: none !important; }
    .cursor, .cursor-dot { display: none !important; }
}
