/* ================================================================
   CloudWithDavid — Premium Personal Portfolio
   Reimagined CSS — Production-Ready
   ================================================================ */

/* =========================
   CSS Reset & Custom Props
   ========================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ---- Brand Colors ---- */
    --primary: #4EA0FF;
    --primary-dark: #2F79D9;
    --secondary: #00E5FF;
    --accent: #BFD8FF;
    --gradient-primary: linear-gradient(135deg, #00E5FF 0%, #4EA0FF 50%, #7B61FF 100%);
    --gradient-hero: linear-gradient(135deg, #00E5FF, #4EA0FF);
    --gradient-subtle: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(78,160,255,0.12));

    /* ---- Text ---- */
    --text-1: #EAF2FF;
    --text-2: #B7C7E6;
    --text-3: #8FA6CC;
    --text-inv: #0B1220;

    /* ---- Backgrounds ---- */
    --bg-body: #0B1220;
    --bg-surface: #0F1A2E;
    --bg-card: rgba(15, 26, 46, 0.85);
    --bg-card-hover: rgba(20, 34, 58, 0.92);
    --bg-elevated: rgba(20, 35, 56, 0.90);
    --bg-input: rgba(8, 16, 29, 0.65);
    --bg-nav: rgba(7, 16, 31, 0.72);

    /* ---- Borders ---- */
    --border-subtle: rgba(140, 174, 214, 0.12);
    --border-medium: rgba(140, 174, 214, 0.24);
    --border-strong: rgba(140, 174, 214, 0.40);

    /* ---- Shadows ---- */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.15);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.30);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.40);
    --shadow-xl: 0 24px 56px rgba(0,0,0,0.50);
    --shadow-glow: 0 0 30px -10px rgba(78,160,255,0.40);

    /* ---- Spacing ---- */
    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 1.5rem;
    --sp-lg: 2rem;
    --sp-xl: 3rem;
    --sp-2xl: 4rem;
    --sp-3xl: 6rem;
    --sp-section: 7rem;

    /* ---- Typography ---- */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* ---- Transitions ---- */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s;
    --t-base: 0.3s;
    --t-slow: 0.5s;

    /* ---- Radius ---- */
    --r-sm: 0.375rem;
    --r-md: 0.625rem;
    --r-lg: 0.875rem;
    --r-xl: 1.25rem;
    --r-full: 9999px;

    /* ---- Layout ---- */
    --nav-h: 72px;
    --container: 1200px;

    /* ---- Badge dots ---- */
    --dot-core: #fffdf4;
    --dot-mid: #e4dccd;
    --dot-outer: #d2c3ab;
    --dot-ring: rgba(210,195,171,0.33);
    --dot-glow: rgba(210,195,171,0.47);
    --dot-ring-pulse: rgba(223,211,192,0.40);
    --dot-glow-pulse: rgba(223,211,192,0.60);

}

/* =========================
   Light Theme Overrides
   ========================= */
[data-theme="light"] {
    --text-1: #202a3a;
    --text-2: #55627a;
    --text-3: #7d8ca7;
    --text-inv: #edf3f9;

    --bg-body: #d7e1ec;
    --bg-surface: #e9f0f7;
    --bg-card: rgba(234,241,248,0.95);
    --bg-card-hover: rgba(228,237,246,0.98);
    --bg-elevated: rgba(230,239,247,0.97);
    --bg-input: rgba(221,231,242,0.96);
    --bg-nav: rgba(231,239,247,0.84);

    --border-subtle: rgba(0,0,0,0.06);
    --border-medium: rgba(0,0,0,0.10);
    --border-strong: rgba(0,0,0,0.18);

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.10);
    --shadow-xl: 0 24px 56px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 30px -10px rgba(78,160,255,0.20);

    --gradient-subtle: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(78,160,255,0.06));

    /* Make badge dots visible and glowing on bright backgrounds */
    --dot-core: #fff8de;
    --dot-mid: #ffd98f;
    --dot-outer: #ffb347;
    --dot-ring: rgba(255,179,71,0.42);
    --dot-glow: rgba(255,157,0,0.58);
    --dot-ring-pulse: rgba(255,179,71,0.54);
    --dot-glow-pulse: rgba(255,157,0,0.74);

}

[data-theme="light"] body {
    color-scheme: light;
}

/* =========================
   Base Styles
   ========================= */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    color-scheme: dark;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-1);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
.navbar,
.btn,
.theme-segmented,
.theme-segment,
.foundation-card,
.project-card,
.blog-card,
.timeline-content,
.contact-form-wrapper,
input,
textarea,
select {
    transition:
        background-color 0.2s var(--ease-out),
        color 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out);
}

/* Ambient background glow — dark mode only */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(78,160,255,0.08), transparent),
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(0,229,255,0.05), transparent),
        radial-gradient(ellipse 50% 50% at 80% 60%, rgba(123,97,255,0.04), transparent);
    transition: opacity var(--t-slow);
}

[data-theme="light"] body::before {
    opacity: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-lg);
}

/* =========================
   Typography
   ========================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-1);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.625rem); }

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

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.8;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================
   Scroll Progress Bar
   ========================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s linear;
}

/* =========================
   Buttons
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--r-full);
    border: none;
    cursor: pointer;
    transition: all var(--t-base) var(--ease-out);
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--t-fast);
}

.btn:hover::before {
    background: rgba(255,255,255,0.08);
}

[data-theme="light"] .btn::before {
    background: rgba(15, 23, 42, 0);
}

[data-theme="light"] .btn:hover::before {
    background: rgba(15, 23, 42, 0.06);
}

.btn-primary {
    background: var(--gradient-hero);
    color: var(--text-inv);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 40px -8px rgba(78,160,255,0.50);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-inv);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-2px);
}

/* =========================
   Navigation
   ========================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--t-base) var(--ease-out);
    height: var(--nav-h);
}

[data-theme="light"] .navbar {
    background: rgba(226, 235, 244, 0.56);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--border-medium);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: var(--r-md);
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
}

.navbar .brand-mark {
    width: 42px;
    height: 42px;
}

.navbar .brand-text {
    font-size: 1.49rem;
}

.brand-accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin-left: auto;
    margin-right: 0.5rem;
}

.nav-links a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-2);
    border-radius: var(--r-md);
    transition: all var(--t-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-1);
    background: var(--gradient-subtle);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-hero);
    border-radius: var(--r-full);
}

[data-theme="light"] .nav-links a {
    color: #46566f;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    color: #1f2d44;
    background: rgba(78,160,255,0.17);
}

[data-theme="light"] .nav-links a.active::after {
    background: var(--gradient-hero);
}

.nav-theme-item {
    display: none;
    list-style: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-segmented {
    --theme-pill-pulse-base-border: rgba(94, 179, 255, 0.36);
    --theme-pill-pulse-base-shadow:
        inset 0 0 0 1px rgba(78, 160, 255, 0.16),
        0 0 16px rgba(78, 160, 255, 0.22);
    --theme-pill-pulse-peak-border: rgba(120, 201, 255, 0.68);
    --theme-pill-pulse-peak-shadow:
        inset 0 0 0 1px rgba(120, 196, 255, 0.34),
        0 0 22px rgba(78, 160, 255, 0.40);
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0.18rem;
    border-radius: var(--r-full);
    border: 1px solid var(--theme-pill-pulse-base-border);
    background: linear-gradient(135deg, rgba(14, 31, 58, 0.72), rgba(14, 26, 48, 0.78));
    box-shadow: var(--theme-pill-pulse-base-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

[data-theme="light"] .theme-segmented {
    --theme-pill-pulse-base-border: rgba(148, 163, 184, 0.52);
    --theme-pill-pulse-base-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.22),
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 6px 14px rgba(15, 23, 42, 0.08),
        0 0 14px rgba(96, 165, 250, 0.14);
    --theme-pill-pulse-peak-border: rgba(59, 130, 246, 0.62);
    --theme-pill-pulse-peak-shadow:
        inset 0 0 0 1px rgba(147, 197, 253, 0.38),
        0 1px 2px rgba(37, 99, 235, 0.14),
        0 10px 20px rgba(37, 99, 235, 0.18),
        0 0 20px rgba(59, 130, 246, 0.22);
    background: linear-gradient(145deg, rgba(233, 240, 248, 0.98), rgba(217, 227, 238, 0.98));
    border-color: var(--theme-pill-pulse-base-border);
    box-shadow: var(--theme-pill-pulse-base-shadow);
}

.theme-segment {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-width: 5.2rem;
    padding: 0.4rem 0.72rem;
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1;
    text-align: center;
}

.theme-segment-label {
    letter-spacing: 0.01em;
}

.theme-segment-icon {
    font-size: 0.84rem;
    line-height: 1;
}

.theme-segment-icon i {
    color: var(--primary);
}

.theme-segment-divider {
    width: 1px;
    height: 1rem;
    margin: 0 0.1rem;
    background: var(--border-subtle);
    opacity: 0.95;
    flex: 0 0 auto;
}

.theme-segment:hover {
    color: var(--text-1);
    background: rgba(78, 160, 255, 0.10);
}

[data-theme="light"] .theme-segment {
    color: #475569;
}

[data-theme="light"] .theme-segment:hover {
    color: #1e3a5f;
    background: rgba(59, 130, 246, 0.12);
    box-shadow:
        inset 0 0 0 1px rgba(147, 197, 253, 0.46),
        0 0 10px rgba(96, 165, 250, 0.14);
}

[data-theme="light"] .theme-segment-divider {
    background: rgba(100, 116, 139, 0.35);
    opacity: 1;
}

.theme-segment:focus-visible {
    color: var(--text-1);
    outline: 2px solid rgba(78, 160, 255, 0.72);
    outline-offset: 2px;
}

[data-theme="light"] .theme-segment:focus-visible {
    outline-color: rgba(37, 99, 235, 0.58);
}

.theme-segment.is-active,
.theme-segment[aria-pressed="true"] {
    color: var(--text-1);
    border-color: rgba(114, 196, 255, 0.72);
    background: linear-gradient(135deg, rgba(78, 160, 255, 0.30), rgba(0, 229, 255, 0.20));
    box-shadow:
        inset 0 0 0 1px rgba(191, 216, 255, 0.30),
        0 0 18px rgba(78, 160, 255, 0.34);
}

[data-theme="light"] .theme-segment.is-active,
[data-theme="light"] .theme-segment[aria-pressed="true"] {
    color: #0f2942;
    border-color: rgba(37, 99, 235, 0.68);
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.92));
    box-shadow:
        inset 0 0 0 1px rgba(238, 246, 255, 0.92),
        0 1px 2px rgba(37, 99, 235, 0.14),
        0 8px 14px rgba(37, 99, 235, 0.16),
        0 0 18px rgba(59, 130, 246, 0.22);
}

.theme-segmented--mobile {
    width: 100%;
    justify-content: center;
}

.theme-segmented--mobile-inline {
    display: none;
}

.theme-segmented--pulse {
    animation: themeSegmentedPulse 2s ease-out 3;
}

@keyframes themeSegmentedPulse {
    0%, 100% {
        border-color: var(--theme-pill-pulse-base-border);
        box-shadow: var(--theme-pill-pulse-base-shadow);
    }
    50% {
        border-color: var(--theme-pill-pulse-peak-border);
        box-shadow: var(--theme-pill-pulse-peak-shadow);
    }
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-1);
    border-radius: var(--r-full);
    transition: all var(--t-base) var(--ease-out);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================
   Hero Section
   ========================= */
.hero {
    position: relative;
    padding: calc(var(--nav-h) + var(--sp-2xl)) 0 var(--sp-3xl);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-gradient-line {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
    animation: gradientSlide 4s ease-in-out infinite;
}

@keyframes gradientSlide {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.4; }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: var(--sp-2xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Hero Badges */
.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--sp-lg);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: var(--bg-elevated);
    backdrop-filter: blur(12px);
    border-radius: var(--r-full);
    border: 1px solid var(--border-medium);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-1);
    box-shadow: var(--shadow-sm);
    white-space: normal;
    line-height: 1.35;
    max-width: 100%;
}

.hero-badge span {
    overflow-wrap: anywhere;
}

.cert-pill {
    cursor: pointer;
    transition: border-color var(--t-fast), box-shadow var(--t-base) var(--ease-out), transform var(--t-fast);
}

.cert-pill:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);
}

.cert-pill:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(78,160,255,0.35), var(--shadow-md);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--dot-core), var(--dot-mid) 50%, var(--dot-outer));
    box-shadow: 0 0 0 3px var(--dot-ring), 0 0 12px 2px var(--dot-glow), 0 0 18px 3px var(--dot-glow);
    animation: heroDotPulse 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes heroDotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px var(--dot-ring), 0 0 12px 2px var(--dot-glow), 0 0 18px 3px var(--dot-glow); }
    50% { transform: scale(1.15); box-shadow: 0 0 0 2px var(--dot-ring-pulse), 0 0 17px 3px var(--dot-glow-pulse), 0 0 24px 4px var(--dot-glow-pulse); }
}

.hero-badge--loading {
    color: var(--text-3);
}

.hero-loading-dots {
    display: inline-block;
    width: 1.4em;
}

.hero-badge-loader {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.75px solid var(--border-medium);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Hero Title */
.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: var(--sp-lg);
    letter-spacing: -0.02em;
}

.hero-line {
    display: inline;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-2);
    margin-bottom: var(--sp-xl);
    max-width: 520px;
    line-height: 1.75;
}

.hero-description strong {
    color: var(--primary);
}

.hero-cta {
    display: flex;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xl);
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    gap: 0.75rem;
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-3);
    font-size: 1.125rem;
    transition: all var(--t-base) var(--ease-out);
}

.hero-social a:hover {
    color: var(--primary);
    border-color: var(--border-medium);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Hero Visual / Mascot */
.hero-visual {
    position: relative;
    height: 500px;
}

.hero-mascot-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    z-index: 1;
}

.mascot-glow {
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78,160,255,0.15) 0%, rgba(0,229,255,0.08) 40%, transparent 70%);
    animation: mascotGlow 4s ease-in-out infinite alternate;
    filter: blur(30px);
}

@keyframes mascotGlow {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-mascot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: mascotFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

@keyframes mascotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-medium);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
    text-decoration: none;
    color: inherit;
    z-index: 3;
    animation: floatingCardDrift 7.2s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
    will-change: transform, box-shadow;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.floating-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    transition: transform var(--t-base) var(--ease-out);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .floating-card:hover {
        box-shadow: var(--shadow-xl), var(--shadow-glow);
        border-color: var(--border-strong);
    }

    .floating-card:hover .floating-card-inner {
        transform: translate3d(0, -8px, 0) scale(1.05);
    }
}

.floating-card i {
    font-size: 1.625rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-1 i {
    font-size: 2rem;
}

.card-3 i {
    font-size: 1.85rem;
}

.floating-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-1);
}

.card-1 { top: 5%; left: 5%; --float-delay: 0s; }
.card-2 { top: 15%; right: 2%; --float-delay: 0.9s; }
.card-3 { bottom: 25%; left: 0%; --float-delay: 1.8s; }
.card-4 { top: 55%; right: 0%; --float-delay: 2.7s; }
.card-5 { bottom: 5%; right: 20%; --float-delay: 3.6s; }

@keyframes floatingCardDrift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(0, -5px, 0); }
    50% { transform: translate3d(0, -10px, 0); }
    75% { transform: translate3d(0, -4px, 0); }
}

@media (hover: none), (pointer: coarse) {
    .floating-card {
        animation-duration: 8.6s;
    }
}

/* =========================
   Proof Snapshot
   ========================= */
.proof-snapshot {
    padding: 0 0 var(--sp-2xl);
}

.proof-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: var(--sp-md);
    box-shadow: var(--shadow-md);
}

.proof-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.25rem 0.375rem;
}

.proof-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    font-family: var(--font-mono);
}

.proof-value {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    font-size: 1.25rem;
    line-height: 1.2;
}

.proof-value--accent {
    position: relative;
    display: inline-block;
    color: #2abfff;
}

.proof-value--accent::after {
    content: attr(data-shimmer-text);
    position: absolute;
    inset: 0;
    color: transparent;
    pointer-events: none;
    white-space: nowrap;
    background: linear-gradient(105deg, #29bfff 0%, #63d7ff 42%, #dff6ff 50%, #63d7ff 58%, #29bfff 100%);
    background-size: 240% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    will-change: background-position;
    animation: proofAccentShimmer 2.8s linear infinite;
}

@keyframes proofAccentShimmer {
    0% { background-position: 180% 50%; }
    100% { background-position: -80% 50%; }
}

.proof-item .stats-number {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1;
}

.proof-meta {
    font-size: 0.8125rem;
    color: var(--text-2);
}

.proof-links {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--sp-sm);
}

.proof-status-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.proof-status-line .proof-value {
    margin: 0;
    line-height: 1;
}

.proof-status-line .proof-meta {
    line-height: 1.25;
}

.proof-links a {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.proof-links a:hover:not(.proof-link-secondary) {
    color: var(--secondary);
}

.proof-link-secondary {
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-3);
    opacity: 0.9;
    transition: color var(--t-fast), text-shadow var(--t-fast), opacity var(--t-fast);
}

.proof-link-secondary.proof-link-secondary--scroll-glow {
    color: var(--secondary);
    opacity: 1;
    text-shadow:
        0 0 10px rgba(0,229,255,0.95),
        0 0 20px rgba(0,229,255,0.7),
        0 0 34px rgba(0,229,255,0.5);
}

[data-theme="light"] .proof-link-secondary.proof-link-secondary--scroll-glow {
    color: #00a7ea;
    text-shadow:
        0 0 1px rgba(0, 57, 96, 0.72),
        0 0 12px rgba(0, 167, 234, 0.88),
        0 0 24px rgba(0, 153, 217, 0.72),
        0 0 36px rgba(0, 128, 192, 0.58);
}

/* =========================
   Section Base
   ========================= */
.section {
    padding: var(--sp-section) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--sp-3xl);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--sp-md);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    cursor: pointer;
}

.timeline-toggle {
    appearance: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--primary);
    margin-bottom: 0;
}

.timeline-toggle-row {
    display: grid;
    grid-template-columns: 2.75rem auto 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.timeline-toggle-main {
    grid-column: 2;
    padding: 0.375rem 1rem;
    justify-self: center;
}

.timeline-toggle-icon {
    grid-column: 3;
    width: 2.75rem;
    padding: 0.375rem 0;
    justify-content: center;
    justify-self: start;
}

.timeline-toggle-chevron {
    font-size: 0.72rem;
    transition: transform var(--t-base) var(--ease-out);
}

.timeline-toggle[aria-expanded="false"] .timeline-toggle-chevron {
    transform: rotate(180deg);
}

.section-title {
    margin-bottom: var(--sp-sm);
}

.section-title--paired .title-phrase {
    display: inline-block;
    white-space: nowrap;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-3);
    max-width: 560px;
    margin: 0 auto;
}

/* =========================
   About Section
   ========================= */
.about-grid {
    display: block;
}

.about-text {
    max-width: 920px;
    margin: 0 auto;
}

.about-text .lead {
    margin-bottom: var(--sp-md);
}

.about-text .lead strong {
    color: var(--primary);
}

.about-text > p {
    margin-bottom: var(--sp-lg);
}

.about-text > p:last-child {
    margin-bottom: 0;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-2);
}

.highlight-item i {
    color: var(--secondary);
    font-size: 0.875rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.about-stats--inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-md);
    margin: 0 auto var(--sp-2xl);
}

.about-stats--inline .stat-card {
    align-items: center;
    min-height: 122px;
    padding: 1rem 1.125rem;
}

.about-stats--inline .stat-icon {
    width: 46px;
    height: 46px;
    font-size: var(--about-stat-icon-size, 1.125rem);
}

/* Per-about-card icon sizing controls */
.stat-icon--systems { --about-stat-icon-size: 1.375rem; }
.stat-icon--learning { --about-stat-icon-size: 1.3rem; }
.stat-icon--collab { --about-stat-icon-size: 1.175rem; }

.about-stats--inline .stat-info {
    min-width: 0;
    flex: 1;
}

.about-stats--inline .stat-info h3 {
    line-height: 1.25;
    margin-bottom: 0.3rem;
    text-wrap: balance;
}

.about-stats--inline .stat-info p {
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--text-2);
}

.about-stats--inline .stat-arrow {
    display: block;
    opacity: 0.55;
    transform: none;
    margin-left: 0;
}

.about-stats--inline .stat-card--no-arrow .stat-arrow {
    display: none;
}

.about-stats--inline .stat-card:hover {
    transform: translateY(-3px);
}

.about-stats--inline .stat-card:hover .stat-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    transition: all var(--t-base) var(--ease-out);
    cursor: default;
}

.stat-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--r-lg);
    background: var(--gradient-hero);
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.stat-nowrap {
    white-space: nowrap;
}

.stat-tail {
    display: inline-block;
    white-space: nowrap;
}

.stat-info p {
    font-size: 0.8125rem;
    color: var(--text-3);
}

.stat-arrow {
    margin-left: auto;
    color: var(--text-3);
    font-size: 0.75rem;
    transition: all var(--t-base);
    opacity: 0;
    transform: translateX(-8px);
}

.stat-card:hover .stat-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

/* =========================
   Foundation Section
   ========================= */
.foundation .section-header {
    margin-bottom: 0;
}

.timeline-dropdown-content .foundation-grid {
    text-align: left;
}

.foundation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--sp-lg);
}

@media (min-width: 769px) {
    .foundation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(0.6rem, 1vw, 1rem);
    }

    .foundation-grid .foundation-card {
        min-width: 0;
        padding: clamp(0.9rem, 1.2vw, 1.15rem);
    }

    .foundation-grid .fcard-header {
        gap: 0.6rem;
        margin-bottom: 0.75rem;
    }

    .foundation-grid .fcard-icon {
        width: clamp(38px, 2.2vw, 44px);
        height: clamp(38px, 2.2vw, 44px);
        font-size: var(--fcard-icon-size, clamp(1.1rem, 1.1vw, 1.28rem));
    }

    .foundation-grid .fcard-header h3 {
        font-size: clamp(0.9rem, 1vw, 1.15rem);
        line-height: 1.2;
    }

    .foundation-grid .foundation-card > p {
        font-size: clamp(0.82rem, 0.95vw, 0.9375rem);
        margin-bottom: 0.6rem;
    }

    .foundation-grid .fcard-list li {
        font-size: clamp(0.78rem, 0.88vw, 0.875rem);
        margin-bottom: 0.3rem;
    }
}

@media (min-width: 980px) {
    .foundation-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1820px) {
    .foundation-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.foundation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: var(--sp-lg);
    transition: all var(--t-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.foundation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.5;
    transition: opacity var(--t-base);
}

.foundation-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.foundation-card:hover::before {
    opacity: 1;
}

.fcard-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--sp-sm);
}

.fcard-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-lg);
    background: var(--gradient-hero);
    color: white;
    font-size: var(--fcard-icon-size, 1.3rem);
    flex-shrink: 0;
}

/* Foundation-card icon sizing controls */
.fcard-icon--linux { --fcard-icon-size: 1.6rem; }
.fcard-icon--networking { --fcard-icon-size: 1.25rem; }
.fcard-icon--git { --fcard-icon-size: 1.7rem; }
.fcard-icon--aws { --fcard-icon-size: 1.3rem; }
.fcard-icon--itil { --fcard-icon-size: 1.3rem; }

.fcard-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    min-width: 0;
}

.foundation-card > p {
    font-size: 0.9375rem;
    margin-bottom: var(--sp-sm);
    color: var(--text-2);
}

.fcard-list {
    list-style: none;
    margin-bottom: var(--sp-md);
}

.fcard-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.5;
}

.fcard-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

.fcard-progress {
    height: 4px;
    background: var(--border-subtle);
    border-radius: var(--r-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--r-full);
    transition: width 1.5s var(--ease-out);
}

/* =========================
   Projects Section
   ========================= */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--sp-xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-2);
    border-radius: var(--r-full);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--t-base);
}

.filter-btn:hover {
    border-color: var(--border-medium);
    color: var(--text-1);
}

.filter-btn.active {
    background: var(--gradient-hero);
    color: var(--text-inv);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.projects-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--sp-xl);
}

.project-group.hidden {
    display: none;
}

.project-group-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-lg);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: var(--sp-lg);
    transition: all var(--t-base) var(--ease-out);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.project-card.hidden {
    display: none;
}

.project-card-top {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.75rem;
    margin-bottom: 0.875rem;
}

.project-card-top .project-icons {
    margin-left: auto;
}

.project-icons a,
.project-icons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--r-md);
    border: 1px solid var(--border-subtle);
    background: var(--gradient-subtle);
    color: var(--text-3);
    font-size: 2.25rem;
    cursor: pointer;
    appearance: none;
    transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}

.project-icons a:hover,
.project-icons button:hover {
    color: var(--primary);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.project-upcoming-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--r-full);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--r-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1.1;
    overflow: visible;
}

.project-status i {
    display: inline-block;
    line-height: 1.1;
}

.status-complete {
    --complete-icon-shadow-soft: rgba(52,211,153,0.82);
    --complete-icon-shadow-strong: rgba(52,211,153,1);
    color: #ECFDF5;
    background: linear-gradient(135deg, rgba(16,185,129,0.42) 0%, rgba(20,184,166,0.32) 100%);
    border: 1px solid rgba(52,211,153,0.50);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.22), 0 0 10px rgba(16,185,129,0.14);
    transition: box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out);
}

.project-card:hover .status-complete,
.status-complete:hover,
.status-complete:active,
.status-complete:focus-visible,
.project-card:active .status-complete,
.project-card:focus-within .status-complete {
    --complete-icon-shadow-soft: rgba(74,222,128,0.96);
    --complete-icon-shadow-strong: rgba(74,222,128,1);
    border-color: rgba(110,231,183,0.72);
    background: linear-gradient(135deg, rgba(16,185,129,0.48) 0%, rgba(20,184,166,0.36) 100%);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.34), 0 0 16px rgba(16,185,129,0.28);
}

.status-complete i {
    color: #34D399;
    transform: translateZ(0);
    backface-visibility: hidden;
    filter:
        drop-shadow(0 0 8px var(--complete-icon-shadow-soft))
        drop-shadow(0 0 14px var(--complete-icon-shadow-soft));
    animation: completeIconBreath 2.8s ease-in-out infinite;
}

@keyframes completeIconBreath {
    0%, 100% {
        filter:
            drop-shadow(0 0 8px var(--complete-icon-shadow-soft))
            drop-shadow(0 0 14px var(--complete-icon-shadow-soft));
    }
    50% {
        filter:
            drop-shadow(0 0 18px var(--complete-icon-shadow-strong))
            drop-shadow(0 0 30px var(--complete-icon-shadow-strong));
    }
}

.status-progress {
    color: #F3E8FF;
    background: linear-gradient(135deg, rgba(167,139,250,0.22) 0%, rgba(124,58,237,0.16) 100%);
    border: 1px solid rgba(167,139,250,0.48);
    box-shadow: inset 0 0 0 1px rgba(167,139,250,0.24), 0 0 10px rgba(167,139,250,0.20);
    transition: box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out);
}

.status-progress i {
    color: #C4B5FD;
}

.project-card:hover .status-progress,
.status-progress:hover,
.status-progress:active,
.status-progress:focus-visible,
.project-card:active .status-progress,
.project-card:focus-within .status-progress {
    border-color: rgba(196,181,253,0.62);
    background: linear-gradient(135deg, rgba(167,139,250,0.26) 0%, rgba(124,58,237,0.19) 100%);
    box-shadow: inset 0 0 0 1px rgba(167,139,250,0.28), 0 0 12px rgba(167,139,250,0.24);
}

.status-planned {
    color: #FEF3C7;
    background: linear-gradient(135deg, rgba(245,158,11,0.22) 0%, rgba(234,179,8,0.16) 100%);
    border: 1px solid rgba(245,158,11,0.46);
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.16), 0 0 6px rgba(245,158,11,0.10);
    transition: box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out);
}

.status-planned i {
    color: #FBBF24;
}

.project-card:hover .status-planned,
.status-planned:hover,
.status-planned:active,
.status-planned:focus-visible,
.project-card:active .status-planned,
.project-card:focus-within .status-planned {
    border-color: rgba(251,191,36,0.72);
    background: linear-gradient(135deg, rgba(245,158,11,0.30) 0%, rgba(234,179,8,0.22) 100%);
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.20), 0 0 6px rgba(245,158,11,0.09);
}

/* Improve project status label contrast on light theme */
[data-theme="light"] .status-complete {
    --complete-icon-shadow-soft: rgba(5,150,105,0.72);
    --complete-icon-shadow-strong: rgba(5,150,105,0.98);
    color: #065F46;
    background: linear-gradient(135deg, rgba(16,185,129,0.30) 0%, rgba(20,184,166,0.24) 100%);
    border-color: rgba(5,150,105,0.40);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.20);
}

[data-theme="light"] .project-card:hover .status-complete,
[data-theme="light"] .status-complete:hover,
[data-theme="light"] .status-complete:active,
[data-theme="light"] .status-complete:focus-visible,
[data-theme="light"] .project-card:active .status-complete,
[data-theme="light"] .project-card:focus-within .status-complete {
    --complete-icon-shadow-soft: rgba(16,185,129,0.86);
    --complete-icon-shadow-strong: rgba(5,150,105,1);
    border-color: rgba(16,185,129,0.58);
    background: linear-gradient(135deg, rgba(16,185,129,0.36) 0%, rgba(20,184,166,0.28) 100%);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.28), 0 0 12px rgba(16,185,129,0.20);
}

[data-theme="light"] .status-complete i {
    color: #059669;
}

[data-theme="light"] .status-progress {
    color: #5B21B6;
    background: linear-gradient(135deg, rgba(167,139,250,0.22) 0%, rgba(139,92,246,0.14) 100%);
    border-color: rgba(124,58,237,0.40);
    box-shadow: inset 0 0 0 1px rgba(139,92,246,0.18), 0 0 9px rgba(124,58,237,0.12);
}

[data-theme="light"] .status-progress i {
    color: #6D28D9;
}

[data-theme="light"] .project-card:hover .status-progress,
[data-theme="light"] .status-progress:hover,
[data-theme="light"] .status-progress:active,
[data-theme="light"] .status-progress:focus-visible,
[data-theme="light"] .project-card:active .status-progress,
[data-theme="light"] .project-card:focus-within .status-progress {
    border-color: rgba(109,40,217,0.46);
    background: linear-gradient(135deg, rgba(167,139,250,0.25) 0%, rgba(139,92,246,0.17) 100%);
    box-shadow: inset 0 0 0 1px rgba(139,92,246,0.20), 0 0 10px rgba(109,40,217,0.12);
}

[data-theme="light"] .status-planned {
    color: #92400E;
    background: linear-gradient(135deg, rgba(251,191,36,0.22) 0%, rgba(245,158,11,0.16) 100%);
    border-color: rgba(202,138,4,0.40);
    box-shadow: inset 0 0 0 1px rgba(202,138,4,0.16), 0 0 6px rgba(202,138,4,0.08);
}

[data-theme="light"] .status-planned i {
    color: #CA8A04;
}

[data-theme="light"] .project-card:hover .status-planned,
[data-theme="light"] .status-planned:hover,
[data-theme="light"] .status-planned:active,
[data-theme="light"] .status-planned:focus-visible,
[data-theme="light"] .project-card:active .status-planned,
[data-theme="light"] .project-card:focus-within .status-planned {
    border-color: rgba(180,83,9,0.52);
    background: linear-gradient(135deg, rgba(251,191,36,0.30) 0%, rgba(245,158,11,0.20) 100%);
    box-shadow: inset 0 0 0 1px rgba(202,138,4,0.18), 0 0 5px rgba(180,83,9,0.08);
}

.project-card h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.28;
    margin-bottom: 0.625rem;
}

.project-card > p {
    font-size: 0.9375rem;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: var(--sp-md);
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.project-tags span {
    padding: 0.2rem 0.5rem;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-3);
    font-family: var(--font-mono);
}

/* =========================
   Timeline Section
   ========================= */
.section.timeline,
.section.foundation {
    padding: calc(var(--sp-section) * 0.52) 0;
}

.timeline .section-header {
    margin-bottom: 0;
}

.timeline-dropdown-content {
    margin-top: var(--sp-md);
    max-height: 2400px;
    overflow: hidden;
    opacity: 1;
    transition: max-height var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out), margin-top var(--t-base) var(--ease-out);
}

.timeline-dropdown-content.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

/* Prevent foundation card hover shadows from being clipped */
#foundationDropdownContent.timeline-dropdown-content {
    overflow: visible;
}

#foundationDropdownContent.timeline-dropdown-content.is-collapsed {
    overflow: hidden;
}

.timeline-dropdown-content .section-title {
    margin-bottom: var(--sp-sm);
}

.timeline-dropdown-content .section-subtitle {
    margin: 0 auto var(--sp-lg);
}

.timeline-dropdown-content .timeline-track,
.timeline-dropdown-content .timeline-content {
    text-align: left;
}

.timeline-track {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    --timeline-track-pad: 1.75rem;
    --timeline-rail-x: 7px;
    padding-left: var(--timeline-track-pad);
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--timeline-rail-x);
    width: 2px;
    background: var(--border-medium);
}

.timeline-item {
    position: relative;
    padding-bottom: 0.75rem;
}

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

.timeline-dot {
    position: absolute;
    left: calc(var(--timeline-rail-x) - var(--timeline-track-pad) - 3px);
    top: 0.28rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-medium);
    z-index: 2;
    transition: all var(--t-base);
}

.timeline-dot--active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(78,160,255,0.20);
}

.timeline-dot--current {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(0,229,255,0.30), 0 0 10px 1px rgba(0,229,255,0.30), 0 0 16px 2px rgba(0,229,255,0.18);
    animation: timelineDotPulse 2s ease-in-out infinite;
}

.timeline-dot--future {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
    border-style: dashed;
}

@keyframes timelineDotPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(0,229,255,0.30), 0 0 10px 1px rgba(0,229,255,0.30), 0 0 16px 2px rgba(0,229,255,0.18);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(0,229,255,0.42), 0 0 14px 2px rgba(0,229,255,0.45), 0 0 22px 4px rgba(0,229,255,0.26);
    }
}

.timeline-content {
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    transition: all var(--t-base) var(--ease-out);
}

.timeline-content:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-mono);
    margin-bottom: 0.25rem;
}

.timeline-content h3 {
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.timeline-content p {
    font-size: 0.8125rem;
    color: var(--text-2);
    line-height: 1.5;
}

.timeline-item--future .timeline-content {
    opacity: 0.6;
    border-style: dashed;
}

.stats-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-3);
}

/* =========================
   Blog Preview Section
   ========================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-lg);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: var(--sp-lg);
    transition: all var(--t-base) var(--ease-out);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-meta {
    display: flex;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-sm);
}

.blog-date,
.blog-read {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--r-full);
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
}

.blog-date i,
.blog-read i {
    font-size: 0.6875rem;
    opacity: 0.72;
}

.blog-upcoming-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-3);
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
}

.blog-upcoming-badge i {
    font-size: 0.6875rem;
    opacity: 0.72;
}

.blog-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.blog-card > p {
    font-size: 0.9375rem;
    color: var(--text-2);
    margin-bottom: var(--sp-md);
    flex: 1;
}

.blog-card--no-cta > p {
    margin-bottom: 0;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    border-radius: var(--r-md);
    transition: gap 0.75s var(--ease-out), text-shadow 0.75s var(--ease-out);
}

.blog-link:hover {
    gap: 0.625rem;
}

.blog-link--upcoming {
    color: var(--text-3);
    cursor: default;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-full);
    padding: 0.25rem 0.625rem;
    background: var(--gradient-subtle);
    gap: 0.35rem;
}

.blog-link--upcoming:hover {
    gap: 0.35rem;
}

.blog-link i {
    font-size: 0.75rem;
    transition: transform 0.75s var(--ease-out), filter 0.75s var(--ease-out);
}

.blog-link:hover i {
    transform: translateX(2px);
}

.blog-card:not(.blog-card--no-cta):hover .blog-link {
    text-shadow: 0 0 10px rgba(78,160,255,0.42), 0 0 18px rgba(0,229,255,0.22);
}

.blog-card:not(.blog-card--no-cta):hover .blog-link i {
    transform: translateX(2px);
    filter: drop-shadow(0 0 8px rgba(78,160,255,0.6));
}

/* =========================
   Contact Section
   ========================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--sp-3xl);
    align-items: start;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: 0.875rem var(--sp-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    transition: all var(--t-base) var(--ease-out);
}

.contact-link:hover {
    border-color: var(--border-medium);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.contact-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--r-lg);
    background: var(--gradient-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.contact-link-info strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
    color: var(--text-1);
}

.contact-link-info span {
    font-size: 0.8125rem;
    color: var(--text-3);
}

.contact-link-arrow {
    margin-left: auto;
    color: var(--text-3);
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--t-base);
}

.contact-link:hover .contact-link-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    font-size: 1.375rem;
    margin-bottom: var(--sp-sm);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-full);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--text-3);
    margin-bottom: var(--sp-lg);
    transition: all var(--t-fast);
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.contact-email i {
    color: var(--primary);
}

.contact-email:hover {
    border-color: var(--border-medium);
    color: var(--text-2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm);
}

.form-group {
    margin-bottom: var(--sp-sm);
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem var(--sp-sm);
    background: var(--bg-input);
    color: var(--text-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78,160,255,0.15);
}

.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.20);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    min-height: 1.25rem;
    margin-top: 0.125rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-3);
}

.form-status--info {
    color: var(--text-3);
}

.form-status--success {
    color: #86efac;
}

.form-status--error {
    color: #fca5a5;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: var(--sp-xs);
}

/* =========================
   Footer
   ========================= */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: var(--sp-2xl) 0 var(--sp-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--sp-xl);
    margin-bottom: var(--sp-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--sp-sm);
}

.footer-tagline {
    color: var(--text-3);
    font-size: 0.9375rem;
    max-width: 360px;
    line-height: 1.65;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--sp-md);
    color: var(--text-1);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links a {
    color: var(--text-3);
    font-size: 0.9375rem;
    transition: color var(--t-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-3);
    font-size: 1rem;
    transition: all var(--t-base);
}

.footer-social a:hover {
    color: var(--primary);
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--border-subtle);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--text-3);
}

.footer-note {
    font-size: 0.8125rem;
    color: var(--text-3);
}

/* =========================
   Back to Top
   ========================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--r-lg);
    color: var(--text-2);
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all var(--t-base) var(--ease-out);
    backdrop-filter: blur(12px);
}

.back-to-top.back-to-top--footer-clear {
    bottom: 6.5rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--primary);
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* =========================
   Notifications
   ========================= */
.notification-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    max-width: calc(100vw - 2rem);
    gap: 0.5rem;
    pointer-events: none;
}

.notification {
    padding: 0.875rem 1.5rem;
    border-radius: var(--r-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    position: relative;
    padding-right: 2.25rem;
    box-shadow: var(--shadow-lg);
    animation: notifIn 0.4s var(--ease-spring);
    pointer-events: auto;
    width: fit-content;
    max-width: min(680px, calc(100vw - 2rem));
}

.notification-message {
    display: inline-block;
    flex: 0 1 auto;
    max-width: 100%;
}

.notification-mobile-break {
    display: inline;
}

.notification-repo-statement {
    white-space: nowrap;
}

.notification-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.85;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 0;
    flex: 0 0 auto;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity var(--t-fast), transform var(--t-fast);
}

.notification-close:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.06);
}

.notification-link {
    color: #2F1B7A;
    text-decoration: underline;
    text-underline-offset: 0.14em;
    font-weight: 700;
}

.notification-link:hover {
    color: #1F114F;
}

.notification--success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification--error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

[data-theme="light"] .notification--success {
    background: linear-gradient(90deg, #07b181 0%, #08c791 55%, #34d399 100%);
}

[data-theme="light"] .notification--error {
    background: linear-gradient(90deg, #b91c1c 0%, #ef4444 55%, #f87171 100%);
}

.notification.closing {
    animation: notifOut 0.3s var(--ease-out) forwards;
}

/* =========================
   Credential Modal
   ========================= */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(6, 12, 24, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out), visibility var(--t-base) var(--ease-out);
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .cert-modal {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

.cert-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cert-modal-dialog {
    width: min(980px, 100%);
    max-height: 90vh;
    padding: 0.75rem;
    border-radius: var(--r-xl);
    border: 1px solid var(--border-medium);
    background: var(--bg-surface);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cert-modal-close {
    align-self: flex-end;
    width: 2rem;
    height: 2rem;
    border-radius: var(--r-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-2);
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.cert-modal-close:hover,
.cert-modal-close:focus-visible {
    color: var(--text-1);
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
    outline: none;
}

#certModalContent {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#certModalContent iframe {
    width: 100%;
    height: min(80vh, calc(90vh - 4.5rem));
    border: 0;
    border-radius: var(--r-lg);
    background: #0b1220;
    display: block;
    margin: 0 auto;
}

#certModalContent img {
    width: 100%;
    height: auto;
    max-height: min(80vh, calc(90vh - 4.5rem));
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

@keyframes notifIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes notifOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* =========================
   Scroll Animations
   ========================= */
[data-animate] {
    opacity: 0;
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-animate="fade-up"] {
    transform: translateY(30px);
}

[data-animate="fade-right"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"] {
    transform: translateX(30px);
}

[data-animate="fade-in"] {
    transform: scale(0.96);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

@media (max-width: 1360px) {
    .brand-text {
        font-size: 1.25rem;
    }

    .navbar .brand-text {
        font-size: 1.38rem;
    }

    .nav-links {
        gap: 0.125rem;
    }

    .nav-links a {
        padding: 0.45rem 0.625rem;
        font-size: 0.875rem;
    }
}

/* =========================
   Responsive — Tablet
   ========================= */
@media (max-width: 1024px) {
    .proof-strip {
        grid-template-columns: 1fr 1fr;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-xl);
    }

    .hero-visual {
        height: 350px;
        order: -1;
    }

    .hero-mascot-wrapper {
        width: 260px;
        height: 260px;
    }

    .hero {
        min-height: auto;
        padding-bottom: var(--sp-2xl);
    }

    .hero-title {
        text-align: center;
    }

    .hero-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-badge-row {
        justify-content: center;
        gap: 0.4rem;
    }

    .hero-badge {
        font-size: 0.78125rem;
        padding: 0.35rem 0.75rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .about-stats--inline {
        grid-template-columns: 1fr;
    }

    .about-stats--inline .stat-card {
        min-height: 0;
    }

    .about-stats--inline .stat-arrow {
        transform: none;
    }

    .about-stats--inline .stat-arrow i {
        display: inline-block;
        transform: rotate(90deg);
    }

    .about-stats--inline .stat-card:hover .stat-arrow {
        transform: none;
    }

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

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

}

/* =========================
   Responsive — Mobile
   ========================= */
@media (max-width: 768px) {
    :root {
        --sp-section: 4rem;
        --nav-h: 64px;
    }

    .container {
        padding: 0 var(--sp-md);
    }

    .cert-modal {
        padding: 0.75rem;
    }

    .cert-modal-dialog {
        width: 100%;
        padding: 0.625rem;
        max-height: 90vh;
    }

    #certModalContent iframe {
        width: min(100%, 560px);
        height: min(72dvh, calc(100dvh - 10rem));
    }

    #certModalContent img {
        width: min(100%, 560px);
        max-height: min(72dvh, calc(100dvh - 10rem));
    }

    .navbar .container {
        gap: 0.375rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
        gap: 0.5rem;
    }

    .navbar .brand-mark {
        width: 36px;
        height: 36px;
    }

    .navbar .brand-text {
        font-size: clamp(1.16rem, 3.6vw, 1.3rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-actions {
        gap: 0.375rem;
        flex-shrink: 0;
    }

    .nav-toggle {
        width: 38px;
        height: 38px;
    }

    .theme-segmented--mobile-inline .theme-segment {
        min-width: 0;
        width: 2.5rem;
        height: 2.5rem;
        flex: 0 0 2.5rem;
        padding: 0;
        gap: 0;
    }

    .theme-segmented--mobile-inline .theme-segment-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .theme-segmented--mobile-inline .theme-segment-divider {
        margin: 0 0.06rem;
        height: 0.92rem;
    }

    .theme-segmented--mobile-inline .theme-segment-icon {
        font-size: 1rem;
    }

    .navbar.nav-menu-open .theme-segmented--mobile-inline {
        display: none;
    }

    /* Mobile Nav */
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
        flex-direction: column;
        background: var(--bg-nav);
        backdrop-filter: blur(20px) saturate(140%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        padding: 0.5rem 0.625rem;
        gap: 0;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-lg);
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--t-base) var(--ease-out);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li + li {
        border-top: 1px solid var(--border-subtle);
    }

    .nav-links .nav-theme-item + li {
        border-top: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.85rem var(--sp-sm);
        font-size: 1rem;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

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

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--text-1);
        background: transparent;
    }

    .nav-theme-item {
        display: none;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0.35rem 0;
    }

    .nav-theme-item .theme-segmented {
        width: 100%;
    }

    .nav-theme-item .theme-segment {
        flex: 1 1 0;
        min-width: 0;
    }

    .nav-toggle {
        display: flex;
    }

    /* Hero Mobile */
    .hero-visual {
        height: 300px;
    }

    .hero-mascot-wrapper {
        width: 200px;
        height: 200px;
    }

    .floating-card {
        padding: 0.5rem 0.625rem;
    }

    .floating-card i {
        font-size: 1.25rem;
    }

    .card-1 i,
    .card-3 i {
        font-size: 1.5rem;
    }

    .floating-card span {
        font-size: 0.625rem;
    }

    .card-1 { top: 2%; left: 2%; }
    .card-2 { top: 8%; right: 2%; }
    .card-3 { bottom: 20%; left: 0%; }
    .card-4 { top: 55%; right: 0%; }
    .card-5 { bottom: 2%; right: 15%; }

    .hero-cta {
        flex-direction: column;
    }

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

    /* Grids */
    .proof-strip {
        grid-template-columns: 1fr;
    }

    .foundation-grid,
    .projects-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .projects-groups {
        grid-template-columns: 1fr;
        gap: var(--sp-lg);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: var(--sp-lg);
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .about-stats--inline {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-tagline {
        margin: var(--sp-sm) auto 0;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .back-to-top.back-to-top--footer-clear {
        bottom: 9.25rem;
    }

    .timeline-track {
        --timeline-track-pad: 1.95rem;
        --timeline-rail-x: 15px;
        padding-left: var(--timeline-track-pad);
    }

    .timeline-item {
        padding-bottom: 0.625rem;
    }

    .timeline-content {
        padding: 0.625rem 0.75rem;
    }

    .notification-mobile-break {
        display: block;
    }

    .notification-container {
        left: 0.75rem;
        right: auto;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        transform: none;
        width: fit-content;
        max-width: min(28rem, 92vw);
        align-items: flex-start;
    }

    .notification {
        width: fit-content;
        max-width: min(23rem, 88vw);
        padding: 0.72rem 2rem 0.72rem 0.9rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }

    [data-animate="fade-right"],
    [data-animate="fade-left"] {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    :root {
        --sp-section: 3rem;
    }

    .navbar .container {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
        gap: 0.25rem;
    }

    .navbar .brand-mark {
        width: 34px;
        height: 34px;
    }

    .navbar .brand-text {
        font-size: 1.14rem;
    }

    .nav-toggle {
        width: 36px;
        height: 36px;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    .theme-segmented--mobile-inline {
        padding: 0.2rem;
    }

    .theme-segmented--mobile-inline .theme-segment {
        width: 2.35rem;
        height: 2.35rem;
        flex: 0 0 2.35rem;
        min-width: 0;
        padding: 0;
    }

    .theme-segmented--mobile-inline .theme-segment-icon {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.6875rem;
        padding: 0.3rem 0.625rem;
    }

    .container {
        padding: 0 var(--sp-sm);
    }

    .contact-form-wrapper {
        padding: var(--sp-md);
    }

    .section-header {
        margin-bottom: var(--sp-xl);
    }

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

    .back-to-top.back-to-top--footer-clear {
        bottom: 8.5rem;
    }

    .notification-container {
        left: 0.625rem;
        bottom: calc(0.625rem + env(safe-area-inset-bottom));
        max-width: min(24rem, 92vw);
    }

    .notification {
        max-width: min(21rem, 88vw);
        padding: 0.68rem 1.9rem 0.68rem 0.82rem;
        font-size: 0.84375rem;
    }
}

@media (max-width: 549px) {
    .theme-segmented--desktop {
        display: none;
    }

    .theme-segmented--mobile-inline {
        display: inline-flex;
    }

    .nav-theme-item {
        display: block;
    }
}

@media (max-width: 330px) {
    .nav-theme-item .theme-segment {
        font-size: 0.78rem;
        padding: 0.38rem 0.5rem;
    }
}

/* =========================
   Reduced Motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .status-complete {
        transition: none !important;
    }

    .status-complete i {
        animation: none !important;
        filter:
            drop-shadow(0 0 8px var(--complete-icon-shadow-soft))
            drop-shadow(0 0 14px var(--complete-icon-shadow-soft)) !important;
    }

    .status-complete:hover,
    .status-complete:active,
    .status-complete:focus-visible,
    .project-card:active .status-complete,
    .project-card:focus-within .status-complete {
        transform: none;
    }
}

/* =========================
   Selection & Scrollbar
   ========================= */
::selection {
    background: rgba(78,160,255,0.30);
    color: var(--text-1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}
