:root {
    --bg-color: #030305;
    --surface-color: #0a0a0f;
    --surface-light: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(3, 3, 5, 0.7);

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.5);

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --surface-light: rgba(0, 0, 0, 0.03);
    --surface-border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(248, 250, 252, 0.8);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --accent-glow: rgba(79, 70, 229, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor for custom cursor */
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Cyber Swarm 2.0 Cursor */
.cursor {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    mix-blend-mode: normal;
}

#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

/* Magnetic States */
.cursor.hovering {
    transform: scale(0);
    opacity: 0;
}

.cursor-follower.hovering {
    width: 50px;
    height: 50px;
    border-color: var(--accent-secondary);
    opacity: 0.8;
}

/* Click Animation */
@keyframes cursor-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

.cursor-click-pulse {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: cursor-pulse 0.4s ease-out forwards;
}

/* Liquid Frames & Animations */
.liquid-frame {
    position: relative;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: liquid-morph 8s ease-in-out infinite;
    overflow: hidden;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 30px var(--accent-glow);
}

@keyframes liquid-morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.glass.liquid {
    position: relative;
    overflow: hidden;
}

.glass.liquid::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass.liquid:hover::before {
    opacity: 0.2;
    animation: liquid-swirl 10s linear infinite;
}

@keyframes liquid-swirl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gooey Filter for Swarm */
#cursor-canvas {
    filter: url('#gooey');
}

/* Liquid Frame Styling */
.hero {
    position: relative;
    overflow: visible;
}

.hero-liquid-bg {
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    z-index: -1;
    opacity: 0.15;
    filter: blur(40px);
}

[data-theme="light"] .hero-liquid-bg {
    opacity: 0.1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
}

/* Ambient Background */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 40vw;
    height: 40vw;
    background: rgba(99, 102, 241, 0.15);
    top: -10vw;
    left: -10vw;
}

.orb-2 {
    width: 35vw;
    height: 35vw;
    background: rgba(139, 92, 246, 0.15);
    bottom: -10vw;
    right: -5vw;
    animation-delay: -5s;
}

.orb-3 {
    width: 20vw;
    height: 20vw;
    background: rgba(56, 189, 248, 0.1);
    top: 40vh;
    left: 30vw;
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 100;
    transition: var(--transition-normal);
}

.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    padding: 1rem 5%;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.brand span {
    color: var(--accent-primary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--surface-light);
}

.theme-toggle svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.26, 1.55), opacity 0.3s ease;
}

.theme-toggle .sun-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

.theme-toggle .moon-icon {
    transform: translateY(-30px) rotate(90deg);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .sun-icon {
    transform: translateY(30px) rotate(-90deg);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .moon-icon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

.nav nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-hire {
    background: var(--text-primary);
    color: var(--bg-color) !important;
    padding: 0.6rem 1.25rem;
    border-radius: 99px;
    font-weight: 600;
}

.btn-hire::after {
    display: none;
}

.btn-hire:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 0;
    transition: var(--transition-fast);
}

.mobile-menu-toggle span:first-child {
    top: 0;
}

.mobile-menu-toggle span:last-child {
    bottom: 0;
}

.mobile-menu-toggle.active span:first-child {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:last-child {
    transform: translateY(-9px) rotate(-45deg);
}

/* Sections */
main {
    padding-top: 100px;
}

.section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 99px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn.primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn.primary:hover {
    background: #e4e4e7;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(255, 255, 255, 0.2);
}

.btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.btn.secondary:hover {
    background: var(--surface-light);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero .subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card:nth-child(3) {
    grid-column: span 2;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-number .accent {
    color: var(--accent-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

/* Tech Stack Section */
.tech-stack-container {
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.tech-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tags .badge {
    margin-bottom: 0;
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.tech-tags .badge:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Timeline Section */
.timeline {
    padding: 3rem 4rem;
    position: relative;
    border-radius: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4rem;
    top: 3rem;
    bottom: 3rem;
    width: 2px;
    background: var(--surface-border);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.project-image {
    height: 240px;
    width: 100%;
}

.project-content {
    padding: 2rem;
    transform: translateZ(30px);
}

.project-category {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.project-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.project-link:hover {
    color: var(--accent-primary);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 48px;
    height: 48px;
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
}

.social-links a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--surface-border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.4);
}

.submit-btn {
    align-self: flex-start;
    border: none;
}

/* Footer */
.footer {
    border-top: 1px solid var(--surface-border);
    padding: 2rem 5%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.footer-socials a:hover {
    color: var(--accent-primary);
}

.footer-socials a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.footer-socials a:hover::after {
    width: 100%;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .section {
        padding: 5rem 5%;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: clamp(2.5rem, 7vw, 4.5rem);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card:nth-child(3) {
        grid-column: span 1;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 5%;
    }

    .nav nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 100;
    }

    .nav nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .section {
        padding: 4rem 5%;
    }

    .hero {
        min-height: auto;
        padding: 6rem 5% 4rem;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .cta-group {
        justify-content: center;
    }

    .hero-liquid-bg {
        width: 300px;
        height: 300px;
        top: 20%;
        right: 50%;
        transform: translate(50%, -50%);
        opacity: 0.1;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    body {
        cursor: auto;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }
    
    .packet-stream {
        height: 200px;
        width: 200px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
    }
    
    .success-icon svg {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-container {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .service-card {
        padding: 1.5rem;
    }

    .process-item {
        padding: 2rem 1rem;
    }

    .lab-container {
        padding: 1.5rem;
    }

    .timeline {
        padding: 2rem 1.5rem;
    }

    .timeline::before {
        left: 1.5rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }
}

/* --- Swup Page Transitions --- */
.transition-fade {
    transition: opacity 0.4s, transform 0.4s;
    opacity: 1;
    transform: translateY(0);
}

html.is-animating .transition-fade {
    opacity: 0;
    transform: translateY(20px);
}

/* --- Interactive Terminal --- */
.terminal-window {
    background: #0a0a0f;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    color: #a1a1aa;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 2rem 0;
}

[data-theme="light"] .terminal-window {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #ef4444;
}

.terminal-dot.yellow {
    background: #f59e0b;
}

.terminal-dot.green {
    background: #10b981;
}

.terminal-body {
    padding: 1.5rem;
    height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-line {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.terminal-prompt {
    color: var(--accent-primary);
    margin-right: 0.5rem;
}

.terminal-command {
    color: var(--accent-secondary);
}

.terminal-input-line {
    display: flex;
    margin-top: 0.5rem;
}

.terminal-input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
    width: 100%;
}

/* --- Engineering Process --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-item {
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
    transition: var(--transition-normal);
}

.process-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
}

.process-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    opacity: 0.05;
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    color: var(--accent-primary);
}

.process-item h3 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.process-item p {
    font-size: 1rem;
}


/* --- Cyber Scan Reveal --- */
#theme-scan {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    pointer-events: none;
    background: var(--bg-color);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    opacity: 0;
}

#theme-scan.animating {
    opacity: 1;
    animation: scan-wipe 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary), 0 0 40px var(--accent-primary);
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
}

.scan-line.animating {
    animation: scan-line-move 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scan-wipe {
    0% { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

@keyframes scan-line-move {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Glitch Effect during transition */
.theme-switching .text-gradient {
    animation: theme-glitch 0.2s infinite;
}

@keyframes theme-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, 2px); }
    80% { transform: translate(1px, -2px); }
    100% { transform: translate(0); }
}

/* --- Lab Blog Aesthetic --- */
.lab-container {
    background-image:
        linear-gradient(var(--surface-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--surface-border) 1px, transparent 1px);
    background-size: 30px 30px;
    border: 1px solid var(--surface-border);
    padding: 3rem;
    border-radius: 8px;
    position: relative;
}

.lab-post {
    margin-bottom: 4rem;
    padding-left: 2rem;
    border-left: 2px solid var(--accent-primary);
}

.lab-date {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.lab-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.lab-diagram {
    background: rgba(0, 0, 0, 0.1);
    border: 1px dashed var(--accent-primary);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--accent-primary);
    overflow-x: auto;
}

/* --- Data Transmission Effect --- */
.transmission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.transmission-overlay.active {
    display: flex;
}

.packet-stream {
    height: 300px;
    width: 300px;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.packet {
    position: absolute;
    width: auto;
    height: auto;
    color: var(--accent-primary);
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-shadow: 0 0 8px var(--accent-glow);
    pointer-events: none;
    animation: transmit 1.5s linear infinite;
    opacity: 0;
}

.binary-packet {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes transmit {
    0% {
        transform: translateY(200px) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

.transmission-status {
    text-align: center;
    margin-bottom: 2rem;
    z-index: 10;
}

.transmission-status h3 {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    animation: pulse-opacity 1s ease-in-out infinite alternate;
}

.progress-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    transition: width 0.1s linear;
}

@keyframes pulse-opacity {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.success-message {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.success-icon svg {
    width: 80px;
    height: 80px;
    display: block;
}

.success-icon circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--accent-primary);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-icon path {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: var(--accent-primary);
    fill: none;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* --- Digital Transmission Theme Switch --- */
body.theme-switching {
    animation: theme-glitch 0.3s steps(2) infinite;
    pointer-events: none;
}

body.theme-switching::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 99999;
    pointer-events: none;
    animation: scanline 0.2s linear infinite;
}

@keyframes theme-glitch {
    0% { transform: translate(2px, 0); }
    50% { transform: translate(-2px, 0); }
    100% { transform: translate(0, 0); }
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}
