html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    font-family: 'Inter', sans-serif;
    background-color: #1f1f24;
    color: white;
}

/* Base spacing helper */
.text-box p + p {
    margin-top: 1.5rem;
}

.text-box #text1,
.text-box #text2 {
    color: rgba(255,255,255,0.75);
    line-height: 1.65;
}

/* Screen reader only helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   CONTAINER
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* =========================================
   NAV BAR
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.85);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    color: #ffffff;
    font-size: 1.4rem;
    text-transform: uppercase;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
}

/* =========================================
   HOME
   ========================================= */
.home {
    position: relative;
    min-height: 100vh;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: pointer;
    z-index: 0;
}

.home-overlay {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 5.5rem 2rem 2rem;
}

.home-overlay-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.home-title {
    margin: 0 0 0.75rem;
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: 0.2px;
}

.home-subtitle {
    margin: 0 auto 0.75rem;
    max-width: 720px;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
}

.home-hint {
    margin: 0;
    color: rgba(255,255,255,0.58);
    font-size: 0.95rem;
}

/* =========================================
   WORKS
   ========================================= */
.works-page {
    background-color: #000A1F;
    padding: 4rem 2rem;
    min-height: 100vh;
}

.works-intro p {
    max-width: 900px;
    margin: 0 auto;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.project-card h3 {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.project-card:hover h3 {
    color: #FFA500;
}

.project-card:hover img {
    transform: scale(1.02);
}

/* Works: tabs */
.works-filters {
    margin-top: 18px;
    margin-bottom: 18px;
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

.tab {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.78);
    padding: 10px 14px;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.tab:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.22);
}

.tab.is-active {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.30);
    color: rgba(255,255,255,0.92);
}

/* Works: filtering */
.project-card.is-hidden {
    display: none;
}

/* =========================================
   PROJECT DETAIL PAGE
   ========================================= */
.project-page {
    padding: 4rem 2rem;
    background: #1f1f24;
    color: white;
}

.project-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.project-title {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.back-arrow {
    display: inline-block;
    color: #aaa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-arrow:hover {
    color: #fff;
}

.three-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Cards */
.text-box {
    background-color: #26262b;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}

.text-box h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
    letter-spacing: 0.2px;
}

.text-box p {
    margin: 0;
    color: rgba(255,255,255,0.75);
    line-height: 1.65;
}

.text-box ul,
.text-box ol {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.65;
}

.text-box li + li {
    margin-top: 0.35rem;
}

.project-img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* Credits */
.credits {
    margin: 0;
    color: rgba(255,255,255,0.60);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Image scroll */
.image-col {
    max-height: 1200px;
    overflow: hidden;
}

.image-scroll-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: 700px;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.image-scroll-vertical::-webkit-scrollbar {
    width: 8px;
}

.image-scroll-vertical::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.22);
    border-radius: 8px;
}

.image-scroll-vertical::-webkit-scrollbar-track {
    background: transparent;
}

.image-scroll-vertical img,
.image-scroll-vertical video,
.image-scroll-vertical iframe {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* =========================================
   SNAPSHOT
   ========================================= */
.project-snapshot {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.project-snapshot h2 {
    margin-bottom: 0.9rem;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.snap {
    display: grid;
    grid-template-columns: 84px 1fr;
    align-items: baseline;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.18);
}

.snap strong {
    font-weight: 600;
    color: rgba(255,255,255,0.60);
    letter-spacing: 0.2px;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.snap span {
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
    line-height: 1.35;
}

.project-snapshot.text-box {
    box-shadow: none;
}/* =========================================
   ABOUT
   ========================================= */
.about-page {
    background: #1f1f24;
    color: #fff;
    padding: 4rem 2rem;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.25rem;
    align-items: start;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

/* Keep your existing two-column blocks (text + image), but make them read as separate units */
.about-flex-pair {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.25rem;

    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.6rem;
}

.about-flex-pair.reverse {
    flex-direction: row-reverse;
}

.about-text-block {
    flex: 1 1 auto;
    min-width: 320px;
    max-width: 62ch;
}

.about-text-block h1 {
    font-weight: 600;
    margin: 0 0 0.9rem;
    font-size: 1.9rem;
    letter-spacing: 0.2px;
}

.about-text-block h2 {
    font-weight: 600;
    margin: 1.5rem 0 0.9rem;
    font-size: 1.35rem;
    letter-spacing: 0.2px;
}

.about-text-block p {
    color: rgba(255,255,255,0.78);
    line-height: 1.75;
    margin: 0;
}

.about-text-block p + p {
    margin-top: 1.1rem;
}

.about-text-block a {
    color: rgba(255,255,255,0.78);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.about-text-block a:hover {
    color: rgba(255,255,255,0.95);
}

.about-image-block {
    flex: 0 0 320px;
    max-width: 320px;
}

.about-image-block img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* RIGHT rail */
.about-aside {
    position: sticky;
    top: 92px;
    align-self: start;
}

/* Skills card becomes a contained, scrollable unit */
.about-aside .skills-unit {
    background-color: #26262b;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
    padding: 1.05rem;

    max-height: calc(100vh - 120px);
    overflow: auto;

    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.20) transparent;
}

.about-aside .skills-unit::-webkit-scrollbar {
    width: 8px;
}

.about-aside .skills-unit::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 8px;
}

.about-aside .skills-unit::-webkit-scrollbar-track {
    background: transparent;
}

.skills-title {
    margin: 0 0 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;

    position: sticky;
    top: 0;
    background: #26262b;
    padding: 0.2rem 0 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 1;
}

.skills-group + .skills-group {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.skills-group h3 {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.92);
}

.skills-unit ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skills-unit li + li {
    margin-top: 0.7rem;
}

.skills-unit strong {
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.90);
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.skill-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
}
/* Skill → project links */
.skill-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    padding: 4px 8px;
    border-radius: 6px;

    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);

    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.2;

    transition:
            background 0.2s ease,
            border-color 0.2s ease,
            color 0.2s ease,
            transform 0.15s ease;
}

/* subtle arrow cue */
.skill-links a::after {
    content: "→";
    font-size: 0.85em;
    opacity: 0.6;
}

/* hover state */
.skill-links a:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.16);
    color: #fff;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1000px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-aside {
        position: static;
        top: auto;
    }

    .about-aside .skills-unit {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .about-flex-pair {
        flex-direction: column !important;
        align-items: stretch;
        text-align: left;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .about-text-block {
        max-width: none;
        min-width: 0;
        text-align: left;
    }

    .about-image-block {
        flex: 0 0 auto;
        width: 100%;
        max-width: 420px;
    }
}



/* =========================================
   STUDY PLAN
   ========================================= */
.study-plan-page {
    background: #1f1f24;
    color: #fff;
    padding-bottom: 3rem;
}

/* Intro text above slider */
.studyplan-intro {
    max-width: 900px;
    margin: 2.75rem auto 1.75rem;
    padding: 0 2rem;
}

.studyplan-intro h1 {
    margin: 0 0 0.75rem;
    font-size: 2.2rem;
    font-weight: 600;
}

.studyplan-intro p {
    margin: 0;
    color: rgba(255,255,255,0.78);
    line-height: 1.75;
    font-size: 1.05rem;
}

.studyplan-intro p + p {
    margin-top: 1.1rem;
}

.studyplan-intro-hint {
    margin-top: 1.25rem;
    color: rgba(255,255,255,0.60);
    font-size: 0.95rem;
}

/* Slider block */
.slider-block {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 1.25rem;
    padding: 0 2rem;
    text-align: center;
}

.slider-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Rail: inset both track + steps by half-thumb */
.slider-rail {
    --thumb: 18px;
    --thumb-r: calc(var(--thumb) / 2);

    width: min(800px, 100%);
    padding: 0 calc(22px + var(--thumb-r));
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: stretch;
}

/* Track and step row share exact width */
.slider-rail .slider,
.slider-rail .slider-steps {
    width: 100%;
    margin: 0;
}

/* Slider track */
.slider {
    appearance: none;
    height: 8px;
    background: rgba(255,255,255,0.14);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

/* Thumb */
.slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    border: 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    border: 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Pulse thumb until first interaction */
.slider.slider-is-hinting::-webkit-slider-thumb {
    animation: sliderPulse 1.2s ease-in-out infinite;
}
.slider.slider-is-hinting::-moz-range-thumb {
    animation: sliderPulse 1.2s ease-in-out infinite;
}

@keyframes sliderPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Step buttons */
.step-btn {
    justify-self: center;

    appearance: none;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.16);
    color: rgba(255,255,255,0.80);
    padding: 8px 12px;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
    min-width: 42px;
    text-align: center;
    line-height: 1.1;
}

.step-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.26);
}

.step-btn.is-active {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.34);
    color: rgba(255,255,255,0.95);
}

/* Thesis indication for 7/8 */
.step-btn.is-thesis {
    border-color: rgba(255,255,255,0.32);
    background: rgba(255,255,255,0.06);
}

.step-btn.is-thesis::after {
    content: "thesis";
    display: block;
    margin-top: 3px;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.65;
    line-height: 1;
}

.slider-hint {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.70);
}

/* Courses under slider */
.course-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding: 0 2rem;
    margin-top: 1.5rem;
}

.course-pair .text-box {
    flex: 1 1 420px;
    max-width: 600px;
}

/* Narrative story section below */
.studyplan-story {
    max-width: 900px;
    margin: 2.25rem auto 3.5rem;
    padding: 0 2rem;
}

.studyplan-story h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.studyplan-story p {
    margin: 0;
    color: rgba(255,255,255,0.78);
    line-height: 1.75;
    font-size: 1.05rem;
}

.studyplan-story p + p {
    margin-top: 1.25rem;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-page {
    padding: 4rem 2rem;
    color: white;
}

.contact-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-page h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.contact-page a {
    color: #00bcd4;
    text-decoration: none;
}

.contact-page a:hover {
    text-decoration: underline;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 4rem;
}

.contact-page img.project-img {
    width: 65%;
    border-radius: 12px;
    object-fit: cover;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1000px) {
    .three-column-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 2rem;
    }

    .image-col {
        max-height: none;
    }

    .image-scroll-vertical {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .about-flex-pair {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
    }

    .about-text-block {
        text-align: center;
    }

    .about-image-block {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .slider-rail {
        padding: 0 14px;
    }

    .step-btn {
        min-width: 38px;
        padding: 8px 10px;
    }

    .snapshot-grid {
        grid-template-columns: 1fr;
    }
}

.slider-steps {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: start;
    gap: 0;
}

.step-btn {
    justify-self: center;
}

/* Study plan: Research Questions block */
.rq-block {
    display: grid;
    gap: 0.9rem;
}

.rq-label {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.rq-main {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.92);
}

.rq-intro {
    margin: 0;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
}

.rq-list {
    margin: 0;
    padding-left: 1.2rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.7;
}

.rq-list li + li {
    margin-top: 0.75rem;
}

.rq-tag {
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 3px 8px;
    border-radius: 999px;
    margin-right: 0.55rem;
    font-size: 0.85rem;
    vertical-align: baseline;
}
