*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #F9F8F6;
    --ink: #0C0C0A;
    --muted: #717171;
    --border: #DDDBD8;
    --surface: #F1F0EE;
    --serif: 'Cormorant', Georgia, serif;
    --mono: 'DM Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.7;
    font-weight: 300;
}

/* NAV */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(249,248,246,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }
.nav-brand {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--ink);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 300;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.2s;
}
.nav-links a::after {
    content: '';
    position: absolute; bottom: -2px; left: 0; right: 0;
    height: 1px; background: var(--ink);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

/* HERO */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 48px 80px;
    position: relative;
}
.hero-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 32px; height: 1px;
    background: var(--muted);
}
.hero-name {
    font-family: var(--serif);
    font-size: clamp(64px, 10vw, 144px);
    font-weight: 300;
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 36px;
}
.hero-name em { font-style: italic; }
.hero-role {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-bottom: 52px;
    height: 22px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cursor {
    display: inline-block;
    width: 1px; height: 14px;
    background: var(--ink);
    animation: blink 1s step-end infinite;
    flex-shrink: 0;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-bio {
    max-width: 520px;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 300;
    line-height: 1.65;
    color: #3A3A38;
    margin-bottom: 56px;
}
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.btn-primary {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--ink);
    border: 1px solid var(--ink);
    padding: 15px 36px;
    text-decoration: none;
    transition: all 0.25s;
}
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-ghost {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--border);
    transition: all 0.25s;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.hero-scroll {
    position: absolute;
    bottom: 48px; right: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.hero-scroll span {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}
.scroll-line {
    width: 1px; height: 64px;
    background: var(--border);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute; top: -100%; left: 0; right: 0; height: 100%;
    background: var(--ink);
    animation: slideDown 1.8s ease-in-out infinite;
}
@keyframes slideDown { 0% { top: -100%; } 100% { top: 100%; } }

/* SECTION WRAPPER */
.section-wrap {
    padding: 120px 48px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 72px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.section-number {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.12em;
    flex-shrink: 0;
}
.section-title {
    font-family: var(--serif);
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 96px;
    align-items: start;
}
.about-text {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 300;
    line-height: 1.7;
    color: #3A3A38;
}
.about-text p + p { margin-top: 28px; }
.about-text em { font-style: italic; color: var(--ink); }
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
}
.stat-item { border-top: 1px solid var(--border); padding-top: 16px; }
.stat-number {
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.stat-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.5;
}

/* EXPERIENCE */
.exp-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.exp-item.visible { opacity: 1; transform: translateY(0); }
.exp-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    line-height: 1.5;
}
.exp-company {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.exp-type {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.exp-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    padding: 3px 10px;
    margin-bottom: 14px;
}
.exp-role {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.2;
}
.exp-bullets { list-style: none; }
.exp-bullets li {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.75;
    padding: 4px 0 4px 20px;
    position: relative;
}
.exp-bullets li::before {
    content: '—';
    position: absolute; left: 0;
    color: var(--border);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    background: var(--border);
}
.project-card {
    background: var(--bg);
    padding: 44px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s ease;
}
.project-card.visible { opacity: 1; transform: translateY(0); }

/* Stagger delays */
.project-card:nth-child(1) { transition-delay: 0s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }
.project-card:nth-child(4) { transition-delay: 0.3s; }

.project-card:hover { background: var(--ink); }
.project-card:hover .project-tag,
.project-card:hover .project-desc,
.project-card:hover .project-number { color: rgba(249,248,246,0.35) !important; }
.project-card:hover .project-name { color: var(--bg); }
.project-card:hover .project-link { color: var(--bg); border-bottom-color: rgba(249,248,246,0.3); }

.project-card.large  { grid-column: span 7; }
.project-card.medium { grid-column: span 5; }
.project-card.half   { grid-column: span 6; }

.project-number {
    position: absolute;
    top: 44px; right: 44px;
    font-family: var(--serif);
    font-size: 88px;
    font-weight: 300;
    color: var(--border);
    line-height: 1;
    pointer-events: none;
    transition: color 0.3s;
}
.project-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
    transition: color 0.3s;
}
.project-name {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    transition: color 0.3s;
}
.project-desc {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 28px;
    transition: color 0.3s;
}
.project-link {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

/* SKILLS */
.skills-group {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.skills-group:first-child { border-top: 1px solid var(--border); }
.skills-group.visible { opacity: 1; transform: translateY(0); }
.skills-category {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 6px;
}
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 300;
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 7px 16px;
    cursor: default;
    transition: all 0.2s;
}
.skill-tag:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

/* CONTACT */
#contact-section {
    background: var(--ink);
    padding: 120px 48px;
}
.contact-inner {
    max-width: 1280px;
    margin: 0 auto;
}
#contact-section .section-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
#contact-section .section-number { color: rgba(255,255,255,0.25); }
#contact-section .section-title { color: var(--bg); }

.contact-headline {
    font-family: var(--serif);
    font-size: clamp(48px, 8vw, 108px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 72px;
    color: var(--bg);
}
.contact-headline em {
    font-style: italic;
    color: rgba(255,255,255,0.35);
}
.contact-links { display: flex; gap: 56px; flex-wrap: wrap; }
.contact-link { display: flex; flex-direction: column; gap: 6px; }
.contact-link-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}
.contact-link a {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--bg);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 3px;
    transition: border-color 0.2s;
}
.contact-link a:hover { border-bottom-color: var(--bg); }

.footer-bar {
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-bar span {
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.05em;
}

/* FADE UP GENERIC */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 900px) {
    nav { padding: 20px 24px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 10px; }
    #hero { padding: 120px 24px 80px; }
    .hero-scroll { right: 24px; }
    .section-wrap { padding: 80px 24px; }
    .about-grid { grid-template-columns: 1fr; gap: 56px; }
    .exp-item { grid-template-columns: 1fr; gap: 12px; }
    .project-card.large, .project-card.medium, .project-card.half { grid-column: span 12; }
    .skills-group { grid-template-columns: 1fr; gap: 20px; }
    #contact-section { padding: 80px 24px; }
    .contact-links { gap: 36px; }
    .footer-bar { padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .about-stats { grid-template-columns: 1fr 1fr; }
    .hero-scroll { display: none; }
}
