@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500&display=swap');

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

/* ── tokens ── */
:root {
    --bg:         #FFF8F3;  /* warmer cream */
    --bg-card:    #FFFCF9;  /* lighter than bg, cards pop */
    --bg-nav:     #FFF5F0;  /* slightly darker than bg */
    --border:     #D8D2C8;  /* warm grey border */
    --text:       #1A1814;
    --text-muted: #5C5852;
    --text-faint: #8C887F;
    --hover-bg:   #F0EDE8;
}

body.dark {
    --bg:         #141414;
    --bg-card:    #1c1c1c;
    --bg-nav:     #0a0a0a;
    --border:     #2a2a2a;
    --text:       #f0f0f0;
    --text-muted: #aaa;
    --text-faint: #666;
    --hover-bg:   #222;
}

/* ── base ── */
html { background: var(--bg-nav); }
html.dark { background: #0a0a0a; }

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── nav ── */
nav {
    width: 100%;
    background: var(--bg-nav);
    border-bottom: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { font-size: 13px; font-weight: 500; color: var(--text-muted); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.nav-links a:hover,
#theme-toggle:hover { color: var(--text); }

#theme-toggle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 0;
}

/* ── layout ── */
.wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

section { margin-bottom: 3.5rem; scroll-margin-top: 100px; }

hr { border: none; border-top: 0.5px solid var(--border); margin: 3rem 0; }

/* ── type ── */
.label {
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

h1 { font-size: 32px; font-weight: 500; margin-bottom: 0.4rem; }
.sub { font-size: 14px; color: var(--text-muted); }

/* ── cards (shared) ── */
.about-box,
.project,
.contact-line {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 4px;
}

/* ── about ── */
.about-box { padding: 1.25rem; }
.about-text { font-size: 13px; line-height: 1.8; color: var(--text-muted); }

/* ── experience ── */
.exp-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    padding: 0.85rem 1.25rem;
    margin-top: 0.75rem;
}

.exp-role { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 0.2rem; }
.exp-company { font-size: 12px; color: var(--text-muted); }
.exp-period { font-size: 11px; color: var(--text-faint); white-space: nowrap; margin-left: 1rem; }

/* ── projects ── */
.project {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: background 0.15s;
}
.project:last-child { margin-bottom: 0; }
.project:hover { background: var(--hover-bg); }

.project-name { font-size: 13px; font-weight: 500; margin-bottom: 0.25rem; color: var(--text); }
.project-desc { font-size: 12px; color: var(--text-muted); }

.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag {
    font-size: 10px;
    color: var(--text-faint);
    border: 0.5px solid var(--border);
    padding: 2px 7px;
    border-radius: 3px;
}

.project-link {
    font-size: 11px;
    color: var(--text-faint);
    text-decoration: none;
    white-space: nowrap;
    margin-left: 1rem;
    margin-top: 2px;
    transition: color 0.15s;
}
.project-link:hover { color: var(--text); }

/* ── contact ── */
.contact-box { display: flex; flex-direction: column; }

.contact-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 13px;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    border-radius: 0;
    border-bottom: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.contact-line:first-child { border-radius: 4px 4px 0 0; }
.contact-line:last-child { border-bottom: 0.5px solid var(--border); border-radius: 0 0 4px 4px; }
.contact-line:hover { background: var(--hover-bg); }

.contact-key { color: var(--text-faint); min-width: 60px; }
.contact-val { color: var(--text); }

/* ── footer ── */
footer {
    width: 100%;
    background: var(--bg-nav);
    border-top: 0.5px solid var(--border);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left, .footer-right { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-right { text-align: right; }

.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--text); }

/* ── toast ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text);
    color: var(--bg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── no transition ── */
.no-transition * {
    transition: none !important;
}

/* ── nav active ── */
.nav-active { color: var(--text) !important; }

/* ── view all ── */
.view-all {
    display: inline-block;
    margin-top: 1rem;
    font-size: 12px;
    color: var(--text-faint);
    text-decoration: none;
}
.view-all:hover { color: var(--text); }

/* ── project full (projects page) ── */
.project-full {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}
.project-full:last-child { margin-bottom: 0; }

.project-full-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.project-long-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.project-meta-right { display: flex; gap: 6px; }

.meta-pill {
    font-size: 10px;
    color: var(--text-faint);
    border: 0.5px solid var(--border);
    padding: 2px 7px;
    border-radius: 3px;
    text-decoration: none;
}
.meta-pill:hover { color: var(--text); }