:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #181818;
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.24);
    --accent: #c4a26f;
    --accent-soft: rgba(196, 162, 111, 0.08);
    --accent-border: rgba(196, 162, 111, 0.24);
    --text: #f0f0f0;
    --text-muted: #b6b6b6;
    --text-dim: #777;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --max-w: 820px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.028), transparent 58%);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

::selection { background: rgba(255, 255, 255, 0.14); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #262626; }

/* nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: background 400ms var(--ease), border-color 400ms var(--ease);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.85);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    position: relative;
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 350ms var(--ease);
}

.nav-logo:hover::after { width: 100%; }

.nav-links { display: flex; gap: 22px; }

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    transition: color 200ms var(--ease);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 300ms var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* hero */
.hero {
    padding: 96px 0 0;
}

.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 0;
}

.hero-pfp {
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.92);
    animation: heroFadeIn 700ms var(--ease) forwards;
}

.hero-pfp img {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: transform 400ms var(--ease), border-color 300ms var(--ease);
}

.hero-pfp img:hover {
    transform: scale(1.04) rotate(-2deg);
    border-color: var(--border-hover);
}

.hero-text {
    opacity: 0;
    transform: translateY(14px);
    animation: heroSlideIn 700ms var(--ease) 120ms forwards;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
}

.hero-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.01em;
}

.section.intro-section {
    padding: 18px 0 38px;
}

.section.intro-section + .section {
    padding-top: 34px;
}

.intro-copy {
    max-width: 620px;
}

.intro-copy p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    opacity: 0;
    transform: translateY(14px);
    animation: heroSlideIn 700ms var(--ease) 320ms forwards;
}

.intro-actions {
    margin-top: 22px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 250ms var(--ease), border-color 250ms var(--ease), background 250ms var(--ease);
}

.hero-cta:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}

.hero-cta-primary {
    color: #0a0a0a;
    background: var(--accent);
    border-color: var(--text);
}

.hero-cta-primary:hover {
    color: #0a0a0a;
    background: #fff;
    border-color: #fff;
}

.hero-cta svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

.social-section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: border-color 250ms var(--ease), color 250ms var(--ease), background 250ms var(--ease), transform 250ms var(--ease);
}

.social:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.social svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.7;
}

.social .brand-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
    stroke: none;
    transition: transform 250ms var(--ease);
}

.social:hover .brand-icon {
    transform: scale(1.08);
}

@keyframes heroFadeIn {
    to { opacity: 1; transform: scale(1); }
}

@keyframes heroSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* sections */
.section {
    padding: 64px 0;
}

.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 28px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 600ms var(--ease);
}

.section.visible .section-title::after {
    width: 28px;
}

/* cards */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 300ms var(--ease), transform 350ms var(--ease), box-shadow 300ms var(--ease), background 300ms var(--ease);
    display: block;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.035), transparent 60%);
    opacity: 0;
    transition: opacity 350ms var(--ease);
    pointer-events: none;
}

a.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    background: var(--bg-card-hover);
}

a.card:hover::before { opacity: 1; }

.card-static,
.card-soon {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 300ms var(--ease);
}

.card-static:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 1.5;
    transition: stroke 250ms var(--ease), transform 350ms var(--ease);
}

a.card:hover .card-header svg {
    stroke: var(--text);
    transform: translateY(-1px);
}

.card-tag {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    transition: color 250ms var(--ease);
}

a.card:hover h3 { color: #fff; }

.card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.card-soon {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.05);
}

.card-soon h3 { color: var(--text-dim); }

/* contact */
.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: border-color 300ms var(--ease), background 300ms var(--ease), transform 300ms var(--ease);
}

.contact-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.contact-btn-primary {
    background: #f0f0f0;
    border-color: #f0f0f0;
    color: #0a0a0a;
}

.contact-btn-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #0a0a0a;
}

.contact-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.7;
}

.contact-note {
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* footer */
footer {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-inner p {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* stagger children */
.stagger > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease), background 300ms var(--ease);
}

.stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 400ms; }

/* mobile */
@media (max-width: 640px) {
    .hero { padding: 86px 0 0; }

    .section.intro-section { padding: 16px 0 32px; }

    .section.intro-section + .section { padding-top: 30px; }

    .hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .hero-pfp img {
        width: 76px;
        height: 76px;
    }

    .hero h1 {
        font-size: 1.95rem;
    }

    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.8rem; }

    .section { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .stagger > *,
    .hero-pfp,
    .hero-text,
    .hero-actions {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }

    a.card:hover { transform: none; }

    .section-title::after { width: 28px; }
}
