:root {
    /* Color Palette - Linear Obsidian Design System */
    --bg-main: #08090a;
    --bg-alt: #0e1015;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-elevated: #12141a;
    --bg-glass: rgba(14, 16, 21, 0.75);
    
    --text-primary: #f7f8f8;
    --text-secondary: #8a8f98;
    --text-tertiary: #62666d;
    
    /* Brand Accents - Navy Blue Design System */
    --accent-primary: #2563eb; /* Navy / Royal Blue */
    --accent-primary-hover: #3b82f6;
    --accent-glow: rgba(37, 99, 235, 0.35);
    --accent-secondary: #70b8ff; /* Ice Cyan */
    --accent-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #70b8ff 100%);
    --accent-gradient-text: linear-gradient(135deg, #ffffff 30%, #8a8f98 100%);
    
    /* Status Colors */
    --status-emerald: #27b686;
    --status-emerald-glow: rgba(39, 182, 134, 0.25);
    --status-amber: #f59e0b;
    --status-coral: #f43f5e;
    
    /* Hairline Borders & Specular Highlights */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    --border-hover: 1px solid rgba(255, 255, 255, 0.16);
    --border-active: 1px solid rgba(37, 99, 235, 0.5);
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    --shadow-spotlight: 0 0 30px rgba(30, 64, 175, 0.25);
    --inset-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
    
    /* Transitions & Physics Easing */
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
    color-scheme: dark;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Atmospheric Background Navy Blue Ambient Spotlight */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, rgba(30, 64, 175, 0.20) 0%, transparent 65%),
                      radial-gradient(circle at 85% 30%, rgba(112, 184, 255, 0.06) 0%, transparent 50%),
                      radial-gradient(circle at 15% 70%, rgba(30, 58, 138, 0.16) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Tactile Obsidian Grain / Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.028'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Scroll Progress Bar at Top of Viewport */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent-gradient);
    z-index: 2000;
    width: 0%;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.7);
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 110px 0;
    position: relative;
}

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

.section-title {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 auto 2.8rem;
    text-align: center;
    position: relative;
    display: block;
    width: fit-content;
    color: var(--text-primary);
    transition: transform 0.4s var(--ease-smooth);
}

/* Section title underline grows on hover */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.4s var(--ease-smooth), box-shadow 0.4s ease;
}

.section-title:hover::after {
    width: 56px;
    box-shadow: 0 0 18px var(--accent-glow);
}

/* Highlight Text with Crisp Contrast */
.highlight {
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Linear-Styled Buttons with Specular Edge Highlights */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.68rem 1.45rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    font-family: var(--font-main);
    overflow: hidden;
    z-index: 1;
    transition: var(--transition);
    will-change: transform, box-shadow;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Custom Brand SVGs */
.svg-icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -0.15em;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease-spring), stroke 0.25s ease;
}

.btn .svg-icon,
.btn i {
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.25s var(--ease-spring);
}

.btn:hover .svg-icon,
.btn:hover i {
    transform: translateX(2px);
}

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

/* Primary Specular Button */
.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(37, 99, 235, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

/* Linear Secondary Obsidian Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Navigation - Linear Frosted Glass Bar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.1rem 0;
}

#navbar.scrolled {
    background: rgba(8, 9, 10, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 0;
    border-bottom: var(--border-subtle);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5);
}

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

/* Logo & "S" Monogram */
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s var(--ease-spring);
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-badge {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-spring);
}

.logo-badge-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7), rgba(112, 184, 255, 0.6));
    border-radius: 12px;
    opacity: 0.25;
    filter: blur(8px);
    transition: opacity 0.3s ease, filter 0.3s ease;
    z-index: 0;
}

.logo-s-svg {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: visible;
    display: block;
}

.badge-bg {
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.s-glow-halo {
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.s-main-path {
    transition: stroke-width 0.3s ease, filter 0.3s ease;
}

.s-terminal-top,
.s-terminal-bot {
    transition: transform 0.3s var(--ease-spring), filter 0.3s ease;
    transform-origin: center;
}

.logo:hover .logo-badge {
    transform: translateY(-1px) scale(1.05);
}

.logo:hover .logo-badge-glow {
    opacity: 0.6;
    filter: blur(12px);
}

.logo:hover .s-main-path {
    filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.8)) drop-shadow(0 0 10px rgba(112, 184, 255, 0.5));
}

.logo:hover .s-terminal-top {
    filter: drop-shadow(0 0 5px #70b8ff);
}

.logo:hover .s-terminal-bot {
    filter: drop-shadow(0 0 5px #2563eb);
}

/* Nav Menu Items */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    position: relative;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Navbar Actions Right */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    transition: var(--transition);
}

.nav-status-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.nav-btn {
    padding: 0.5rem 1.1rem !important;
    font-size: 0.84rem !important;
}



.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.3s var(--ease-spring), color 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
    color: var(--accent-primary);
}

/* Logo SVG Badge Stops */
.badge-bg-stop-1 {
    stop-color: rgba(15, 23, 42, 0.95);
    transition: stop-color 0.35s ease;
}
.badge-bg-stop-2 {
    stop-color: rgba(10, 15, 22, 0.98);
    transition: stop-color 0.35s ease;
}



/* Nav CTA and Status Pill Enhancements */
.nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.32rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    transition: var(--transition);
}

.nav-status-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.nav-cta-li {
    display: flex;
    align-items: center;
    margin-left: 0.35rem;
}

.nav-cta-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f7f8f8 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.45rem 1.05rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    border-radius: 7px !important;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-cta-btn:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.22), 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}

.nav-cta-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

.nav-cta-btn::after {
    display: none !important;
}

/* Pulsating Status Dot */
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-emerald);
    box-shadow: 0 0 8px var(--status-emerald-glow);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid var(--status-emerald);
    animation: statusPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

.about-image-wrapper picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* Quick Copy Email Button */
.btn-copy-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 0.35rem 0.5rem;
    margin-left: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-email:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    border-radius: 50px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 5% 40px;
    position: relative;
    overflow: hidden;
    gap: 2rem;
}

.hero-content {
    flex: 1.1;
    z-index: 10;
    max-width: 620px;
}

.hero-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.95rem;
    background: rgba(255, 255, 255, 0.035);
    border: var(--border-subtle);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.hero-status-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--status-emerald);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px var(--status-emerald-glow);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -3.5px;
    left: -3.5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--status-emerald);
    opacity: 0.6;
    animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(2.2); opacity: 0; }
}

.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.08;
    margin-bottom: 0.85rem;
    letter-spacing: -0.035em;
    font-weight: 600;
}

.hero-content h2 {
    font-size: 1.7rem;
    color: #94a3b8;
    margin-bottom: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 520px;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.2rem;
    flex-wrap: wrap;
}

.hero-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.hero-tech-pills span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.025);
    border: var(--border-subtle);
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    transition: var(--transition);
}

.hero-tech-pills span:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.hero-tech-pills span .svg-icon,
.hero-tech-pills span i {
    color: var(--accent-primary);
    width: 1em;
    height: 1em;
}

/* 3D Canvas Container & HUD Elements */
.hero-3d-wrapper {
    flex: 1;
    position: relative;
    height: 560px;
    min-width: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.canvas-ambient-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.32) 0%, rgba(59, 130, 246, 0.12) 50%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 1;
    animation: ambientPulse 6s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 0.9; }
}

.canvas-3d-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    cursor: grab;
    touch-action: none;
}

.canvas-3d-container:active {
    cursor: grabbing;
}

#hero-3d-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    outline: none;
}

/* Floating Telemetry / HUD Badges - Linear Obsidian Glass */
.hud-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.9rem;
    background: rgba(14, 16, 21, 0.85);
    border: var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 10px;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    z-index: 12;
    pointer-events: auto;
    transition: var(--transition);
}

.hud-badge:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.7), 0 0 20px rgba(37, 99, 235, 0.25);
}

.hud-badge-top-right {
    top: 30px;
    right: 15px;
    animation: floatHud1 5s ease-in-out infinite;
}

.hud-badge-bottom-left {
    bottom: 45px;
    left: 15px;
    animation: floatHud2 6s ease-in-out infinite 0.5s;
}

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

@keyframes floatHud2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(6px); }
}

.hud-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.hud-text {
    display: flex;
    flex-direction: column;
}

.hud-label {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-tertiary);
}

.hud-value {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Linear-Styled Tech Stack HUD Tooltip */
.tech-tooltip-hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
    background: rgba(14, 16, 21, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 210px;
    text-align: center;
}

.tech-tooltip-hud.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.tech-tooltip-glow {
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at 50% 0%, rgba(30, 64, 175, 0.35), transparent 70%);
    border-radius: 10px;
    opacity: 0.5;
    z-index: -1;
}

.tech-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.tech-tooltip-icon-wrap {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

.tech-tooltip-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tech-tooltip-tag {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.tech-tooltip-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.canvas-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.2px;
    pointer-events: none;
    white-space: nowrap;
}

/* Background Ambient Shapes - Linear Palette + Parallax Drift */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.20) 0%, transparent 70%);
    animation: parallaxDrift1 18s ease-in-out infinite alternate;
}

.shape-2 {
    bottom: 5%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(112, 184, 255, 0.08) 0%, transparent 70%);
    animation: parallaxDrift2 22s ease-in-out infinite alternate;
}

.shape-3 {
    top: 40%;
    left: 45%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.16) 0%, transparent 70%);
    animation: parallaxDrift3 15s ease-in-out infinite alternate;
}

@keyframes parallaxDrift1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.08); }
}

@keyframes parallaxDrift2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-25px, -15px) scale(1.05); }
}

@keyframes parallaxDrift3 {
    0%   { transform: translate(0, 0) scale(0.95); }
    100% { transform: translate(15px, -25px) scale(1.1); }
}

/* Enhanced About Section - Linear Obsidian Architecture */
.about-grid-enhanced {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3.5rem;
    align-items: center;
}

.about-image-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: 16px;
    padding: 1.6rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), var(--inset-specular);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-image-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6), var(--inset-specular);
    transform: translateY(-3px);
}

.about-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.4rem;
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-image-border {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.45), transparent 70%);
    opacity: 0.6;
    z-index: 1;
    filter: blur(6px);
    transition: var(--transition);
}

.about-image-card:hover .about-image-border {
    opacity: 0.9;
    filter: blur(8px);
}

.about-quick-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.about-quick-info .role {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.quick-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.quick-tags span {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.about-content-right {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.about-text p {
    margin-bottom: 1.1rem;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.68;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat-box {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), var(--inset-specular);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5), var(--inset-specular);
}

.stat-box .svg-icon,
.stat-box i {
    font-size: 2rem;
    width: 2rem;
    height: 2rem;
    color: var(--accent-primary);
    margin-bottom: 0.85rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 0.3s var(--ease-spring);
}

.stat-box:hover .svg-icon,
.stat-box:hover i {
    transform: scale(1.08) translateY(-2px);
}

.stat-box h3 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================================================
   Skills Section (Linear Bento Grid)
   ========================================================================= */
.bento-skills-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Base Bento Skill Card */
.bento-skill-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    border: var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), var(--inset-specular);
    transition: var(--transition);
    will-change: transform, box-shadow;
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.bento-skill-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6), var(--inset-specular);
}

/* Asymmetric 7:5 and 5:7 Grid Column Spans */
.skill-card-ai-flagship {
    grid-column: span 7;
}

.skill-card-mobile {
    grid-column: span 5;
}

.skill-card-devops {
    grid-column: span 5;
}

.skill-card-languages {
    grid-column: span 7;
}

/* Skill Card Header */
.skill-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1.6rem;
    position: relative;
    z-index: 3;
}

.skill-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s var(--ease-spring);
}

.skill-icon-wrap .svg-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.ai-icon-glow {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-primary);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 0 16px var(--accent-glow);
}

.mobile-icon-glow {
    background: rgba(112, 184, 255, 0.15);
    color: var(--accent-secondary);
    border-color: rgba(112, 184, 255, 0.3);
    box-shadow: 0 0 16px rgba(112, 184, 255, 0.2);
}

.devops-icon-glow {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-amber);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.lang-icon-glow {
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.2);
}

.bento-skill-card:hover .skill-icon-wrap {
    transform: scale(1.06);
}

.skill-card-header h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.skill-category-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Skill Chips Cloud */
.skill-chips-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 3;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: default;
}

.skill-chip .svg-icon {
    width: 1em;
    height: 1em;
    color: var(--accent-primary);
}

.skill-chip.active-chip {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
    color: #e2e8f0;
}

.skill-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* Mini Pipeline Telemetry in Card 1 */
.skill-subcard-telemetry {
    background: rgba(14, 16, 21, 0.8);
    border: var(--border-subtle);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    position: relative;
    z-index: 3;
    margin-top: auto;
}

.telemetry-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.telemetry-tag {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-primary);
}

.telemetry-val {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--status-emerald);
    font-weight: 500;
}

.telemetry-dots-chain {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.t-dot.live {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.35);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    color: #93c5fd;
    font-weight: 500;
}

.t-sep {
    color: var(--text-tertiary);
}

/* Responsive Breakpoints for Skills Bento Grid */
@media (max-width: 1024px) {
    .bento-skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skill-card-ai-flagship,
    .skill-card-mobile,
    .skill-card-devops,
    .skill-card-languages {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .bento-skill-card {
        padding: 1.8rem 1.4rem;
    }

    .skill-card-header {
        flex-direction: column;
        gap: 0.8rem;
    }

    .telemetry-dots-chain {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .t-sep {
        display: none;
    }
}

/* =========================================================================
   Projects Section (Asymmetrical Broken Bento Grid)
   ========================================================================= */
.section-header-wrap {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    margin-bottom: 0.6rem;
    background: rgba(37, 99, 235, 0.12);
    padding: 0.3rem 0.85rem;
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    font-family: var(--font-mono);
}

.section-intro {
    color: var(--text-secondary);
    font-size: 1.02rem;
    margin-top: 0.8rem;
    line-height: 1.6;
}

/* 12-Column Asymmetrical Grid Layout */
.bento-project-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Base Bento Card */
.bento-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    border: var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), var(--inset-specular);
    transition: var(--transition);
    will-change: transform, box-shadow;
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6), var(--inset-specular);
}

/* Asymmetric Grid Spans */
.bento-card-hero {
    grid-column: span 12;
    background: linear-gradient(135deg, rgba(14, 20, 32, 0.92) 0%, rgba(10, 15, 24, 0.96) 100%);
    border-color: rgba(112, 184, 255, 0.22);
}

.bento-card-hero:hover {
    border-color: rgba(112, 184, 255, 0.5);
    box-shadow: 0 24px 54px -12px rgba(0, 0, 0, 0.75),
                0 0 32px rgba(37, 99, 235, 0.18),
                0 0 1px 1px rgba(112, 184, 255, 0.25),
                var(--inset-specular);
}

.bento-card-featured-left {
    grid-column: span 7;
}

.bento-card-tall-right {
    grid-column: span 5;
}

.bento-card-terminal {
    grid-column: span 5;
}

.bento-card-rag-wide {
    grid-column: span 7;
}

/* Floating Status Badges - Linear Pill */
.bento-floating-badge {
    position: absolute;
    top: -12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.85rem;
    background: rgba(14, 16, 21, 0.95);
    border: var(--border-subtle);
    border-radius: 6px;
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.bento-card:hover .bento-floating-badge {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.badge-top-right {
    right: 20px;
}

.badge-top-left {
    left: 20px;
}

.badge-trophy {
    left: 20px;
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.trophy-icon {
    font-size: 0.9rem;
}

/* Card Internal Layouts */
.bento-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 3;
}

.bento-card-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.7rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.bento-subtitle {
    font-size: 0.98rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.bento-card-info p {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.65;
    margin-bottom: 1.4rem;
}

/* Tag Pills */
.project-tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.project-tag-pill {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    color: var(--text-secondary);
}

.project-tag-pill.featured-tag {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--accent-primary);
}

/* Metrics Counter Grid */
.project-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-subtle);
    border-radius: 10px;
    margin-bottom: 1.4rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-val {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.metric-lbl {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.2rem;
}

/* Overlapping Visual Preview in Card 1 (Attendance) */
.visual-attendance {
    margin-top: 1rem;
    position: relative;
}

.visual-glass-preview {
    background: #08090b;
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 1rem 1.2rem 1.8rem;
    position: relative;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.55rem;
}

.preview-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.preview-title {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    margin-left: 6px;
}

.preview-code-block {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
}

.c-kw { color: #60a5fa; font-weight: 500; }
.c-fn { color: #70b8ff; }

/* Overlapping Live Scanner Radar Badge */
.overlapping-scanner-badge {
    position: absolute;
    bottom: -16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.9rem;
    background: rgba(14, 16, 21, 0.95);
    border: 1px solid rgba(39, 182, 134, 0.35);
    backdrop-filter: blur(14px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.scanner-radar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(39, 182, 134, 0.15);
    border: 1px solid rgba(39, 182, 134, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--status-emerald);
}

.scanner-text {
    display: flex;
    flex-direction: column;
}

.s-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.s-sub {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--status-emerald);
}

/* Card 2 Workout Tracker Visual */
.fitlock-preview-card {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 1.1rem;
    margin-bottom: 1.4rem;
}

.fitlock-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-pill .num {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    display: block;
}

.stat-pill .lbl {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.confidence-meter {
    text-align: right;
}

.confidence-meter .meter-bar {
    height: 5px;
    width: 100px;
    background: var(--accent-primary);
    border-radius: 4px;
    margin-bottom: 0.25rem;
    box-shadow: 0 0 8px var(--accent-glow);
}

.confidence-meter span {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-weight: 500;
}

.unlocked-toast {
    font-size: 0.76rem;
    font-family: var(--font-mono);
    background: rgba(39, 182, 134, 0.12);
    border: 1px solid rgba(39, 182, 134, 0.3);
    color: var(--status-emerald);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}

/* Card 3 LangGraph Terminal Visual */
.langgraph-terminal-window {
    background: #08090b;
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    margin-bottom: 1.4rem;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0.55rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.term-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.term-title {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    margin-left: 6px;
}

.term-line {
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.term-line.success { color: #70b8ff; }
.term-line.info { color: #fbbf24; }
.term-line.final { color: var(--status-emerald); font-weight: 600; }
.t-prompt { color: var(--accent-primary); font-weight: 600; }
.t-node { font-weight: 600; color: #f7f8f8; }

/* Card 4 RAG Pipeline Flow Cards */
.rag-pipeline-container {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.4rem;
}

.rag-pipeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-title {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.pipeline-title .svg-icon {
    width: 1em;
    height: 1em;
}

.rag-pipeline-steps {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.rag-step {
    flex: 1;
    min-width: 115px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    border-radius: 8px;
    padding: 0.65rem 0.6rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rag-step:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.rag-step.step-highlight,
.rag-step.active-step {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.4);
}

.rag-step.step-highlight .step-num,
.rag-step.active-step .step-num {
    background: var(--accent-primary);
    color: #fff;
    border-color: transparent;
}

.step-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.1rem;
}

.step-num {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
}

.step-desc strong {
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.step-desc span {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: block;
}

.rag-step-arrow {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.6;
}

/* Card 4 Visual Showcase */
.visual-rag-showcase {
    margin-top: 0.5rem;
    margin-bottom: 1.8rem;
    position: relative;
}

.live-status-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--status-emerald);
    background: rgba(39, 182, 134, 0.1);
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    border: 1px solid rgba(39, 182, 134, 0.25);
    font-weight: 500;
}

.overlapping-insight-badge {
    position: absolute;
    bottom: -16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.9rem;
    background: rgba(14, 16, 21, 0.95);
    border: var(--border-subtle);
    backdrop-filter: blur(14px);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
}

.bento-card:hover .overlapping-insight-badge {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.insight-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.insight-text {
    display: flex;
    flex-direction: column;
}

.i-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-primary);
}

.i-sub {
    font-size: 0.66rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* CivicGuard Custom Telemetry & Pulse Indicator */
.civicguard-metrics {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1.4rem;
}

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

@media (max-width: 480px) {
    .civicguard-metrics {
        grid-template-columns: 1fr;
    }
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-emerald, #10b981);
    box-shadow: 0 0 8px var(--status-emerald, #10b981);
    display: inline-block;
    flex-shrink: 0;
    animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

/* Tech Pills inside Bento Cards */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}

.project-tech span {
    font-size: 0.74rem;
    font-family: var(--font-mono);
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: var(--border-subtle);
    border-radius: 5px;
    font-weight: 400;
    transition: var(--transition);
    display: inline-block;
}

.project-tech span:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Action Links inside Bento Cards */
.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-project-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    background: var(--accent-primary);
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.btn-project-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    transition: var(--transition);
}

.project-links a .svg-icon {
    width: 1.05em;
    height: 1.05em;
    transition: transform 0.25s var(--ease-spring);
}

.project-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.project-links a:hover .svg-icon {
    transform: translateX(2px);
}

/* Responsive Breakpoints for Bento Grid */
@media (max-width: 1024px) {
    .bento-project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bento-card-hero,
    .bento-card-featured-left,
    .bento-card-tall-right,
    .bento-card-terminal,
    .bento-card-rag-wide {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .bento-card {
        padding: 2rem 1.5rem;
    }

    .bento-floating-badge {
        position: static;
        margin-bottom: 1.2rem;
        align-self: flex-start;
    }

    .project-metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .overlapping-scanner-badge,
    .overlapping-insight-badge {
        position: static;
        margin-top: 1rem;
    }

    .rag-pipeline-steps {
        flex-direction: column;
        align-items: stretch;
    }

    .rag-step-arrow {
        transform: rotate(90deg);
        text-align: center;
        margin: 0.2rem 0;
    }
}

/* Education & Roadmap Section - Linear Cycle Style */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
}

.edu-column h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.edu-column h3 .svg-icon,
.edu-column h3 i {
    color: var(--accent-primary);
    width: 1.25rem;
    height: 1.25rem;
}

.timeline {
    position: relative;
    padding-left: 1.8rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    height: calc(100% - 12px);
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.8rem;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-main);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.timeline-item .institution {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.timeline-item .date {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.76rem;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    display: inline-block;
}

.societies-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.society-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: var(--bg-card);
    padding: 1.3rem 1.6rem;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-subtle);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2), var(--inset-specular);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.society-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.4;
    transition: var(--transition);
}

.society-item:hover {
    transform: translateX(6px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.society-item:hover::before {
    opacity: 1;
    width: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.society-item .svg-icon,
.society-item i {
    color: var(--accent-primary);
    margin-top: 0.2rem;
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.25s var(--ease-spring);
}

.society-item:hover .svg-icon,
.society-item:hover i {
    transform: scale(1.1);
}

.society-item h4 {
    margin-bottom: 0.2rem;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.society-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0;
}

/* Contact Section - Linear Issue Creation Aesthetic */
.contact-desc {
    text-align: center;
    max-width: 540px;
    margin: 0 auto 3.5rem;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.96rem;
    color: var(--text-primary);
}

.info-item .svg-icon,
.info-item i {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.info-item a:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

.btn-copy-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    margin-left: 0.35rem;
}

.btn-copy-email:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-focus);
    color: var(--text-primary);
    transform: scale(1.06);
}

.btn-copy-email .svg-icon {
    width: 14px;
    height: 14px;
    color: currentColor;
}

.social-links {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.85rem;
}

.social-links a {
    background: var(--bg-card);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: var(--border-subtle);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a .svg-icon,
.social-links a i {
    width: 1.2em;
    height: 1.2em;
    transition: transform 0.25s var(--ease-spring);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.social-links a:hover .svg-icon,
.social-links a:hover i {
    transform: scale(1.08);
}

.download-btn {
    margin-top: 1rem;
    align-self: flex-start;
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: var(--border-subtle);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), var(--inset-specular);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:focus-within {
    border-color: var(--border-active);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6), 0 0 24px rgba(37, 99, 235, 0.2);
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.92rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.3);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-tertiary);
    font-size: 0.88rem;
}

/* Validation error state */
.form-group.has-error input,
.form-group.has-error textarea {
    border-color: var(--status-coral);
    background: rgba(244, 63, 94, 0.05);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.15);
}

.field-error {
    display: none;
    color: var(--status-coral);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    margin-top: 0.35rem;
    padding-left: 0.15rem;
}

.form-group.has-error .field-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Submit Button & Icon States */
#submitBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-width: 170px;
}

#submitBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.spinner-icon {
    display: inline-block;
    animation: spinRotate 0.9s linear infinite;
}

@keyframes spinRotate {
    100% { transform: rotate(360deg); }
}

/* Form Status Banner */
.form-status {
    margin-top: 1.2rem;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-status:empty {
    display: none;
}

.form-status.success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(39, 182, 134, 0.12);
    border: 1px solid rgba(39, 182, 134, 0.35);
    color: var(--status-emerald);
    padding: 0.9rem 1.2rem;
}

.form-status.error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: var(--status-coral);
    padding: 0.9rem 1.2rem;
}

/* Linear Toast Notification */
.linear-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.linear-toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.1rem;
    background: rgba(18, 20, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: var(--font-mono);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), var(--inset-specular);
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.linear-toast .toast-icon {
    color: var(--status-emerald);
    font-size: 1rem;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================================
   Card Spotlight Glow Physics — Enhanced Cursor-Tracked Radial Spotlight
   ========================================================================= */
.bento-card, .bento-skill-card, .stat-box, .edu-card, .about-image-card, .contact-form {
    position: relative;
}

/* Primary radial spotlight — follows cursor via --mouse-x / --mouse-y */
.bento-card::before,
.bento-skill-card::before,
.stat-box::before,
.edu-card::before,
.about-image-card::before,
.contact-form::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(37, 99, 235, 0.12),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover::before,
.bento-skill-card:hover::before,
.stat-box:hover::before,
.edu-card:hover::before,
.about-image-card:hover::before,
.contact-form:hover::before {
    opacity: 1;
}

/* Edge glow accent — subtle border illumination near cursor */
.bento-card::after,
.bento-skill-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(112, 184, 255, 0.15),
        transparent 40%
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 1px;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 2;
}

.bento-card:hover::after,
.bento-skill-card:hover::after {
    opacity: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 0;
    border-top: var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =========================================================================
   Smooth Page Transitions & Scroll Reveal — Multi-Variant System
   ========================================================================= */

/* Base fade-in: default upward reveal */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Blur-to-sharp reveal for section titles */
.fade-in-blur {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
    filter: blur(8px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.fade-in-blur.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Slide from left */
.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up reveal */
.fade-in-scale {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered cascade delays (0-11 for chip-level staggering) */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.55s; }
.delay-5 { transition-delay: 0.65s; }

/* Cascade stagger for skill chips when parent becomes visible */
.bento-skill-card.visible .skill-chips-cloud .skill-chip {
    animation: chipCascade 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(1) { animation-delay: 0.05s; }
.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(2) { animation-delay: 0.10s; }
.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(3) { animation-delay: 0.15s; }
.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(4) { animation-delay: 0.20s; }
.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(5) { animation-delay: 0.25s; }
.bento-skill-card.visible .skill-chips-cloud .skill-chip:nth-child(6) { animation-delay: 0.30s; }

@keyframes chipCascade {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shimmer section divider animation */
.bg-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(37, 99, 235, 0.4) 25%,
        rgba(112, 184, 255, 0.5) 50%,
        rgba(37, 99, 235, 0.4) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmerLine 4s ease-in-out infinite;
    z-index: 3;
}

.bg-alt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(37, 99, 235, 0.3) 25%,
        rgba(112, 184, 255, 0.4) 50%,
        rgba(37, 99, 235, 0.3) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmerLine 4s ease-in-out infinite 1s;
    z-index: 3;
}

@keyframes shimmerLine {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Page load entrance */
body {
    animation: pageReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageReveal {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Accessibility: Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in,
    .fade-in-blur,
    .fade-in-left,
    .fade-in-right,
    .fade-in-scale {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    .btn::before {
        display: none !important;
    }
    body {
        animation: none !important;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
        padding-bottom: 60px;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-content p {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .hero-tech-pills {
        justify-content: center;
    }

    .hero-3d-wrapper {
        width: 100%;
        max-width: 500px;
        height: 420px;
    }
    
    .about-grid-enhanced, .edu-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image-card {
        max-width: 360px;
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-main);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        transition: 0.4s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
    }

    .hero-3d-wrapper {
        height: 360px;
    }

    .hud-badge-top-right {
        top: 10px;
        right: 5px;
        padding: 0.5rem 0.75rem;
    }

    .hud-badge-bottom-left {
        bottom: 35px;
        left: 5px;
        padding: 0.5rem 0.75rem;
    }

    .hud-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .hud-label {
        font-size: 0.65rem;
    }

    .hud-value {
        font-size: 0.75rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 0.65rem;
    }

    .logo-badge {
        width: 36px;
        height: 36px;
    }

    .logo-name {
        font-size: 1.4rem;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .hero-3d-wrapper {
        height: 310px;
    }

    .hud-badge {
        display: none; /* Keep hero 3D unobstructed on extra-small mobile */
    }
}

/* Project Bullet Points (CV Style) */
.project-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-bullet-list li {
    position: relative;
    padding-left: 1.3rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.project-bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

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

.project-bullet-list li code {
    font-size: 0.85rem;
    padding: 0.1rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #38bdf8;
}

/* =========================================================================
   Project In-Depth Details Button & Deep-Dive Modal System
   ========================================================================= */

/* Plus Button (Architecture & Details) */
.btn-project-details {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.15rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(30, 64, 175, 0.35) 100%);
    border: 1px solid rgba(112, 184, 255, 0.35);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 500;
    font-family: var(--font-main);
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-project-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-project-details:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4) 0%, rgba(30, 64, 175, 0.55) 100%);
    border-color: rgba(112, 184, 255, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45), 0 0 15px rgba(112, 184, 255, 0.3);
    color: #ffffff;
}

.btn-project-details:hover::before {
    left: 100%;
}

.btn-project-details .icon-plus {
    width: 1rem;
    height: 1rem;
    stroke: #70b8ff;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-project-details:hover .icon-plus {
    transform: rotate(90deg) scale(1.15);
    stroke: #ffffff;
}

.btn-project-link {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-subtle);
    transition: var(--transition);
    text-decoration: none;
}

.btn-project-link .svg-icon {
    width: 1.05em;
    height: 1.05em;
    transition: transform 0.25s var(--ease-spring);
}

.btn-project-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-project-link:hover .svg-icon {
    transform: translateX(2px);
}

/* =========================================================================
   HTML5 <dialog> Project Deep-Dive Modal
   ========================================================================= */
dialog.project-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: 92vw;
    max-width: 1080px;
    max-height: 88vh;
    background: rgba(10, 14, 23, 0.97);
    border: 1px solid rgba(112, 184, 255, 0.22);
    border-radius: 16px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(37, 99, 235, 0.16), var(--inset-specular);
    color: var(--text-primary);
    padding: 0;
    overflow: hidden;
    z-index: 9999;
}

dialog.project-modal::backdrop {
    background: rgba(3, 5, 10, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: modalBackdropFadeIn 0.25s ease-out forwards;
}

dialog.project-modal[open] {
    animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-dialog-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 88vh;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.3rem 1.8rem;
    background: rgba(13, 18, 29, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.3rem;
}

.modal-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.modal-project-category {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #70b8ff;
    font-weight: 600;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0 0;
    line-height: 1.4;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-modal-repo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-modal-repo:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-modal-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-modal-close:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

/* Modal Tabs Navigation */
.modal-tabs-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.8rem;
    background: rgba(8, 11, 19, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: thin;
}

.modal-tabs-bar::-webkit-scrollbar {
    height: 4px;
}

.modal-tabs-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.modal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.modal-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.modal-tab-btn.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(112, 184, 255, 0.4);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}

.modal-tab-btn .tab-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.65;
}

/* Modal Body & Panes */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.project-pane {
    display: none;
}

.project-pane.active {
    display: block;
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.25s ease-out forwards;
}

.tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Deep-Dive Section Typography */
.deepdive-section {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.deepdive-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.015em;
}

.deepdive-badge {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(112, 184, 255, 0.3);
    color: #70b8ff;
}

.deepdive-lead {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Diagram Showcase Card */
.diagram-showcase-card {
    position: relative;
    background: #060912;
    border: 1px solid rgba(112, 184, 255, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    transition: var(--transition);
    cursor: zoom-in;
}

.diagram-showcase-card:hover {
    border-color: rgba(112, 184, 255, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 25px rgba(37, 99, 235, 0.2);
}

.diagram-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(14, 20, 32, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.diagram-tag {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #93c5fd;
    font-weight: 500;
}

.btn-zoom-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.74rem;
    font-family: var(--font-mono);
    cursor: zoom-in;
    transition: var(--transition);
}

.btn-zoom-hint:hover {
    background: rgba(37, 99, 235, 0.45);
    border-color: rgba(112, 184, 255, 0.7);
    color: #ffffff;
    transform: scale(1.04);
}

.diagram-showcase-card:hover .btn-zoom-hint {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(112, 184, 255, 0.5);
    color: #ffffff;
}

.diagram-img-frame {
    width: 100%;
    min-height: 220px;
    max-height: 480px;
    background: radial-gradient(circle at center, #0f172a 0%, #060911 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    overflow: hidden;
}

.diagram-img-frame img {
    max-width: 100%;
    max-height: 460px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagram-showcase-card:hover .diagram-img-frame img {
    transform: scale(1.015);
}

.diagram-footer {
    padding: 0.65rem 1rem;
    background: rgba(10, 14, 24, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.diagram-caption-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-family: var(--font-mono);
}

/* Deep-Dive Grid Cards */
.deepdive-grid {
    display: grid;
    gap: 1rem;
}

.deepdive-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.deepdive-card {
    background: rgba(255, 255, 255, 0.025);
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 1.2rem;
    transition: var(--transition);
}

.deepdive-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.deepdive-card h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.55rem 0;
}

.deepdive-card h5 .svg-icon {
    width: 1.1em;
    height: 1.1em;
    color: #70b8ff;
    flex-shrink: 0;
}

.deepdive-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.deepdive-list {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.deepdive-list li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    position: relative;
    padding-left: 1.2rem;
}

.deepdive-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #70b8ff;
    font-size: 1.1rem;
    line-height: 1;
}

.deepdive-list li strong {
    color: var(--text-primary);
}

.deepdive-list li code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: #93c5fd;
}

/* Workspace 4-Cards List */
.workspace-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.workspace-card {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 1rem;
    transition: var(--transition);
}

.workspace-card:hover {
    border-color: rgba(112, 184, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.ws-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(112, 184, 255, 0.35);
    color: #93c5fd;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ws-info h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.3rem 0;
}

.ws-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* In-Modal Pipeline & Metrics */
.civicguard-modal-pipeline {
    margin-top: 0.5rem;
}

.in-modal-metrics {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 0.5rem;
}

/* Status Badge (Preparation Notice) */
.status-badge-prep {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    width: fit-content;
}

.status-badge-prep .svg-icon {
    width: 1.1em;
    height: 1.1em;
}

/* =========================================================================
   Fullscreen Image Lightbox
   ========================================================================= */
dialog.image-lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    overflow: hidden;
}

dialog.image-lightbox[open] {
    display: flex;
    animation: lightboxFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

dialog.image-lightbox::backdrop {
    background: rgba(2, 4, 8, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: lightboxBackdropFadeIn 0.25s ease-out forwards;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lightboxBackdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    z-index: 2;
    max-width: 95vw;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(20, 25, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

.lightbox-img-wrap {
    max-width: 94vw;
    max-height: 84vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(112, 184, 255, 0.3);
    background: #060911;
    cursor: zoom-in;
    transition: border-color 0.2s ease;
}

.lightbox-img-wrap:hover {
    border-color: rgba(112, 184, 255, 0.6);
}

.lightbox-img-wrap.zoomed {
    cursor: zoom-out;
    display: block;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.2s ease;
}

.lightbox-img-wrap.zoomed img {
    max-width: none;
    max-height: none;
}

.lightbox-caption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-align: center;
    max-width: 850px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.lightbox-hint {
    font-size: 0.75rem;
    color: var(--accent-blue);
    opacity: 0.85;
}

/* =========================================================================
   Modal Responsive Breakpoints
   ========================================================================= */
@media (max-width: 900px) {
    .deepdive-grid.two-col,
    .workspace-features-list {
        grid-template-columns: 1fr;
    }

    .in-modal-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    dialog.project-modal {
        width: 96vw;
        max-height: 94vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem 1.2rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-tabs-bar {
        padding: 0.5rem 1rem;
    }

    .modal-body {
        padding: 1.2rem;
    }

    .in-modal-metrics {
        grid-template-columns: 1fr;
    }

    .diagram-img-frame {
        max-height: 320px;
    }
}


