:root {
    --bg: #090909;
    --surface: #111111;
    --surface-2: #1a1a1a;
    --line: #2c2c2c;
    --text: #ededed;
    --muted: #8a8a8a;
    --icon: #b0b0b0;
    --icon-hi: #ffffff;
    --radius: 10px;
    --font: 'Inter', system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    overflow-x: hidden;
    font-size: 14px;
}

body.no-scroll { overflow: hidden; }

a { color: var(--text); text-decoration: none; }

.page { width: min(1180px, 94vw); margin: 0 auto; }

/* ── cursor glow ── */
.cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 65%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body.entered .cursor-glow { opacity: 1; }

/* ── scroll progress ── */
.scroll-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--icon-hi);
    z-index: 200;
    transition: width 0.05s linear;
}

/* ── entry ── */
.entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.entry-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entry-box {
    text-align: center;
    padding: 1.5rem;
    max-width: 360px;
}

.entry-box h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.entry-box p {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.btn-enter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.btn-enter:hover {
    border-color: #555;
    background: var(--surface-2);
    transform: translateY(-1px);
}

.btn-enter img { width: 18px; height: 18px; opacity: 0.9; }

/* ── music btn ── */
.music-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color 0.2s;
}

.music-btn:hover, .music-btn.playing { border-color: #555; }
.music-btn img { width: 18px; height: 18px; opacity: 0.85; }
.music-btn.playing img { opacity: 1; }

.music-bars {
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 14px;
}

.music-btn.playing .music-bars { display: flex; }
.music-btn.playing .music-icon { display: none; }

.music-bars span {
    width: 3px;
    background: var(--icon-hi);
    border-radius: 1px;
    animation: bar 0.8s ease-in-out infinite;
}

.music-bars span:nth-child(2) { animation-delay: 0.15s; }
.music-bars span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bar {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* ── nav ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 9, 9, 0.9);
    backdrop-filter: blur(10px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    gap: 1rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    font-size: 0.78rem;
    color: var(--muted);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--surface);
}

/* ── bento grid ── */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
    padding: 12px 0 24px;
}

.cell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s var(--ease);
}

.cell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.04), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.cell:hover::before { opacity: 1; }
.cell:hover { border-color: #444; }

.cell-tilt { transform-style: preserve-3d; }

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* hero cells */
.cell-hero { grid-column: span 7; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.cell-photo { grid-column: span 5; padding: 0; min-height: 280px; }
.cell-stack { grid-column: span 12; }
.cell-stat { grid-column: span 3; }
.cell-learn { grid-column: span 6; }
.cell-cta { grid-column: span 6; }

.hero-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-role {
    color: var(--muted);
    font-size: 0.9rem;
    min-height: 1.4em;
}

.hero-role .cursor-blink {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--muted);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-2);
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.btn:hover { border-color: #555; transform: translateY(-1px); }
.btn img { width: 16px; height: 16px; opacity: 0.85; }

.photo-wrap {
    height: 100%;
    min-height: 280px;
    position: relative;
}

.photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--ease);
}

.cell-photo:hover .photo-wrap img { transform: scale(1.03); }

.photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(9,9,9,0.55));
    pointer-events: none;
}

/* stack tags */
.stack-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stack-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--surface-2);
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
    cursor: default;
}

.stack-tag:hover {
    color: var(--text);
    border-color: #444;
    transform: translateY(-2px);
}

.stack-tag img { width: 14px; height: 14px; opacity: 0.7; }

/* stats */
.stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.3;
}

/* section label */
.sec-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sec-head img { width: 18px; height: 18px; opacity: 0.75; }

.sec-head h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sec-head span {
    font-size: 0.72rem;
    color: var(--muted);
    margin-left: auto;
}

/* projects */
.cell-project { grid-column: span 4; display: flex; flex-direction: column; gap: 8px; }
.cell-project--wide { grid-column: span 12; }

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.project-top h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-top h3 a { transition: opacity 0.2s; }
.project-top h3 a:hover { opacity: 0.75; }

.project-link {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.project-link:hover { opacity: 1; }
.project-link img { width: 16px; height: 16px; display: block; }

.project-domain {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: ui-monospace, monospace;
}

.project-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}

.project-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.project-feats span {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
}

/* learning + cta */
.cell-icon-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cell-icon-row img {
    width: 22px;
    height: 22px;
    opacity: 0.8;
    flex-shrink: 0;
    margin-top: 2px;
}

.cell-icon-row h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cell-icon-row p {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

/* services */
.cell-services { grid-column: span 12; }

.services-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.svc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    transition: border-color 0.2s, transform 0.2s;
}

.svc:hover {
    border-color: #444;
    transform: translateY(-2px);
}

.svc img { width: 20px; height: 20px; opacity: 0.8; flex-shrink: 0; }

.svc strong { display: block; font-size: 0.8rem; font-weight: 600; }
.svc span { font-size: 0.7rem; color: var(--muted); }

/* contacts */
.cell-contacts { grid-column: span 12; }

.contacts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    transition: border-color 0.2s, transform 0.2s;
}

.contact:hover {
    border-color: #444;
    transform: translateY(-2px);
}

.contact img { width: 22px; height: 22px; opacity: 0.85; }
.contact strong { display: block; font-size: 0.82rem; }
.contact span { font-size: 0.72rem; color: var(--muted); font-family: ui-monospace, monospace; }

.footer {
    padding: 14px 0 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
}

/* icons8 mono helper */
.ico { display: block; object-fit: contain; }

@media (max-width: 900px) {
    .cell-hero, .cell-photo, .cell-stat, .cell-learn, .cell-cta,
    .cell-project, .cell-project--wide, .cell-services, .cell-contacts {
        grid-column: span 12;
    }

    .services-row { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .cell-photo { min-height: 220px; }
}

@media (max-width: 520px) {
    .services-row, .contacts-row { grid-template-columns: 1fr; }
}
