/* ========================================= */
/* [CSS] 통합 스타일 정의 */
/* ========================================= */

/* 1. 기본 설정 및 변수 */
:root {
    --bg-color: #121212;
    --text-color: #DAD8D0;
    /* 오트밀 화이트 */
    --text-muted: #888888;
    --accent-color: #CCFF00;
    /* 네온 라임/옐로우 */
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* 타임라인 여백 변수 */
    --timeline-margin-left: 85px;
    --timeline-margin-right: 195px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    width: 100%;
    height: auto;
    overflow-x: clip;
    /* Changed from hidden to clip to fix sticky positioning */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    /* Changed from hidden to clip to fix sticky positioning */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img,
video {
    width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    outline: none;
}

/* Lenis */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

.text-accent {
    color: var(--accent-color);
}

.desc-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* 초기 모션 숨김 */
.work-item,
.fade-up,
.fade-left,
.fade-right,
.fade-down {
    opacity: 0;
}

.fade-up,
.fade-left,
.fade-right,
.fade-down {
    visibility: hidden;
}

/* work-item은 JS로 visibility 제어 안함 */

/* work-item (Index Only) */
.work-item {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    transition: margin 0.5s ease;
}

/* 2. 헤더 및 메뉴 */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 30px 5%;
    z-index: 1000;
    mix-blend-mode: difference;
    align-items: center;
}

.logo {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-links a {
    display: block;
    font-family: var(--font-heading);
    font-size: 6vw;
    color: var(--text-color);
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1;
    transition: color 0.3s, transform 0.3s;
}

.menu-links a:hover {
    color: var(--accent-color);
    font-style: italic;
    transform: translateX(10px);
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 5%;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
}


/* 3. Hero Common */
.mega-text {
    font-family: var(--font-heading);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    position: relative;
    color: var(--text-color);
}

.line-mask {
    overflow: hidden;
    display: block;
}

.anim-text {
    display: block;
    transform: translateY(110%);
}

.shape-anim {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    animation: shapeMorph 3s infinite linear;
}

.shape-index {
    right: 0;
    bottom: 6px;
    width: 30px;
    height: 30px;
}

.shape-project {
    right: 10px;
    left: auto;
    bottom: 0em;
}

@keyframes shapeMorph {
    0% {
        transform: rotate(0deg);
        border-radius: 0%;
    }

    50% {
        transform: rotate(180deg);
        border-radius: 50%;
    }

    100% {
        transform: rotate(360deg);
        border-radius: 0%;
    }
}

/* 4. Index Page Specifics */
.hero-section {
    width: 100%;
    padding-top: 25vh;
    padding-bottom: 15vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('sirio_black_paper.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.mega-text-index {
    font-size: 13vw;
}

/* Index Mega Text Size Override */

.work-section {
    margin-bottom: 20vh;
    min-height: 100vh;
}

.work-filters {
    display: flex;
    gap: 30px;
    margin-bottom: 100px;
    justify-content: flex-end;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.3s;
    padding: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--accent-color);
}

.filter-btn.active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 80px;
    row-gap: 75px;
    align-items: start;
}

.work-item:nth-child(even) {
    margin-top: 30px;
}

.img-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    transform: translate3d(0, 0, 0);
    will-change: transform, box-shadow, outline;
    outline: 2px solid transparent;
    outline-offset: 0px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.img-container img,
.img-container video {
    width: 100%;
    height: 115%;
    object-fit: cover;
    display: block;
    transform-origin: center center;
    will-change: transform;
}

.work-item:hover .img-container {
    outline: 2px solid var(--accent-color);
    outline-offset: 8px;
    box-shadow: 0 0 50px rgba(204, 255, 0, 0.25), 0 0 15px rgba(204, 255, 0, 0.4);
    transform: scale(1.02);
}

.work-info h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: var(--text-color);
    transition: color 0.3s;
}

.work-item:hover .work-info h3 {
    color: var(--accent-color);
}

.work-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* About Section (Index) */
.about-section {
    width: 100%;
    padding-bottom: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('sirio_black_paper.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: scaleY(-1);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

.about-visual {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 150px;
    height: fit-content;
    will-change: transform;
}

.profile-card {
    width: 100%;
    aspect-ratio: 4 / 5;
    position: relative;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: border-color 0.3s;
    overflow: hidden;
}

.profile-card:hover {
    border-color: var(--accent-color);
}

.about-content {
    display: flex;
    flex-direction: column;
}

.about-intro-title {
    font-size: 3rem;
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.about-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 60px;
    max-width: 100%;
}

.resume-contact-group {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr;
    gap: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.section-sub-title {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 25px;
    display: block;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.resume-block {
    display: flex;
    flex-direction: column;
}

.resume-list {
    border-top: none;
    margin-bottom: 0;
}

.resume-item {
    padding: 0 0 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.resume-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-year {
    color: var(--text-muted);
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.resume-detail {
    color: var(--text-color);
    font-size: 1.1rem;
}

.resume-sub {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.contact-block {
    display: flex;
    flex-direction: column;
}

.contact-list li {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-list a:hover {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.footer {
    padding: 50px 0;
    opacity: 0.4;
    font-size: 0.9rem;
    text-align: center;
}

.scroll-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    mix-blend-mode: difference;
}

.scroll-top-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-5px);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* 5. Detail Page Specifics */
.layout-hero {
    height: auto;
    min-height: auto;
    width: 90%;
    position: relative;
    display: block;
    padding-bottom: 0;
    margin-bottom: 100px;
    margin-left: auto;
    margin-right: auto;
}

.hero-bg {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
}

/* Square/Vertical Hero Video Modifier */
.hero-square {
    object-fit: contain !important;
    height: 80vh !important;
    width: 100%;
    margin: 0 auto;
    max-width: 1200px;
    /* Optional constraint to keep it centered nicely */
    display: block;
}

@media (max-width: 900px) {
    .hero-square {
        height: 60vh !important;
    }
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(to top, var(--bg-color) 10%, transparent 80%);
    pointer-events: none;
}

.project-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    padding-bottom: 80px;
}



.project-meta-row {
    display: flex;
    gap: 60px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    font-size: 1.1rem;
    color: var(--text-color);
}

.meta-item .label {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    opacity: 1;
}

/* Video Embed & Timeline */
.embed-section {
    margin-bottom: 100px;
}

.video-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-player-container video,
.video-player-container iframe {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.video-player-container iframe {
    aspect-ratio: 16/9;
}

/* Custom Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    /* Mobile Default */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-player-container:hover .custom-controls {
    opacity: 1;
}

.play-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-display {
    font-size: 0.8rem;
    color: #ccc;
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: right;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

.volume-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 24px;
    display: flex;
    justify-content: center;
}

.volume-slider {
    width: 0;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    transition: width 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.volume-container:hover .volume-slider {
    width: 60px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: -100vw 0 0 100vw var(--accent-color);
}

/* Static Timeline Visualizer (Vimeo Compatible) */
.timeline-visualizer-wrap {
    width: 100%;
    background-color: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    /* Default Mobile Padding */
    box-sizing: border-box;
}

.timeline-visualizer-inner {
    position: relative;
    width: 100%;
}

.static-timeline-track {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: #2a2a2a;
    border-radius: 2px;
}

.work-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    background-color: rgba(204, 255, 0, 0.7);
    /* accent/70 */
    border-radius: 2px;
    cursor: help;
    transition: all 0.3s;
    z-index: 1;
}

.work-segment:hover {
    background-color: var(--accent-color);
    z-index: 10;
    box-shadow: 0 0 10px var(--accent-color);
}

.segment-tooltip {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    background-color: var(--accent-color);
    color: #000;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(204, 255, 0, 0.4);
    transition: opacity 0.3s;
}

.work-segment:hover .segment-tooltip {
    opacity: 1;
}

/* Timeline Info Labels (Static) */
.timeline-labels-static {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 24px;
    gap: 8px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

@media (min-width: 900px) {
    .timeline-visualizer-wrap {
        padding: 32px 0;
        /* Vertical padding only, horiz handled by inner */
    }

    .timeline-visualizer-inner {
        padding-left: 12px;
        padding-right: 12px;
    }

    .timeline-labels-static {
        position: absolute;
        right: 40px;
        top: 50%;
        transform: translateY(-50%);
        margin-top: 0;
        font-size: 0.85rem;
    }
}


.progress-container {
    flex-grow: 1;
    height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.progress-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    border-radius: 2px;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 2px;
    z-index: 2;
}

.timeline-marker {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: var(--accent-color);
    z-index: 1;
    opacity: 0.8;
    cursor: pointer;
}

.timeline-marker:hover {
    opacity: 1;
    transform: scaleY(2);
    transition: 0.2s;
}

@media (min-width: 900px) {
    .custom-controls {
        padding-left: var(--timeline-margin-left);
        padding-right: var(--timeline-margin-right);
    }
}

@media (max-width: 900px) {
    .volume-container {
        display: none;
    }
}

/* Static Timeline Styles (From Gap.html) */
.timeline-visualizer-wrap {
    width: 100%;
    padding: 20px 0;
    background-color: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    width: calc(100% - var(--timeline-margin-left) - var(--timeline-margin-right));
    margin-top: 15px;
    margin-left: var(--timeline-margin-left);
    margin-right: var(--timeline-margin-right);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.static-timeline-track {
    position: relative;
    width: calc(100% - var(--timeline-margin-left) - var(--timeline-margin-right));
    margin-left: var(--timeline-margin-left);
    margin-right: var(--timeline-margin-right);
    height: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
}

.work-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    background-color: var(--accent-color);
    opacity: 0.7;
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: help;
}

.work-segment:hover {
    opacity: 1;
    transform: scaleY(1);
    z-index: 10;
    box-shadow: 0 0 10px var(--accent-color);
}

.work-segment::after {
    content: attr(data-time);
    position: absolute;
    bottom: 180%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--accent-color);
    color: #000;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(204, 255, 0, 0.4);
}

.work-segment::before {
    content: '';
    position: absolute;
    bottom: 180%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: var(--accent-color);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.work-segment:hover::after,
.work-segment:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* R&D Section */
.rd-section {
    margin-bottom: 120px;
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rd-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.rd-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-color);
    margin: 0;
}

.rd-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

.rd-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 20px;
}

.rd-item {
    position: relative;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s;
}

.rd-item:hover {
    border-color: var(--accent-color);
}

.rd-item img,
.rd-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.rd-item:hover img,
.rd-item:hover video {
    transform: scale(1.03);
}

.rd-item.text-box {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #161616;
}

.rd-item.text-box h4 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.rd-item.text-box p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.rd-span-6 {
    grid-column: span 6;
}

.rd-span-4 {
    grid-column: span 4;
}

.rd-span-3 {
    grid-column: span 3;
}

.rd-span-2 {
    grid-column: span 2;
}

/* Sticky Layout */
.layout-sticky {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    padding: 50px 0;
    align-items: start;
    /* Fix for sticky positioning */
}

.layout-sticky.reverse {
    grid-template-columns: 2fr 1fr;
}

.layout-sticky.reverse .sticky-content {
    order: 2;
}

.layout-sticky.reverse .scroll-images {
    order: 1;
}

.scroll-images {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Align images without gap */
}

.scroll-images img {
    width: 100%;
    height: auto;
    display: block;
}

.sticky-content {
    position: sticky;
    top: 150px;
    /* Adjust top offset */
    height: fit-content;
    align-self: start;
    /* Prevents stretching, crucial for sticky */
}

.project-specs {
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.spec-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.spec-label {
    width: 100px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.spec-value {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* Cinema Layout & Grid */
.layout-cinema {
    margin-bottom: 100px;
}

.cinema-block img,
.cinema-block video {
    width: 100%;
    height: auto;
}

.cinema-caption {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
    border-top: 1px solid var(--accent-color);
    display: inline-block;
    padding-top: 5px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
    margin-bottom: 150px;
}

/* Custom Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Hide overflow slides */
    /* aspect-ratio removed to allow caption height */
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    /* Height determined by tallest slide */
    transition: transform 0.5s ease-in-out;
    align-items: flex-start;
    /* Align slides to top */
}

.slide {
    min-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.slide img,
.slide video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    /* Enforce ratio */
    object-fit: cover;
}

.slider-container.square-view .slide img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.slider-caption {
    /* Revert to static position below image */
    position: relative;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
    border-top: 1px solid var(--accent-color);
    display: inline-block;
    padding-top: 5px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    background: none;
    left: auto;
    bottom: auto;
    width: fit-content;
}

.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    /* Let clicks pass through to content if needed */
    z-index: 10;
}

.prev-btn,
.next-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.prev-btn:hover,
.next-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.grid-span-6 {
    grid-column: span 6;
}

.grid-span-3 {
    grid-column: span 3;
}

.grid-span-2 {
    grid-column: span 2;
}

/* PDF Section */
.pdf-section {
    margin-bottom: 40px;
    padding: 100px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Default to wide ratio for PC */
    position: relative;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-caption-wrapper {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 80px;
}

/* Next Link */
.next-link-section {
    text-align: center;
    padding: 150px 0 200px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.next-project-wrap {
    display: inline-block;
    cursor: pointer;
}

.next-label {
    opacity: 0.5;
    margin-bottom: 20px;
    font-size: 1rem;
    letter-spacing: 2px;
}

.next-title {
    font-size: 8vw;
    color: var(--text-color);
    transition: all 0.4s ease;
}

.next-project-wrap:hover .next-title {
    color: var(--accent-color);
    font-style: italic;
}

/* Media Queries */
@media (max-width: 900px) {
    .mega-text {
        font-size: 15vw;
        margin-left: 0;
    }

    .mega-text-index {
        font-size: 15vw;
    }

    .shape-index {
        bottom: 10px;
        right: 0;
        position: absolute;
    }

    .work-grid {
        display: flex;
        flex-direction: column;
        gap: 60px;
    }

    .work-item:nth-child(even) {
        margin-top: 0;
    }

    .about-layout,
    .resume-contact-group {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-visual {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }

    .work-filters {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
    }

    .container {
        width: 92%;
    }

    .layout-hero {
        height: 70vh;
    }

    .project-meta-row {
        flex-direction: column;
        gap: 20px;
    }

    .layout-sticky {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .layout-sticky.reverse {
        grid-template-columns: 1fr;
    }

    /* Mobile: Text first, then Images */
    .layout-sticky.reverse .sticky-content {
        order: 1;
        /* Text on top */
        margin-bottom: 20px;
    }

    .layout-sticky.reverse .scroll-images {
        order: 2;
        /* Images below */
    }

    .sticky-content {
        position: relative;
        top: 0;
        height: auto;
        width: 100%;
        overflow-wrap: break-word;
        word-break: keep-all;
    }

    .desc-text {
        word-break: break-all;
        /* Ensure long words break on mobile */
        white-space: normal;
    }

    .layout-grid {
        grid-template-columns: 1fr;
    }

    .grid-span-6,
    .grid-span-3,
    .grid-span-2 {
        grid-column: span 1;
    }

    .shape-project {
        position: absolute;
        right: 0;
        bottom: 0.1em;
        margin-top: 0;
    }

    .rd-grid {
        display: flex;
        flex-direction: column;
    }

    .rd-item {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .rd-item.text-box {
        aspect-ratio: auto;
        min-height: 200px;
    }

    .pdf-section {
        padding: 60px 0;
    }

    .pdf-wrapper {
        aspect-ratio: 1 / 1.4;
        /* Portrait ratio for mobile/tablet to read better */
        max-height: none;
    }
}

/* Timeline Info Labels (Added via JS) */
.timeline-info-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
    white-space: nowrap;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

@media (min-width: 900px) {
    .timeline-info-labels {
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .timeline-info-labels {
        display: none;
    }

    /* Mobile Improvements (Step 490) */
    .shape-anim {
        animation: shapeMorph 3s infinite linear;
        width: 2.5vw;
        /* Smaller size */
        height: 2.5vw;
    }

    .shape-project,
    .shape-index {
        right: 0.5vw;
        /* User requested Right position */
        left: auto;
        bottom: 0em;
        /* Knife-like alignment with text bottom */
    }

    .mega-text {
        font-size: 13vw;
        /* Reverted to original */
        margin-left: 2vw;
        margin-right: 2vw;
        letter-spacing: -1px;
    }

    .mega-text-index {
        font-size: 18vw;
        /* Increased for Index only */
        margin-left: 1vw;
        margin-right: 1vw;
    }

    .logo {
        padding-left: 10px;
    }
}

/* Independent Overview Layout (Refined) */
.overview-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Image: 2, Text: 1 */
    gap: 80px;
    padding: 50px 0;
    align-items: start;
    /* Essential for sticky */
    position: relative;
    margin-bottom: 150px;
    /* Increased bottom margin */
    overflow: visible;
    /* Ensure sticky works */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 100px;
}

.overview-images {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.overview-images img {
    width: 100%;
    height: auto;
    display: block;
}

.overview-text {
    position: sticky;
    top: 15vh;
    /* Vertical position when stuck */
    height: fit-content;
    align-self: start;
    /* Prevents stretching */
    z-index: 5;
    /* Typography */
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .overview-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .overview-text {
        position: relative;
        /* Disable sticky on mobile */
        top: 0;
        width: 100%;
        order: 1;
        /* Text first */
        margin-bottom: 30px;
        z-index: 1;
    }

    .overview-images {
        order: 2;
        /* Images second */
    }
}

/* [Added] 2-Column Grid Layout for Reloaded.html */
.layout-grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.layout-grid-2-col .grid-item img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    min-height: 400px;
}

@media (max-width: 900px) {
    .layout-grid-2-col {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .layout-grid-2-col .grid-item img {
        min-height: 250px;
    }

    /* [Added] Mobile Menu Font Size Increase */
    .menu-links a {
        font-size: 13vw;
    }
}

/* [Added] Overview Images Grid Variant */
.overview-images.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .overview-images.grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ========================================= */
/* [Mobile Responsiveness - Added] */
/* ========================================= */

@media (max-width: 768px) {

    /* 1. Hero Background Adjustment */
    .hero-bg {
        height: 60vh;
        /* Prevent it from being too short */
        object-fit: cover;
        object-position: center bottom;
        /* Focus on the important part */
    }

    /* 2. Project Metadata Layout (Horizontal) */
    .project-meta-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 20px;
    }

    .meta-item {
        width: auto;
        border-bottom: none;
        padding-bottom: 0px;
        font-size: 0.8rem;
        /* Reduced from default */
    }

    .meta-item .label {
        font-size: 0.65rem;
        /* Reduced label size */
    }

    .meta-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* [FIX] Prevent title cutoff at top */
    .project-hero-content {
        position: relative;
        /* Changed from absolute */
        padding-bottom: 40px;
        top: auto;
        bottom: auto;
        margin-top: -20vh;
        /* Pull up to overlap image */
        padding-left: 20px;
        /* Add some side padding */
        padding-right: 20px;

        /* [FIX] Push next section down to prevent overlap with metadata */
        margin-bottom: 100px;
    }

    .mega-text {
        font-size: 11vw !important;
        /* Reverted for other pages */
    }

    .mega-text-index {
        font-size: 18vw !important;
        /* Explicitly larger for Index on mobile */
    }

    /* Gap.html Specific */
    .page-gap .mega-text {
        font-size: 9vw !important;
    }

    /* 3. Timeline Touch Improvement (Mobile) */
    /* Wider length, symmetric margins */
    .timeline-visualizer-wrap {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .static-timeline-track {
        width: 94%;
        /* Maximize length */
        margin: 0 auto;
        /* Symmetric center */
    }
}

/* Storyboard Section */
.storyboard-section {
    padding-bottom: 50px;
}

.storyboard-text-container {
    width: 100%;
    margin: 0 0 30px;
    /* No side margins, bottom margin only */
    text-align: left;
    /* Default left alignment for container */
}

.storyboard-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.storyboard-bg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    /* Optional rounded corners */
}

/* Removed overlay positioning, keep input styling */
.storyboard-input {
    width: 100%;
    padding: 30px;
    /* Match typical text box padding */
    background: #111;
    /* Dark background like typical R&D boxes if applicable, or transparent border style */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
    color: var(--text-muted);
    /* Muted text color */
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: left;
    /* R&D text is usually left aligned */
    border-radius: 0;
    outline: none;
    /* Remove hover/focus effects */
    transition: none;
}

.storyboard-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.storyboard-input:focus {
    /* No change on focus */
    background: #111;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    /* Ensure aspect ratio is maintained */
    height: auto;
    /* Ensure aspect ratio is maintained */
    object-fit: contain;
    /* Prevent stretching */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* PDF Section Responsive Styles */
.pdf-section {
    margin-top: 100px;
    margin-bottom: 100px;
    /* Do not set short-hand 'margin' to avoid overriding container's auto margins */
}

.pdf-container {
    width: 100%;
    max-width: 100%;
}

.pdf-wrapper {
    position: relative;
    width: 100%;
    height: 80vh;
    /* Default desktop height */
    overflow: hidden;
    background: #111;
    /* Loading placeholder */
}

@media (max-width: 900px) {
    .pdf-wrapper {
        height: 50vh;
        /* Adjust for mobile */
    }
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Mobile PDF Fallback Button */
.mobile-pdf-action {
    display: none;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 30px;
}

.btn-view-pdf {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: #000;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(204, 255, 0, 0.2);
}

.btn-view-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 255, 0, 0.4);
    background-color: #fff;
}

@media (max-width: 900px) {
    .mobile-pdf-action {
        display: block;
    }
}