/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600&family=Nunito:wght@300;400;500&display=swap');

/* ── Design Tokens ── */
:root {
    --bg:           #f7f5f0;
    --surface:      #ffffff;
    --text:         #1a1a18;
    --text-muted:   #6b6b65;
    --border:       #e2dfd8;
    --accent:       #1a1a18;
    --accent-warm:  #c4773a;
    --max-w:        760px;
    --font-display: 'Raleway', system-ui, sans-serif;
    --font-body:    'Nunito', system-ui, sans-serif;
}

[data-theme="dark"] {
    --bg:           #141412;
    --surface:      #1c1c1a;
    --text:         #edebe6;
    --text-muted:   #7a7870;
    --border:       #2e2d2a;
    --accent:       #edebe6;
    --accent-warm:  #d4884a;
}

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

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Typography ── */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
}

h3 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
}

p:last-child { margin-bottom: 0; }

strong {
    color: var(--text);
    font-weight: 500;
}

/* ── Layout ── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg);
    transition: background-color 0.3s ease;
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-link {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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

#theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

#theme-toggle:hover {
    border-color: var(--text-muted);
    color: var(--text);
    background-color: var(--surface);
}

#sun-icon { display: none; }
[data-theme="dark"] #moon-icon { display: none; }
[data-theme="dark"] #sun-icon { display: block; }

/* ── Sections ── */
.section {
    padding: 96px 0;
    border-bottom: 1px solid var(--border);
}

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

/* ── Section label ── */
.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-warm);
    margin-bottom: 1.75rem;
}

/* ── List ── */
ul {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

li {
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.975rem;
    color: var(--text-muted);
    line-height: 1.7;
}

li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 1px;
    background-color: var(--accent-warm);
}

/* ── Project Grid ── */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background-color: var(--border);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2rem;
}

.card {
    background-color: var(--surface);
    padding: 2rem;
    transition: background-color 0.2s ease;
}

.card:hover {
    background-color: var(--bg);
}

.card p {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ── Form ── */
.form-group { margin-bottom: 1.5rem; }

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

textarea { resize: vertical; min-height: 120px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--text);
    color: var(--bg);
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.2s ease, transform 0.1s ease;
    margin-top: 0.5rem;
}

.btn:hover { opacity: 0.75; }
.btn:active { transform: scale(0.98); }

/* ── Mobile ── */
@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
    .section { padding: 64px 0; }
    h1 { font-size: 2.2rem; }
}