:root {
    --bg-color: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-color: #000000;
    --border-color: #e5e7eb;
    --link-color: #2563eb;
    --link-hover: #1d4ed8;
    --nav-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    --bg-color: #111827;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-color: #ffffff;
    --border-color: #374151;
    --link-color: #60a5fa;
    --link-hover: #93c5fd;
    --nav-bg: rgba(17, 24, 39, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html[lang="en"] body {
    font-family: 'Inter', -apple-system, sans-serif;
}

html[lang="vn"] body {
    font-family: 'Be Vietnam Pro', 'Inter', -apple-system, sans-serif;
}

html[lang="jp"] body {
    font-family: 'Noto Sans JP', -apple-system, sans-serif;
}

html[lang="cn"] body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-left: 220px;
}

#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    z-index: 50;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    padding-left: 0.75rem;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    text-decoration: none;
    border-left: 2px solid var(--link-color);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container-wide {
    max-width: 1200px;
}

/* Header */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.profile-info h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.profile-info .subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.profile-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Nav Actions */
.nav-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lang-switcher select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234b5563%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 0.65rem auto;
}

[data-theme="dark"] .lang-switcher select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

.lang-switcher select:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.lang-switcher select option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.nav-actions .btn-download {
    width: 100%;
    justify-content: center;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-download:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    text-decoration: none;
}

.btn-download svg {
    transition: transform 0.2s ease;
}

.btn-download:hover svg {
    transform: translateY(2px);
}

/* Sections */
.cv-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 4rem; /* Offset for sticky nav */
}

.cv-section h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--accent-color);
    letter-spacing: 1px;
}

.cv-section h3 .note {
    font-size: 0.8rem;
    text-transform: none;
    font-weight: 400;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 0.5rem;
}

/* CV Items (Minimalist) */
.cv-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.cv-item:hover {
    border-left: 2px solid var(--border-color);
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.cv-item-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-color);
}

.cv-item-header .date {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cv-item-subheader {
    display: flex;
    justify-content: space-between;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.cv-desc, .role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Lists */
.skills-list, .bullet-list {
    list-style-type: disc;
    margin-left: 1.25rem;
    color: var(--text-secondary);
}

.skills-list li, .bullet-list li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.skills-list li strong, .bullet-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Certifications specific */
.certification {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}
.certification:last-child {
    margin-bottom: 0;
}
.issuer {
    font-style: italic;
    color: var(--text-secondary);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    body {
        padding-left: 0;
    }
    .side-nav {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        overflow-x: auto;
    }
    [data-theme="dark"] .side-nav {
        background-color: rgba(17, 24, 39, 0.9);
    }
    .nav-links {
        flex-direction: row;
        gap: 1.25rem;
    }
    .nav-links a {
        padding-left: 0;
        border-left: none;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .nav-links a:hover {
        border-left: none;
    }
    .nav-actions {
        margin-top: 0;
        margin-left: 1.25rem;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    .lang-switcher select {
        width: auto;
        padding: 0.4rem 1.8rem 0.4rem 0.6rem;
        background-position: right 0.5rem top 50%;
    }
    .nav-actions .btn-download {
        padding: 0.4rem 0.8rem;
        white-space: nowrap;
        width: auto;
    }
    .container {
        padding: 2rem 1.5rem;
    }
    .profile-header {
        flex-direction: column-reverse;
        text-align: center;
    }
    .profile-avatar {
        margin-bottom: 1.5rem;
    }
    .cv-item-header, .cv-item-subheader {
        flex-direction: column;
    }
    .cv-item-header .date {
        margin-top: 0.1rem;
    }
}

/* =========================================
   Neural AI Door Overlay Animation
   ========================================= */
.ai-door-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    background: transparent;
}

.door {
    position: relative;
    width: 50%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 1;
}

.door-left {
    border-right: 1px solid transparent;
    animation: slideLeft 0.8s cubic-bezier(0.85, 0, 0.15, 1) 1.9s forwards;
}

.door-right {
    border-left: 1px solid transparent;
    animation: slideRight 0.8s cubic-bezier(0.85, 0, 0.15, 1) 1.9s forwards;
}

.split-line {
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 100vh;
    background-color: var(--text-primary);
    transform: translateX(-50%) scaleY(0);
    z-index: 3;
    animation: shootLine 0.3s cubic-bezier(0.85, 0, 0.15, 1) 1.7s forwards, fadeLine 0.4s ease 2.1s forwards;
}

.door-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    animation: fadeOutLogo 0.5s cubic-bezier(0.85, 0, 0.15, 1) 1.5s forwards;
    pointer-events: none;
}

/* Neural Network SVG Styling */
.neural-network {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem auto;
    overflow: visible;
    animation: collapseNetwork 0.5s cubic-bezier(0.85, 0, 0.15, 1) 1.5s forwards;
}

.synapse {
    stroke: var(--text-secondary);
    stroke-width: 1;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    opacity: 0;
}

.s1 { animation: drawLine 0.6s ease 0.1s forwards; }
.s2 { animation: drawLine 0.6s ease 0.2s forwards; }
.s3 { animation: drawLine 0.6s ease 0.3s forwards; }
.s4 { animation: drawLine 0.6s ease 0.1s forwards; }
.s5 { animation: drawLine 0.5s ease 0.5s forwards; }
.s6 { animation: drawLine 0.5s ease 0.6s forwards; }
.s7 { animation: drawLine 0.5s ease 0.4s forwards; }
.s8 { animation: drawLine 0.5s ease 0.7s forwards; }
.s9 { animation: drawLine 0.6s ease 0.2s forwards; }

.node {
    fill: var(--text-primary);
    transform-origin: center;
    transform-box: fill-box;
    transform: scale(0);
}

.center-node {
    animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s forwards;
}

.pulse-node {
    fill: transparent;
    stroke: var(--text-primary);
    stroke-width: 0.5;
    animation: pulseRing 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.n1 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s forwards; }
.n2 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards; }
.n3 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s forwards; }
.n4 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s forwards; }
.n5 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.8s forwards; }
.n6 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.9s forwards; }
.n7 { animation: popNode 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.7s forwards; }

/* Text Styling */
.door-center-logo .ai-text {
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 6px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.door-center-logo .ai-subtext {
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Keyframes */
@keyframes slideLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes slideRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

@keyframes shootLine {
    0% { transform: translateX(-50%) scaleY(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateX(-50%) scaleY(1); opacity: 1; }
}

@keyframes fadeLine {
    0% { opacity: 1; }
    100% { opacity: 0; width: 0; }
}

@keyframes fadeOutLogo {
    0% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); visibility: hidden; }
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; opacity: 0.4; }
}

@keyframes popNode {
    to { transform: scale(1); }
}

@keyframes pulseRing {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes collapseNetwork {
    0% { transform: scale(1); opacity: 1; filter: blur(0); }
    100% { transform: scale(0.1) rotate(90deg); opacity: 0; filter: blur(4px); }
}

/* =========================================
   Timeline / Story Page
   ========================================= */
.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    top: 0.25rem;
    left: -1.9rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    z-index: 2;
    transition: background-color 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--accent-color);
}

.timeline-content {
    padding-left: 1rem;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* =========================================
   Articles Page
   ========================================= */
.article-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--link-color);
    margin-bottom: 0.5rem;
}

.article-title a {
    color: inherit;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.article-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
}

/* =========================================
   Navigation Groups
   ========================================= */
.nav-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
    padding-left: 0.75rem;
}

.nav-group-title:first-child {
    margin-top: 0;
}

/* =========================================
   Timeline Flex Layout (Story Page)
   ========================================= */
.timeline-flex {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 1rem;
    border-radius: 8px;
}

.timeline-flex:hover {
    transform: translateX(5px);
    background-color: rgba(156, 163, 175, 0.05);
}

.timeline-text {
    flex: 1;
}

.timeline-gallery {
    flex: 1;
    position: relative;
    height: 220px;
    min-width: 300px;
}

.timeline-gallery .timeline-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--bg-color);
    transition: transform 0.3s ease, z-index 0.3s ease;
}

.timeline-gallery .timeline-image:nth-child(1) {
    z-index: 3;
    transform: rotate(0deg) translate(0, 0);
}
.timeline-gallery .timeline-image:nth-child(2) {
    z-index: 2;
    transform: rotate(4deg) translate(15px, 10px);
}
.timeline-gallery .timeline-image:nth-child(3) {
    z-index: 1;
    transform: rotate(-3deg) translate(-10px, 15px);
}

.timeline-flex:hover .timeline-gallery .timeline-image:nth-child(1) {
    transform: rotate(0deg) translate(0, -5px);
}
.timeline-flex:hover .timeline-gallery .timeline-image:nth-child(2) {
    transform: rotate(6deg) translate(25px, 5px);
}
.timeline-flex:hover .timeline-gallery .timeline-image:nth-child(3) {
    transform: rotate(-5deg) translate(-20px, 5px);
}

@media (max-width: 768px) {
    .timeline-flex {
        flex-direction: column;
        gap: 1rem;
    }
}

/* =========================================
   Modal CSS
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10001;
    overflow-y: auto;
    padding: 2.5rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.modal-desc {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.modal-carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-carousel img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s;
}

.carousel-dot.active {
    background-color: white;
}

/* =========================================
   Story Layout & Filter
   ========================================= */
.story-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.story-layout .timeline {
    flex: 1;
}

.story-filter {
    position: sticky;
    top: 2rem;
    width: 280px;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.story-filter h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: rgba(156, 163, 175, 0.1);
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 500;
}

@media (max-width: 900px) {
    .story-layout {
        flex-direction: column-reverse;
    }
    
    .story-filter {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        text-align: center;
        flex: 1;
        min-width: 80px;
    }
}
