:root {
    --paper: #f7f7f5;
    --surface: #ffffff;
    --ink: #1d1d1f;
    --muted: #77777c;
    --line: #dededb;
    --blue: #1769e0;
    --content: 1120px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ── NAV ── */
nav {
    order: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 60px;
    padding: 0 max(6%, calc((100vw - var(--content)) / 2));
    display: flex;
    align-items: center;
    background: rgba(247, 247, 245, 0.92);
    border-bottom: 1px solid rgba(29, 29, 31, 0.08);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.logo {
    color: var(--ink);
    font-size: 0.96rem;
    font-weight: 650;
}

.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hamburger div {
    width: 20px;
    height: 1.5px;
    margin: 5px 0;
    background: var(--ink);
}

.nav-links {
    position: static;
    width: auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 30px;
    background: transparent;
    border: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
}

.nav-links a {
    padding: 8px 0;
    color: #55555b;
    font-size: 0.82rem;
    font-weight: 450;
    text-decoration: none;
    transition: color 180ms ease;
}

.nav-links a:hover { color: var(--blue); }

/* ── SECTIONS ── */
section {
    order: 5;
    width: 100%;
    min-height: 0;
    padding: 100px max(7%, calc((100vw - var(--content)) / 2));
    display: block;
    scroll-margin-top: 60px;
}

/* ── HERO ── */
#home {
    order: 1;
    position: relative;
    min-height: min(810px, calc(100svh - 60px));
    padding-top: 72px;
    padding-bottom: 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
    align-items: center;
    gap: clamp(42px, 8vw, 112px);
}

.home-text { order: 0; max-width: 650px; }

.home-role, .section-index {
    margin: 0 0 26px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.09em;
}

.home-role::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}

.home-text h1 {
    max-width: 760px;
    margin: 0 0 26px;
    color: var(--ink);
    font-size: 5.4rem;
    font-weight: 600;
    line-height: 0.98;
}

.home-text h1 span { color: #8c8c91; }

.home-text > p:not(.home-role) {
    max-width: 480px;
    color: #5f5f65;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    color: #fff;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 550;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease;
}

.btn:hover { background: var(--blue); transform: translateY(-2px); }

.text-link {
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 550;
    text-decoration: none;
}

.text-link span {
    display: inline-block;
    margin-left: 4px;
    color: var(--blue);
    transition: transform 180ms ease;
}

.text-link:hover span { transform: translate(2px, -2px); }

.hero-footnote {
    margin-top: 66px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.73rem;
}

.footnote-line { width: 32px; height: 1px; background: #b8b8b8; }

.home-img {
    order: 1;
    width: 100%;
    max-width: 420px;
    margin: 0;
    justify-self: end;
    display: block;
    position: relative;
}

/* Glow overlay on hover */
.home-img::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 3px;
    background: radial-gradient(ellipse at 50% 28%, rgba(255,255,255,0.32) 0%, rgba(200,200,200,0.08) 45%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 500ms ease;
}

.home-img:hover::before { opacity: 1; }

.home-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 3px;
    background: #e8e8e6;
    box-shadow: 0 28px 70px rgba(27, 30, 38, 0.12);
    transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1),
                filter 500ms ease,
                box-shadow 500ms ease;
}

.home-img img:hover {
    transform: translateY(-4px);
    filter: grayscale(1) contrast(1.55) brightness(1.15);
    box-shadow: 0 28px 80px rgba(27, 30, 38, 0.22), 0 0 0 1px rgba(0,0,0,0.08);
}

/* Mobile shake reveal class */
.home-img img.shake-reveal {
    animation: shakeReveal 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shakeReveal {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
    15%  { transform: translate3d(-8px, 0, 0) rotate(-2deg); }
    30%  { transform: translate3d(8px, 0, 0) rotate(2deg); }
    45%  { transform: translate3d(-6px, 0, 0) rotate(-1deg); }
    60%  { transform: translate3d(6px, 0, 0) rotate(1deg); }
    75%  { transform: translate3d(-3px, 0, 0) rotate(0deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.home-img figcaption {
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #8a8a8e;
    font-size: 0.6rem;
    letter-spacing: 0.07em;
}

.scroll-cue {
    position: absolute;
    right: max(7%, calc((100vw - var(--content)) / 2));
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #77777c;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-decoration: none;
}

.scroll-cue-line {
    width: 34px;
    height: 1px;
    background: var(--blue);
    transform-origin: left;
    animation: cueLine 1.7s ease-in-out infinite;
}

@keyframes cueLine {
    0%, 100% { transform: scaleX(0.4); opacity: 0.5; }
    50% { transform: scaleX(1); opacity: 1; }
}

/* ── PORTFOLIO SECTION ── */
#portfolio {
    order: 2;
    position: relative;
    color: #f5f5f7;
    background-color: #060608;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-ambient-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.portfolio-backdrop-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.95;
}

#portfolio > *:not(.portfolio-ambient-bg) {
    position: relative;
    z-index: 1;
}

#portfolio .section-heading {
    max-width: 1200px;
    margin: 0 auto 36px;
    padding: 0 16px;
}

#portfolio .home-role, #portfolio .section-index {
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.1em;
}

#portfolio .home-role::before {
    background: #4e8cff;
    box-shadow: 0 0 10px rgba(78, 140, 255, 0.6);
}

#portfolio .section-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 10px;
}

#portfolio .section-intro {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 400px;
}

#portfolio .portfolio-subheading {
    color: #fff;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 4px 0 0;
}

#portfolio .youtube-work,
#portfolio .mwa-work {
    max-width: 1200px;
    margin: 70px auto 0;
    padding: 44px 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#portfolio .youtube-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

#portfolio .text-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

#portfolio .text-link:hover { color: #4e8cff; }

/* ── 3D CAROUSEL ── */
.carousel3d {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    padding: 8px 0 16px;
    outline: none;
    /* No perspective on container — applied per-card instead for perf */
}

.carousel3d__stage {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 520px;
    position: relative;
    overflow: visible;
}

.carousel3d__card {
    width: 100%;
    max-width: 380px;
    position: absolute;
    will-change: transform, opacity, filter;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

.carousel3d__card--active {
    opacity: 1;
    z-index: 20;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
    cursor: pointer;
}

.carousel3d__card--next {
    opacity: 0.42;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    filter: blur(5px);
    transform: translate3d(58%, 0, 0) scale(0.87) perspective(900px) rotateY(-10deg);
}

.carousel3d__card--prev {
    opacity: 0.42;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    filter: blur(5px);
    transform: translate3d(-58%, 0, 0) scale(0.87) perspective(900px) rotateY(10deg);
}

.carousel3d__card--hidden {
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0) scale(0.8);
}

/* Card Shell */
.carousel3d__card-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.carousel3d__card--active .carousel3d__card-link:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.65);
}

/* Image Wrap Base */
.carousel3d__card-image-wrap {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #0d0d0f;
    border-radius: 1.1rem 1.1rem 0 0;
}

/* 1. Video (9:16) */
.carousel3d--video .carousel3d__stage { height: 700px; }
.carousel3d--video .carousel3d__card { max-width: 300px; }

.carousel3d__card-image-wrap--video {
    width: 100%;
    aspect-ratio: 9 / 16;
}

.carousel3d__card-image-wrap--video .carousel3d__card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 2. YouTube (16:9) */
.carousel3d--youtube .carousel3d__stage { height: 430px; }
.carousel3d--youtube .carousel3d__card { max-width: 380px; }

.carousel3d__card-image-wrap--youtube {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.carousel3d__card-image-wrap--youtube .carousel3d__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.carousel3d__card--active .carousel3d__card-link:hover .carousel3d__card-image {
    transform: scale(1.04);
}

/* 3. MWA (3:4) */
.carousel3d--mwa .carousel3d__stage { height: 570px; }
.carousel3d--mwa .carousel3d__card { max-width: 310px; }

.carousel3d__card-image-wrap--mwa {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.carousel3d__card-image-wrap--mwa .carousel3d__card-image,
.carousel3d__card-image-wrap--mwa .carousel3d__card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sound Button (corner icon) */
.carousel3d__sound-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 6;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel3d__sound-toggle:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.08);
}

.carousel3d__sound-toggle .sound-svg { display: none; }
.carousel3d__sound-toggle .sound-svg--muted { display: block; }
.carousel3d__card--unmuted .carousel3d__sound-toggle .sound-svg--muted { display: none; }
.carousel3d__card--unmuted .carousel3d__sound-toggle .sound-svg--active { display: block; }

/* Center Sound Toast */
.carousel3d__sound-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.carousel3d__sound-toast .sound-toast-svg { display: none; }
.carousel3d__sound-toast .sound-toast-svg--muted { display: block; }
.carousel3d__card--unmuted .carousel3d__sound-toast .sound-toast-svg--muted { display: none; }
.carousel3d__card--unmuted .carousel3d__sound-toast .sound-toast-svg--active { display: block; }

.carousel3d__sound-toast.is-animating {
    animation: igSoundToast 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes igSoundToast {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    38%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
}

/* YouTube Play Badge */
.carousel3d__play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
    pointer-events: none;
}

.carousel3d__card--active .carousel3d__card-link:hover .carousel3d__play-badge {
    transform: translate(-50%, -50%) scale(1.12);
    background: #e00;
    border-color: #e00;
}

/* Instagram Badge */
.carousel3d__ig-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Card Body */
.carousel3d__card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    text-align: left;
}

.carousel3d__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.carousel3d__card-tag {
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 2px 8px;
    font-size: 0.64rem;
    font-weight: 500;
}

.carousel3d__card-title {
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.carousel3d__card-arrow-icon {
    font-size: 1rem;
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.carousel3d__card--active .carousel3d__card-link:hover .carousel3d__card-arrow-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}

.carousel3d__card-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel3d__card-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 10px;
}

.carousel3d__card-role,
.carousel3d__card-year {
    color: rgba(255, 255, 255, 0.38);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.65rem;
    font-weight: 500;
}

/* Nav Arrows */
.carousel3d__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 30;
}

.carousel3d__arrow:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.08);
}

.carousel3d__arrow--prev { left: clamp(4px, 2vw, 20px); }
.carousel3d__arrow--next { right: clamp(4px, 2vw, 20px); }

/* Dots */
.carousel3d__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.carousel3d__dot {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 100px;
    width: 6px;
    height: 6px;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel3d__dot--active {
    background: rgba(255, 255, 255, 0.8);
    width: 22px;
}

.carousel3d__dot:hover:not(.carousel3d__dot--active) {
    background: rgba(255, 255, 255, 0.42);
}

/* ── CAROUSEL MEDIA QUERIES ── */
@media (max-width: 1024px) {
    .carousel3d--video .carousel3d__stage { height: 630px; }
    .carousel3d--video .carousel3d__card { max-width: 265px; }
    .carousel3d--youtube .carousel3d__stage { height: 400px; }
    .carousel3d--youtube .carousel3d__card { max-width: 340px; }
    .carousel3d--mwa .carousel3d__stage { height: 530px; }
    .carousel3d--mwa .carousel3d__card { max-width: 285px; }
    .carousel3d__card--next { transform: translate3d(52%, 0, 0) scale(0.86) perspective(900px) rotateY(-9deg); }
    .carousel3d__card--prev { transform: translate3d(-52%, 0, 0) scale(0.86) perspective(900px) rotateY(9deg); }
}

@media (max-width: 768px) {
    .carousel3d { overflow: hidden; }

    .carousel3d--video .carousel3d__stage { height: 580px; }
    .carousel3d--video .carousel3d__card { max-width: min(250px, 68vw); }
    .carousel3d--youtube .carousel3d__stage { height: 350px; }
    .carousel3d--youtube .carousel3d__card { max-width: min(300px, 72vw); }
    .carousel3d--mwa .carousel3d__stage { height: 490px; }
    .carousel3d--mwa .carousel3d__card { max-width: min(262px, 68vw); }

    /* Side cards: visible but no blur (blur causes lag on mobile GPU) */
    .carousel3d__card--next {
        opacity: 0.38;
        transform: translate3d(54%, 0, 0) scale(0.84);
        pointer-events: auto;
        cursor: pointer;
    }
    .carousel3d__card--prev {
        opacity: 0.38;
        transform: translate3d(-54%, 0, 0) scale(0.84);
        pointer-events: auto;
        cursor: pointer;
    }

    .carousel3d__arrow { display: none; }

    #portfolio .youtube-work,
    #portfolio .mwa-work {
        margin-top: 56px;
        padding-top: 32px;
    }
}

@media (max-width: 480px) {
    .carousel3d--video .carousel3d__stage { height: 540px; }
    .carousel3d--video .carousel3d__card { max-width: min(232px, 66vw); }
    .carousel3d--youtube .carousel3d__stage { height: 320px; }
    .carousel3d--youtube .carousel3d__card { max-width: min(278px, 72vw); }
    .carousel3d--mwa .carousel3d__stage { height: 460px; }
    .carousel3d--mwa .carousel3d__card { max-width: min(242px, 66vw); }

    .carousel3d__card--next {
        opacity: 0.32;
        transform: translate3d(50%, 0, 0) scale(0.82);
    }
    .carousel3d__card--prev {
        opacity: 0.32;
        transform: translate3d(-50%, 0, 0) scale(0.82);
    }

    .carousel3d__card-body { padding: 11px 13px 13px; }
    .carousel3d__card-title { font-size: 0.98rem; }
    .carousel3d__dots { margin-top: 14px; }
}

/* ── ABOUT ── */
#about {
    order: 3;
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.about-container {
    max-width: var(--content);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px 72px;
}

.education, .skills, .awards { min-width: 0; }
.awards { grid-column: 1 / -1; }

.sub-title { margin-bottom: 22px; font-size: 1.7rem; }

.timeline { padding-left: 20px; border-left: 1px solid #d3d3d0; }

.timeline-entry { margin-bottom: 22px; }

.timeline-item { position: relative; }

.timeline-item::before {
    position: absolute;
    left: -25px;
    top: 5px;
    width: 9px;
    height: 9px;
    content: "";
    background: var(--blue);
    border: 2px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--blue);
}

.timeline-item h4 {
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 580;
}

.timeline-item p {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.65;
}

.year-badge {
    display: inline-block;
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.skill-box { margin-bottom: 18px; }

.skill-info {
    margin-bottom: 7px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink);
    font-size: 0.84rem;
}

.skill-info span:last-child { color: var(--muted); }

.skill-bar {
    position: relative;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: #e4e4e1;
    border-radius: 99px;
}

.skill-per {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--target);
    background: var(--blue);
    border-radius: inherit;
}

/* ── CONTACT ── */
#contact {
    order: 4;
    padding-top: 90px;
    padding-bottom: 26px;
    color: var(--ink);
    background: var(--surface);
    border-top: 1px solid var(--line);
}

#contact .section-title {
    margin: 0;
    color: var(--ink);
    font-size: 4.5rem;
    line-height: 0.98;
}

.contact-container {
    width: 100%;
    max-width: var(--content);
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.contact-card {
    min-width: 0;
    padding: 16px 0 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease;
}

.contact-card h4 {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 550;
}

.contact-card p {
    margin: 0;
    color: var(--ink);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

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

/* ── FOOTER ── */
.site-footer {
    order: 5;
    width: min(var(--content), 86%);
    margin: 52px auto 0;
    padding: 18px 0 8px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.68rem;
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

/* ── SCROLL PROGRESS ── */
.scroll-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    height: 2px;
    pointer-events: none;
}

#scroll-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
}

/* ── REVEAL ANIMATIONS ── */
html.has-reveal .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 650ms cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.has-reveal .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── GLOBAL RESPONSIVE ── */
@media (max-width: 900px) {
    #home {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 0.72fr);
        gap: 42px;
    }
    .home-text h1 { font-size: 4rem; }
}

@media (max-width: 680px) {
    nav { min-height: 54px; padding: 0 6%; }

    .hamburger { display: block; }

    .nav-links {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 10px 6% 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(247, 247, 245, 0.98);
        border-bottom: 1px solid var(--line);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
    }

    .nav-links.nav-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        font-size: 0.94rem;
    }

    .nav-links a:last-child { border: 0; }

    section { padding: 72px 6%; }

    #home {
        min-height: 0;
        padding-top: 44px;
        padding-bottom: 70px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
    }

    .home-text h1 { font-size: 3.1rem; }
    .home-text > p:not(.home-role) { font-size: 0.94rem; }
    .hero-footnote { margin-top: 30px; flex-wrap: wrap; }
    .home-img { width: min(100%, 390px); max-width: none; justify-self: start; }
    .home-img img { aspect-ratio: 4 / 4.6; }
    .scroll-cue { right: 6%; bottom: 22px; }

    .about-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .awards { grid-column: auto; }

    .contact-container { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    #contact { padding-top: 72px; }
    #contact .section-title { font-size: 3rem; }

    .site-footer { width: 100%; margin-top: 40px; flex-wrap: wrap; }
}

@media (max-width: 380px) {
    .home-text h1 { font-size: 2.7rem; }
    #contact .section-title { font-size: 2.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
