/* ============================================================
   SYNCFORM — Research Project Website Stylesheet
   Version  : 1.0
   Theme    : Dark / Light via CSS custom properties
   Approach : Glassmorphism, responsive grid, CSS animations
   ============================================================ */


/* ============================================================
   1. CSS CUSTOM PROPERTIES — Light theme (default)
      Dark theme overrides are in [data-theme="dark"]
   ============================================================ */
:root {
    /* Backgrounds */
    --color-bg:           #f0f4ff;
    --color-bg-alt:       #e8edf8;
    --color-surface:      #ffffff;
    --color-glass:        rgba(255, 255, 255, 0.70);
    --color-glass-border: rgba(255, 255, 255, 0.90);

    /* Text */
    --color-text-1:  #0f172a;   /* headings */
    --color-text-2:  #334155;   /* body      */
    --color-text-3:  #64748b;   /* muted     */

    /* Accent palette */
    --color-accent:   #7c3aed;   /* violet  */
    --color-accent-2: #0891b2;   /* cyan    */
    --color-accent-3: #f59e0b;   /* amber   */
    --color-accent-4: #10b981;   /* emerald */

    /* Accent as RGB channels (for rgba() usage) */
    --accent-rgb: 124, 58, 237;

    /* Navigation */
    --nav-bg:     rgba(240, 244, 255, 0.88);
    --nav-border: rgba(124, 58, 237, 0.12);

    /* Shadows */
    --shadow-xs:   0 1px 2px  rgba(15,23,42, 0.06);
    --shadow-sm:   0 2px 8px  rgba(15,23,42, 0.08);
    --shadow-md:   0 4px 16px rgba(15,23,42, 0.10);
    --shadow-lg:   0 8px 30px rgba(15,23,42, 0.12);
    --shadow-glow: 0 0 30px   rgba(124, 58, 237, 0.20);

    /* Borders */
    --border-subtle: rgba(15,23,42, 0.08);
    --border-card:   rgba(255,255,255, 0.80);

    /* Gradient */
    --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #0891b2 100%);

    /* Spacing */
    --section-py: 6rem;
    --container:  1200px;
    --radius-sm:  8px;
    --radius-md:  14px;
    --radius-lg:  22px;
    --radius-xl:  32px;

    /* Transition */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.25s;
}

/* ── Dark theme overrides ── */
[data-theme="dark"] {
    --color-bg:           #070b16;
    --color-bg-alt:       #0d1226;
    --color-surface:      #111827;
    --color-glass:        rgba(255, 255, 255, 0.04);
    --color-glass-border: rgba(255, 255, 255, 0.10);

    --color-text-1:  #f1f5f9;
    --color-text-2:  #cbd5e1;
    --color-text-3:  #94a3b8;

    --color-accent:   #a855f7;
    --color-accent-2: #22d3ee;
    --color-accent-3: #fbbf24;
    --color-accent-4: #34d399;

    --accent-rgb: 168, 85, 247;

    --nav-bg:     rgba(7, 11, 22, 0.90);
    --nav-border: rgba(168, 85, 247, 0.15);

    --shadow-xs:   0 1px 2px  rgba(0,0,0, 0.40);
    --shadow-sm:   0 2px 8px  rgba(0,0,0, 0.40);
    --shadow-md:   0 4px 16px rgba(0,0,0, 0.50);
    --shadow-lg:   0 8px 30px rgba(0,0,0, 0.60);
    --shadow-glow: 0 0 40px   rgba(168, 85, 247, 0.25);

    --border-subtle: rgba(255,255,255, 0.06);
    --border-card:   rgba(255,255,255, 0.09);

    --gradient-accent: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji";
    background-color: var(--color-bg);
    color: var(--color-text-2);
    line-height: 1.6;
    transition: background-color var(--duration) var(--ease),
                color var(--duration) var(--ease);
    overflow-x: hidden;
}

/* ── Base element resets ── */
img, svg { display: block; max-width: 100%; }
ul, ol   { list-style: none; }
a        { color: inherit; text-decoration: none; }
button   { cursor: pointer; background: none; border: none; font: inherit; }
input, select, textarea, button { outline: none; }

/* ── Focus-visible ring for accessibility ── */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 4px;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 {
    color: var(--color-text-1);
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { color: var(--color-text-2); }

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875em;
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--color-accent);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

/* Gradient text utility */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.section {
    padding-block: var(--section-py);
    position: relative;
}

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

/* Glass card — reusable glassmorphism card */
.glass-card {
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--duration) var(--ease),
                transform var(--duration) var(--ease);
}
.glass-card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-2px);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 100px;
    padding: 0.3em 1em;
    margin-bottom: 0.75rem;
}
.section-title {
    margin-bottom: 0.75rem;
}
.section-desc {
    max-width: 56ch;
    margin-inline: auto;
    color: var(--color-text-3);
}

/* Badge colours for milestones / presentations */
.ms-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3em 0.85em;
    border-radius: 100px;
}
.ms-badge.proposal { background: rgba(168,85,247,0.18); color: #a855f7; border: 1px solid rgba(168,85,247,0.3); }
.ms-badge.pp1      { background: rgba(34,211,238,0.15); color: #22d3ee; border: 1px solid rgba(34,211,238,0.3); }
.ms-badge.pp2      { background: rgba(251,191,36,0.15); color: #f59e0b; border: 1px solid rgba(251,191,36,0.3); }
.ms-badge.final    { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.ms-badge.viva     { background: rgba(239,68,68,0.15);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3);  }

.ms-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.7em;
    border-radius: 100px;
}
.ms-status.upcoming  { background: rgba(var(--accent-rgb),0.10); color: var(--color-accent); }
.ms-status.completed { background: rgba(16,185,129,0.15); color: #10b981; }
.ms-status.active    { background: rgba(251,191,36,0.15); color: #f59e0b; }


/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7em 1.6em;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--duration) var(--ease);
    cursor: pointer;
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.55);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--color-text-1);
    border-color: var(--border-subtle);
}
.btn-ghost:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(var(--accent-rgb), 0.06);
}

.btn-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55em 1.1em;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-accent);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: var(--radius-sm);
    background: rgba(var(--accent-rgb), 0.07);
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-doc:hover {
    background: rgba(var(--accent-rgb), 0.16);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5em 1.1em;
    font-size: 0.82rem;
}

.btn-full { width: 100%; justify-content: center; }

.btn-view {
    background: var(--gradient-accent);
    color: #fff;
    font-size: 0.82rem;
    padding: 0.5em 1.1em;
    border-radius: var(--radius-sm);
    font-weight: 600;
}


/* ============================================================
   6. NAVIGATION BAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transition: box-shadow var(--duration) var(--ease);
}
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
.logo-mark {
    width: 120px;
    height: 56px;
    object-fit: contain;
    object-position: left center;
    border-radius: 0;
    transition: transform 0.3s var(--ease);
    flex-shrink: 0;
}
.nav-logo:hover .logo-mark { transform: scale(1.08) rotate(4deg); }
.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-text-1);
    letter-spacing: -0.02em;
}

/* Desktop links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-3);
    padding: 0.45em 0.85em;
    border-radius: 6px;
    transition: color var(--duration) var(--ease),
                background var(--duration) var(--ease);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
    transition: left var(--duration) var(--ease), right var(--duration) var(--ease);
}
.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
    background: rgba(var(--accent-rgb), 0.08);
}
.nav-link.active::after { left: 12%; right: 12%; }

/* Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    color: var(--color-text-2);
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid var(--border-subtle);
    transition: all var(--duration) var(--ease);
}
.theme-toggle:hover {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--color-accent);
    transform: rotate(20deg);
}
/* Show/hide moon vs sun based on theme */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    padding: 8px;
}
.hamburger-line {
    display: block;
    width: 100%; height: 2px;
    background: var(--color-text-2);
    border-radius: 2px;
    transition: transform var(--duration) var(--ease),
                opacity var(--duration) var(--ease);
}
/* Active hamburger → X */
.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}
.mobile-overlay.visible { opacity: 1; }


/* ============================================================
   7. HERO SECTION
   ============================================================ */
.hero-section {
    min-height: 100svh;
    padding-top: 64px;    /* navbar height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Animated background */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}
.orb-1 {
    width: clamp(300px, 50vw, 700px);
    height: clamp(300px, 50vw, 700px);
    background: radial-gradient(circle, rgba(168,85,247,0.30) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: orb-float 10s ease-in-out infinite;
}
.orb-2 {
    width: clamp(250px, 40vw, 550px);
    height: clamp(250px, 40vw, 550px);
    background: radial-gradient(circle, rgba(34,211,238,0.22) 0%, transparent 70%);
    bottom: 5%;
    right: -8%;
    animation: orb-float 13s ease-in-out infinite reverse;
    animation-delay: -4s;
}
.orb-3 {
    width: clamp(150px, 25vw, 350px);
    height: clamp(150px, 25vw, 350px);
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 70%);
    top: 40%;
    left: 55%;
    animation: orb-float 16s ease-in-out infinite;
    animation-delay: -8s;
}

/* Subtle grid overlay */
.hero-grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Hero two-column layout */
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding-block: 3rem;
    position: relative;
    z-index: 1;
}

/* Hero text */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    background: rgba(var(--accent-rgb), 0.10);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 100px;
    padding: 0.35em 1em;
    margin-bottom: 1.25rem;
}
.badge-dot {
    width: 7px; height: 7px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
.hero-title {
    margin-bottom: 0.5rem;
    line-height: 1.05;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-text-2);
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}
.hero-abstract {
    font-size: 0.96rem;
    color: var(--color-text-3);
    max-width: 54ch;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Stats row */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.2rem;
    border-radius: var(--radius-sm);
    min-width: 80px;
    text-align: center;
}
.stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.stat-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text-3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.3rem;
}

/* Hero actions */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Hero visual — right column */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Pipeline diagram card */
.pipeline-diagram {
    padding: 1.4rem 1.6rem;
}
.diagram-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-3);
    margin-bottom: 1rem;
}
.pipeline-flow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pipe-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 60px;
    position: relative;
    transition: transform 0.3s var(--ease);
    animation: pipe-node-in 0.7s calc(var(--ni, 0) * 0.18s) both;
}
.pipe-node:hover { transform: translateY(-5px); }

/* Animated icon container */
.pipe-icon-wrap {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent, #a855f7) 14%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--accent, #a855f7) 38%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, var(--color-accent));
    position: relative;
    transition: box-shadow 0.35s var(--ease), background 0.35s;
    overflow: visible;
}
.pipe-node:hover .pipe-icon-wrap {
    background: color-mix(in srgb, var(--accent, #a855f7) 22%, transparent);
    box-shadow: 0 0 22px color-mix(in srgb, var(--accent, #a855f7) 45%, transparent);
}

/* Outer pulse ring on each node */
.pipe-node-ring {
    position: absolute;
    inset: -7px;
    border-radius: 20px;
    border: 1.5px solid var(--accent, var(--color-accent));
    opacity: 0;
    animation: node-ring-pulse 3.5s calc(var(--ni, 0) * 0.9s) ease-out infinite;
    pointer-events: none;
}

/* Keep old .pipe-icon for any legacy usage */
.pipe-icon {
    font-size: 1.6rem;
    line-height: 1;
}
.pipe-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent, var(--color-accent));
}
.pipe-desc {
    font-size: 0.65rem;
    color: var(--color-text-3);
    text-align: center;
    white-space: nowrap;
}
.pipe-arrow {
    color: var(--color-text-3);
    opacity: 0.75;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Flowing dot on arrow */
.arrow-anim .flow-dot {
    animation: flow-along 2.2s calc(var(--ni, 0) * 0.55s) linear infinite;
}
@keyframes flow-along {
    0%   { transform: translateX(0);   opacity: 1;   }
    75%  { transform: translateX(28px); opacity: 0.5; }
    100% { transform: translateX(28px); opacity: 0;   }
}

/* Formation canvas card */
.formation-canvas {
    padding: 1.25rem;
    position: relative;
}
.canvas-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-3);
    margin-bottom: 0.75rem;
}
.stage-area {
    position: relative;
    width: 100%;
    padding-bottom: 60%;  /* aspect ratio */
    background: rgba(var(--accent-rgb), 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    overflow: hidden;
}
/* Dancer figures (SVG stick people) — replaces old .dancer dots */
.dancer-figure {
    position: absolute;
    left: var(--dx);
    top:  var(--dy);
    transform: translate(-50%, -50%);
    color: var(--dc, var(--color-accent));
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--dc, var(--color-accent)) 70%, transparent));
    transition: left 1.1s cubic-bezier(0.4, 0, 0.2, 1),
                top  1.1s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dancer-groove 2.2s var(--delay, 0s) ease-in-out infinite alternate;
    z-index: 2;
    cursor: default;
}
@keyframes dancer-groove {
    0%   { transform: translate(-50%, -50%) rotate(-8deg) scale(1);    }
    40%  { transform: translate(-50%, -58%) rotate(5deg)  scale(1.12); }
    70%  { transform: translate(-50%, -52%) rotate(-4deg) scale(1.05); }
    100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1);    }
}

/* Beat ring emanating from each dancer */
.beat-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0;
    animation: beat-expand 2s var(--delay, 0s) ease-out infinite;
    pointer-events: none;
}
@keyframes beat-expand {
    0%   { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(2.8); opacity: 0;   }
}
.formation-lines {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    color: var(--color-accent);
    pointer-events: none;
}

/* Floating music notes */
.music-note {
    position: absolute;
    left: var(--nx, 20%);
    bottom: 20%;
    color: var(--color-accent);
    opacity: 0;
    animation: note-float 4.5s var(--ndelay, 0s) ease-in infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes note-float {
    0%   { opacity: 0;   transform: translateY(0)      rotate(-10deg) scale(0.7); }
    12%  { opacity: 0.9; transform: translateY(-12px)  rotate(6deg)   scale(1);   }
    75%  { opacity: 0.4; transform: translateY(-65px)  rotate(-8deg)  scale(0.85);}
    100% { opacity: 0;   transform: translateY(-90px)  rotate(12deg)  scale(0.6); }
}

/* Music equalizer bars */
.eq-bars {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 22%;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 0 8%;
    pointer-events: none;
    z-index: 1;
}
.eq-bar {
    flex: 1;
    min-height: 15%;
    border-radius: 3px 3px 0 0;
    background: var(--gradient-accent);
    opacity: 0.28;
    animation: eq-dance 0.85s var(--bd, 0s) ease-in-out infinite alternate;
}
@keyframes eq-dance {
    0%   { height: 15%; }
    100% { height: 95%; }
}

/* Canvas footer with label + formation indicator dots */
.canvas-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
    gap: 0.75rem;
}
.formation-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.f-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-text-3);
    transition: background 0.4s var(--ease), transform 0.4s var(--ease);
    cursor: default;
}
.f-dot.active {
    background: var(--color-accent);
    transform: scale(1.5);
}
.canvas-sublabel {
    font-size: 0.72rem;
    color: var(--color-text-3);
    margin: 0;
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-3);
    animation: bounce-down 2s ease-in-out infinite;
    z-index: 1;
    opacity: 0.7;
    transition: opacity var(--duration);
}
.scroll-cue:hover { opacity: 1; }


/* ============================================================
   8. DOMAIN SECTION — Tabs
   ============================================================ */
.domain-tabs {
    margin-bottom: 2.5rem;
}

/* Tab button bar */
[role="tablist"] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.tab-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-3);
    background: var(--color-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 0.5em 1.1em;
    transition: all var(--duration) var(--ease);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.tab-btn:hover {
    color: var(--color-accent);
    border-color: rgba(var(--accent-rgb), 0.4);
}
.tab-btn.active, .tab-btn[aria-selected="true"] {
    background: var(--gradient-accent);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35);
}

/* Tab panels */
.tab-panel { display: none; animation: fade-in-up 0.3s var(--ease); }
.tab-panel.active { display: block; }

.tab-heading {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-1);
}
.tab-intro {
    max-width: 65ch;
    color: var(--color-text-3);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Background tab: lit-grid */
/* ── Literature Review — paragraph style ── */
.lit-prose {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.75rem;
}
.lit-theme {
    padding: 1.5rem 0 1.5rem 1.5rem;
    border-left: 2.5px solid rgba(var(--accent-rgb), 0.18);
    position: relative;
    transition: border-color 0.25s;
}
.lit-theme:not(:last-child) {
    margin-bottom: 0.1rem;
}
.lit-theme::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 1.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.55;
    transition: opacity 0.25s, transform 0.25s;
}
.lit-theme:hover {
    border-left-color: rgba(var(--accent-rgb), 0.5);
}
.lit-theme:hover::before {
    opacity: 1;
    transform: scale(1.3);
}
.lit-theme-heading {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-text-1);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    letter-spacing: 0.01em;
}
.lit-theme-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--color-accent);
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}
.lit-theme p {
    font-size: 0.9rem;
    color: var(--color-text-2);
    line-height: 1.78;
    margin: 0;
    text-align: justify;
}

/* ── Inline citation superscript links ── */
.cite {
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: super;
    line-height: 0;
    color: var(--color-accent);
    text-decoration: none;
    padding: 0 0.12em;
    border-radius: 3px;
    transition: background 0.18s var(--ease);
}
.cite:hover {
    background: rgba(var(--accent-rgb), 0.15);
    text-decoration: underline;
}

/* ── IEEE Reference Section ── */
.ref-section {
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}
.ref-heading {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-1);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.01em;
}
.ref-style-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.22em 0.75em;
    border-radius: 100px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.ref-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.ref-item {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(var(--accent-rgb), 0.03);
    border: 1px solid var(--border-subtle);
    transition: background 0.2s var(--ease), border-color 0.2s;
    scroll-margin-top: 90px;  /* offset for sticky nav */
}
.ref-item:target {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
}
.ref-item:hover {
    background: rgba(var(--accent-rgb), 0.055);
}
.ref-num {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-accent);
    min-width: 2rem;
    text-align: right;
}
.ref-text {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--color-text-2);
}
.ref-text em {
    font-style: italic;
    color: var(--color-text-1);
}
.ref-link {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    padding: 0.2em 0.65em;
    border-radius: 100px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.07);
    white-space: nowrap;
    transition: background 0.18s var(--ease), border-color 0.18s;
}
.ref-link:hover {
    background: rgba(var(--accent-rgb), 0.18);
    border-color: rgba(var(--accent-rgb), 0.5);
}

/* Gap tab: gap-grid */
.gap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}
.gap-card {
    padding: 1.5rem;
    text-align: center;
}
/* Gap card custom SVG icons */
.gap-icon {
    margin-bottom: 0.8rem;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s var(--ease), filter 0.3s;
}
.gap-card:hover .gap-icon {
    transform: scale(1.12) translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6));
}

/* Tech section icon spans */
.tech-icon {
    display: inline-flex;
    align-items: center;
    color: var(--color-accent);
    flex-shrink: 0;
}
.gap-card h4 { margin-bottom: 0.4rem; }
.gap-card p  { font-size: 0.85rem; color: var(--color-text-3); }

/* Problem tab */
.problem-quote {
    padding: 2rem 2.5rem;
    position: relative;
    margin-bottom: 2rem;
    border-left: 3px solid var(--color-accent);
}
.quote-mark {
    font-size: 5rem;
    line-height: 0.8;
    color: var(--color-accent);
    opacity: 0.25;
    font-family: Georgia, serif;
    position: absolute;
    top: 0.5rem; left: 1rem;
}
.problem-quote p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--color-text-1);
    line-height: 1.75;
    position: relative;
    z-index: 1;
}
.subheading { margin-bottom: 1rem; color: var(--color-text-1); }
.problem-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}
.problem-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.96rem;
    color: var(--color-text-2);
}
.problem-list li::before {
    content: '';
    flex-shrink: 0;
    margin-top: 0.55em;
    width: 8px; height: 8px;
    background: var(--gradient-accent);
    border-radius: 50%;
}

/* Objectives tab */
.objectives-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.obj-item {
    padding: 1.4rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.obj-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(var(--accent-rgb), 0.20);
    line-height: 1;
    flex-shrink: 0;
}
.obj-body h4 { margin-bottom: 0.4rem; }
.obj-body p  { font-size: 0.875rem; color: var(--color-text-3); line-height: 1.6; }

/* Methodology tab */
.flow-label {
    display: inline-block;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px dashed rgba(var(--accent-rgb), 0.3);
    border-radius: var(--radius-sm);
    padding: 0.6em 1.2em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    font-family: monospace;
}
.pipeline-steps { display: flex; flex-direction: column; gap: 0; }
.step-card {
    padding: 1.5rem;
    border-radius: 0;
    border-left: 3px solid rgba(var(--accent-rgb), 0.2);
    margin-left: 20px;
}
.step-card:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.step-card:last-child  { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.step-connector {
    text-align: center;
    color: var(--color-text-3);
    font-size: 1.2rem;
    margin-left: 20px;
    opacity: 0.5;
}
.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.step-badge {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--badge-color, var(--color-accent));
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.step-card h4  { color: var(--color-text-1); }
.step-card p   { font-size: 0.875rem; color: var(--color-text-3); line-height: 1.7; margin-bottom: 0.75rem; }
.step-tags     { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25em 0.65em;
    border-radius: 100px;
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--color-accent);
    border: 1px solid rgba(var(--accent-rgb), 0.20);
}

/* Technologies tab */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.tech-cat {
    padding: 1.4rem;
}
.tech-cat h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tech-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3em 0.8em;
    border-radius: 100px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--color-accent);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    transition: all var(--duration) var(--ease);
}
.chip:hover {
    background: rgba(var(--accent-rgb), 0.18);
    transform: translateY(-1px);
}


/* ============================================================
   9. MILESTONES — Vertical timeline
   ============================================================ */
.milestone-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-3);
}
.select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.milestone-select,
select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.6em 2.5em 0.6em 1em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--color-glass);
    color: var(--color-text-1);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.milestone-select:focus,
select:focus { border-color: var(--color-accent); }
.select-chevron {
    position: absolute;
    right: 0.7rem;
    pointer-events: none;
    color: var(--color-text-3);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    list-style: none;
}
/* Vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--color-accent) 10%,
        rgba(var(--accent-rgb), 0.3) 90%,
        transparent 100%
    );
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.timeline-item.hidden {
    opacity: 0.18;
    transform: scale(0.98);
    pointer-events: none;
}

/* Node marker */
.timeline-marker {
    position: absolute;
    left: -2.75rem;
    top: 1.5rem;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
}
.marker-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    animation: ring-pulse 3s ease-in-out infinite;
    opacity: 0.4;
}
.marker-dot {
    width: 10px; height: 10px;
    background: var(--gradient-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

/* Timeline card */
.timeline-card {
    padding: 1.6rem;
}
.card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.timeline-card h3 { margin-bottom: 0.5rem; }
.timeline-card p  { font-size: 0.9rem; color: var(--color-text-3); margin-bottom: 1.25rem; }

/* Meta row */
.ms-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid rgba(var(--accent-rgb), 0.10);
}
.ms-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.ms-meta-item svg { color: var(--color-accent); flex-shrink: 0; }
.ms-label { color: var(--color-text-3); }
.ms-val   { font-weight: 700; color: var(--color-text-1); }

/* Deliverables */
.ms-deliverables strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-3);
    margin-bottom: 0.4rem;
}
.ms-deliverables ul { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.ms-deliverables li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-2);
}
.ms-deliverables li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}


/* ============================================================
   10. DOCUMENTS SECTION
   ============================================================ */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.doc-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
}
.doc-icon-wrap {
    color: var(--color-accent);
    flex-shrink: 0;
}
.doc-body {
    flex: 1;
    min-width: 0;
}
.doc-body h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.doc-body p  { font-size: 0.83rem; color: var(--color-text-3); margin-bottom: 0.75rem; }
.doc-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.doc-type-badge {
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--color-accent);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 4px;
    padding: 0.15em 0.5em;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.doc-status { color: var(--color-text-3); font-style: italic; }


/* ============================================================
   11. PRESENTATIONS SECTION
   ============================================================ */
.pres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.pres-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Slide mock thumbnail */
.pres-thumb {
    position: relative;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.slide-mock {
    width: 90%;
    background: var(--color-surface);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.slide-topbar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}
.slide-logo-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c, var(--color-accent));
    opacity: 0.7;
}
.slide-title-block {
    height: 10px;
    border-radius: 4px;
    background: var(--gradient-accent);
    width: var(--tw, 80%);
    opacity: 0.7;
}
.slide-line {
    height: 5px;
    border-radius: 3px;
    background: var(--border-subtle);
}
.l-wide   { width: 100%; }
.l-medium { width: 70%; }
.l-narrow { width: 45%; }
.slide-grid-mini {
    display: grid;
    grid-template-columns: repeat(var(--gcols, 3), 1fr);
    gap: 0.35rem;
    margin-top: 0.25rem;
}
.slide-grid-mini > div {
    height: 18px;
    border-radius: 4px;
    background: rgba(var(--accent-rgb), 0.12);
}
.slide-chart-mini {
    height: var(--ch, 30%);
    border-radius: 4px;
    background: linear-gradient(to top, rgba(var(--accent-rgb), 0.25) 0%, transparent 100%);
    margin-top: 0.25rem;
    min-height: 20px;
}

/* Overlay on hover */
.pres-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--accent-rgb), 0.15);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}
.pres-thumb:hover .pres-overlay { opacity: 1; }

/* Pres body */
.pres-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.pres-body h3 { font-size: 1rem; margin-block: 0.5rem 0.3rem; }
.pres-body p  { font-size: 0.82rem; color: var(--color-text-3); flex: 1; }
.pres-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}
.pres-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--color-text-3);
}
.pres-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-accent);
    transition: opacity var(--duration);
}
.pres-link:hover { opacity: 0.75; }


/* ============================================================
   12. ABOUT US — Team cards
   ============================================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}
.team-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}
.team-card:hover { transform: translateY(-4px); }

.team-photo-wrap {
    position: relative;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(34,211,238,0.10));
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}
.team-photo-placeholder {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.10);
    border: 2px dashed rgba(var(--accent-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-3);
    /* ── HOW TO REPLACE WITH AN ACTUAL PHOTO: ──
       1. Put the photo in web/images/ (e.g., member1.jpg)
       2. Remove this placeholder div entirely
       3. Add: <img src="images/member1.jpg" alt="Name" class="team-photo-img">
    */
}
.team-photo-img {
    width: 88px; height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
}

.role-pill {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2em 0.7em;
    border-radius: 100px;
    white-space: nowrap;
}
.role-pill.supervisor {
    background: rgba(168,85,247,0.25);
    color: #a855f7;
    border: 1px solid rgba(168,85,247,0.4);
}
.role-pill.member {
    background: rgba(34,211,238,0.20);
    color: #22d3ee;
    border: 1px solid rgba(34,211,238,0.3);
}

.team-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}
.member-name { font-size: 1rem; margin: 0; }
.member-role { font-size: 0.8rem; font-weight: 600; color: var(--color-accent); }
.member-dept { font-size: 0.75rem; color: var(--color-text-3); }
.member-achievement {
    font-size: 0.78rem;
    color: var(--color-text-3);
    margin-top: 0.25rem;
    line-height: 1.5;
    flex: 1;
}

.member-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}
.member-link {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--color-text-3);
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid var(--border-subtle);
    transition: all var(--duration) var(--ease);
}
.member-link:hover {
    color: var(--color-accent);
    background: rgba(var(--accent-rgb), 0.14);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-1px);
}


/* ============================================================
   13. CONTACT SECTION
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 2rem;
    align-items: start;
}
.contact-info-col { display: flex; flex-direction: column; gap: 1rem; }

.contact-item {
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.contact-icon {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(var(--accent-rgb), 0.10);
    border: 1px solid rgba(var(--accent-rgb), 0.20);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-accent);
}
.contact-detail h4 { font-size: 0.875rem; margin-bottom: 0.35rem; color: var(--color-text-1); }
.contact-detail a,
.contact-detail p {
    display: block;
    font-size: 0.83rem;
    color: var(--color-text-3);
    line-height: 1.6;
}
.contact-detail a:hover { color: var(--color-accent); }

/* Contact form */
.contact-form-wrap {
    padding: 2rem;
}
.contact-form-wrap h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-2);
}
.required-mark { color: var(--color-accent); }

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.7em 1em;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-subtle);
    background: var(--color-glass);
    color: var(--color-text-1);
    font-size: 0.9rem;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    width: 100%;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-3);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* Inline validation */
.field-error {
    font-size: 0.76rem;
    color: #ef4444;
    display: none;
}
.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
    border-color: #ef4444;
}
.form-group.invalid .field-error { display: block; }

/* Success message */
.form-success {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(16,185,129, 0.12);
    border: 1px solid rgba(16,185,129, 0.3);
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fade-in-up 0.3s var(--ease);
}


/* ============================================================
   14. FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--border-subtle);
    padding-block: 3rem 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    margin-bottom: 2.5rem;
}
.footer-logo-link { margin-bottom: 0.75rem; }
.footer-tagline {
    max-width: 38ch;
    font-size: 0.875rem;
    color: var(--color-text-3);
    margin-bottom: 0.4rem;
}
.footer-group { font-size: 0.78rem; color: var(--color-text-3); }

.footer-nav { display: flex; gap: 3rem; }
.footer-col h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-3);
    margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
    font-size: 0.875rem;
    color: var(--color-text-3);
    transition: color var(--duration) var(--ease);
}
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--color-text-3);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    z-index: 900;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity var(--duration) var(--ease),
                transform var(--duration) var(--ease);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-2px); }


/* ============================================================
   15. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal,
.reveal-delay {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease),
                transform 0.65s var(--ease);
}
.reveal-delay { transition-delay: 0.2s; }
.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Keyframe animations */
@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(20px, -25px) scale(1.05); }
    66%       { transform: translate(-15px, 15px) scale(0.96); }
}

/* Pipe node entry animation */
@keyframes pipe-node-in {
    from { opacity: 0; transform: translateY(14px) scale(0.88); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Pulsing outer ring on pipe nodes */
@keyframes node-ring-pulse {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.45); opacity: 0;   }
}

@keyframes dancer-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5); }
    50%       { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.9); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes bounce-down {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.4; }
    50%       { transform: scale(1.4); opacity: 0;   }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   16. RESPONSIVE — Tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    :root { --section-py: 4rem; }

    /* Navbar: hide desktop links, show hamburger */
    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        position: fixed;
        top: 64px; right: 0;
        width: min(300px, 85vw);
        height: calc(100vh - 64px);
        background: var(--nav-bg);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--nav-border);
        padding: 1.5rem 1rem;
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
        z-index: 999;
        justify-content: flex-start;
        overflow-y: auto;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-link {
        font-size: 1rem;
        padding: 0.65em 1em;
        border-radius: var(--radius-sm);
        width: 100%;
    }
    .hamburger { display: flex; }
    .mobile-overlay { display: block; }

    /* Hero: single column */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text { order: 1; }
    .hero-abstract { margin-inline: auto; }
    .hero-stats { justify-content: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { order: 2; max-width: 520px; margin-inline: auto; }

    /* Pipeline flow: wrap */
    .pipeline-flow { gap: 0.35rem; }
    .pipe-arrow svg { width: 24px; }

    /* Contact: single column */
    .contact-layout { grid-template-columns: 1fr; }

    /* Form row: single column on tablet */
    .form-row { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-nav  { gap: 2rem; }
}


/* ============================================================
   17. RESPONSIVE — Mobile (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
    :root { --section-py: 3rem; }

    .hero-stats { gap: 0.5rem; }
    .stat-pill  { min-width: 68px; padding: 0.6rem 0.8rem; }

    /* Timeline: tighten */
    .timeline      { padding-left: 2rem; }
    .timeline::before { left: 0.6rem; }
    .timeline-marker  { left: -1.75rem; }

    /* Docs: single column */
    .docs-grid { grid-template-columns: 1fr; }
    .doc-card  { flex-direction: column; }

    /* Presentations: single column */
    .pres-grid { grid-template-columns: 1fr; }

    /* Team: 1 or 2 columns */
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

    /* Domain tabs: scroll horizontally */
    [role="tablist"] { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 0.5rem; }
    .tab-btn         { white-space: nowrap; flex-shrink: 0; }

    .objectives-list { grid-template-columns: 1fr; }
    .lit-theme       { padding-left: 1rem; }
    .gap-grid        { grid-template-columns: 1fr; }
    .tech-grid       { grid-template-columns: 1fr; }

    /* Footer */
    .footer-bottom    { flex-direction: column; text-align: center; }
    .footer-nav       { flex-direction: column; gap: 1.5rem; }

    .back-to-top { bottom: 1rem; right: 1rem; }
}
