/**
 * ============================================================
 * FRAKTAL DESIGN SYSTEM
 * ============================================================
 * Version: 2.5
 * Author: Fraktal Studio
 * Last Updated: January 2026
 * 
 * A monochrome design system for computational architecture.
 * 
 * TABLE OF CONTENTS:
 * ------------------
 * 1. FONTS & IMPORTS
 * 2. DESIGN TOKENS (CSS Variables)
 * 3. BASE RESET & TYPOGRAPHY
 * 4. LAYOUT UTILITIES (.container, .container-wide)
 * 5. PROJECT CARDS (.project-card, .project-card-horizontal)
 * 6. BUTTONS (.btn, .btn-primary, .btn-sm)
 * 7. HEADER & NAVIGATION
 * 8. HERO SECTION & CANVAS
 * 9. SERVICE ACCORDION (.service-item)
 * 10. PRODUCT CARDS (.product-card)
 * 11. FOOTER
 * 12. ANIMATIONS & KEYFRAMES
 * 13. SCROLL REVEAL
 * 14. RESPONSIVE BREAKPOINTS
 * ============================================================
 */

/* ============================================================
   1. FONTS & IMPORTS  
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@300;500;700&family=Space+Mono:wght@400&display=swap');

/* ============================================================
   2. DESIGN TOKENS (CSS Variables)
   ============================================================ */
:root {
    /* Colors - MONOCHROME Palette (Black/White/Gray only) */
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.15);
    --grid-color: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing - 40px Grid */
    --spacing-base: 1rem;
    --grid-unit: 40px;
    --container-width: 1400px;

    /* Card Backgrounds - Pure Black/Gray */
    --bg-card: rgba(8, 8, 8, 0.95);
    --bg-card-hover: rgba(25, 25, 25, 1);

    /* Text Colors - High Contrast */
    --text-primary: #ffffff;
    --text-secondary: #909090;
    --accent-glow: rgba(255, 255, 255, 0.15);

    /* Borders - White only */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.4);

    /* Animation Timings */
    --transition-base: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-premium: 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    --ease-data: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out-sharp: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);

    /* Glass Effect - Pure Black */
    --glass-bg: rgba(0, 0, 0, 0.85);
    --blur-strength: 12px;
    --swiss-tracking: -0.03em;
}

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

html,
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* Grid Background Overlay */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: var(--grid-unit) var(--grid-unit);
    opacity: 1;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 10%, transparent 65%);
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 10%, transparent 65%);
}

/* Ensure mobile nav doesn't overflow horizontally */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
        /* Smaller hero title on mobile */
    }

    .tech-item {
        padding: 0 1.5rem;
        /* Tighter ticker on mobile */
        font-size: 1rem;
    }
}

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

/* Background Grid Effect */
/* Background Grid Effect - More Visible */
/* Background Grid Effect - High Visibility Mode */
/* Background Grid Effect - Globally High Visibility */
/* Background Grid Effect - Globally High Visibility */


/* Extra-High Visibility Grid - SCOPED TO EDUCATION */

/* Triangle Grid for Work & Store */
.grid-bg-triangle {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(60deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 50px 87px;
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
}

/* Circle/Dot Grid for Education & Contact */
.grid-bg-circle {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
}

/* Decorative Pattern Overlays */
.pattern-fibonacci {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern_fibonacci.svg');
    background-repeat: repeat;
    background-size: 100px 100px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.pattern-voronoi {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern_voronoi.svg');
    background-repeat: repeat;
    background-size: 60px 60px;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 80px;
    box-sizing: border-box;
}

/* Mobile container padding fix */
@media (max-width: 768px) {

    .container,
    .container-wide {
        padding: 0 1.5rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix Philosophy section on mobile - stack columns */
    #philosophy .mission-grid {
        grid-template-columns: 1fr !important;
    }

    /* AGGRESSIVE: Prevent ALL horizontal overflow */
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        scroll-behavior: smooth;
    }

    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative !important;
    }

    section,
    main,
    header,
    footer,
    .container,
    .container-wide {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* DISABLE GSAP HORIZONTAL ANIMATIONS ON MOBILE */
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    [data-gsap],
    .scroll-line-container,
    .philosophy-diagram,
    .mission-svg {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Force all animated content to stay in bounds */
    .mission-content,
    .mission-content p,
    .mission-content h2,
    .mission-content h3,
    #mission p,
    #philosophy p,
    #ecosystem p,
    section p,
    section h1,
    section h2,
    section h3,
    .hero-content,
    .hero-content p,
    .lead {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    /* Ensure all text stays within viewport */
    p,
    h1,
    h2,
    h3,
    h4,
    span,
    div {
        max-width: 100vw !important;
    }

    /* Fix text that goes off screen */
    .hero-sub,
    .mission-text,
    .philosophy-text {
        text-align: center !important;
        padding: 0 1rem !important;
        transform: none !important;
    }

    /* SVG diagrams - scale down on mobile */
    .mission-svg,
    .philosophy-diagram img,
    svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /* MOBILE FOOTER RESPONSIVE */
    footer>div>div:first-child {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    footer div[style*="grid-template-columns: 2fr"] {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    footer div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }

    footer h4 {
        margin-bottom: 1rem !important;
    }

    footer a {
        text-align: center !important;
    }

    footer div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        text-align: center !important;
    }
}

/* Project Card Horizontal - Used in Work & Services */
.project-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Glassmorphism Card Style */
/* Glassmorphism Card Style - SCOPED TO EDUCATION */
.edu-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.4) 0%, rgba(40, 40, 40, 0.2) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 350px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Base Project Card - Restored for Work/Services */
.project-card-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Sheen Animation - ONLY FOR EDUCATION */
@keyframes sheen {
    0% {
        transform: translateX(-150%) skewX(-15deg);
    }

    100% {
        transform: translateX(150%) skewX(-15deg);
    }
}

.edu-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.05) 40%, transparent 60%);
    transform: translateX(-150%) skewX(-15deg);
    animation: sheen 8s infinite linear;
    pointer-events: none;
    z-index: 10;
}

.edu-card:hover::after {
    animation: sheen 2s infinite linear;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.1) 40%, transparent 60%);
}

.edu-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, rgba(35, 35, 35, 0.5) 0%, rgba(50, 50, 50, 0.3) 100%);
    transform: translateY(-4px);
}

/* Regular Hover for Work/Services */
.project-card-horizontal:not(.edu-card):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Reverse layout */
.project-card-horizontal.reverse,
.edu-card.reverse {
    grid-template-columns: 1fr 1fr;
}

.project-card-horizontal.reverse .visual-box,
.edu-card.reverse .visual-box {
    order: 2;
}

.project-card-horizontal.reverse .card-content,
.edu-card.reverse .card-content {
    order: 1;
}

/* Glass Hover Effect - Ambient Glow - ONLY FOR EDUCARD */
.edu-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow) var(--ease-linear);
    pointer-events: none;
    z-index: 0;
}

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

.visual-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #0a0a0a, #111);
    min-height: 300px;
    z-index: 1;
}

.visual-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow) var(--ease-out-sharp),
        opacity var(--transition-base) var(--ease-linear);
}

.project-card-horizontal:hover .visual-box img,
.edu-card:hover .visual-box img {
    transform: scale(1.03);
}

.data-overlay-text {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.5rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    border: 1px solid var(--accent-dim);
    z-index: 2;
}

.card-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.card-content .mono {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
    /* Glow removed globally */
}

/* Add glow BACK only for edu-card h3 */
.edu-card .card-content h3 {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.card-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

.card-content h4 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.card-content ul {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--text-secondary);
}

.card-content li {
    margin-bottom: 0.4rem;
}

/* Read More Expand Effect - Data Reveal Animation */
.read-more-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) var(--ease-data),
        opacity var(--transition-base) var(--ease-linear);
    opacity: 0;
    border-top: 1px solid transparent;
}

@keyframes scan-open {
    0% {
        border-top-color: var(--accent);
        background: rgba(255, 255, 255, 0.2);
    }

    100% {
        border-top-color: transparent;
        background: transparent;
    }
}

.read-more-wrapper.expanded {
    max-height: 800px;
    opacity: 1;
    margin-top: 1.5rem;
    animation: scan-open 0.6s var(--ease-out-sharp);
}

.read-more-content {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

/* Corner accents like HUD */
.read-more-content::before,
.read-more-content::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.read-more-content::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.read-more-content::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Syllabus Typography - Micro-Tech Hierarchy */
.card-content .read-more-content h4,
.read-more-content h4 {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-top: 1.2rem !important;
    margin-bottom: 0.3rem !important;
    text-shadow: none !important;
}

/* Big Phase Label - Relative contrast, but globally small */
.phase-label {
    font-size: 0.75rem !important;
    /* Back to small */
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    /* Precise glow */
}

/* Small Phase Title */
.phase-title {
    font-size: 0.7rem !important;
    /* Micro */
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Body Text - Back to the compact tech look */
.card-content .read-more-content p,
.read-more-content p {
    font-size: 0.75rem !important;
    /* Small & Sharp */
    font-weight: 300 !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 0 !important;
}

.card-content .read-more-content li,
.read-more-content li {
    font-size: 0.7rem !important;
    font-weight: 400 !important;
}

.card-content .read-more-content h4:first-of-type,
.read-more-content h4:first-of-type {
    margin-top: 0 !important;
}

/* Syllabus Paragraph Text - Thinner & Grayer */
.card-content .read-more-content p,
.read-more-content p {
    font-size: 0.9rem !important;
    font-weight: 300 !important;
    /* Thinner */
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    /* More gray */
    margin-bottom: 0 !important;
}

/* Syllabus Lists - Thinner */
.card-content .read-more-content ul,
.read-more-content ul {
    margin: 0.75rem 0 0 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.card-content .read-more-content li,
.read-more-content li {
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.65) !important;
    /* Grayer */
    margin-bottom: 0.4rem !important;
    padding-left: 1.25rem !important;
    position: relative;
}

.read-more-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.6;
}

.read-more-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.8;
}

/* HUD Corner decoration */
.hud-corner::before,
.hud-corner::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    opacity: 0.4;
    pointer-events: none;
    z-index: 5;
}

.hud-corner::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.hud-corner::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Visual Slider for multiple images */
.visual-box {
    position: relative;
    aspect-ratio: 4 / 3;
    min-height: 300px;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.5);
}

.visual-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.visual-slider::-webkit-scrollbar {
    display: none;
}

.visual-slider img {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    color: var(--accent);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.slider-nav.prev {
    left: 0.5rem;
}

.slider-nav.next {
    right: 0.5rem;
}

/* Responsive project cards */
@media (max-width: 900px) {
    .project-card-horizontal {
        grid-template-columns: 1fr;
    }

    .project-card-horizontal.reverse .visual-box,
    .project-card-horizontal.reverse .card-content {
        order: unset;
    }

    .visual-box {
        min-height: 250px;
    }

    .container-wide {
        padding: 0 20px;
    }
}


.section {
    /* padding: 160px 0; */
    /* Handled by Tailwind classes */
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    min-height: auto;
    overflow: visible;
}

/* Philosophy Section - Grid Aligned */
/* Philosophy Section - Stable Grid */
.philosophy-grid {
    /* display: grid; */
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 6rem; */
    /* Increased gap for better separation */
    /* align-items: center; */
}

@media (max-width: 900px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.philosophy-box {
    border: 1px solid var(--border-color);
    background: radial-gradient(circle at center, rgba(30, 30, 35, 0.8) 0%, rgba(5, 5, 5, 0.9) 100%);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

/* Ecosystem Grid (Archly, SpaceCraft, BMS) */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

@media (max-width: 1024px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
        /* Stack on tablet/mobile */
    }
}

.philosophy-box:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    /* Reveal glow on hover */
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%), rgba(20, 20, 20, 0.75);
}



.philosophy-box::before,
.philosophy-box::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    opacity: 0.4;
    pointer-events: none;
}

.philosophy-box::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.philosophy-box::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.philosophy-box img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* .section {
        padding: 80px 0;
    } */
}

/* Ensure texture handles events correctly */
/* Ensure texture handles events correctly */
.background-texture {
    pointer-events: none;
    animation: texture-pulse 15s ease-in-out infinite alternate;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    /* Fade edges */
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    background-image: url('images/bg_fractal.png');
    background-size: cover;
    background-position: center;
}

@keyframes texture-pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    100% {
        transform: scale(1.02);
        opacity: 0.15;
    }
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: var(--swiss-tracking);
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    background: linear-gradient(to bottom right, #fff, #888);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Components - Fraktal UI */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-decoration: none;
    transition: all var(--transition-base) var(--ease-out-sharp);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Technical scan-line fill effect instead of bouncy circle */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--text-primary);
    transition: width var(--transition-slow) var(--ease-out-sharp);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    color: var(--bg-color);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Primary CTA Button */
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-color);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.btn-primary::before {
    background: var(--bg-color);
}

.btn-primary:hover {
    color: var(--accent);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Small Button Variant */
.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    text-decoration: none;
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent);
    transition: all var(--transition-base) var(--ease-out-sharp);
    cursor: pointer;
}

.btn-sm:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg-color);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    mix-blend-mode: difference;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.05em;
    border: 1px solid var(--text-primary);
    padding: 0.2rem 0.8rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.logo.logo-highlight {
    animation: logo-pulse 0.6s ease-out;
}

@keyframes logo-pulse {
    0% {
        text-shadow: 0 0 0 rgba(255, 255, 255, 0);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }

    50% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 1),
            0 0 60px rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
    }

    100% {
        text-shadow: 0 0 0 rgba(255, 255, 255, 0);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-left: 2rem;
}

.lang-opt {
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}

.lang-opt.active {
    color: var(--accent);
    text-decoration: underline;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

/* Ensure nav links are always clickable above overlays */
nav a {
    position: relative;
    z-index: 1001;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
    text-decoration: none;
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: var(--accent);
    border-color: var(--accent-dim);
    background: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 10px var(--accent-dim);
}

/* ============================================================
   MOBILE NAVIGATION
   ============================================================ */

/* Hamburger Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    z-index: 10000;
    position: relative;
    transition: border-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    border-color: var(--accent);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Body scroll lock when mobile nav is open */
body.mobile-nav-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Mobile Navigation Overlay */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1000000 !important;
        position: relative;
    }

    /* When menu is open, give burger button a background so it's visible */
    .mobile-menu-toggle.active {
        background: #000 !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        position: fixed !important;
        top: 1rem;
        right: 1rem;
    }

    header {
        padding: 1rem 0;
    }

    .header-inner {
        padding: 0 1rem;
    }

    /* MOBILE NAV - FULLY OPAQUE BLACK OVERLAY */
    header nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        /* FULLY OPAQUE - no transparency */
        background: #000000 !important;
        background-color: #000000 !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 999999 !important;
        overflow: hidden !important;
    }

    header nav.mobile-nav-open {
        display: flex !important;
    }

    /* Menu card - solid dark background */
    header nav.mobile-nav-open ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: center !important;
        width: 85% !important;
        max-width: 280px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background-color: #0a0a0a !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.8) !important;
    }

    header nav ul li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    header nav ul li:last-child {
        border-bottom: none !important;
    }

    header nav a {
        display: block !important;
        width: 100% !important;
        padding: 1.1rem 1.5rem !important;
        font-size: 1.1rem !important;
        font-weight: 500 !important;
        color: #ffffff !important;
        text-decoration: none !important;
        text-align: center !important;
        background: transparent !important;
        opacity: 1 !important;
        letter-spacing: 0.08em !important;
        border: none !important;
    }

    header nav a:hover,
    header nav a:active {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    header nav a.active {
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .logo {
        font-size: 1.5rem;
        padding: 0.15rem 0.6rem;
    }

    .lang-switch {
        margin-left: 1rem;
    }

    /* Prevent body scroll when mobile nav is open */
    body.mobile-nav-active {
        overflow: hidden !important;
    }

}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* padding-top: 120px; */
    /* Center vertically */
}

@media (max-width: 768px) {
    .hero {
        /* padding-top: 80px; */
    }
}

/* Canvas Positioning */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
    /* Subtle backdrop */
}

.hero-content {
    position: relative;
    z-index: 2;
    mix-blend-mode: normal;
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Labels */
.section-label {
    display: block;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

/* Philosophy Section */
.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.lead {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 800px;
}

/* Product Cards - Legacy rules removed */

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.card-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.card-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-content p {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 2rem;
    max-width: 400px;
}

.visual-box {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: radial-gradient(circle at center, #222, #050505);
    position: relative;
    overflow: hidden;
}

/* Placeholder visual style for Archly */
.product-archly .visual-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: conic-gradient(from 180deg at 50% 50%, #000000 0deg, #333 360deg);
    border-radius: 50%;
    filter: blur(40px);
}

/* Studio Services List - REBUILT */
.services-list {
    list-style: none;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.service-item {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    /* No fixed height, let content dictate */
    display: block;
    position: relative;
    background: transparent;
    transition: background 0.3s ease;
}

.service-item.active {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
}

.service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 40px 0;
    /* Consistent padding */
    cursor: pointer;
    user-select: none;
    /* Prevent text selection on double click */
}

/* Number */
.service-header .num {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-right: 2rem;
    font-size: 1rem;
}

/* Name */
.service-header .name {
    font-size: 1.5rem;
    font-weight: 400;
    flex-grow: 1;
    /* Push icon to right */
    color: var(--text-primary);
}

/* Icon Container */
.service-header .icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon Lines */
.service-header .icon::before,
.service-header .icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-secondary);
    transition: all 0.3s ease;
}

/* Horizontal */
.service-header .icon::before {
    width: 100%;
    height: 1px;
}

/* Vertical */
.service-header .icon::after {
    width: 1px;
    height: 100%;
}

/* Active Icon State */
.service-item.active .icon::after {
    transform: rotate(90deg);
    /* "+" becomes "-" look or just flat */
    opacity: 0;
    /* Turn vertical line off to make it a minus */
}

.service-item.active .icon::before {
    background-color: var(--accent);
    transform: rotate(180deg);
}

/* Accordion Body */
.service-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.5s ease;
    opacity: 0;
    padding-left: 3.5rem;
    /* Indent to align with text */
    padding-right: 2rem;
}

.service-item.active .service-body {
    opacity: 1;
    /* max-height handled by JS, but give strict visibility */
    display: block;
    padding-bottom: 40px;
}


/* --- HUD & VISUAL IMMERSION --- */

/* Corner markers */
.hud-corner {
    position: relative;
    overflow: hidden;
}

.hud-corner::before,
.hud-corner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--text-secondary);
    /* accent-secondary fallback */
    border-color: var(--accent);
    transition: all 0.5s ease;
    opacity: 0.5;
    pointer-events: none;
}

.hud-corner::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.hud-corner::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.hud-corner:hover::before,
.hud-corner:hover::after {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

/* Background Texture Overlay */
.visual-texture {
    position: relative;
    pointer-events: none;
}

/* Tech Ticker */
.tech-ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin: 4rem 0;
    position: relative;
    z-index: 10;
}

.tech-ticker {
    display: flex;
    width: max-content;
    /* Ensure container matches content width for correct transform calculation */
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    /* Slowed down for readability */
}

.tech-item {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 0 3rem;
    position: relative;
    display: flex;
    align-items: center;
}

.tech-item::after {
    content: '+';
    position: absolute;
    right: 0;
    color: var(--border-color);
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Data Overlay styling enhancements */
.data-overlay-text {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.7;
    letter-spacing: 1px;
}

/* --- FOOTER --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* === ENHANCED PRODUCT CARDS === */
.product-card {
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.2);
}

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

.p-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.p-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .p-image img {
    transform: scale(1.1);
}

.p-content {
    padding: 1.5rem;
}

/* === IMPROVED TEXT READABILITY === */
h1,
h2,
h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mono-accent {
    color: var(--accent);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}

/* === CONTENT BOX FOR BETTER HIERARCHY === */
.content-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

/* === LAZY LOADING ANIMATION === */
img[loading="lazy"] {
    opacity: 0;
    animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* === SCROLL REVEAL ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active,
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* === ENHANCED PROJECT CARDS === */
.project-card.hud-corner {
    transition: all 0.4s ease;
}

.project-card.hud-corner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.project-card .visual-box img {
    transition: all 0.5s ease;
}

.project-card:hover .visual-box img {
    transform: scale(1.05);
    opacity: 1 !important;
}

/* === BADGE STYLES === */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    color: var(--bg-color);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2px;
}

.badge-new {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }

    50% {
        box-shadow: 0 0 10px 2px rgba(0, 255, 136, 0.5);
    }
}

/* === NEW UI OVERHAUL STYLES === */

/* Wider Container for Cinematic Feel */
.container-wide {
    max-width: 1600px;
    /* Increased from 1400px */
    margin: 0 auto;
    padding: 0 4rem;
}

/* Horizontal "Cinematic" Project Cards */
/* Horizontal Scroll Container (Slider) */
/* Vertical Wide Stack (Reverted from Slider) */
.project-stack {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    /* Large vertical gap for cinematic pacing */
    margin-top: 4rem;
    width: 100%;
}


/* Horizontal Card for Slider */
/* === CINEMATIC CARD STYLES === */
.project-card,
.service-item,
.philosophy-box,
.project-card-horizontal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(var(--blur-strength));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Specific Vertical Layout for Standard Project Cards */
.project-card {
    display: flex !important;
    /* Override potential grid conflicts */
    flex-direction: column !important;
    height: 100%;
}

.project-card img {
    width: 100% !important;
    height: 280px !important;
    /* Fixed Cinematic Height */
    object-fit: cover !important;
    border-bottom: 1px solid var(--border-color);
    transition: transform var(--transition-slow);
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card .card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1rem;
}

.project-card .card-tag {
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    display: block;
}

.project-card h3 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.project-card:hover,
.service-item:hover,
.philosophy-box:hover,
.project-card-horizontal:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 15px rgba(224, 192, 144, 0.1);
    background: var(--bg-card-hover);
}

/* Remove old gradients */
.project-card::before,
.service-item::before {
    display: none;
}

/* Ensure images don't overflow weirdly and look "huge" */
.visual-box {
    position: relative;
    overflow: hidden;
    height: 100%;
    border-right: 1px solid var(--border-color);
    /* Add separation */
}

/* Reverse modifier for variety in the slider */
.project-card-horizontal.reverse {
    grid-template-columns: 1fr 1fr;
}

.project-card-horizontal.reverse .visual-box {
    order: 2;
    border-right: none;
    border-left: 1px solid var(--border-color);
}

/* Responsive: Stack on mobile */
@media (max-width: 1024px) {
    .project-stack {
        flex-direction: column;
        overflow-x: hidden;
        gap: 4rem;
        padding: 0;
        scroll-snap-type: none;
    }

    .project-card-horizontal {
        flex: none;
        width: 100%;
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .visual-box {
        height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .project-card-horizontal.reverse .visual-box {
        order: 0;
        /* Reset order on mobile */
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.project-card-horizontal .visual-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: brightness(0.8) contrast(1.1);
}

.project-card-horizontal:hover .visual-box img {
    transform: scale(1.03);
    filter: brightness(1) contrast(1);
}

/* Enhanced Content Box */
.project-card-horizontal .card-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.project-card-horizontal h3 {
    font-size: 3rem;
    /* Larger title */
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-card-horizontal p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

/* Detailed Info Section styling */
.read-more-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.read-more-content h4 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.read-more-content ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.read-more-content ul li {
    margin-bottom: 0.5rem;
    color: #bbb;
    position: relative;
    padding-left: 1.5rem;
}

.read-more-content ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Responsive Styles for New Layout */
@media (max-width: 1024px) {

    .project-card-horizontal,
    .project-card-horizontal.reverse {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .project-card-horizontal .visual-box {
        height: 350px;
        min-height: 350px;
        order: 1 !important;
        /* Image always first on mobile */
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    .project-card-horizontal .card-content {
        order: 2 !important;
        padding: 2.5rem;
        text-align: left !important;
        align-items: flex-start !important;
    }

    .container-wide {
        padding: 0 1.5rem;
    }
}

/* === FORM IMPROVEMENTS === */
input,
textarea {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.7);
}

/* === UTILITY CLASSES === */
.text-highlight {
    color: var(--accent);
    font-weight: 600;
}

.glow {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* === EDUCATION PAGE STYLES === */
.education-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* Wider main column */
    gap: 4rem;
    margin-top: 4rem;
}

.course-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    /* Consistent ID width */
    gap: 2rem;
    padding: 3rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.4), rgba(10, 10, 10, 0.6));
    align-items: start;
    transition: all 0.3s ease;
    position: relative;
}

.course-item:hover {
    border-color: var(--accent);
    transform: translateX(10px);
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.6), rgba(15, 15, 15, 0.8));
}

.course-id {
    opacity: 0.5;
    font-size: 0.9rem;
    padding-top: 0.5rem;
}

.specs {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.specs li {
    position: relative;
}

.specs li::before {
    content: '//';
    color: var(--accent);
    margin-right: 0.5rem;
}

.btn-sm {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    position: sticky;
    top: 2rem;
}

.info-box p {
    margin: 1.5rem 0 2.5rem 0;
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .education-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .course-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }

    .course-item>.btn-sm {
        margin-top: 1rem;
        display: inline-block;
    }
}

/* Student Work Gallery Grid */
.student-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    width: 100%;
}

.student-work-item {
    height: 400px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.student-work-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.student-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.8;
}


.student-work-item:hover img {
    transform: scale(1.05);
    opacity: 1;
}

/* === SMOOTH EXPANSION ANIMATION === */
.read-more-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-more-wrapper.expanded {
    grid-template-rows: 1fr;
}

.read-more-inner {
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
    /* Slight delay for opacity */
}

.read-more-wrapper.expanded .read-more-inner {
    opacity: 1;
}

/* === PROJECT CARD IMAGE SLIDER === */
.visual-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    height: 100%;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
}

.visual-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.visual-slider img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: center;
    transition: transform 0.6s ease;
}

/* === SLIDER NAVIGATION === */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(5px);
}

.visual-box:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.slider-nav.prev {
    left: 0;
    border-radius: 0 5px 5px 0;
}

.slider-nav.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

/* === ENHANCED BORDER ANIMATION === */
.project-card.hud-corner {
    position: relative;
    overflow: hidden;
    /* Ensures glow doesn't spill messily */
}

.project-card.hud-corner::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Cover the entire card */
    border: 1px solid transparent;
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.project-card.hud-corner:hover::after {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: borderPulse 3s infinite alternate;
}

@keyframes borderPulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.1);
    }

    100% {}
}

/* =========================================
   EDUCATION & STORE OVERHAUL STYLES
   ========================================= */

/* Education Page Layout */
.education-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    /* Grid Align */
    margin-top: 80px;
    /* 2 Grid Units */
}

.course-item {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    /* Grid Unit */
    position: relative;
    display: flex;
    gap: 2rem;
}

.course-id {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.7;
    flex-shrink: 0;
    width: 80px;
}

.course-details h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.read-more-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.read-more-wrapper.expanded {
    max-height: 2000px;
    /* Sufficient buffer */
}

.module-details {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--accent);
}

/* Sidebar Info Box */
.info-box {
    position: sticky;
    top: 120px;
    padding: 40px;
    border: 1px solid var(--border-color);
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
}

/* Student Work Grid */
.student-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    /* Grid Align */
    margin-top: 40px;
}

.student-work-item {
    aspect-ratio: 1/1;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.student-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.student-work-item:hover img {
    transform: scale(1.05);
}

/* Store Product Cards - Tech/HUD Style */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    /* Grid Align */
    margin-top: 40px;
}

.product-card {
    border: 1px solid var(--border-color);
    background: #050505;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.p-image {
    height: 300px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.p-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.product-card:hover .p-image img {
    transform: scale(1.02);
    filter: contrast(1.1);
}

/* Scanline Effect on Hover */
.p-image::after {
    content: '';
    position: absolute;
    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% 2px, 3px 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 2;
}

.product-card:hover .p-image::after {
    opacity: 1;
}

.p-content {
    padding: 20px;
}

.tech-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
    opacity: 0.8;
}

.tech-specs-grid span {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #222;
    padding-bottom: 2px;
}

@media (max-width: 768px) {
    .education-layout {
        grid-template-columns: 1fr;
    }

    .student-work-grid {
        grid-template-columns: 1fr;
    }

    .course-item {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   FRAKTAL VISUAL IDENTITY ENHANCEMENTS
   Clean Gradients + Glassmorphism + SVG
   ======================================== */

/* Pattern Overlay - Clean SVG Tessellation */
.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern_voronoi.svg');
    background-size: 120px;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* Fibonacci Pattern Variant */
.pattern-fibonacci {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern_fibonacci.svg');
    background-size: 200px;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* Clean Gradient Background - Primary */
.gradient-bg {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #050505 0%, #0a0a0a 50%, #050505 100%);
}

/* Glassmorphism Section */
.glass-section {
    position: relative;
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Accent Glow Orb - Decorative */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.glow-orb.gold {
    background: var(--accent);
}

.glow-orb.red {
    background: var(--accent-red);
}

/* Section with Gradient Accent */
.section-gradient {
    position: relative;
    overflow: hidden;
}

.section-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 80%, rgba(230, 76, 60, 0.03) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

/* Red Accent Utilities */
.accent-red {
    color: var(--accent-red);
}

.border-red {
    border-color: var(--accent-red);
}

/* Technical Label - Swiss Style */
.tech-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-label::before {
    content: '';
    width: 8px;
    height: 1px;
    background: var(--accent-red);
}

/* Dimension Line Decorators */
.dimension-line {
    position: relative;
    padding-left: 2rem;
}

.dimension-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1.5rem;
    height: 1px;
    background: var(--accent);
}

.dimension-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border: 1px solid var(--accent);
    border-radius: 50%;
}

/* Visual Diagram Container */
.diagram-container {
    position: relative;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 2rem;
    margin: 2rem 0;
}

.diagram-container img {
    width: 100%;
    height: auto;
}

.diagram-container .diagram-label {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 0.1em;
}

/* Section Visual - Large Background Image */
.section-visual {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.section-visual .visual-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    filter: grayscale(100%);
}

/* Grid Annotation Lines */
.grid-lines {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Bold Large Numbers - Swiss Style */
.big-number {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 700;
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    opacity: 0.1;
    position: absolute;
    z-index: 0;
}

/* Process Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.step-indicator .step-num {
    width: 28px;
    height: 28px;
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--accent);
}

/* Visual Slider Improvements */
.visual-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.visual-slider::-webkit-scrollbar {
    display: none;
}

.visual-slider img {
    flex: 0 0 100%;
    scroll-snap-align: start;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.slider-nav:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.slider-nav.prev {
    left: 1rem;
}

.slider-nav.next {
    right: 1rem;
}

/* Enhanced Card Visual Box */
.visual-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
    min-height: 400px;
}

.visual-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card-horizontal:hover .visual-box::after {
    opacity: 1;
}

/* Section Divider with Pattern */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 4rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: 1px solid var(--accent);
    background: var(--bg-color);
}

/* Hero Section Enhancement */
#hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 20%, var(--bg-color) 80%);
    pointer-events: none;
    z-index: 1;
}

#hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Data Overlay Text */
.data-overlay-text {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.6;
    z-index: 10;
}

/* Feature Visual Grid */
.feature-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-visual-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-visual-grid img:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .feature-visual-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PREMIUM ANIMATION SYSTEM
   Inspired by Fractal Labs / Awwwards sites
   ======================================== */

/* Base reveal - silky smooth */
.reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children - cascading reveal */
/* .reveal-stagger>* {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
} */

/* Staggered Child Reveal */
/* .reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
} */

/* .reveal-stagger.in-view>*:nth-child(1) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
} */

/* .reveal-stagger.in-view>*:nth-child(2) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateY(0);
} */

.reveal-stagger.in-view>*:nth-child(3) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.in-view>*:nth-child(4) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.in-view>*:nth-child(5) {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.in-view>*:nth-child(6) {
    transition-delay: 0.6s;
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left */
.reveal-left {
    /* opacity: 0; */
    /* transform: translateX(-100px); */
    /* transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1s cubic-bezier(0.22, 1, 0.36, 1); */
}

.reveal-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.reveal-right {
    /* opacity: 0; */
    /* transform: translateX(100px); */
    /* transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1s cubic-bezier(0.22, 1, 0.36, 1); */
}

.reveal-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in - for images */
.reveal-scale {
    /* opacity: 0; */
    /* transform: scale(0.9); */
    /* transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); */
}

.reveal-scale.in-view {
    opacity: 1;
    transform: scale(1);
}

/* Clip reveal - text appears from bottom */
.reveal-clip {
    /* clip-path: inset(100% 0 0 0); */
    /* transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1); */
}

.reveal-clip.in-view {
    clip-path: inset(0 0 0 0);
}

/* MASSIVE Typography - with entrance animation */
.hero-title-massive {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    /* opacity: 0; */
    /* transform: translateY(100px); */
    /* transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.4s cubic-bezier(0.22, 1, 0.36, 1); */
}

.hero-title-massive.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-title-large {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.subtitle-mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: block;
}

/* Pill Tags with hover */
.pill-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}

.pill-tag:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.pill-tag.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

/* Clickable pill-tag links (hero section) */
.pill-tag-link {
    cursor: pointer;
    text-decoration: none;
}

.pill-tag-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Scrolling tech stack */
.tech-stack-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1.5rem 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.tech-stack-scroll::-webkit-scrollbar {
    display: none;
}

.tech-stack-scroll .pill-tag {
    flex-shrink: 0;
}

/* Premium Section styling */
.section-minimal {
    padding: 10rem 0;
    position: relative;
}

.section-minimal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Floating nav - premium glass */
.nav-floating {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-floating:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.85);
}

/* Line diagram elements */
.diagram-line {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
    fill: none;
}

.diagram-dot {
    fill: var(--accent);
}

.diagram-label {
    font-family: var(--font-mono);
    font-size: 10px;
    fill: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Asymmetric layout */
.layout-asymmetric {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: end;
}

@media (max-width: 768px) {
    .layout-asymmetric {
        grid-template-columns: 1fr;
    }
}

/* Text-only section */
.section-text-only {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 6rem 2rem;
}

.section-text-only h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    max-width: 800px;
    line-height: 1.2;
}

/* Hover underline effect - smooth */
.hover-line {
    position: relative;
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-line::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-line:hover {
    color: var(--text-primary);
}

.hover-line:hover::after {
    width: 100%;
}

/* Minimal button - premium feel */
.btn-minimal {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    position: relative;
}

.btn-minimal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--text-primary);
    transition: left 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.btn-minimal:hover::before {
    left: 0;
}

.btn-minimal:hover {
    color: var(--bg-color);
    border-color: var(--text-primary);
}

.btn-minimal::after {
    content: '→';
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-minimal:hover::after {
    transform: translateX(6px);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Counter display - big numbers */
.counter-display {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

/* Card hover - smooth lift */
.project-card,
.product-card {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover,
.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* Image zoom on card hover */
.project-card img,
.product-card .p-image img {
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover img,
.product-card:hover .p-image img {
    transform: scale(1.08);
}

/* Smooth page transitions feel */
body {
    scroll-behavior: smooth;
}

/* Disable reveal animations while loading */
.loading .reveal,
.loading .reveal-left,
.loading .reveal-right,
.loading .reveal-scale,
.loading .hero-title-massive {
    transition: none !important;
}

/* Read More / View Syllabus Button - Clean Style */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.read-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Read More Wrapper - Expandable Content */
.read-more-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.read-more-wrapper.expanded {
    max-height: 1000px;
    opacity: 1;
}

/* Hero Section - Center triangle in viewport */
.hero {
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.hero #hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Philosophy/Mission Section with Scroll Line */
.mission-section {
    position: relative;
    padding: 12rem 0;
    overflow: hidden;
}

.mission-grid {
    /* display: grid; */
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 6rem; */
    /* align-items: center; */
}

@media (max-width: 768px) {
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.mission-content h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.mission-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Scroll Line Animation SVG */
.scroll-line-container {
    position: relative;
    height: 400px;
}

/* Static background line */
.scroll-line-bg {
    stroke: rgba(255, 255, 255, 0.15);
}

/* Animated main line with dash effect */
.scroll-line-animated {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 8 4;
    animation: line-dash 30s linear infinite;
}

@keyframes line-dash {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -1000;
    }
}

/* Travel dot glow effect */
.travel-dot {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

/* Node pulse animation */
.node-pulse {
    animation: node-glow 2s ease-in-out infinite;
}

.node-delay-1 {
    animation-delay: 0.5s;
}

.node-delay-2 {
    animation-delay: 1s;
}

.node-delay-3 {
    animation-delay: 1.5s;
}

.node-delay-4 {
    animation-delay: 2s;
}

@keyframes node-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    }
}

/* Diagram labels */
.diagram-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* Line labels */
.line-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.line-label.visible {
    opacity: 1;
    transform: translateX(0);
}

.line-label.label-1 {
    top: 20%;
    left: 30%;
    transition-delay: 0.3s;
}

.line-label.label-2 {
    top: 50%;
    left: 60%;
    transition-delay: 0.6s;
}

.line-label.label-3 {
    top: 80%;
    left: 40%;
    transition-delay: 0.9s;
}

/* Bounce animation for scroll arrow */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Diagram labels in SVG */
.diagram-label {
    fill: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
}

/* Scroll arrow hover */
.scroll-arrow a:hover {
    color: var(--text-primary);
}

.scroll-arrow a:hover svg {
    animation-play-state: paused;
    transform: translateY(5px);
}

.pill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.pill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

/* === NEW LAYOUT STYLES === */
.mission-section {
    padding: 4rem 0;
}

.tech-stack-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* === TECH TICKER === */
.tech-ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
}

.tech-ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}

.tech-item {
    margin: 0 2rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* === REVEAL ANIMATIONS === */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 1s ease-out;
}

.reveal {
    transform: translateY(30px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal.in-view,
.reveal-left.in-view,
.reveal-right.in-view {
    opacity: 1;
    transform: translate(0);
}

/* === HERO STYLES (Restored) === */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
}

/* === GLASS CARD (Black/White Only) - Enhanced v2.0 === */
.glass-card {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-slow) var(--ease-expo);
    position: relative;
    overflow: hidden;
}

/* Ensure card content is always visible */
.glass-card h4,
.glass-card p {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-slow) var(--ease-expo);
    pointer-events: none;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 22, 0.95);
    transform: translateY(-6px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(255, 255, 255, 0.03);
}

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

/* === SCROLL LINE DIAGRAM === */
.scroll-line-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hide scroll line diagram on mobile */
@media (max-width: 768px) {
    .scroll-line-container {
        display: none !important;
    }
}

.scroll-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 2;
    stroke-linecap: round;
}

.scroll-line-glow {
    fill: none;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.diagram-label {
    fill: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
}

/* === PHILOSOPHY DIAGRAM === */
.philosophy-diagram {
    position: relative;
}

.philosophy-diagram img {
    transition: transform var(--transition-slow) var(--ease-expo),
        opacity var(--transition-base);
}

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

/* === PILL TAG ENHANCEMENTS === */
.pill-tag {
    transition: all var(--transition-base) var(--ease-out-sharp);
}

.pill-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* === PREMIUM BUTTON HOVER === */
.btn-minimal {
    transition: all var(--transition-base) var(--ease-out-sharp);
}

.btn-minimal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* === VISUAL BOX ENHANCEMENT === */
.visual-box img {
    transition: transform var(--transition-premium) var(--ease-expo);
}

.project-card-horizontal:hover .visual-box img {
    transform: scale(1.05);
}

/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   All breakpoints and component adaptations
   ============================================================ */

/* TABLET BREAKPOINT - 1024px */
@media (max-width: 1024px) {
    .container-wide {
        padding: 0 2rem;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

/* MOBILE BREAKPOINT - 768px */
@media (max-width: 768px) {

    /* === TYPOGRAPHY === */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    .hero-title-massive {
        font-size: 3rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    /* === PROJECT CARDS - CRITICAL FIX === */
    .project-card-horizontal,
    .edu-card {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .project-card-horizontal.reverse {
        display: flex;
        flex-direction: column;
    }

    .project-card-horizontal .visual-box,
    .edu-card .visual-box {
        min-height: 250px;
        order: 1;
    }

    .project-card-horizontal .card-content,
    .edu-card .card-content {
        padding: 1.5rem !important;
        order: 2;
    }

    /* === STORE GRID === */
    .store-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .filter-bar {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .filter-bar button {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    /* === SLIDERS === */
    .visual-slider {
        min-height: 200px;
    }

    .slider-nav {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }

    /* === FOOTER === */
    footer>div>div:first-child {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* === SECTIONS === */
    .section {
        padding: 3rem 0 !important;
    }

    .section-minimal {
        padding-top: 6rem !important;
    }

    /* === INLINE GRIDS OVERRIDE === */
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 2fr"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    div[style*="grid-template-columns: repeat(3"],
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }

    /* === BUTTONS === */
    .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.85rem !important;
    }

    /* === PILL TAGS === */
    .tech-stack-scroll {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pill-tag {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* === READ MORE === */
    .read-more-content {
        padding: 1rem !important;
    }

    /* === STATUS BADGES === */
    div[style*="display: flex"][style*="gap: 1rem"] {
        flex-wrap: wrap !important;
    }

    /* === HERO === */
    .hero {
        min-height: 80vh !important;
        padding-top: 100px !important;
    }

    .hero-content {
        padding: 0 1rem;
    }

    /* === CONTACT FORM === */
    form {
        padding: 1.5rem !important;
    }

    /* === LOCATIONS GRID === */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* SMALL MOBILE - 480px */
@media (max-width: 480px) {

    .container,
    .container-wide {
        padding: 0 1rem !important;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    .hero-title-massive {
        font-size: 2.25rem !important;
    }

    .card-content {
        padding: 1rem !important;
    }

    .visual-slider {
        min-height: 180px;
    }

    .p-image {
        height: 200px !important;
    }

    /* Locations single column */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* Social buttons stack */
    div[style*="grid-template-columns: repeat(3, 1fr)"] a {
        padding: 0.5rem !important;
    }
}