/* ---------- Theme ---------- */
:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface-2: #1e1e24;
  --line: #2a2a31;
  --text: #ececf1;
  --muted: #9a9aa6;
  --accent: #c9b8ff;      /* soft lavender — change this one value to re-color the site */
  --radius: 14px;
  --max: 1080px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img, iframe, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.logo { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); font-size: .92rem;
  padding: 6px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav a.ext::after { content: " ↗"; color: var(--accent); }

@media (max-width: 640px) {
  .site-header .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; }
  .nav { margin-left: -12px; }
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent);
}
h1, h2, h3 { font-weight: 400; line-height: 1.1; }
h1 { font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 5.5rem); letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 2.8rem); }
h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 600; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */
.hero { padding-block: 120px 80px; }
.hero h1 { margin: 14px 0 22px; }
.hero { position: relative; isolation: isolate; }
.hero > :not(.hero-canvas) { position: relative; }
.hero-canvas {
  position: absolute; z-index: -1; top: -64px; bottom: 0;
  left: 50%; width: 100vw; height: calc(100% + 64px); transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
          mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
body { overflow-x: clip; }

/* hero headline: slow shimmer on the italic line */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 em {
    background: linear-gradient(90deg, var(--muted) 0%, var(--text) 45%, var(--accent) 50%, var(--text) 55%, var(--muted) 100%);
    background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shimmer 9s ease-in-out infinite;
  }
  @keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
}

/* card spotlight that follows the cursor */
.card, .stats > div { position: relative; overflow: hidden; }
.card::before, .stats > div::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.card:hover::before, .stats > div:hover::before { opacity: 1; }
.card > *, .stats > div > * { position: relative; }
.page-head { padding-block: 88px 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 12px 0 16px; }
.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); font-size: .95rem;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
@media (max-width: 480px) { .grid.two { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s, transform .25s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card .num { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card .more { margin-top: auto; padding-top: 10px; font-size: .9rem; color: var(--text); }
.card .more::after { content: " →"; color: var(--accent); }
a.card.ext .more::after { content: " ↗"; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .75rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

.haiku { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.45; color: var(--muted); }
.card .haiku { font-size: 1.1rem; }
.section > .haiku { font-size: 1.3rem; }

.section-haiku { font-size: 1.3rem; margin: -8px 0 28px; }
.meme { color: var(--muted); font-size: .95rem; }

/* ---------- Media ---------- */
.media {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.media iframe, .media video, .media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.media.square { aspect-ratio: 1; }
.media.tall { aspect-ratio: 3 / 4; }
.placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: .85rem; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface) 12px 24px);
}
.media-item { display: flex; flex-direction: column; gap: 12px; }
.media-item .caption h3 { margin-bottom: 2px; }
.media-item .caption p { color: var(--muted); font-size: .92rem; }

.photos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

iframe.spotify { width: 100%; height: 352px; border: 0; border-radius: var(--radius); background: var(--surface); }

/* ---------- List rows (performances, etc.) ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.row .date { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.row .where { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Experience timeline ---------- */
.xp { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.xp:last-child { border-bottom: 1px solid var(--line); }
.xp-when { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.xp h3 { font-size: 1.15rem; }
.xp-org { color: var(--accent); font-size: .92rem; margin: 2px 0 8px; }
.xp-summary { color: var(--text); margin-bottom: 10px; max-width: 70ch; }
.xp .tags { margin-top: 12px; }
.xp ul { margin-left: 18px; color: var(--muted); font-size: .95rem; display: grid; gap: 4px; max-width: 70ch; }
@media (max-width: 560px) { .xp { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-bottom: 28px; }
.stats > div { display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.stat { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--text); }
.stats .muted { font-size: .88rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.socials { display: flex; gap: 18px; flex-wrap: wrap; }
.socials a:hover { color: var(--text); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade .7s ease both; }
  .fade.d1 { animation-delay: .08s; } .fade.d2 { animation-delay: .16s; } .fade.d3 { animation-delay: .24s; }
  @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Home polish ---------- */
.quick-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; font-size: .9rem; color: var(--muted); }
.quick-links a { color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.quick-links a:hover { color: var(--text); border-color: var(--accent); }
.quick-links span { opacity: .5; }

/* hanko-style seal on cards, echoing the HaikuSDL site */
.card .seal {
  position: absolute; right: 18px; bottom: 18px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 6px;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif; font-size: 15px; line-height: 1;
  color: var(--bg); background: var(--accent); opacity: .85;
  transform: rotate(-6deg); transition: transform .3s, opacity .3s;
}
.card:hover .seal { transform: rotate(0) scale(1.1); opacity: 1; }
.card .num { font-size: 1.4rem; }

.now .row { grid-template-columns: 120px 1fr auto; }
.now .where { color: var(--muted); transition: color .2s; }
.now .where:hover { color: var(--accent); }

/* =====================================================================
   INDUSTRIAL / SCI-FI LAYER: overrides the base theme above
   ===================================================================== */
:root {
  --bg: #0a0b0c;
  --surface: #0f1113;
  --surface-2: #15181b;
  --line: #23272b;
  --text: #e4e6e8;
  --muted: #858b91;
  --accent: #ff8a1f;            /* signal orange */
  --radius: 2px;
  --serif: "Space Grotesk", "Inter", system-ui, sans-serif;   /* display face */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  background-attachment: fixed;
}
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h1 em, h1 em.muted { font-style: normal; font-weight: 400; }

/* mono system labels */
.eyebrow, .num, .tag, .xp-when, .row .date, .quick-links, .nav a, .btn, .more,
.section-title .muted, .site-footer, .stats .muted {
  font-family: var(--mono); letter-spacing: .04em;
}
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; }
.eyebrow::before { content: "▍"; color: var(--accent); margin-right: .5em; }
.nav a { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; border-radius: 2px; }
.nav a[aria-current="page"] { background: transparent; color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
.logo { font-family: var(--mono); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.logo::before { content: "◤ "; color: var(--accent); }

/* buttons: square, mono, uppercase */
.btn { border-radius: 2px; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; padding: 12px 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0a0b0c; }
.btn.primary:hover { background: var(--text); border-color: var(--text); }

/* cards: hairlines + corner brackets */
.card, .stats > div, .media, iframe.spotify {
  border-radius: 2px;
  background-color: rgba(15,17,19,.82);
}
.card {
  background-image:
    linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 10px 1px, 1px 10px, 10px 1px, 1px 10px;
  background-position: top left, top left, bottom right, bottom right;
}
a.card:hover { transform: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.card .num { font-size: .72rem; color: var(--accent); }
.card .num::before { content: "// "; color: var(--muted); }
.card h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: 1.35rem; }
.more { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.card .more::after { content: " →"; }
a.card.ext .more::after { content: " ↗"; }

/* system code tag in the corner (replaces the kanji seal on this site) */
.card .seal {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; width: auto; height: auto;
  padding: 3px 6px; border-radius: 0; transform: none; opacity: .9;
  color: var(--accent); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}
.card:hover .seal { transform: none; background: var(--accent); color: #0a0b0c; }

/* haiku as terminal readout */
.haiku, .card .haiku, .section-haiku {
  font-family: var(--mono); font-style: normal; font-size: .82rem; line-height: 1.7; color: var(--muted);
}
.section-haiku { font-size: .9rem; border-left: 1px solid var(--accent); padding-left: 14px; }

.tag { border-radius: 2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.section-title h2::before { content: "■ "; color: var(--accent); font-size: .5em; vertical-align: middle; }
.rows .row .date { color: var(--accent); text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; }
.stat { font-family: var(--mono); font-size: 1.7rem; }
.xp-org { color: var(--accent); font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; }
.hero h1 em {
  background: linear-gradient(90deg, var(--muted) 0%, var(--text) 45%, var(--accent) 50%, var(--text) 55%, var(--muted) 100%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text;
}
.card::before, .stats > div::before {
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.site-footer { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.section-title h2::before { content: ""; display: inline-block; width: .32em; height: .32em; background: var(--accent); margin-right: .45em; vertical-align: .22em; }
