:root {
    /* Colors */
    --bg-main: #0a0a0c;
    --bg-alt: #121214;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f22;
    
    --text-main: #e4e4e7;
    --text-muted: #a1a1aa;
    
    --accent: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
    
    --border: #27272a;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing & Layout */
    --container-w: 1200px;
    --section-pad: 120px 0;
    --section-pad-mobile: 80px 0;
    
    /* Transition */
    --trans-fast: 0.2s ease;
    --trans-slow: 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --trans-fast: 0s;
        --trans-slow: 0s;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

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

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

/* Typography Hierarchy */
h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

p.section-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 4rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--trans-fast);
    cursor: pointer;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-main);
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-main);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background-color: rgba(255,255,255,0.05);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: all var(--trans-fast);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    color: #fff;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a, .nav-social, .mobile-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--trans-fast);
}

.nav-links a:hover, .nav-social:hover, .mobile-menu a:hover {
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 16px;
    position: relative;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background-color: #fff;
    position: absolute;
    transition: all 0.3s;
}

.mobile-menu-toggle span:first-child { top: 0; }
.mobile-menu-toggle span:last-child { bottom: 0; }
.mobile-menu-toggle.open span:first-child { transform: rotate(45deg); top: 7px; }
.mobile-menu-toggle.open span:last-child { transform: rotate(-45deg); bottom: 8px; }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--trans-fast);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    font-size: 1.25rem;
}

/* Sections Base */
section {
    padding: var(--section-pad);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--trans-slow), transform var(--trans-slow);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    width: fit-content;
    background-color: rgba(255,255,255,0.02);
}

.status-indicator .dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
}

.status-text {
    color: var(--text-muted);
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 32px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 48px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Philosophy */
.philosophy-quote {
    font-size: 1.75rem;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 48px;
    max-width: 900px;
    font-weight: 400;
    border-left: 2px solid var(--border);
    padding-left: 32px;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.principle-card {
    padding: 32px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.principle-number {
    display: block;
    color: var(--accent);
    margin-bottom: 16px;
}

.principle-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.principle-card p {
    color: var(--text-muted);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-card {
    padding: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color var(--trans-fast);
}

.about-card:hover {
    border-color: #3f3f46;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-muted);
}

/* Experience */
.timeline {
    position: relative;
    max-width: 800px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: var(--border);
}

.timeline-item {
    display: flex;
    gap: 48px;
    margin-bottom: 48px;
    position: relative;
}

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

.timeline-year {
    width: 96px;
    text-align: right;
    color: var(--text-muted);
    padding-top: 4px;
}

.timeline-content {
    flex: 1;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -28px; /* 48px gap - 20px padding logic approx */
    top: 8px;
    width: 9px;
    height: 9px;
    background-color: var(--bg-main);
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    transition: all var(--trans-fast);
}
/* precise positioning fix */
.timeline-content::before {
    left: calc(-48px - 4px);
}

.timeline-item:hover .timeline-content::before {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.timeline-content .company {
    color: #fff;
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-content .details {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 64px;
}

.skill-category h3 {
    color: var(--text-muted);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 12px;
    color: #e4e4e7;
    position: relative;
    padding-left: 16px;
}

.skill-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.certifications {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 4px;
}

.certifications h3 {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cert-tags span {
    font-size: 0.85rem;
    padding: 6px 12px;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
}

/* Selected Work */
.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.work-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.work-card:hover {
    border-color: #3f3f46;
}

.work-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid var(--border);
}

.work-header .tag {
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}

.work-header h3 {
    font-size: 1.5rem;
}

.work-content {
    padding: 32px 40px;
}

.work-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.work-content .note {
    font-size: 0.85rem;
    color: #71717a;
    margin-bottom: 24px;
}

.data-viz, .data-tree {
    background-color: var(--bg-card);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
}

.data-tree {
    line-height: 1.6;
}

/* Insights */
.featured-insight {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 48px;
    margin-bottom: 32px;
}

.featured-insight h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.featured-insight p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 700px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.insight-card {
    display: block;
    padding: 32px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: border-color var(--trans-fast), background-color var(--trans-fast);
}

.insight-card:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-card-hover);
}

.insight-category {
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}

.insight-card h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: #fff;
}

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

/* Social Proof */
.testimonial-card {
    max-width: 800px;
    border-left: 2px solid var(--border);
    padding-left: 32px;
}

.testimonial-text {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 400;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    color: var(--text-muted);
}

/* Contact */
.contact-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Footer */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .principles-grid, .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section { padding: var(--section-pad-mobile); }
    
    .nav-links, .nav-social { display: none; }
    .mobile-menu-toggle { display: block; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    
    .principles-grid, .about-grid, .skills-grid, .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before { left: 16px; }
    .timeline-year {
        width: auto;
        text-align: left;
        margin-bottom: 8px;
    }
    .timeline-item {
        flex-direction: column;
        gap: 0;
        padding-left: 40px;
    }
    .timeline-content::before {
        left: -28px;
        top: -24px;
    }

    .hero-actions, .contact-actions {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .work-header, .work-content {
        padding: 24px;
    }
}
