:root {
    --paper: #F1EEE4;
    --paper-raised: #F7F5EE;
    --ink: #1B1A17;
    --ink-soft: #6B6A62;
    --line: #D9D5C7;
    --frame: #1B1A17;
    --gold: #A8895A;

    --font-display: 'Lora', serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    background-color: #F1EEE4;
    background-image: radial-gradient(#D9D5C7 1px, transparent 1px);
    background-size: 24px 24px;
}

a { color: var(--ink); }

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 40px;
}

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

/* ---------- Top nav ---------- */

.topnav {
    padding: 32px 0;
}

.navwrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 0.01em;
}

.topnav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.topnav a {
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: color 0.15s ease;
}

.topnav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
    padding: 40px 0 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: center;
    gap: 80px;
}

.photo-frame {
    position: relative;
    border: 2px solid var(--frame);
    padding: 12px;
    background: var(--paper-raised);
}

.photo-placeholder {
    display: block;
    width: 100%;
    height: auto;
}

.photo-hint {
    position: absolute;
    bottom: -34px;
    left: 12px;
    margin: 0;
    font-size: 12.5px;
    color: var(--ink-soft);
    font-style: italic;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(44px, 6vw, 64px);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.05;
}

.role {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink-soft);
    margin: 14px 0 32px;
}

.cta-button {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 15px 34px;
    border: 1px solid var(--ink);
    transition: background 0.15s ease, color 0.15s ease;
}

.cta-button:hover {
    background: transparent;
    color: var(--ink);
}

/* ---------- Sections ---------- */

main > section {
    padding: 72px 40px;
    border-top: 1px solid var(--line);
}

.section-label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
    color: var(--gold);
    margin: 0 0 28px;
}

.about .lede {
    font-size: 19px;
    max-width: 700px;
    color: var(--ink-soft);
    font-family: var(--font-display);
    line-height: 1.7;
}

/* ---------- Commit / experience list ---------- */

.commit-log {
    list-style: none;
    margin: 0;
    padding: 0;
}

.commit {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
}

.commit:last-child { border-bottom: none; }

.commit-meta { padding-top: 4px; }

.date {
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.commit-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 21px;
    margin: 0 0 8px;
}

.commit-body p {
    color: var(--ink-soft);
    margin: 0 0 12px;
    max-width: 620px;
}

.muted { color: var(--ink-soft); font-weight: 400; }

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.tags li {
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 4px 10px;
}

/* ---------- Projects ---------- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    padding: 28px;
}

.project-card.placeholder {
    border-style: dashed;
    opacity: 0.7;
}

.build-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.project-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin: 0 0 12px;
}

.project-card p {
    color: var(--ink-soft);
    margin: 0 0 16px;
}

/* ---------- Skills ---------- */

.skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
}

.skill-group h4 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 16px;
    color: var(--ink);
    margin: 0 0 8px;
}

.skill-group p {
    margin: 0;
    color: var(--ink-soft);
}

/* ---------- Education ---------- */

.edu-entry h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 23px;
    margin: 0 0 8px;
}

/* ---------- Contact ---------- */

.contact h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(34px, 5vw, 46px);
    margin: 0 0 28px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    margin-bottom: 32px;
}

.contact-links a {
    text-decoration: none;
    width: fit-content;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.contact-links a:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 32px 40px 44px;
    border-top: 1px solid var(--line);
}

.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .photo-frame { max-width: 280px; margin: 0 auto; }
    .photo-hint { position: static; margin-top: 10px; text-align: center; }
    .navwrap { flex-direction: column; gap: 18px; }
    .topnav ul { flex-wrap: wrap; justify-content: center; gap: 18px; }
    .commit { grid-template-columns: 1fr; gap: 8px; }
    main > section { padding: 56px 24px; }
    .wrap { padding: 0 24px; }
    .site-footer .wrap { flex-direction: column; gap: 6px; text-align: center; }
}