/* ─────────────────────────────────────────────────────────────────────────────
   Personal site — design tokens, extended for dual-theme.
───────────────────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap");

/* Inter optical sizes */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter_18pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/Inter_18pt-Italic.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter_18pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter_18pt-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter 24pt"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter_24pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter 24pt"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter_24pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter 24pt"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter_24pt-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter 28pt"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter_28pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter 28pt"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter_28pt-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter 28pt"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter_28pt-Bold.ttf") format("truetype"); }

/* ── Theme tokens ─────────────────────────────────────────────────────────── */
:root,
[data-theme="dark"] {
    --surface-base:         #181818;
    --surface-raised:       #202020;
    --surface-island:       #272727;
    --surface-inset:        #141414;
    --surface-hover:        #2e2e2e;
    --surface-hover-raised: #383838;
    --surface-active:       #1b3260;

    --border:         #2e2e2e;
    --border-strong:  #484848;
    --border-hover:   #646464;

    --text-primary:   #e4e4e4;
    --text-secondary: #8e8e8e;
    --text-muted:     #585858;

    --accent:         #5b9cf5;
    --accent-hover:   #78aff7;
    --accent-active:  #4a88e0;
    --accent-muted:   rgba(91, 156, 245, 0.13);
    --accent-soft:    rgba(91, 156, 245, 0.08);

    --shadow-panel: 0 1px 3px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15);
    --shadow-card-hover: 0 4px 24px rgba(91,156,245,0.10);
    --scrim: rgba(0,0,0,0.55);
}

[data-theme="light"] {
    /* Inverted pure cool neutrals — reads like Xcode's light theme */
    --surface-base:         #f5f5f7;
    --surface-raised:       #ffffff;
    --surface-island:       #ffffff;
    --surface-inset:        #f0f0f2;
    --surface-hover:        #ebebed;
    --surface-hover-raised: #e0e0e4;
    --surface-active:       #e8f0fe;

    --border:         #e5e5e8;
    --border-strong:  #c8c8cc;
    --border-hover:   #a0a0a6;

    --text-primary:   #1a1a1c;
    --text-secondary: #6b6b72;
    --text-muted:     #9a9aa0;

    --accent:         #3b82e8;
    --accent-hover:   #2f6fcc;
    --accent-active:  #1e5cb8;
    --accent-muted:   rgba(59, 130, 232, 0.10);
    --accent-soft:    rgba(59, 130, 232, 0.05);

    --shadow-panel: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
    --shadow-card-hover: 0 4px 24px rgba(59,130,232,0.08);
    --scrim: rgba(20,20,22,0.35);
}

:root {
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 999px;

    --font-ui:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-ui-title:   "Inter 24pt", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ui-display: "Inter 28pt", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:       "JetBrains Mono", ui-monospace, monospace;

    --ease: 0.18s cubic-bezier(.2,.7,.2,1);
    --ease-fast: 0.12s ease;

    --maxw: 1080px;
    --gutter: clamp(20px, 5vw, 48px);
}

/* ── Ambient background ───────────────────────────────────────────────────── */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--surface-base);
    transition: background-color var(--ease);
}
.ambient__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}
[data-theme="dark"] .ambient__blob--1 {
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(91,156,245,0.28), rgba(91,156,245,0) 70%);
    top: -180px; left: -120px;
    animation: drift-a 26s ease-in-out infinite alternate;
}
[data-theme="dark"] .ambient__blob--2 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(130,90,220,0.18), rgba(130,90,220,0) 70%);
    bottom: -160px; right: -100px;
    animation: drift-b 32s ease-in-out infinite alternate;
}
[data-theme="dark"] .ambient__blob--3 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(91,156,245,0.12), rgba(91,156,245,0) 70%);
    top: 40%; left: 55%;
    animation: drift-c 38s ease-in-out infinite alternate;
}
[data-theme="light"] .ambient__blob--1 {
    width: 680px; height: 680px;
    background: radial-gradient(circle, rgba(59,130,232,0.22), rgba(59,130,232,0) 70%);
    top: -220px; left: -140px;
    animation: drift-a 26s ease-in-out infinite alternate;
}
[data-theme="light"] .ambient__blob--2 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(180,140,255,0.16), rgba(180,140,255,0) 70%);
    bottom: -180px; right: -120px;
    animation: drift-b 32s ease-in-out infinite alternate;
}
[data-theme="light"] .ambient__blob--3 {
    width: 440px; height: 440px;
    background: radial-gradient(circle, rgba(80,200,200,0.14), rgba(80,200,200,0) 70%);
    top: 45%; left: 55%;
    animation: drift-c 38s ease-in-out infinite alternate;
}
/* Fine grain texture on top */
.ambient__grain {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--text-muted) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

@keyframes drift-a {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, 80px) scale(1.08); }
    100% { transform: translate(120px, 30px) scale(0.95); }
}
@keyframes drift-b {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-80px, -50px) scale(0.92); }
    100% { transform: translate(-40px, -100px) scale(1.1); }
}
@keyframes drift-c {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-70px, 50px) scale(1.1); }
    100% { transform: translate(50px, -40px) scale(0.9); }
}
@media (prefers-reduced-motion: reduce) {
    .ambient__blob { animation: none !important; }
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

body {
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: color var(--ease);
    min-height: 100vh;
    position: relative;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-muted); color: var(--text-primary); }

/* ── Layout shell ─────────────────────────────────────────────────────────── */
.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklab, var(--surface-base) 10%, transparent);
    backdrop-filter: saturate(1.8) blur(24px);
    -webkit-backdrop-filter: saturate(1.8) blur(24px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--ease), background var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--border); }

.topbar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px var(--gutter);
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-ui-title);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    transition: opacity var(--ease);
}
.brand:hover { opacity: 0.75; }
.brand__mark {
    width: 24px; height: 24px;
    border-radius: 6px;
    display: grid; place-items: center;
    background: var(--surface-island);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: var(--radius-md);
    transition: color var(--ease), background var(--ease);
}
.nav a:hover { color: var(--text-primary); background: var(--surface-hover); }
.nav a.is-active { color: var(--text-primary); }

.theme-toggle {
    width: 32px; height: 32px;
    margin-left: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text-secondary);
    display: grid; place-items: center;
    transition: all var(--ease);
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-hover); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ── Page / main ──────────────────────────────────────────────────────────── */
main {
    flex: 1;
    padding: 0 var(--gutter);
}
.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 80px 0 120px;
    animation: page-enter 0.32s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes page-enter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Hero (home) ──────────────────────────────────────────────────────────── */
.hero {
    padding: 72px 0 32px;
}
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px 10px 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    margin-bottom: 28px;
    background: color-mix(in oklab, var(--surface-raised) 75%, transparent);
    backdrop-filter: blur(10px);
}
.hero__eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-muted);
    animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent-muted); opacity: 1; }
    50%      { box-shadow: 0 0 0 8px transparent; opacity: 0.7; }
}
.hero__title {
    font-family: var(--font-ui-display);
    font-weight: 600;
    font-size: clamp(42px, 6.4vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 24px;
    color: var(--text-primary);
    text-wrap: balance;
}
.hero__title em {
    font-style: normal;
    background: linear-gradient(92deg, var(--text-secondary), var(--accent) 50%, var(--text-secondary));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shimmer 8s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: 100% 50%; }
    50%      { background-position: 0% 50%; }
}
.hero__sub {
    font-size: clamp(17px, 1.8vw, 19px);
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 0 40px;
    text-wrap: pretty;
}
.hero__ctas {
    display: flex; gap: 10px; flex-wrap: wrap;
}

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-primary);
    transition: all var(--ease);
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.btn:active { background: var(--surface-hover-raised); }
.btn--accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
[data-theme="light"] .btn--accent { color: #fff; }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--accent:active { background: var(--accent-active); border-color: var(--accent-active); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn--ghost:hover { color: var(--text-primary); background: var(--surface-hover); }
.btn .arrow { transition: transform var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }

/* ── Section header ───────────────────────────────────────────────────────── */
.section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}
.section:first-of-type { border-top: 0; }
.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 24px;
}
.section__eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.section__title {
    font-family: var(--font-ui-display);
    font-weight: 600;
    font-size: clamp(28px, 3.2vw, 36px);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0;
    color: var(--text-primary);
}
.section__link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex; align-items: center; gap: 6px;
    transition: color var(--ease);
    white-space: nowrap;
}
.section__link:hover { color: var(--accent); }
.section__link .arrow { transition: transform var(--ease); }
.section__link:hover .arrow { transform: translateX(2px); }

/* ── Project cards ────────────────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.project-card {
    position: relative;
    display: flex; flex-direction: column;
    background: color-mix(in oklab, var(--surface-island) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0;
    overflow: hidden;
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
    min-height: 320px;
    cursor: pointer;
}
.project-card::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--accent-muted), transparent 40%);
    opacity: 0;
    transition: opacity var(--ease);
    pointer-events: none;
    z-index: 1;
}
.project-card:hover::before { opacity: 1; }
.project-card > * { position: relative; z-index: 2; }
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.project-card__art {
    height: 160px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--surface-inset);
}
.project-card:hover .art__glyph { transform: scale(1.06); }
.art__glyph { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.project-card__body {
    padding: 18px 20px 20px;
    display: flex; flex-direction: column;
    flex: 1;
}
.project-card__tags {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 10px;
}
.tag {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-hover);
    transition: all var(--ease-fast);
}
.tag.is-accent {
    background: var(--accent-muted);
    color: var(--accent);
}
.project-card__title {
    font-family: var(--font-ui-title);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}
.project-card__desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    text-wrap: pretty;
}
.project-card__meta {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.project-card__meta .year { letter-spacing: 0.02em; }

/* ── Writing list ─────────────────────────────────────────────────────────── */
.writing-list {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--border);
}
.writing-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 24px;
    align-items: baseline;
    padding: 20px 4px;
    border-bottom: 1px solid var(--border);
    transition: background var(--ease-fast);
    cursor: pointer;
    position: relative;
}
.writing-row:hover { background: var(--surface-raised); }
.writing-row:hover .writing-row__title { color: var(--accent); }
.writing-row__date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.writing-row__title {
    font-family: var(--font-ui-title);
    font-size: 16.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 4px;
    transition: color var(--ease-fast);
    line-height: 1.35;
}
.writing-row__excerpt {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    text-wrap: pretty;
}
.writing-row__meta {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .writing-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .writing-row__meta { display: none; }
}

/* ── Filters ──────────────────────────────────────────────────────────────── */
.filters {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-bottom: 32px;
    padding: 6px;
    background: color-mix(in oklab, var(--surface-raised) 80%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: fit-content;
}
.filter-chip {
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--ease-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-chip:hover { color: var(--text-primary); background: var(--surface-hover); }
.filter-chip.is-active {
    color: var(--accent);
    background: var(--accent-muted);
}
.filter-chip__count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.filter-chip.is-active .filter-chip__count { color: var(--accent); opacity: 0.7; }

/* ── Blog post reader ─────────────────────────────────────────────────────── */
.post {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 0 120px;
    animation: page-enter 0.32s cubic-bezier(.2,.7,.2,1) both;
}
.post__back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    transition: color var(--ease-fast);
}
.post__back:hover { color: var(--accent); }
.post__meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.post__meta .sep { opacity: 0.5; }
.post__title {
    font-family: var(--font-ui-display);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 20px;
    color: var(--text-primary);
    text-wrap: balance;
}
.post__lede {
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 48px;
    text-wrap: pretty;
}
.post__body {
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--text-primary);
}
.post__body > * + * { margin-top: 1.2em; }
.post__body h2 {
    font-family: var(--font-ui-title);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 2em;
    margin-bottom: 0.4em;
    color: var(--text-primary);
}
.post__body h3 {
    font-family: var(--font-ui-title);
    font-size: 17px;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.3em;
}
.post__body a { color: var(--accent); border-bottom: 1px solid var(--accent-muted); transition: border-color var(--ease-fast); }
.post__body a:hover { border-color: var(--accent); }
.post__body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
}
.post__body pre {
    font-family: var(--font-mono);
    font-size: 13.5px;
    background: var(--surface-inset);
    border: 1px solid var(--border);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    line-height: 1.6;
}
.post__body pre code { background: transparent; border: 0; padding: 0; font-size: inherit; }
.post__body blockquote {
    border-left: 2px solid var(--accent);
    padding: 4px 0 4px 18px;
    margin: 1.5em 0;
    color: var(--text-secondary);
    font-style: italic;
}
.post__body ul, .post__body ol { padding-left: 1.4em; }
.post__body li + li { margin-top: 0.4em; }
.post__body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 3em 0;
}

/* ── About ────────────────────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 720px) {
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.about-side {
    position: sticky;
    top: 90px;
}
.about-avatar {
    width: 140px; height: 140px;
    border-radius: 20px;
    background: var(--surface-island);
    border: 1px solid var(--border);
    display: grid; place-items: center;
    font-family: var(--font-ui-display);
    font-size: 56px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}
.about-avatar::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 30%, var(--accent-muted), transparent 60%);
    pointer-events: none;
}
.about-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.about-meta dt {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10.5px;
    margin-top: 12px;
}
.about-meta dt:first-child { margin-top: 0; }
.about-meta dd {
    margin: 2px 0 0;
    color: var(--text-primary);
}
.about-meta a { color: var(--accent); transition: opacity var(--ease-fast); }
.about-meta a:hover { opacity: 0.75; }

.about-main {
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--text-primary);
}
.about-main > * + * { margin-top: 1.1em; }
.about-main h3 {
    font-family: var(--font-ui-title);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 2.4em;
    margin-bottom: 0.6em;
}
.about-main .lede {
    font-family: var(--font-ui-display);
    font-size: 26px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-wrap: pretty;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px var(--gutter);
    margin-top: auto;
}
.footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.footer__links { display: flex; gap: 16px; }
.footer__links a {
    color: var(--text-secondary);
    transition: color var(--ease-fast);
}
.footer__links a:hover { color: var(--text-primary); }
.footer__meta { font-family: var(--font-mono); font-size: 11.5px; }

/* ── Art placeholder for project cards ────────────────────────────────────── */
.art {
    width: 100%; height: 100%;
    position: relative;
}
.art__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, var(--border) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}
.art__glyph {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-family: var(--font-ui-display);
    font-size: 64px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    opacity: 0.9;
}
.art__glyph.mono {
    font-family: var(--font-mono);
    font-size: 48px;
    font-weight: 500;
    letter-spacing: 0;
}
.art__accent {
    position: absolute;
    bottom: 12px; left: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    z-index: 3;
}
.art__motif {
    position: absolute; inset: 0;
    opacity: 0.7;
    transition: opacity var(--ease), transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .art__motif { opacity: 1; transform: scale(1.04); }
.art__motif svg { width: 100%; height: 100%; display: block; }
.art__motif svg line, .art__motif svg path, .art__motif svg circle, .art__motif svg rect {
    stroke: var(--text-secondary);
    fill: none;
}
.art__motif svg .accent { stroke: var(--accent); }
.art__motif svg .accent-fill { fill: var(--accent); stroke: none; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s cubic-bezier(.2,.7,.2,1), transform 0.55s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}
.art--a { background: var(--surface-inset); }
.art--b { background: linear-gradient(135deg, var(--surface-inset), var(--surface-base)); }
.art--c { background: var(--surface-inset); }
.art--c .art__glyph { color: var(--accent); }

/* Subtle halo dot */
.halo-dot {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px var(--accent-muted), 0 0 0 12px var(--accent-soft);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .topbar__inner { gap: 12px; }
    .nav a { padding: 6px 8px; font-size: 13px; }
    .nav a.hide-sm { display: none; }
    .hero { padding: 40px 0 16px; }
    .section { padding: 40px 0; }
    .page { padding: 40px 0 80px; }
    .section__head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
}

/* Utility */
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
