:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-2: #101012;
    --fg: #f5f5f4;
    --muted: #9a9a9f;
    --muted-2: #6f6f75;
    --border: #232326;
    --border-strong: #313135;
    --accent: #ff5a2e;
    --accent-fg: #0a0a0b;
    --accent-soft: rgba(255, 90, 46, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --max-width: 72rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -16px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 16px;
}

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

a {
    color: inherit;
}

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

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

/* Header / Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.25rem;
}

.logo {
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    letter-spacing: -0.01em;
    color: var(--fg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.25rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.15s ease;
}

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

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

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

/* Hero */
.hero {
    padding: 8rem 0 6.5rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: -6rem;
    left: 50%;
    width: 40rem;
    height: 26rem;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-inner {
    max-width: 40rem;
    margin: 0 auto;
}

.eyebrow,
.section-eyebrow {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin: 0 0 1rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 6vw, 4.25rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.6rem;
}

.hero .role {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 0 0 1.5rem;
}

.hero .tagline {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 34rem;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 1.9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.005em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
    box-shadow: 0 8px 20px -8px var(--accent-soft);
}

.btn-primary:hover {
    box-shadow: 0 12px 24px -8px rgba(255, 90, 46, 0.45);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--fg);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

/* Sections */
.section {
    padding: 6.5rem 0;
}

.section-alt {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: clamp(1.85rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 3rem;
}

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

.about-photo {
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.about-bio {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.85;
    margin: 0;
    max-width: 42rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-soft);
}

.project-image {
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(255, 90, 46, 0.14), transparent 60%),
        var(--surface-2);
    background-color: var(--surface-2);
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border);
    transition: background 0.25s ease;
}

.project-card:hover .project-image {
    background:
        linear-gradient(135deg, rgba(255, 90, 46, 0.22), transparent 65%),
        var(--surface-2);
}

.project-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.project-body h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.15rem 0 0;
    padding: 0;
}

.tags li {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
}

.project-link {
    margin-top: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.15s ease;
}

.project-link:hover {
    gap: 0.5rem;
    text-decoration: underline;
}

/* Skills */
.skills-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.75rem;
}

.skills-group h3 {
    margin: 0 0 1.1rem;
    font-size: 0.85rem;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
}

.pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.55rem 1.05rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--fg);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.pill:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* Contact */
.contact-inner {
    text-align: center;
    max-width: 34rem;
}

.contact-copy {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0 0 2.25rem;
}

.contact-inner .btn-primary {
    font-size: 1rem;
    padding: 1rem 2.1rem;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2.5rem 0 0;
    padding: 1.75rem 0 0;
    border-top: 1px solid var(--border);
}

.social-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

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

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted-2);
    font-size: 0.88rem;
}

.back-to-top {
    text-decoration: none;
    color: var(--muted-2);
    font-weight: 500;
    transition: color 0.15s ease;
}

.back-to-top:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 800px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 4.25rem;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 20rem;
    }

    .nav-links li {
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--border);
    }

    .nav-links a {
        font-size: 1rem;
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-photo {
        width: 150px;
        margin: 0 auto;
    }

    .about-bio {
        margin: 0 auto;
    }

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

    .skills-groups {
        grid-template-columns: 1fr;
        gap: 2.25rem;
        text-align: center;
    }

    .pill-list {
        justify-content: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .social-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5.5rem 0 4rem;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

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

    .section {
        padding: 4.5rem 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .contact-inner .btn-primary {
        width: 100%;
    }

    .social-links {
        gap: 1.25rem 1.75rem;
    }
}
