/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
    --bg:         #06090e;
    --bg-2:       #0b0f18;
    --bg-card:    #10141f;
    --gold:       #c8a96e;
    --gold-lt:    #e2cfa0;
    --gold-dk:    #9a7840;
    --white:      #f5f0e8;
    --muted:      #7a8499;
    --border:     rgba(200,169,110,.14);
    --border-hv:  rgba(200,169,110,.40);
    --ff-serif:   'Cormorant Garamond', Georgia, serif;
    --ff-sans:    'DM Sans', system-ui, sans-serif;
    --ease:       cubic-bezier(.25,.46,.45,.94);
    --t:          .4s var(--ease);
    --t-slow:     .8s var(--ease);
}

/* ─── BASE ───────────────────────────────────────────────── */
body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--ff-sans);
    line-height: 1.7;
    overflow-x: hidden;
}
::-webkit-scrollbar          { width: 4px; }
::-webkit-scrollbar-track    { background: var(--bg); }
::-webkit-scrollbar-thumb    { background: var(--gold-dk); border-radius: 2px; }
::selection                  { background: rgba(200,169,110,.25); color: var(--white); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--ff-serif); font-weight: 400; line-height: 1.05; }

.label {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
}
.label::after {
    content: '';
    display: block;
    width: 36px;
    height: 1px;
    background: var(--gold);
    opacity: .6;
}

.section-title {
    font-size: clamp(2.4rem,4.5vw,4rem);
    font-weight: 300;
    color: var(--white);
    margin-top: .75rem;
    margin-bottom: 1.25rem;
}
.section-title em { font-style: italic; color: var(--gold-lt); }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2.25rem; }
section { padding: 8rem 0; }

/* ─── REVEAL ─────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .10s; }
.d2 { transition-delay: .20s; }
.d3 { transition-delay: .30s; }
.d4 { transition-delay: .40s; }
.d5 { transition-delay: .50s; }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2.25rem;
    font-family: var(--ff-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: var(--t);
    cursor: pointer;
    border: none;
}
.btn-gold {
    background: var(--gold);
    color: var(--bg);
}
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,.18);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ═══════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════ */
#nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 900;
    padding: 1.6rem 0;
    transition: var(--t);
}
#nav.scrolled {
    background: rgba(6,9,14,.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}
.nav-logo img {
    height: 38px;
    width: auto;
    display: block;
    transition: var(--t);
}
#nav.scrolled .nav-logo img { height: 32px; }
.nav-logo:hover img { opacity: .8; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.25rem;
    align-items: center;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    transition: color var(--t);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--gold);
    transition: width var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
    padding: .5rem 1.5rem;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    border-radius: 2px;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--bg) !important; }
.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--white);
    transition: var(--t);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px,4.5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 800;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    font-family: var(--ff-serif);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    transition: color var(--t);
}
.mobile-menu a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
#hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* Layered background */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 50%, rgba(200,169,110,.07) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 85% 20%, rgba(200,169,110,.04) 0%, transparent 55%),
        var(--bg);
}

/* Animated neural-network canvas */
.hero-net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    animation: fadeNet 2s ease .4s forwards;
    /* fade the network out towards the edges and behind the text column */
    mask-image:
        radial-gradient(ellipse 85% 80% at 60% 50%, black 30%, transparent 85%),
        linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    -webkit-mask-image:
        radial-gradient(ellipse 85% 80% at 60% 50%, black 30%, transparent 85%),
        linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}
@keyframes fadeNet { to { opacity: 1; } }

/* Slow-drifting glow orbs behind the network */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    pointer-events: none;
    will-change: transform;
}
.hero-orb.a {
    width: 55vw; height: 55vw; max-width: 720px; max-height: 720px;
    left: -12%; top: 5%;
    background: radial-gradient(circle, rgba(200,169,110,.22), transparent 65%);
    animation: orbA 26s ease-in-out infinite alternate;
}
.hero-orb.b {
    width: 42vw; height: 42vw; max-width: 560px; max-height: 560px;
    right: -8%; bottom: -10%;
    background: radial-gradient(circle, rgba(226,207,160,.14), transparent 65%);
    animation: orbB 32s ease-in-out infinite alternate;
}
@keyframes orbA { to { transform: translate(14vw, 12vh) scale(1.12); } }
@keyframes orbB { to { transform: translate(-10vw, -14vh) scale(.92); } }

@media (prefers-reduced-motion: reduce) {
    .hero-orb { animation: none; }
    .hero-net { animation: none; opacity: 1; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: flex-end;
    padding-bottom: 6rem;
    width: 100%;
}

.hero-eyebrow {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeUp .8s var(--ease) .3s forwards;
}

.hero-name {
    font-size: clamp(4rem, 9.5vw, 9rem);
    font-weight: 300;
    line-height: .95;
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease) .55s forwards;
}
.hero-name .line1 { display: block; color: var(--white); }
.hero-name .line2 {
    display: block;
    font-style: italic;
    color: var(--gold-lt);
    margin-left: 2rem;
}

.hero-rule {
    width: 56px; height: 1px;
    background: var(--gold);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp .7s var(--ease) .75s forwards;
}

.hero-desc {
    font-size: .97rem;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.85;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp .7s var(--ease) .9s forwards;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2.75rem;
    opacity: 0;
    animation: fadeUp .7s var(--ease) 1.05s forwards;
}
.hero-tag {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    padding: .38rem 1rem;
    border: 1px solid rgba(200,169,110,.28);
    border-radius: 2px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .7s var(--ease) 1.2s forwards;
}

/* Right-side stats */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    text-align: right;
    padding-bottom: .5rem;
    opacity: 0;
    animation: fadeLeft .7s var(--ease) 1.4s forwards;
}
.hero-stat-num {
    font-family: var(--ff-serif);
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1;
}
.hero-stat-num sup { font-size: 1.5rem; color: var(--gold); }
.hero-stat-lbl {
    font-size: .64rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .3rem;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    opacity: 0;
    animation: fadeIn 1s ease 2.2s forwards;
}
.hero-scroll span {
    font-size: .6rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
}
.scroll-line {
    width: 1px; height: 52px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollBob 2.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════════ */
#about { background: var(--bg-2); }

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 6rem;
    align-items: start;
}

/* Image column */
.about-img-wrap { position: relative; }

.about-img-frame {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 2px;
    background: var(--bg-card);
}
/* Gold border overlay */
.about-img-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(200,169,110,.22);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
}
.about-img-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(15%);
    transition: filter var(--t-slow);
}
.about-img-frame:hover img { filter: grayscale(0%); }

/* Monogram fallback */
.about-monogram {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), #0e1320);
}
.about-monogram span {
    font-family: var(--ff-serif);
    font-size: 8rem;
    font-weight: 300;
    color: var(--gold);
    opacity: .22;
    letter-spacing: -.04em;
}

/* Accent border box */
.about-accent {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    width: 140px; height: 140px;
    border: 1px solid rgba(200,169,110,.18);
    border-radius: 2px;
    z-index: -1;
}

/* Floating tag */
.about-badge {
    position: absolute;
    bottom: 1.5rem;
    left: -1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .85rem 1.25rem;
    z-index: 3;
    border-radius: 2px;
}
.about-badge-title {
    font-family: var(--ff-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--gold);
    line-height: 1;
}
.about-badge-sub {
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .3rem;
}

/* Text column */
.about-text p {
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}
.about-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--border);
}
.meta-item-lbl {
    font-size: .63rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .25rem;
}
.meta-item-val {
    font-size: .9rem;
    color: var(--white);
}
.meta-item-val a { color: var(--white); text-decoration: none; transition: color var(--t); }
.meta-item-val a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   SKILLS
══════════════════════════════════════════════════════════ */
#skills { background: var(--bg); }

.skills-lead {
    max-width: 580px;
    margin-bottom: 4rem;
}
.skills-lead p { font-size: .95rem; color: var(--muted); line-height: 1.85; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
/* Full screen: 1×2 featured row, then 2×3 */
@media (min-width: 1101px) {
    .skills-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .skills-grid .skill-card:nth-child(1),
    .skills-grid .skill-card:nth-child(2) {
        grid-column: span 3;
        border-color: rgba(200,169,110,.32);
    }
    .skills-grid .skill-card:nth-child(1)::before,
    .skills-grid .skill-card:nth-child(2)::before {
        transform: scaleX(1);
    }
    .skills-grid .skill-card:nth-child(1) .skill-card-title,
    .skills-grid .skill-card:nth-child(2) .skill-card-title {
        color: var(--gold-lt);
    }
    .skills-grid .skill-card:nth-child(1) .skill-icon,
    .skills-grid .skill-card:nth-child(2) .skill-icon {
        background: rgba(200,169,110,.16);
        border: 1px solid rgba(200,169,110,.28);
    }
    /* Restore the original gold tag look inside the featured cards */
    .skills-grid .skill-card:nth-child(1) .tag,
    .skills-grid .skill-card:nth-child(2) .tag {
        color: var(--gold);
        background: rgba(200,169,110,.07);
        border-color: rgba(200,169,110,.18);
    }
    .skills-grid .skill-card:nth-child(1) .tag:hover,
    .skills-grid .skill-card:nth-child(2) .tag:hover {
        color: var(--gold-lt);
        border-color: var(--border-hv);
        background: rgba(200,169,110,.14);
    }
    .skills-grid .skill-card:nth-child(n+3) {
        grid-column: span 2;
    }
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    transition: var(--t);
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-dk), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}
.skill-card:hover { border-color: var(--border-hv); }
.skill-card:hover::before { transform: scaleX(1); }

.skill-card-hd {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.skill-icon {
    width: 36px; height: 36px;
    background: rgba(200,169,110,.08);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}
.skill-icon svg { width: 17px; height: 17px; }
.skill-card-title {
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--white);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.tag {
    font-size: .73rem;
    color: var(--muted);
    padding: .28rem .75rem;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 2px;
    transition: var(--t);
}
/* All tags share one style; gold is reserved for hover */
.tag:hover {
    color: var(--gold);
    background: rgba(200,169,110,.07);
    border-color: rgba(200,169,110,.18);
}

/* ═══════════════════════════════════════════════════════════
   EXPERIENCE
══════════════════════════════════════════════════════════ */
#experience { background: var(--bg-2); }

.exp-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 6rem;
}

.exp-sidebar {
    position: sticky;
    top: 8rem;
    height: fit-content;
}
.exp-sidebar p {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.85;
    margin-top: 1rem;
}
/* Credentials — intentionally low-key */
.exp-creds {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.exp-creds-lbl {
    font-size: .6rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-dk);
    margin-bottom: .6rem;
}
.exp-creds ul { list-style: none; }
.exp-creds li {
    font-size: .74rem;
    color: var(--muted);
    line-height: 1.6;
    padding-left: .9rem;
    position: relative;
}
.exp-creds li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--gold-dk);
}

/* Timeline */
.timeline { position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold-dk) 0%, rgba(200,169,110,.08) 100%);
}

.tl-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 3.5rem;
}
.tl-item:last-child { padding-bottom: 0; }

/* Dot */
.tl-item::before {
    content: '';
    position: absolute;
    left: -4px; top: 6px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(200,169,110,.45);
}
.tl-item.current::before {
    width: 13px; height: 13px;
    left: -6px;
    animation: glow 2.2s ease-in-out infinite;
}

.tl-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}
.tl-year {
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--gold);
}
.tl-dur {
    font-size: .68rem;
    color: var(--muted);
}
.tl-now {
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--bg);
    padding: .18rem .6rem;
    border-radius: 2px;
}

.tl-title {
    font-family: var(--ff-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--white);
    display: block;
    line-height: 1.15;
    margin-bottom: .25rem;
}
.tl-company {
    font-size: .82rem;
    font-weight: 500;
    color: var(--gold);
}
.tl-location {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .15rem;
}

.tl-list {
    list-style: none;
    margin-top: 1rem;
}
.tl-list li {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.75;
    padding-left: 1.1rem;
    position: relative;
    margin-bottom: .35rem;
}
.tl-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold-dk);
    font-size: .75rem;
}
.tl-list em { font-style: italic; color: var(--gold-lt); }

/* Personal project cards */
.proj-wrap { margin-top: 7rem; padding-top: 5rem; border-top: 1px solid var(--border); }
.proj-heading {
    font-size: clamp(2rem,3vw,3rem);
    font-weight: 300;
    margin: .75rem 0 2.5rem;
}
.proj-heading em { font-style: italic; color: var(--gold-lt); }
.proj-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.proj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--t);
}
.proj-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-dk), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}
.proj-card:hover { border-color: var(--border-hv); }
.proj-card:hover::before { transform: scaleX(1); }
.proj-card-hd { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.5rem; }
.proj-logo {
    width: 56px; height: 56px;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(200,169,110,.08);
    border: 1px solid rgba(200,169,110,.18);
}
.proj-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-logo-text { font-family: var(--ff-serif); font-size: 1.5rem; color: var(--gold); letter-spacing: .02em; }
.proj-kicker { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .25rem; }
.proj-title { font-family: var(--ff-serif); font-size: 1.7rem; font-weight: 400; line-height: 1.1; color: var(--white); }
.proj-sub { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.proj-role { font-size: .82rem; font-weight: 500; color: var(--white); }
.proj-card .tl-list { margin-bottom: 1.5rem; }
.proj-link {
    margin-top: auto;
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(200,169,110,.35);
    padding-bottom: 2px;
    transition: var(--t);
}
.proj-link:hover { color: var(--gold-lt); border-color: var(--gold-lt); }

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO
══════════════════════════════════════════════════════════ */
#portfolio { background: var(--bg); }

.port-filter {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.filt-btn {
    padding: .45rem 1.2rem;
    font-family: var(--ff-sans);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--t);
}
.filt-btn:hover, .filt-btn.active {
    color: var(--gold);
    border-color: rgba(200,169,110,.38);
    background: rgba(200,169,110,.05);
}

.port-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.port-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    background: var(--bg-card);
    text-decoration: none;
    display: block;
}
.port-item.hidden { display: none; }

.port-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .9s var(--ease);
}
.port-item:hover img { transform: scale(1.07); }
.port-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.port-item:focus-visible .port-overlay { opacity: 1; }
/* Touch devices have no hover — keep captions visible */
@media (hover: none) { .port-overlay { opacity: 1 !important; } }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6,9,14,.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3.5rem 4.5rem;
}
.lightbox.open { display: flex; animation: lbIn .3s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lb-stage img {
    max-width: 100%;
    max-height: calc(100vh - 11rem);
    width: auto; height: auto;
    border-radius: 2px;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    background: var(--bg-card);
}
.lb-cap { font-family: var(--ff-serif); font-size: 1.3rem; color: var(--white); }
.lb-link {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(200,169,110,.35);
    padding-bottom: 2px;
    transition: var(--t);
}
.lb-link:hover { color: var(--gold-lt); border-color: var(--gold-lt); }
.lb-link[hidden] { display: none; }
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: none;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    width: 44px; height: 44px;
    color: var(--white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--t);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--gold); color: var(--gold); }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }

/* App screenshot tiles — phone emerging from a branded backdrop */
.port-item.app {
    background: var(--app-bg, var(--bg-card));
}
.port-item.app::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(255,255,255,.10) 0%, transparent 70%);
    pointer-events: none;
}
.port-item.app img {
    position: absolute;
    left: 50%;
    top: 9%;
    width: 46%;
    height: auto;
    transform: translateX(-50%);
    border-radius: 22px;
    border: 3px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    object-fit: initial;
}
.port-item.app:hover img { transform: translateX(-50%) translateY(-10px); }

.port-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,9,14,.94) 0%, rgba(6,9,14,.25) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity var(--t);
}
.port-item:hover .port-overlay { opacity: 1; }

.port-cat {
    font-size: .63rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .3rem;
}
.port-name {
    font-family: var(--ff-serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   APPS (Mazyte Studio)
══════════════════════════════════════════════════════════ */
#apps { background: var(--bg-2); }

.apps-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7rem;
    align-items: center;
}

/* Two overlapping phone screenshots */
.apps-stack {
    position: relative;
    height: 560px;
}
.phone-a, .phone-b {
    position: absolute;
    overflow: hidden;
    border-radius: 28px;
    background: var(--bg-card);
    border: 3px solid rgba(255,255,255,.08);
    box-shadow: 0 30px 70px rgba(0,0,0,.6);
    transition: transform var(--t-slow);
}
.phone-a {
    top: 0; left: 6%;
    width: 46%; aspect-ratio: 552/1200;
    z-index: 2;
}
.phone-b {
    bottom: 0; right: 6%;
    width: 46%; aspect-ratio: 552/1200;
}
.phone-a:hover, .phone-b:hover { transform: translateY(-8px); }
.phone-a img, .phone-b img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.apps-text p {
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}
.apps-text p a { color: var(--gold-lt); text-decoration: none; border-bottom: 1px solid rgba(200,169,110,.35); transition: var(--t); }
.apps-text p a:hover { color: var(--gold); border-color: var(--gold); }

.apps-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.as-num {
    font-family: var(--ff-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
}
.as-lbl {
    font-size: .63rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .3rem;
}

/* App cards */
.app-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.app-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: var(--t);
}
.app-card:hover { border-color: var(--border-hv); transform: translateY(-2px); }
.app-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #fdfdfc;
    border: 1px solid rgba(255,255,255,.1);
}
.app-card-icon img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; }
.app-card-name { font-family: var(--ff-serif); font-size: 1.1rem; color: var(--white); line-height: 1.1; }
.app-card-sub { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }

.apps-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.apps-actions .btn img { height: 18px; width: 18px; border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════ */
#contact { background: var(--bg); }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7rem;
}

.contact-lead p {
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 2.5rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
.ci {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.ci-icon {
    width: 38px; height: 38px;
    background: rgba(200,169,110,.07);
    border: 1px solid rgba(200,169,110,.18);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
}
.ci-icon svg { width: 16px; height: 16px; }
.ci-lbl {
    font-size: .63rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: .2rem;
}
.ci-val { font-size: .9rem; color: var(--white); }
.ci-val a { color: var(--white); text-decoration: none; transition: color var(--t); }
.ci-val a:hover { color: var(--gold); }

.socials { display: flex; gap: .75rem; }
.social-btn {
    width: 44px; height: 44px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    text-decoration: none;
    transition: var(--t);
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(200,169,110,.05); }

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-lbl {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.form-ctrl {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 2px;
    padding: .9rem 1.2rem;
    color: var(--white);
    font-family: var(--ff-sans);
    font-size: .9rem;
    width: 100%;
    transition: border-color var(--t);
}
.form-ctrl:focus { outline: none; border-color: rgba(200,169,110,.45); }
.form-ctrl::placeholder { color: rgba(122,132,153,.6); }
textarea.form-ctrl { resize: vertical; min-height: 140px; }
.form-ctrl:disabled, .contact-form button:disabled { opacity: .6; cursor: not-allowed; }
.form-status {
    font-size: .85rem;
    line-height: 1.5;
    padding: .9rem 1.1rem;
    border-radius: 2px;
    display: none;
}
.form-status.show { display: block; }
.form-status.ok {
    color: #d8e8c8;
    background: rgba(120,160,90,.12);
    border: 1px solid rgba(120,160,90,.35);
}
.form-status.err {
    color: #f0c8c0;
    background: rgba(180,80,70,.12);
    border: 1px solid rgba(180,80,70,.35);
}
/* Honeypot — must stay invisible to humans */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.foot-copy { font-size: .73rem; color: var(--muted); }
.foot-links { display: flex; gap: 1.5rem; list-style: none; }
.foot-links a { font-size: .73rem; color: var(--muted); text-decoration: none; transition: color var(--t); }
.foot-links a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: .75; }
}
@keyframes scrollBob {
    0%,100% { transform: scaleY(1); opacity: 1; }
    50%     { transform: scaleY(.5); opacity: .3; }
}
@keyframes glow {
    0%,100% { box-shadow: 0 0 10px rgba(200,169,110,.45); }
    50%     { box-shadow: 0 0 22px rgba(200,169,110,.9), 0 0 42px rgba(200,169,110,.3); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .about-grid { grid-template-columns: 1fr; gap: 4rem; }
    .about-img-wrap { max-width: 280px; margin: 0 auto; }
    .exp-layout { grid-template-columns: 1fr; gap: 4rem; }
    .exp-sidebar { position: static; }
    .proj-cards { grid-template-columns: 1fr; }
    .apps-inner { grid-template-columns: 1fr; }
    .apps-stack { height: 460px; max-width: 420px; margin: 0 auto; width: 100%; }
    .contact-layout { grid-template-columns: 1fr; gap: 4rem; }
    .hero-stats { display: none; }
    .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 5rem 0; }
    .nav-links { display: none; }
    .hamburger { display: flex; }

    /* Clear the fixed nav so the logo never sits on the hero eyebrow */
    #hero {
        align-items: flex-start;
        padding-top: 5.75rem;
    }
    .hero-inner {
        padding-top: .5rem;
        padding-bottom: 5rem;
        align-items: flex-start;
    }
    .hero-name { font-size: clamp(3.2rem, 14vw, 4.5rem); }
    .hero-name .line2 { margin-left: .75rem; }

    .port-grid { grid-template-columns: 1fr 1fr; }

    .about-badge { left: -1rem; }
    .about-meta { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .foot-row { flex-direction: column; gap: 1.25rem; text-align: center; }
    .foot-links { justify-content: center; }
    .apps-stats { grid-template-columns: 1fr 1fr; }
    .app-cards { grid-template-columns: 1fr; }
    .apps-actions { flex-direction: column; align-items: stretch; }
    .nav-logo img { height: 30px; }
    .lightbox { padding: 4rem 1rem 2rem; }
    .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
    .lb-prev { left: calc(50% - 56px); }
    .lb-next { right: calc(50% - 56px); }
}

@media (max-width: 520px) {
    .port-grid { grid-template-columns: 1fr; }
    .apps-stack { height: 400px; }
}
