/* ========================================
   MITCH KRUEGER — PORTFOLIO
   Sleek, dark, high-tech design system
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f17;
    --bg-card: #12121c;
    --bg-card-hover: #16162a;
    --bg-elevated: #1a1a2e;

    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #55556a;

    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-cyan: #22d3ee;
    --accent-emerald: #34d399;
    --accent-rose: #fb7185;
    --accent-amber: #fbbf24;

    --gradient-primary: linear-gradient(135deg, #6366f1, #818cf8, #22d3ee);
    --gradient-text: linear-gradient(135deg, #818cf8, #22d3ee);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(34, 211, 238, 0.04));

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(99, 102, 241, 0.3);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --nav-height: 72px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

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

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-base);
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.nav-logo:hover {
    color: var(--accent-secondary);
}

.logo-bracket {
    color: var(--accent-primary);
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-secondary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

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

.hero-line {
    display: block;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter {
    color: var(--accent-cyan);
    border-right: 3px solid var(--accent-cyan);
    padding-right: 4px;
    animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { border-color: var(--accent-cyan); }
    50% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

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

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

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

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* --- Sections --- */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.text-accent {
    color: var(--accent-secondary);
    font-weight: 600;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-text .about-lead {
    color: var(--text-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Code Window --- */
.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-body code {
    font-family: inherit;
}

.code-keyword { color: #c678dd; }
.code-var { color: #e5c07b; }
.code-prop { color: #e06c75; }
.code-string { color: #98c379; }

/* --- Project Cards --- */
.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    overflow: hidden;
    transition: var(--transition-slow);
}

.project-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.project-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-slow);
}

.project-card:hover .project-glow {
    opacity: 1;
}

.project-content {
    padding: 40px;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.project-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-secondary);
    flex-shrink: 0;
}

.project-meta {
    flex: 1;
}

.project-type {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.project-status.live {
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.project-status.live .status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.project-status.complete {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-status.complete .status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 700px;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature svg {
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tech-tag {
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-secondary);
    font-family: var(--font-mono);
}

.project-links {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-secondary);
    transition: var(--transition-fast);
}

.project-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #fff;
}

.project-link svg {
    flex-shrink: 0;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.metric-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-base);
}

.skill-category:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.skill-category-title svg {
    color: var(--accent-primary);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-item {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.skill-item:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

/* --- Workflow Section --- */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.workflow-step {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition-base);
    position: relative;
}

.workflow-step:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.3;
    margin-bottom: 16px;
}

.workflow-step h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.workflow-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Contact Section --- */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    color: var(--text-secondary);
}

.contact-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.contact-card svg:first-child {
    flex-shrink: 0;
    color: var(--accent-primary);
}

.contact-card div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

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

.contact-arrow {
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition-base);
}

.contact-card:hover .contact-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

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

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-year {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- Experience & Timeline --- */
.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.exp-column-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.exp-column-title svg {
    color: var(--accent-primary);
}

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
}

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

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 6px;
}

.timeline-content h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-org {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Research & Recognition --- */
.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition-base);
}

.research-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.research-type {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 12px;
}

.research-type.award {
    color: var(--accent-amber);
    background: rgba(251, 191, 36, 0.1);
}

.research-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
}

.research-venue {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.research-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.animate-in:nth-child(1) { transition-delay: 0.1s; }
.animate-in:nth-child(2) { transition-delay: 0.2s; }
.animate-in:nth-child(3) { transition-delay: 0.3s; }
.animate-in:nth-child(4) { transition-delay: 0.4s; }

/* Scroll reveal for sections */
.section-header,
.about-grid,
.project-card,
.skill-category,
.workflow-step,
.contact-content,
.experience-grid,
.research-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.revealed,
.about-grid.revealed,
.project-card.revealed,
.skill-category.revealed,
.workflow-step.revealed,
.contact-content.revealed,
.experience-grid.revealed,
.research-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger reveal for grid items */
.skill-category:nth-child(1),
.workflow-step:nth-child(1),
.research-card:nth-child(1) { transition-delay: 0s; }
.skill-category:nth-child(2),
.workflow-step:nth-child(2),
.research-card:nth-child(2) { transition-delay: 0.1s; }
.skill-category:nth-child(3),
.workflow-step:nth-child(3),
.research-card:nth-child(3) { transition-delay: 0.2s; }
.skill-category:nth-child(4),
.workflow-step:nth-child(4),
.research-card:nth-child(4) { transition-delay: 0.3s; }

.project-card:nth-child(1) { transition-delay: 0s; }
.project-card:nth-child(2) { transition-delay: 0.15s; }
.project-card:nth-child(3) { transition-delay: 0.3s; }

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

    .about-grid,
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .project-features {
        grid-template-columns: 1fr;
    }

    .project-metrics {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(15, 15, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 32px 40px;
        gap: 4px;
        transform: translateX(100%);
        transition: var(--transition-slow);
        border-left: 1px solid var(--border-subtle);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 1rem;
        padding: 14px 16px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .project-content {
        padding: 28px;
    }

    .project-header {
        flex-wrap: wrap;
    }

    .project-status {
        order: -1;
        width: auto;
    }

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

    .skills-grid,
    .workflow-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .project-content {
        padding: 20px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-number {
        font-size: 1.5rem;
    }
}
