/* Root Variables: NUS Colors and modern typography */
:root {
    --nus-orange: #EF7C00;
    --nus-blue: #003D7C;
    --nus-blue-dark: #002855;
    
    --bg-color: #ffffff;
    --bg-light: #f4f6f9;
    --text-primary: #333333;
    --text-secondary: #666666;
    
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.section.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--nus-blue);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.highlight {
    color: var(--nus-orange);
}

/* Navigation - Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 61, 124, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nus-blue);
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--nus-orange);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--nus-blue);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--nus-orange);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger Menu Button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1010;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--nus-blue);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--nus-orange);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 124, 0, 0.3);
}

.btn-primary:hover {
    background-color: #d16d00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 124, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--nus-blue);
    border: 2px solid var(--nus-blue);
}

.btn-secondary:hover {
    background-color: var(--nus-blue);
    color: #fff;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* Offset for navbar */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fbfd 0%, #e6f0fa 100%);
}

/* Faint pattern in background using CSS gradients */
.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(circle at center, rgba(0, 61, 124, 0.03) 0%, transparent 8%),
        radial-gradient(circle at center, rgba(239, 124, 0, 0.03) 0%, transparent 8%);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    transform: rotate(15deg);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--nus-blue);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    opacity: 0;
    animation: fadeUp 0.8s forwards 0.2s;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s forwards 0.4s;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.8s forwards 0.6s;
}

/* Features Section */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 61, 124, 0.08);
}

.icon-wrapper {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--nus-blue);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Placeholders for 3D and Video */
.interactive-container, .video-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.placeholder-box {
    background: linear-gradient(135deg, rgba(0, 61, 124, 0.05), rgba(239, 124, 0, 0.05));
    border: 2px dashed rgba(0, 61, 124, 0.2);
    border-radius: var(--border-radius);
    padding: 80px 40px;
    text-align: center;
    color: var(--nus-blue);
    position: relative;
    transition: var(--transition);
}

.placeholder-box:hover {
    border-color: var(--nus-orange);
    background: linear-gradient(135deg, rgba(0, 61, 124, 0.02), rgba(239, 124, 0, 0.1));
}

.placeholder-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.placeholder-box p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.placeholder-box .instruction {
    font-size: 0.9rem;
    background: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.video-placeholder .play-icon {
    font-size: 4rem;
    color: var(--nus-orange);
    margin-bottom: 20px;
    opacity: 0.8;
}

/* 3D Explorer Specific Styles */
.explorer-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    align-items: flex-start;
}

.explorer-panel {
    flex: 1 1 350px;
}

.explorer-panel h3 {
    color: var(--nus-blue);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.link-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    background: #fff;
    border: 2px solid rgba(0, 61, 124, 0.1);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: rgba(0, 61, 124, 0.3);
    color: var(--nus-blue);
    transform: translateX(5px);
}

.tab-btn.active {
    background: var(--nus-blue);
    color: #fff;
    border-color: var(--nus-blue);
    box-shadow: 0 4px 15px rgba(0, 61, 124, 0.2);
}

.link-params {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.link-params h4 {
    color: var(--nus-orange);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}

.link-params ul {
    list-style: none;
}

.link-params li {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
}

.link-params li:last-child {
    border-bottom: none;
}

.link-params strong {
    color: var(--text-secondary);
}

.link-params span {
    color: var(--text-primary);
    font-weight: 600;
}

.explorer-viewer {
    flex: 2 1 500px;
    height: 600px;
    background: radial-gradient(circle at center, #ffffff 0%, #f4f6f9 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 61, 124, 0.1);
    box-shadow: 0 15px 40px rgba(0, 61, 124, 0.05);
    overflow: hidden;
}

model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

/* Flowchart / Pipeline Section */
.flowchart-container {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    gap: 20px;
    margin-top: 40px;
    justify-content: space-between;
}

.flowchart-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: rgba(0, 61, 124, 0.1);
    z-index: 0;
}

.flow-step {
    flex: 1;
    min-width: 240px;
    padding: 0 10px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.flow-marker {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 4px solid var(--nus-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nus-blue);
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.flow-step:hover .flow-marker {
    transform: scale(1.1);
    border-color: var(--nus-orange);
    color: var(--nus-orange);
}

.flow-card {
    background: #fff;
    padding: 25px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 4px solid var(--nus-blue);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: calc(100% - 80px);
    display: flex;
    flex-direction: column;
}

.flow-step:hover .flow-card {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-top-color: var(--nus-orange);
}

.flow-card h3 {
    color: var(--nus-blue);
    margin-bottom: 12px;
    font-size: 1.15rem;
    line-height: 1.4;
}

.flow-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Vertical Timeline (Task Management Demo) */
.timeline {
    position: relative;
    padding-left: 80px;
    max-width: 960px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--nus-blue), var(--nus-orange));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -80px;
    top: 30px;
    width: 50px;
    height: 50px;
    background: var(--nus-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 61, 124, 0.3);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background: var(--nus-orange);
    box-shadow: 0 4px 20px rgba(239, 124, 0, 0.4);
    transform: scale(1.1);
}

.timeline-content {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid rgba(0, 61, 124, 0.06);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    box-shadow: 0 12px 40px rgba(0, 61, 124, 0.1);
    transform: translateY(-3px);
}

.timeline-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 locked aspect ratio */
    background: #000;
    overflow: hidden;
}

.timeline-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.timeline-text {
    padding: 25px 30px;
}

.timeline-text h3 {
    font-size: 1.35rem;
    color: var(--nus-blue);
    margin-bottom: 10px;
    line-height: 1.3;
}

.timeline-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Play button inside card */
.timeline-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 22px;
    background: var(--nus-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-play-btn::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 8px solid #fff;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.timeline-play-btn:hover {
    background: var(--nus-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 124, 0, 0.3);
}

.timeline-content.expanded .timeline-play-btn::before {
    border-left: 0;
    border-top: 8px solid #fff;
    border-right: 5px solid transparent;
    border-bottom: 0;
    border-left: 5px solid transparent;
}

/* Expandable video wrapper */
.timeline-video-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-content.expanded .timeline-video-wrapper {
    max-height: 600px;
}

/* Expandable Capability Cards */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cap-card {
    background: #fff;
    padding: 35px 28px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 61, 124, 0.06);
    box-shadow: 0 8px 25px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.cap-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--nus-blue);
    transition: background 0.3s ease;
}

.cap-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 61, 124, 0.1);
}

.cap-card:hover::before {
    background: var(--nus-orange);
}

.cap-card h3 {
    font-size: 1.3rem;
    color: var(--nus-blue);
    margin-bottom: 12px;
    line-height: 1.3;
}

.cap-card .cap-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.cap-card .cap-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.cap-card .cap-detail p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 61, 124, 0.08);
}

.cap-expand-hint {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nus-orange);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

/* Expanded state */
.cap-card.card-expanded {
    grid-column: 1 / -1;
    padding: 45px 40px;
    box-shadow: 0 15px 50px rgba(0, 61, 124, 0.12);
    transform: none;
    cursor: default;
}

.cap-card.card-expanded::before {
    background: var(--nus-orange);
    height: 5px;
}

.cap-card.card-expanded h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cap-card.card-expanded .cap-summary {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cap-card.card-expanded .cap-detail {
    max-height: 2000px;
    margin-top: 15px;
}

/* Rich content inside expanded cards */
.cap-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.88rem;
}

.cap-table th, .cap-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 61, 124, 0.1);
}

.cap-table th {
    background: rgba(0, 61, 124, 0.05);
    color: var(--nus-blue);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cap-table tr:hover {
    background: rgba(239, 124, 0, 0.03);
}

.cap-detail-img,
.cap-detail-video {
    display: block;
    width: 480px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px auto;
    box-shadow: 0 4px 20px rgba(0, 61, 124, 0.08);
    border: 1px solid rgba(0, 61, 124, 0.06);
}

.cap-formula {
    background: rgba(0, 61, 124, 0.03);
    border-left: 3px solid var(--nus-orange);
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    overflow-x: auto;
}

.cap-steps {
    list-style: none;
    counter-reset: step-counter;
    margin: 15px 0;
    padding: 0;
}

.cap-steps li {
    counter-increment: step-counter;
    padding: 10px 10px 10px 45px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.cap-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 8px;
    width: 30px;
    height: 30px;
    background: var(--nus-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.cap-video-block {
    margin: 20px auto;
    width: 480px;
    max-width: 100%;
    text-align: center;
}

.cap-video-block .cap-detail-video {
    width: 100%;
    margin: 0;
}

.cap-video-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 10px;
    font-style: italic;
    text-align: left;
}

.cap-card.card-expanded .cap-expand-hint {
    display: none;
}

/* Close button (injected by JS, visible only when expanded) */
.cap-card-close {
    display: none;
}

.cap-card.card-expanded .cap-card-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    bottom: 10px;
    float: right;
    margin-top: 24px;
    padding: 8px 20px;
    background: rgba(0, 61, 124, 0.06);
    color: var(--nus-blue);
    border: 1px solid rgba(0, 61, 124, 0.12);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cap-card.card-expanded .cap-card-close:hover {
    background: var(--nus-blue);
    color: #fff;
}

.cap-card.card-expanded {
    cursor: default;
}

@media (max-width: 900px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
}

/* Cost Breakdown Table */
.cost-wrapper {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 4px 24px rgba(0, 61, 124, 0.06);
    border: 1px solid rgba(0, 61, 124, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cost-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.cost-table th {
    padding: 14px 16px;
    text-align: left;
    background: var(--nus-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cost-table th:last-child {
    text-align: right;
}

.cost-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 61, 124, 0.06);
    color: var(--text-secondary);
}

.cost-table td:nth-child(3),
.cost-table td:nth-child(4),
.cost-table td:nth-child(5) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cost-table tbody tr:hover {
    background: rgba(239, 124, 0, 0.03);
}

.cost-category-row td {
    font-weight: 700;
    color: var(--nus-blue);
    background: rgba(0, 61, 124, 0.03);
    font-size: 0.85rem;
    padding: 10px 16px;
    letter-spacing: 0.3px;
}

.cost-total-row td {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--nus-blue);
    border-top: 2px solid var(--nus-blue);
    padding: 16px;
}

.cost-total-row td:last-child {
    color: var(--nus-orange);
    font-size: 1.15rem;
}

/* VLA Interactive Pipeline */
.vla-player-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.vla-video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 61, 124, 0.1);
    background: #000;
}

.vla-pipeline {
    display: flex;
    gap: 3px;
    margin-top: 16px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 61, 124, 0.06);
    padding: 3px;
}

.vla-stage {
    flex: 1;
    position: relative;
    cursor: pointer;
    min-height: 44px;
    border-radius: 7px;
    overflow: hidden;
    transition: flex 0.3s ease, background 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
}

.vla-stage:hover,
.vla-stage.vla-active {
    flex: 2.5;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 12px rgba(0, 61, 124, 0.1);
}

.vla-stage-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--nus-blue), rgba(0, 61, 124, 0.7));
    transition: width 0.3s ease;
    border-radius: 7px;
    z-index: 0;
}

.vla-stage.vla-active .vla-stage-bar {
    width: 100%;
}

.vla-stage.vla-past .vla-stage-bar {
    width: 100%;
    background: rgba(0, 61, 124, 0.15);
}

.vla-stage-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 10px;
    white-space: nowrap;
    overflow: hidden;
}

.vla-stage-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--nus-blue);
    opacity: 0.5;
    flex-shrink: 0;
}

.vla-stage.vla-active .vla-stage-num {
    color: #fff;
    opacity: 1;
}

.vla-stage-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--nus-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vla-stage:hover .vla-stage-title,
.vla-stage.vla-active .vla-stage-title {
    opacity: 1;
}

.vla-stage.vla-active .vla-stage-title {
    color: #fff;
}

.vla-stage-desc {
    display: none;
}

/* Info panel below pipeline */
.vla-info {
    margin-top: 16px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0, 61, 124, 0.08);
    min-height: 56px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.vla-info-num {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    background: var(--nus-blue);
    padding: 3px 9px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.vla-info-num:empty {
    display: none;
}

.vla-info-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--nus-blue);
}

.vla-info-desc {
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 4px 0 0;
}

.vla-info-desc:empty {
    display: none;
}

/* Architecture Section */
.arch-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

.arch-content.reverse {
    flex-direction: row-reverse;
}

.arch-text, .arch-visual {
    flex: 1;
}

.arch-text h3 {
    font-size: 1.8rem;
    color: var(--nus-blue);
    margin-bottom: 20px;
}

.arch-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.arch-text hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 30px 0;
}

.arch-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 61, 124, 0.1);
    background: #fff;
    padding: 20px;
    transition: var(--transition);
}

.arch-img:hover {
    transform: scale(1.02);
}

/* Community Section */
.community-section {
    background: #f8f9fb;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.community-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px 30px;
    border: 1px solid rgba(0, 61, 124, 0.06);
    box-shadow: 0 4px 24px rgba(0, 61, 124, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 61, 124, 0.08);
}

.community-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 61, 124, 0.06);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--nus-blue);
}

.community-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--nus-blue);
    margin-bottom: 10px;
}

.community-card > p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.community-rules {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.community-rules li {
    position: relative;
    padding-left: 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.community-rules li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 2px solid var(--nus-orange);
}

.community-rules code {
    background: rgba(0, 61, 124, 0.06);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: 'Inter', monospace;
    color: var(--nus-blue);
}

.community-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--nus-blue);
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.community-btn:hover {
    background: var(--nus-orange);
    transform: translateY(-1px);
    color: #fff;
}

/* Footer */
.footer {
    background-color: var(--nus-blue);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.footer-brand p {
    opacity: 0.8;
    max-width: 300px;
}

.footer-sponsor {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.footer-nus-logo {
    height: 50px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    margin-bottom: 10px;
}

.footer-nus-logo:hover {
    opacity: 1;
}

.footer-sponsor p {
    font-size: 0.82rem;
    opacity: 0.7;
    letter-spacing: 0.3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Responsive — single consolidated block */
@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 0;
        border-bottom: 1px solid rgba(0, 61, 124, 0.1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .arch-content, .arch-content.reverse {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .flowchart-container {
        flex-direction: column;
        gap: 40px;
    }

    .flowchart-container::before {
        display: none;
    }

    .timeline {
        padding-left: 50px;
    }

    .timeline::before {
        left: 17px;
    }

    .timeline-marker {
        left: -50px;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        top: 20px;
    }

    .timeline-text {
        padding: 20px;
    }

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