:root {
    --bg: #faf4ed;
    --surface: #f0e4d0;
    --border: #3a2e20;
    --text: #2c1810;
    --accent: #d4883a;
    --pop: #305f3e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Nav ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.02em;
}

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

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

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

/* ── Hero ── */
.hero {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 2.5rem 4rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--pop);
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
}

.hero h1 {
    font-family: 'Syne', serif;
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 500px;
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.7rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.7rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.2s;
}

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

/* ── Section Cards ── */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 1rem;
}

.section-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.section-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.card-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--pop);
    letter-spacing: 0.04em;
}

.card-title {
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.card-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ── Section shared ── */
.section-header {
    margin-bottom: 2.5rem;
}

.section-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--pop);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ── About ── */
.about-section {
    padding: 5rem 2.5rem;
    max-width: 960px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.about-bio {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-bio p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.8;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
}

.edu-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.edu-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--pop);
    letter-spacing: 0.08em;
}

.edu-degree {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.25rem;
}

.edu-school {
    font-size: 0.9rem;
    color: var(--muted);
}

.edu-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

/* ── Projects ── */
.projects-section {
    padding: 5rem 2.5rem;
    max-width: 960px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.projects-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.project-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.project-card-top {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-title {
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.project-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

.project-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--pop);
    background-color: var(--bg);
    border-color: var(--border);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.project-link:hover { color: var(--text); }

.project-link-accent { color: var(--accent); }
.project-link-accent:hover { color: var(--text); }

/* ── Contact ── */
.contact-section {
    padding: 5rem 2.5rem;
    max-width: 960px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-field label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--pop);
    letter-spacing: 0.06em;
}

.contact-field input,
.contact-field textarea {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: var(--muted);
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: var(--accent);
}

.contact-submit {
    align-self: flex-start;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.contact-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--pop);
    min-height: 1.2em;
}

/* ── Hero Slideshow ── */
#pic-slideshow {
    height: 0.9em;
    width: 1.4em;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
    display: inline-block;
    opacity: 1;
    transition: opacity 0.30s ease;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.25rem;
        width: 100%;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .hero {
        padding: 3.5rem 1.25rem 3rem;
    }

    .about-section,
    .projects-section,
    .contact-section {
        padding: 3.5rem 1.25rem;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

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

    .projects-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem;
    }
}