/* Shopify Editions High-Fidelity Style Core - Vertical Storytelling */

:root {
    --bg-pure-black: #000000;
    --bg-card: #08090d;
    --border-hairline: #14151b;
    --border-hairline-hover: #2e3142;
    
    /* Accents */
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-cell: 16px;
}

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

body {
    background-color: var(--bg-pure-black);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    line-height: 1.4;
}

body.loading {
    overflow: hidden;
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-pure-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--transition-smooth), visibility 0.8s var(--transition-smooth);
}

body:not(.loading) #loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

.loader-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    padding: 30px;
}

.loader-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.loader-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-counter {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 20px;
}

.percent-symbol {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.loader-bar-container {
    width: 100%;
    height: 2px;
    background-color: #111218;
    overflow: hidden;
    margin-bottom: 16px;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transition: width 0.15s ease-out;
}

.loader-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Background Grids & Ambient Lights */
.matrix-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 1;
    pointer-events: none;
}

.ambient-glow {
    position: fixed;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(160px);
    pointer-events: none;
    z-index: 2;
    opacity: 0.08;
}

.glow-1 {
    background-color: var(--accent-indigo);
    top: -15%;
    right: 5%;
    animation: drift 25s linear infinite alternate;
}

.glow-2 {
    background-color: var(--accent-cyan);
    bottom: -15%;
    left: -10%;
    animation: drift 30s linear infinite alternate-reverse;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 90px) scale(1.2); }
}

/* Sticky Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 2, 4, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-hairline);
    transition: opacity 0.5s var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    font-family: var(--font-heading);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-green);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-green);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.social-nav {
    display: flex;
    gap: 20px;
}

.social-nav a {
    color: var(--text-secondary);
    transition: color 0.3s var(--transition-smooth);
}

.social-nav a:hover {
    color: #fff;
}

/* Container Spacing */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* Linear Sections Wrapper */
.sections-wrapper {
    position: relative;
    z-index: 10;
}

/* Full Screen Section Layout */
.story-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    border-bottom: 1px solid var(--border-hairline);
    position: relative;
}

/* Hero Section Spacing */
.hero-section {
    padding-top: 180px;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 4.8rem;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 0.95;
    background: linear-gradient(135deg, #ffffff, #777777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--accent-indigo);
    letter-spacing: -0.8px;
    margin-bottom: 24px;
}

.hero-philosophy {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 40px;
}

.hero-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.scroll-arrow {
    display: flex;
    animation: bounce 1.5s infinite alternate;
}

@keyframes bounce {
    to { transform: translateY(4px); }
}

/* Split Container Layout */
.split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px; /* Spacious column gap */
    align-items: center;
    width: 100%;
}

/* Asymmetric reverse layouts */
.split-container.reverse-layout .story-text-column {
    grid-column: 2;
}

.split-container.reverse-layout .story-visual-column {
    grid-column: 1;
    grid-row: 1;
}

/* Story Text Columns */
.story-text-column {
    display: flex;
    flex-direction: column;
}

.section-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: 4px;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-indigo);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.section-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: justify;
}

/* Story Visual Columns */
.story-visual-column {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Card Styling inside Visual Column */
.bento-cell {
    background: linear-gradient(180deg, rgba(10,11,16,0.95) 0%, rgba(6,7,9,0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-hairline);
    border-radius: var(--border-radius-cell);
    padding: 36px;
    width: 100%;
    max-width: 460px; /* Constrains visual block width */
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color 0.4s var(--transition-smooth), transform 0.15s ease-out;
}

/* Cursor spotlight overlay */
.bento-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--spotlight-color, rgba(99, 102, 241, 0.08)),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 3;
}

.bento-cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 2;
}

.bento-cell:hover::before {
    opacity: 1;
}

.bento-cell:hover {
    border-color: var(--border-hairline-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Set spotlight colors for each section */
#story-algo .bento-cell { --spotlight-color: rgba(168, 85, 247, 0.11); }
#story-drone .bento-cell { --spotlight-color: rgba(16, 185, 129, 0.11); }
#story-launch .bento-cell { --spotlight-color: rgba(6, 182, 212, 0.11); }
#story-experience .bento-cell { --spotlight-color: rgba(99, 102, 241, 0.11); }

/* IDE Code Editor Mockup */
.widget-ide {
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.ide-tab-bar {
    display: flex;
    background: rgba(255,255,255,0.01);
    border-bottom: 1px solid var(--border-hairline);
    position: relative;
    z-index: 4;
}

.ide-tab {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-right: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    user-select: none;
}

.ide-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

.ide-tab.active {
    color: #fff;
    background: rgba(255,255,255,0.04);
    border-bottom: 2px solid var(--accent-purple);
}

.ide-body {
    display: flex;
    padding: 20px;
    font-size: 0.75rem;
    line-height: 1.6;
    font-family: var(--font-mono);
}

.ide-line-numbers {
    display: flex;
    flex-direction: column;
    color: var(--text-muted);
    text-align: right;
    margin-right: 20px;
    user-select: none;
}

.ide-code-content {
    flex-grow: 1;
}

.code-kw { color: var(--accent-purple); }
.code-func { color: var(--accent-blue); }
.code-var { color: var(--accent-cyan); }
.code-type { color: var(--accent-green); }

.ide-tutor-panel {
    background: rgba(168, 85, 247, 0.02);
    border-top: 1px solid rgba(168, 85, 247, 0.08);
    padding: 16px 20px;
}

.tutor-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.tutor-badge { color: var(--accent-purple); }
.tutor-xp { color: var(--accent-green); }

.tutor-output {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
    min-height: 38px;
}

/* Skills Category lists */
.skills-category-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-category h4 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chips span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-hairline);
    padding: 4px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s var(--transition-smooth);
}

.skill-chips span:hover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.04);
}

/* Tech tag elements */
.cell-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.cell-tech-tags span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 6px;
}

/* Freelance chart visual */
.freelance-chart-box {
    border: 1px solid var(--border-hairline);
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    max-width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.chart-metric { color: var(--accent-green); }

.chart-svg {
    width: 100%;
    height: 80px;
}

.chart-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 2s forwards ease-out 1s;
}

/* Solar Panel Drone OpenCV widget */
.widget-camera-feed {
    height: 130px;
    border: 1px solid var(--border-hairline);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: #020204;
}

.camera-lens-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}

.camera-bounding-box {
    position: absolute;
    border: 2px solid var(--accent-green);
    width: 44px;
    height: 44px;
    top: 30px;
    left: 80px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
    animation: trackBox 4s infinite alternate ease-in-out;
}

@keyframes trackBox {
    0% { transform: translate(-45px, -10px); }
    100% { transform: translate(45px, 20px); }
}

.camera-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
}

.camera-crosshair::before { width: 34px; height: 1px; left: -5px; top: 11px; }
.camera-crosshair::after { height: 34px; width: 1px; top: -5px; left: 11px; }

.camera-scanline {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(180deg, transparent, var(--accent-green), transparent);
    animation: scanVertical 3.5s infinite linear;
}

@keyframes scanVertical {
    0% { top: 0; }
    100% { top: 100%; }
}

.camera-telemetry {
    position: absolute;
    bottom: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-blue);
}

.telemetry-pulse {
    color: var(--accent-green);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Launch portal DB pipeline widget */
.widget-pipeline {
    height: 130px;
    border: 1px solid var(--border-hairline);
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.pipeline-node {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.node-success { color: var(--accent-green); }
.node-running { color: var(--accent-indigo); }

.pipeline-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--accent-indigo);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-indigo);
    animation: pulse 1s infinite alternate;
}

/* Education Grade panel */
.grade-display {
    margin: 20px 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.grade-number {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grade-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Contact Grid Layout */
.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-hairline);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.3s var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.12);
}

textarea.form-input {
    min-height: 86px;
    resize: none;
}

/* Metrics and Values */
.metric-row {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.metric-box {
    display: flex;
    flex-direction: column;
}

.metric-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.3s var(--transition-smooth);
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-hairline);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.w-fit { width: fit-content; }
.w-full { width: 100%; }
.mt-3 { margin-top: 12px; }
.mt-auto { margin-top: auto; }

/* Project actions & Demo credentials badge */
.project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(6, 182, 212, 0.04);
    border: 1px solid rgba(6, 182, 212, 0.12);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.demo-badge i {
    width: 14px;
    height: 14px;
}

.demo-highlight {
    color: var(--accent-cyan);
    font-weight: 500;
}

.text-cyan {
    color: var(--accent-cyan);
}


/* Site Footer */
.site-footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    border-top: 1px solid var(--border-hairline);
    font-family: var(--font-mono);
}

/* Scroll reveal CSS animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Grid layouts */
@media (max-width: 1024px) {
    .split-container {
        grid-template-columns: 1fr; /* Stacks layout vertically on tablet and smaller */
        gap: 48px;
    }
    .split-container.reverse-layout .story-text-column {
        grid-column: 1;
    }
    .split-container.reverse-layout .story-visual-column {
        grid-column: 1;
        grid-row: 2;
    }
    .story-section {
        min-height: auto;
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3.2rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .bento-cell {
        padding: 30px;
    }
    .metric-row {
        gap: 20px;
    }
    .metric-num {
        font-size: 2rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #020204;
}
::-webkit-scrollbar-thumb {
    background: #1e202f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2e3142;
}

/* Spinner Animation */
.spin {
    animation: rotate 1s linear infinite;
}
@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* Pipeline Simulator styles */
.pipeline-node {
    position: relative;
    z-index: 4;
    transition: all 0.5s var(--transition-smooth);
}
.pipeline-node.node-running {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.04);
}
.pipeline-node.node-success {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.04);
}

/* CV Controls sensitivity slider styling */
.cv-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #14151b;
    border-radius: 2px;
    outline: none;
}
.cv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-green);
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent-green);
    transition: all 0.2s ease;
}
.cv-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

