:root {
    --bg: #0b0b0b;
    --bg-elevated: #141414;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f2;
    --text-secondary: #a0a0a6;
    --text-tertiary: #65656b;
    --accent: #d4a373;
    --accent-dim: rgba(212, 163, 115, 0.12);
    --accent-border: rgba(212, 163, 115, 0.25);
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --font-sans: 'Nunito Sans', 'SF Pro Rounded', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Avenir Next', 'Manrope', sans-serif;
    --font-mono: 'SF Mono', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
    --max-width: 1400px;
    --nav-height: 70px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection {
    background: rgba(212, 163, 115, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 200;
    pointer-events: none;
}
.scroll-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 0 2px 2px 0;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}
main {
    flex: 1;
    padding-top: calc(var(--nav-height) + 24px);
}
section {
    scroll-margin-top: calc(var(--nav-height) + 20px);
    padding: 80px 0;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
}
h1 {
    font-size: clamp(3rem, 7vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
h2 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}
h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
p {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 640px;
}
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.section-heading {
    margin-bottom: 48px;
}
.section-heading h2 {
    margin-bottom: 12px;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal-left {
    transform: translateX(-40px);
}
.reveal-right {
    transform: translateX(40px);
}
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Navigation */
.nav-wrapper {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
}
.nav {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    padding: 8px 12px 8px 28px;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: background var(--transition-medium);
}
.nav:hover {
    background: rgba(24, 24, 24, 0.9);
}
.nav-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.nav-brand:hover {
    color: var(--accent);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile-menu {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    left: 20px;
    right: 20px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero {
    padding: 80px 0 100px;
    position: relative;
}
.hero-inner {
    max-width: 800px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero h1 {
    margin-bottom: 8px;
}
.hero-tagline {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 1.5em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.typewriter-static {
    display: inline-block;
    color: var(--text-primary);
    font-weight: 700;
}
.typewriter-text {
    display: inline-block;
    white-space: nowrap;
    color: var(--accent);
    font-weight: 600;
}
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 4px;
    animation: blink 0.8s step-end infinite;
    border-radius: 1px;
    flex-shrink: 0;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.hero-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 32px;
}
.hero-line {
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.hero-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: shimmer 2.5s infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.hero-stat {
    text-align: left;
    position: relative;
    overflow: hidden;
}
.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Cards and grids */
.learning-grid,
.interests-grid {
    display: grid;
    gap: 20px;
    margin-top: 8px;
}
.learning-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.interests-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.learning-card,
.interest-card,
.project-card,
.approach-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: transform var(--transition-medium), border-color var(--transition-medium), background var(--transition-medium);
    position: relative;
    overflow: hidden;
}
.learning-card:hover,
.interest-card:hover,
.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
}
.approach-content:hover {
    border-color: var(--border-strong);
}
.learning-card {
    padding: 28px;
    cursor: default;
}
.learning-card-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    opacity: 0.8;
}
.learning-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.learning-card p,
.interest-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}
.project-card {
    padding: 36px;
    cursor: default;
}
.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}
.project-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}
.project-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 20px;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
}
.project-note {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.approach-content {
    padding: 36px;
}
.approach-content p {
    max-width: 580px;
    font-size: 1rem;
}
.approach-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.approach-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    cursor: default;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.approach-step:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-strong);
}
.approach-step .step-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    display: block;
    margin-bottom: 6px;
}

.interest-card {
    padding: 32px;
    cursor: default;
}
.interest-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
    display: block;
}
.interest-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.find-me-content {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 56px 32px;
}
.find-me-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}
.find-me-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.find-me-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.find-me-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.find-me-note {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    max-width: 400px;
    margin: 0 auto;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    background: rgba(30, 30, 30, 0.9);
    color: var(--text-primary);
}
.back-to-top svg {
    width: 20px;
    height: 20px;
}

.footer {
    padding: 24px 0 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}
.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.footer p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 10;
}
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Active press effect for tactile feedback */
.nav-links a:active,
.nav-brand:active,
.find-me-link:active,
.back-to-top:active,
.hero-badge:active,
.nav-toggle:active {
    transform: scale(0.95);
}
.project-card:active,
.learning-card:active,
.interest-card:active,
.approach-step:active,
.hero-stat:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        padding: 0 24px;
    }
    .hero-inner {
        max-width: 100%;
    }
}
@media (max-width: 768px) {
    .nav-wrapper { top: 10px; padding: 0 12px; }
    .nav { max-width: 100%; padding: 4px 6px 4px 16px; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; flex-direction: column; align-items: center; gap: 0; }
    .nav-toggle span { margin: 3px 0; }
    .nav-mobile-menu.open { display: flex; }
    .hero { padding: 50px 0 60px; }
    h1 { font-size: clamp(2.4rem, 8vw, 3.2rem); }
    .hero-tagline { font-size: 1.1rem; margin-bottom: 20px; }
    .hero-intro { font-size: 1rem; }
    .hero-stats { gap: 20px; }
    .hero-stat-number { font-size: 1.5rem; }
    section { padding: 50px 0; }
    .section-heading { margin-bottom: 32px; }
    .container { padding: 0 16px; }
    .learning-grid,
    .interests-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .project-card {
        padding: 24px 20px;
    }
    .approach-content {
        padding: 24px 20px;
    }
    .back-to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}
@media (max-width: 480px) {
    .find-me-links {
        flex-direction: column;
        gap: 12px;
    }
    .find-me-link {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-line::after,
    .hero-badge-dot,
    .project-badge-dot,
    .typewriter-cursor,
    .ripple {
        animation: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}
