/* ============================================
   MAX MAYER — PORTFOLIO
   "Quant Terminal Editorial" aesthetic
   ============================================ */

:root {
    --bg: #08080d;
    --bg-elevated: #0e0e16;
    --bg-card: #111119;
    --accent: #00d4ff;
    --accent-dim: #00a0c4;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --accent-glow-strong: rgba(0, 212, 255, 0.3);
    --text: #e4e4ec;
    --text-muted: #5a5a6e;
    --text-dim: #3a3a4e;
    --border: #1a1a28;
    --border-hover: #2a2a3e;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-body: 'JetBrains Mono', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- Light theme (site-wide) ---------- */
[data-theme="light"] {
    --bg: #faf9f6;
    --bg-elevated: #ffffff;
    --bg-card: #f1f0e9;
    --accent: #0095bb;
    --accent-dim: #007695;
    --accent-glow: rgba(0, 149, 187, 0.12);
    --accent-glow-strong: rgba(0, 149, 187, 0.22);
    --text: #1a1a22;
    --text-muted: #55556a;
    --text-dim: #8a8a9e;
    --border: #e3e1d8;
    --border-hover: #cfcdc1;
}

html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* ---------- Theme toggle (floating) ---------- */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s;
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline-flex; }

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dim) var(--bg);
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

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

/* ============================================
   CANVAS (DOT GRID)
   ============================================ */

#grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 60px;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid transparent;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease-out-expo), border-color 0.3s;
}

.navbar.visible {
    transform: translateY(0);
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color 0.3s;
}

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

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s var(--ease-out-expo);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo);
}

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

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.mobile-menu a:hover {
    color: var(--accent);
    transform: translateX(8px);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

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

.hero-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0;
}

.hero-name {
    margin-bottom: 28px;
}

.hero-name-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(60px, 14vw, 180px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--text);
    opacity: 0;
}

.hero-name-line:nth-child(2) {
    font-style: italic;
    color: var(--accent);
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.4vw, 16px);
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 40px;
    opacity: 0;
}

.hero-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s var(--ease-out-expo);
}

.hero-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.hero-link svg {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.hero-link:hover svg {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scroll-arrow {
    animation: scrollBounce 2s var(--ease-out-expo) infinite;
    color: var(--text-dim);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ============================================
   SECTIONS (SHARED)
   ============================================ */

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 56px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.label-index {
    color: var(--accent);
    font-weight: 500;
}

.label-line {
    width: 48px;
    height: 1px;
    background: var(--border);
}

/* ============================================
   ABOUT
   ============================================ */

.about-content {
    max-width: 720px;
    margin-bottom: 64px;
}

.about-text {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 300;
}

.about-text:last-child {
    margin-bottom: 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.stat {
    background: var(--bg-elevated);
    padding: 32px 24px;
    text-align: center;
    transition: background 0.3s;
}

.stat:hover {
    background: var(--bg-card);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============================================
   EXPERIENCE (TIMELINE)
   ============================================ */

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

.timeline-line {
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 100%);
}

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

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

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 24px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
    transition: all 0.3s;
    z-index: 2;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow-strong);
}

.timeline-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px;
    transition: all 0.4s var(--ease-out-expo);
}

.timeline-item:hover .timeline-card {
    border-color: var(--accent);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
    transform: translateX(8px);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.timeline-company {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.timeline-role {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 300;
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo), opacity 0.4s;
    opacity: 0;
}

.timeline-item:hover .timeline-details,
.timeline-item.expanded .timeline-details {
    max-height: 300px;
    opacity: 1;
}

.timeline-details p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 300;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.timeline-tags span {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.timeline-item:hover .timeline-tags span {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* ============================================
   PROJECTS
   ============================================ */

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.filter-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.filter-pill:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

.filter-pill.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
}

.project-active-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e68a;
    z-index: 2;
}

.active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e68a;
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(0, 230, 138, 0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 8px rgba(0, 230, 138, 0.8); }
}

.project-card.filtered-out {
    display: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    display: block;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    cursor: default;
}

.project-featured {
    grid-column: 1 / -1;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
}

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

.project-card-inner {
    padding: 32px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 12px;
    border: 1px solid var(--accent);
    border-radius: 4px;
}

.project-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}

.project-name {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.project-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 300;
}

.project-desc {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 300;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.project-card:hover .project-tags span {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* ============================================
   SKILLS
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.skill-group-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

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

.skill-pill {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    transition: all 0.3s var(--ease-out-expo);
}

.skill-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: translateY(-2px);
}

/* ============================================
   EDUCATION
   ============================================ */

.education-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 40px;
    transition: border-color 0.3s;
}

.education-card:hover {
    border-color: var(--border-hover);
}

.edu-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.edu-school {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.edu-college {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 300;
}

.edu-date {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

.edu-degree {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 400;
}

.edu-details {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.edu-detail {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
}

.edu-courses {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 300;
}

.edu-activities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edu-activities span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

.edu-activities span.edu-leadership {
    border-color: var(--accent-dim);
    color: var(--accent);
}

.edu-leadership-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    margin-top: 4px;
}

.edu-card-secondary {
    margin-top: 20px;
}

.confidential {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.timeline-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin-top: 16px;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all 0.3s var(--ease-out-expo);
}

.timeline-learn-more:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 20px var(--accent-glow);
}

.project-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: transparent;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    margin-top: 16px;
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}

.project-cta-outline:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
    padding-bottom: 60px;
}

.contact-content {
    text-align: center;
    padding: 80px 0 60px;
    border-top: 1px solid var(--border);
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 96px);
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1;
}

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

.contact-sub {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 300;
}

.contact-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s var(--ease-out-expo);
}

.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
    transform: translateY(-2px);
}

.contact-link:hover svg {
    transform: translate(2px, -2px);
}

.contact-link svg {
    transition: transform 0.3s var(--ease-out-expo);
}

.footer {
    text-align: center;
    padding-top: 40px;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* Stagger delays for hero elements */
.hero .hero-name .reveal:nth-child(1) { transition-delay: 0.2s; }
.hero .hero-name .reveal:nth-child(2) { transition-delay: 0.4s; }
.hero-tagline.reveal { transition-delay: 0.6s; }
.hero-links.reveal { transition-delay: 0.8s; }
.scroll-indicator.reveal { transition-delay: 1.1s; }

/* Stagger for stats */
.stat.reveal:nth-child(1) { transition-delay: 0.1s; }
.stat.reveal:nth-child(2) { transition-delay: 0.2s; }
.stat.reveal:nth-child(3) { transition-delay: 0.3s; }
.stat.reveal:nth-child(4) { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */

@media (max-width: 900px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-featured {
        grid-column: 1;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .timeline {
        padding-left: 32px;
    }

    .timeline-dot {
        left: -32px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */

@media (max-width: 640px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 24px;
    }

    .hero-name-line {
        font-size: clamp(48px, 16vw, 80px);
    }

    .hero-links {
        gap: 12px;
    }

    .hero-link {
        padding: 8px 14px;
        font-size: 11px;
    }

    .section {
        padding: 80px 0;
    }

    .container {
        padding: 0 20px;
    }

    .section-label {
        margin-bottom: 36px;
    }

    .about-text {
        font-size: 14px;
    }

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

    .stat {
        padding: 24px 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-dot {
        left: -24px;
        width: 11px;
        height: 11px;
    }

    .timeline-card {
        padding: 24px;
    }

    .timeline-company {
        font-size: 22px;
    }

    .timeline-item:hover .timeline-card,
    .timeline-item.expanded .timeline-card {
        transform: none;
    }

    /* On mobile, always show details */
    .timeline-details {
        max-height: 300px;
        opacity: 1;
    }

    .project-card-inner {
        padding: 24px;
    }

    .project-name {
        font-size: 22px;
    }

    .education-card {
        padding: 24px;
    }

    .edu-top {
        flex-direction: column;
        gap: 8px;
    }

    .edu-school {
        font-size: 22px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

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

    /* Simplify animations on mobile */
    .reveal-left, .reveal-right {
        transform: translateY(30px);
    }

    .reveal-left.visible, .reveal-right.visible {
        transform: translateY(0);
    }
}

@media (max-width: 380px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .hero-name-line {
        font-size: 42px;
    }
}

/* ============================================
   NOISE OVERLAY (subtle texture)
   ============================================ */

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
