/* ============================================
   Base & Reset
   ============================================ */

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

:root {
    --color-bg: #fafafa;
    --color-bg-alt: #f4f4f5;
    --color-surface: #ffffff;
    --color-text: #18181b;
    --color-text-secondary: #52525b;
    --color-text-muted: #a1a1aa;
    --color-border: #e4e4e7;
    --color-border-light: #f0f0f2;
    --color-accent: #18181b;
    --color-accent-hover: #3f3f46;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-max: 1080px;
    --section-spacing: 96px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ============================================
   Layout
   ============================================ */

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

.section {
    padding: var(--section-spacing) 0;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    color: var(--color-text);
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    transition: box-shadow 0.2s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

.nav-logo {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--color-text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
    color: var(--color-text);
    background-color: var(--color-bg-alt);
}

.nav-github {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--color-text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
    margin-left: 8px;
    white-space: nowrap;
}

.nav-github:hover {
    color: var(--color-text);
    background-color: var(--color-bg-alt);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

/* ============================================
   Hero
   ============================================ */

.hero {
    padding-top: 160px;
    padding-bottom: var(--section-spacing);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--color-text);
    max-width: 720px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 540px;
    margin-bottom: 36px;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

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

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
    transform: translateY(-1px);
}

/* ============================================
   Projects
   ============================================ */

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

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
    border-color: var(--color-text-muted);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.project-card--wip {
    border-style: dashed;
}

.project-header {
    margin-bottom: 16px;
}

.project-icon {
    color: var(--color-text-secondary);
}

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--color-text);
}

.project-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

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

.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
    border-radius: 100px;
    border: 1px solid var(--color-border-light);
}

/* ============================================
   Current Focus
   ============================================ */

.focus-list {
    list-style: none;
    max-width: 600px;
}

.focus-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    padding: 12px 0;
}

.focus-item + .focus-item {
    border-top: 1px solid var(--color-border-light);
}

.focus-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    min-width: 8px;
    background: var(--color-text);
    border-radius: 50%;
    margin-top: 9px;
}

/* ============================================
   About
   ============================================ */

.about-content {
    max-width: 640px;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
}

.about-content p + p {
    margin-top: 16px;
}

/* ============================================
   Stack
   ============================================ */

.stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 18px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stack-badge:hover {
    border-color: var(--color-text-muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Contact
   ============================================ */

.contact-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    max-width: 540px;
}

.contact-sub {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    max-width: 540px;
}

.contact-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: all 0.15s ease;
}

.contact-item:hover {
    border-color: var(--color-text-muted);
    background: var(--color-bg-alt);
    transform: translateY(-1px);
}

.contact-item svg {
    color: var(--color-text-secondary);
}

/* ============================================
   Footer
   ============================================ */

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

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

.footer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

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

.footer-links a {
    font-size: 0.85rem;
    font-weight: 450;
    color: var(--color-text-secondary);
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--color-text);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    :root {
        --section-spacing: 72px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-border-light);
        padding: 12px 24px 20px;
        gap: 4px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: 10px 14px;
        width: 100%;
    }

    .nav-github {
        display: none;
    }

    .hero {
        padding-top: 120px;
        min-height: auto;
        padding-bottom: 64px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

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

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

    .project-card {
        padding: 24px;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 28px;
    }

    .focus-item {
        font-size: 0.95rem;
    }

    .about-content p {
        font-size: 0.95rem;
    }
}

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

    .nav-container {
        padding: 0 18px;
    }

    .hero {
        padding-top: 104px;
    }

    .hero-title {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-item {
        justify-content: center;
    }
}
