/* ═══════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════ */
:root {
    --bg:           #090909;
    --bg-2:         #111111;
    --bg-3:         #181818;
    --text:         #f0ece3;
    --muted:        #5e5a56;
    --muted-2:      #aaa49d;
    --accent:       #c7b77a;
    --line:         #1c1c1c;
    --line-2:       #272727;

    --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: "Syne", "Inter", sans-serif;
    --font-mono:    "JetBrains Mono", "IBM Plex Mono", monospace;

    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}


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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ═══════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.35s var(--ease-out), border-color 0.35s;
    border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
    background: rgba(9, 9, 9, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px;
    height: 64px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.06em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--muted-2);
    letter-spacing: 0.04em;
    text-transform: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover {
    color: var(--text);
}

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

.nav-cta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--accent);
    border: 1px solid rgba(199, 183, 122, 0.35);
    padding: 8px 18px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}


/* ═══════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════ */
.hero {
    min-height: 72svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 112px 40px 76px;
    max-width: 1120px;
    margin: 0 auto;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: center;
    gap: 72px;
}

.hero-text {
    max-width: 720px;
}


.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 4.8vw, 4.4rem);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.04em;
    margin-bottom: 26px;
}

.hero-desc {
    max-width: 52ch;
    font-size: 1.02rem;
    font-weight: 300;
    color: var(--muted-2);
    line-height: 1.68;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}



.hero-feature {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 0%, rgba(199, 183, 122, 0.12), transparent 34%),
        var(--bg-2);
    padding: 24px;
    min-height: 320px;
}

.hero-feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(199, 183, 122, 0.08) 45%, transparent 70%);
    transform: translateX(-100%);
    animation: heroFeatureSweep 5.6s ease-in-out infinite;
    pointer-events: none;
}

.hero-feature-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-feature-status {
    color: var(--accent);
}

.hero-feature-title {
    position: relative;
    max-width: 26ch;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--text);
    margin-bottom: 28px;
}

.hero-feature-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.hero-feature-flow span {
    height: 4px;
    background: var(--line);
    overflow: hidden;
}

.hero-feature-flow span::after {
    content: "";
    display: block;
    height: 100%;
    width: 42%;
    background: var(--accent);
    animation: heroFeatureBar 3.4s ease-in-out infinite;
}

.hero-feature-flow span:nth-child(2)::after {
    animation-delay: 0.35s;
}

.hero-feature-flow span:nth-child(3)::after {
    animation-delay: 0.7s;
}

.hero-feature-list {
    position: relative;
    display: grid;
    gap: 14px;
}

.hero-feature-list div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.hero-feature-list strong {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.15;
}

.hero-feature-list small {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--muted);
}

@keyframes heroFeatureSweep {
    0%,
    55%,
    100% {
        transform: translateX(-100%);
    }

    75% {
        transform: translateX(100%);
    }
}

@keyframes heroFeatureBar {
    0%,
    100% {
        transform: translateX(-110%);
    }

    45%,
    70% {
        transform: translateX(145%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-feature::before,
    .hero-feature-flow span::after {
        animation: none;
    }
}

/* Scroll hint */
.hero-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
    cursor: pointer;
}

.hero-scroll-hint span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.scroll-line {
    width: 52px;
    height: 1px;
    background: var(--line-2);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scan 2.2s ease-in-out infinite;
}

@keyframes scan {
    0%   { left: -100%; }
    100% { left: 100%; }
}


/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    padding: 12px 22px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s var(--ease-out),
                color 0.2s var(--ease-out),
                border-color 0.2s var(--ease-out);
    white-space: nowrap;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-2);
    border-color: var(--line-2);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--muted);
}

.btn-large {
    font-size: 0.84rem;
    padding: 16px 40px;
}


/* ═══════════════════════════════════════════════════
   SECTION SHARED CHROME
═══════════════════════════════════════════════════ */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}


/* ═══════════════════════════════════════════════════
   RESUME STORY
═══════════════════════════════════════════════════ */
.resume-story {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px 48px;
}

.resume-story-inner {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) 1.4fr;
    gap: 40px;
    align-items: stretch;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 56px 0;
}

.resume-story-copy {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
}

.resume-story-copy p {
    color: var(--muted-2);
    font-weight: 300;
    line-height: 1.72;
    max-width: 42ch;
}

.resume-story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.resume-card {
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.018);
    padding: 22px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s var(--ease-out),
                transform 0.2s var(--ease-out);
}

.resume-card:hover {
    border-color: var(--muted);
    transform: translateY(-3px);
}

.resume-card-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
    line-height: 1;
}

.resume-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin-top: auto;
}

.resume-card p {
    color: var(--muted-2);
    font-size: 0.86rem;
    font-weight: 300;
    line-height: 1.65;
    margin-top: 14px;
}

/* ═══════════════════════════════════════════════════
   PROJECTS SECTION
═══════════════════════════════════════════════════ */
.projects {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.projects-header {
    padding: 56px 0 36px;
    border-bottom: 1px solid var(--line);
}

/* Individual project row */
.project {
    position: relative;
    border-bottom: 1px solid var(--line);
    padding: 48px 0;
}


.project-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
}

/* Ghost large number */
.project-num {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 1.7vw, 1.3rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--muted);
    user-select: none;
    pointer-events: none;
    transition: color 0.3s var(--ease-out);
}

.project:hover .project-num {
    color: var(--muted-2);
}


/* Two-column layout */
.project-layout {
    display: grid;
    grid-template-columns: 58% 1fr;
    gap: 44px;
    align-items: center;
}

.project-layout-flip {
    grid-template-columns: 1fr 58%;
}

.project-layout-flip .project-image-wrap {
    order: 2;
}

.project-layout-flip .project-body {
    order: 1;
}

/* Image */
.project-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-3);
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line-2);
    padding: 10px;
    transition: border-color 0.25s var(--ease-out),
                transform 0.25s var(--ease-out);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.7s var(--ease-out);
    display: block;
}

.project:hover .project-img {
    transform: scale(1.04);
}

.project:hover .project-image-wrap {
    border-color: var(--muted);
    transform: translateY(-2px);
}

.project-image-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    background: var(--accent);
    color: var(--bg);
    padding: 5px 11px;
}

/* Body copy */
.project-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.project-desc {
    font-size: 0.96rem;
    font-weight: 300;
    color: var(--muted-2);
    line-height: 1.74;
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-list li {
    font-size: 0.88rem;
    color: var(--muted-2);
    padding-left: 22px;
    position: relative;
    font-weight: 300;
}

.project-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    top: 1px;
}

.project-stack {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.project-links {
    margin-top: 4px;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(228, 199, 90, 0);
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.project-link:hover {
    border-color: var(--accent);
}


/* ═══════════════════════════════════════════════════
   STACK SECTION
═══════════════════════════════════════════════════ */
.stack-section {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stack-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 88px 40px;
}

.stack-inner .section-label {
    margin-bottom: 32px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.stack-group-label {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
}

.stack-tags {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted-2);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    transition: color 0.2s;
}

.tag:hover {
    color: var(--text);
}

.tag::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: var(--accent);
    flex-shrink: 0;
    border-radius: 50%;
}


/* ═══════════════════════════════════════════════════
   CONTACT SECTION
═══════════════════════════════════════════════════ */
.contact-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 96px 40px 96px;
}

.contact-inner {
    max-width: 620px;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 24px;
}

.contact-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted-2);
    line-height: 1.72;
    margin-bottom: 40px;
    max-width: 48ch;
}


/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 40px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent);
}


/* ═══════════════════════════════════════════════════
   REVEAL ANIMATIONS
═══════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease-out),
                transform 0.65s var(--ease-out);
}

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


/* ═══════════════════════════════════════════════════
   RESPONSIVE — tablet
═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .hero-feature {
        min-height: auto;
    }



    .resume-story-inner {
        grid-template-columns: 1fr;
    }

    .resume-story-grid {
        grid-template-columns: 1fr;
    }
    .project-layout,
    .project-layout-flip {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-layout-flip .project-image-wrap,
    .project-layout-flip .project-body {
        order: unset;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE — mobile
═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .nav-inner   { padding: 0 24px; }
    .hero        { padding: 104px 24px 64px; }
    .hero-inner { gap: 36px; }
    .hero-feature { padding: 20px; }
    .resume-story { padding: 0 24px 56px; }
    .projects    { padding: 0 24px 96px; }
    .stack-inner { padding: 64px 24px; }
    .contact-section { padding: 72px 24px; }
    .site-footer { padding: 24px; }

    .projects-header { padding: 60px 0 40px; }
    .project         { padding: 40px 0; }
    .resume-story-inner { padding: 44px 0; }
    .resume-card { min-height: auto; }


    .nav-links { gap: 20px; }
    .nav-link  { display: none; }


    .stack-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .project-image-wrap {
        aspect-ratio: 4 / 3;
    }
}
