/* ──────────────────────────────────────────
   Lucas Barnes — lucasbarnes.cc
   Minimal, Apple-inspired single-page site
   ────────────────────────────────────────── */

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

/* ── Tokens ── */
:root {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --border: #e5e5e5;
    --link-hover: #000000;
    --toggle-bg: transparent;
    --toggle-border: #d4d4d4;
    --toggle-text: #666666;
    --blockquote-border: #d4d4d4;
    --blockquote-text: #555555;
}

html.dark {
    --bg: #111111;
    --text: #e5e5e5;
    --text-secondary: #999999;
    --border: #262626;
    --link-hover: #ffffff;
    --toggle-bg: transparent;
    --toggle-border: #333333;
    --toggle-text: #999999;
    --blockquote-border: #333333;
    --blockquote-text: #aaaaaa;
}

/* ── Base ── */
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg);
    transition: background-color 0.3s ease;
    padding: 48px 0 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ── Avatar ── */
.header-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Theme Toggle ── */
#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--toggle-border);
    border-radius: 50%;
    background: var(--toggle-bg);
    color: var(--toggle-text);
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

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

/* Show/hide sun and moon */
.icon-moon {
    display: none;
}

html.dark .icon-sun {
    display: none;
}

html.dark .icon-moon {
    display: block;
}

/* ── Main ── */
main {
    padding-bottom: 96px;
}

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

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

/* ── Typography ── */
h2 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

h2:not(:first-child) {
    margin-top: 40px;
}

h3 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 12px;
    margin-top: 32px;
}

h3:first-child,
h2+h3 {
    margin-top: 0;
}

.section-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ── Lists ── */
ul {
    list-style: none;
    padding: 0;
}

li {
    font-size: 0.9375rem;
    padding: 6px 0;
    line-height: 1.5;
}

/* ── Links ── */
a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* Dash separators in list items */
li a {
    font-weight: 500;
}

/* ── Blockquote ── */
blockquote {
    border-left: 2px solid var(--blockquote-border);
    padding-left: 20px;
    margin-top: 12px;
}

blockquote p {
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--blockquote-text);
    margin-bottom: 4px;
}

blockquote cite {
    font-size: 0.8125rem;
    font-style: normal;
    color: var(--text-secondary);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    body {
        padding: 0 20px;
    }

    header {
        padding-top: 32px;
    }

    .avatar {
        width: 54px;
        height: 54px;
    }

    .header-identity {
        gap: 12px;
    }

    header h1 {
        font-size: 1.1rem;
    }

    section {
        padding: 36px 0;
    }

    h2:not(:first-child) {
        margin-top: 32px;
    }

    h3 {
        margin-top: 24px;
    }

    li {
        font-size: 0.875rem;
    }
}

/* ── Selection ── */
::selection {
    background: rgba(0, 0, 0, 0.08);
}

html.dark ::selection {
    background: rgba(255, 255, 255, 0.12);
}

/* ── Scroll ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}