/* ---------- Variables ---------- */
:root {
    --bg: #fbfbf9;
    --bg-alt: #f2f1ec;
    --ink: #15171c;
    --ink-soft: #5b5e66;
    --accent: #2f5cff;
    --accent-ink: #ffffff;
    --border: #e5e2da;
    --radius: 14px;
    --max-width: 1100px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

ul {
    list-style: none;
}

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

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    background: var(--ink);
    color: var(--bg);
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 200;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

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

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

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

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

.nav-menu a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* ---------- Sections ---------- */
section {
    padding: 110px 0;
}

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

h1, h2, h3 {
    letter-spacing: -0.02em;
    font-weight: 800;
}

/* ---------- Hero ---------- */
.hero {
    padding-top: 140px;
    padding-bottom: 130px;
}

.hero-inner h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.1;
    max-width: 760px;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--ink-soft);
    max-width: 560px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--ink-soft);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-links svg {
    width: 22px;
    height: 22px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(47, 92, 255, 0.28);
}

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

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

/* ---------- About ---------- */
.about-content {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 1.05rem;
    color: var(--ink-soft);
}

/* ---------- Skills ---------- */
.skills-block {
    margin-bottom: 56px;
}

.skills h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

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

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.skills-block .pill {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

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

/* ---------- Contact ---------- */
.contact h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 18px;
}

.contact-sub {
    color: var(--ink-soft);
    max-width: 520px;
    margin-bottom: 36px;
    font-size: 1.05rem;
}

.contact-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    section {
        padding: 80px 0;
    }

    .hero {
        padding-top: 120px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-menu.is-open {
        max-height: 240px;
    }

    .nav-menu a {
        padding: 16px 0;
        width: 100%;
        text-align: center;
    }

    .skills-grid {
        gap: 32px;
    }
}
