/* ── Custom Properties ─────────────────────────── */
:root {
    --bg: #fafafa;
    --fg: #111111;
    --muted: #767676;
    --border: #e5e5e5;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --max-w: 1100px;
    --nav-h: 64px;
    --ease: 0.2s ease;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Base ───────────────────────────────────────── */
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────── */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background var(--ease), border-color var(--ease);
    border-bottom: 1px solid transparent;
}

#site-header.scrolled {
    background: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}

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

.logo {
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.06em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav ul li a {
    font-size: 0.875rem;
    color: var(--muted);
    transition: color var(--ease);
}

nav ul li a:hover { color: var(--fg); }

/* ── Animations ─────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content {
    animation: fadeUp 0.9s ease both;
}

.fade-section {
    opacity: 1;
    transform: none;
}

/* ── Hero ───────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 4rem) 2rem 6rem;
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
}

.eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

#hero h1 {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 600;
    line-height: 1.0;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--muted);
    font-weight: 400;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 2rem;
    font-size: 1.2rem;
    color: var(--muted);
    animation: bounce 2.4s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

/* ── Sections ───────────────────────────────────── */
section:not(#hero) {
    padding: 7rem 2rem;
    border-top: 1px solid var(--border);
}

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

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3rem;
}

/* ── About ──────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-grid h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.about-grid p {
    font-size: 1.0625rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ── Projects ───────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.project-card {
    background: var(--bg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background var(--ease);
}

.project-card:hover { background: #f0f0f0; }

.project-tag {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.65;
    flex: 1;
}

.project-link {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: inline-block;
    transition: letter-spacing var(--ease);
}

.project-link:hover { letter-spacing: 0.03em; }

/* ── Contact ────────────────────────────────────── */
.contact-content h2 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.0;
    margin-bottom: 2rem;
}

.contact-link {
    font-size: 1.125rem;
    font-weight: 500;
    border-bottom: 1px solid var(--fg);
    padding-bottom: 2px;
    display: inline-block;
    transition: opacity var(--ease);
}

.contact-link:hover { opacity: 0.45; }

/* ── Footer ─────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    #hero h1 { font-size: clamp(3rem, 14vw, 5rem); }
    nav ul { gap: 1.5rem; }
    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}