/* westaly — personal homepage */
:root {
  --bg: #F2EDE4;
  --bg-soft: #E8E2D5;
  --ink: #0F0F0F;
  --ink-soft: #2A2A2A;
  --muted: #6B665C;
  --line: #1A1A1A;
  --orange: #FF4D1F;
  --blue: #1E40FF;
  --lime: #DFFF1F;
  --paper: #FBF8F1;
  --deep: #0F0F0F;
  --deep-fg: #F2EDE4;
  --deep-line: rgba(255,255,255,0.15);
  --note-shadow: rgba(15,15,15,0.18);
}

[data-theme="dark"] {
  --bg: #14110E;
  --bg-soft: #1E1A15;
  --ink: #F2EDE4;
  --ink-soft: #D9D3C7;
  --muted: #8A857B;
  --line: #2A2620;
  --paper: #1E1A15;
  --deep: #050403;
  --deep-fg: #F2EDE4;
  --deep-line: rgba(255,255,255,0.1);
  --note-shadow: rgba(0,0,0,0.5);
}

html, body, .project, .use-card, .stack-row, .terminal, .nav, .contact-card, .sticky {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.mono { font-family: 'JetBrains Mono', 'Menlo', monospace; }

/* ─── Top nav ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  z-index: 50;
  mix-blend-mode: difference;
  color: #fff;
}
.nav .logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav .logo .dot {
  width: 10px; height: 10px;
  background: var(--orange);
  border-radius: 999px;
  display: inline-block;
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.nav .links {
  display: flex;
  gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.nav .links a {
  position: relative;
  padding: 4px 0;
}
.nav .links a::before {
  content: "0" attr(data-i);
  margin-right: 6px;
  opacity: 0.4;
}
.nav .links a:hover { color: var(--lime); }

.nav .status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.nav .status .pulse {
  width: 8px; height: 8px;
  background: #18C964;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(24,201,100,0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(24,201,100,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,201,100,0); }
}

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  position: relative;
  padding: 120px 40px 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 40px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-meta .right { display: flex; gap: 24px; }

.hero h1 {
  font-size: clamp(80px, 18vw, 280px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin-bottom: 32px;
  position: relative;
}
.hero h1 .accent {
  color: var(--orange);
  font-style: italic;
  font-weight: 500;
}
.hero h1 .slash {
  display: inline-block;
  color: var(--blue);
  transform: translateY(-0.05em);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  padding-top: 24px;
  border-top: 1.5px solid var(--ink);
}

.tagline {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  min-height: 2.5em;
}
.tagline .cursor {
  display: inline-block;
  width: 0.55ch;
  background: var(--ink);
  height: 1em;
  vertical-align: -0.1em;
  margin-left: 2px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.tagline .chip {
  display: inline-block;
  padding: 2px 10px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65em;
  vertical-align: 0.18em;
  margin: 0 2px;
}

.hero-side {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.hero-side .label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin-bottom: 8px;
}
.hero-side p + .label { margin-top: 16px; }

/* floating sticker blobs */
.sticker {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}
.sticker.s1 { top: 18%; right: 8%; background: var(--lime); transform: rotate(-6deg); }
.sticker.s2 { top: 30%; left: 6%; background: var(--orange); color: #fff; transform: rotate(4deg); }
.sticker.s3 { top: 52%; right: 18%; background: var(--blue); color: #fff; transform: rotate(-3deg); }
.sticker.s4 { top: 12%; left: 35%; background: var(--paper); transform: rotate(2deg); }

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-cue .bar {
  width: 1.5px;
  height: 36px;
  background: var(--ink);
  animation: drop 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes drop {
  0% { transform: scaleY(0); }
  40% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Section shell ────────────────────────────────────────── */
section.block {
  padding: 120px 40px;
  position: relative;
}
.block-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--ink);
}
.block-head .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--orange);
}
.block-head h2 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.block-head .desc {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
  text-align: right;
}

/* ─── Terminal ─────────────────────────────────────────────── */
.terminal-block { background: var(--deep); color: var(--deep-fg); }
.terminal-block .block-head { border-color: var(--deep-line); }
.terminal-block .block-head h2 { color: var(--deep-fg); }
.terminal-block .block-head .desc { color: rgba(255,255,255,0.5); }
.terminal-block .block-head .num { color: var(--lime); }

.terminal {
  background: #0A0A0A;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  max-width: 1100px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.terminal .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #141414;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.terminal .bar .dot {
  width: 12px; height: 12px;
  border-radius: 999px;
}
.terminal .bar .dot.r { background: #FF5F57; }
.terminal .bar .dot.y { background: #FEBC2E; }
.terminal .bar .dot.g { background: #28C840; }
.terminal .bar .title {
  margin-left: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.terminal .body {
  padding: 24px 28px;
  min-height: 360px;
  max-height: 480px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #E6E6E6;
}
.terminal .body::-webkit-scrollbar { width: 6px; }
.terminal .body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .prompt { color: var(--lime); user-select: none; }
.term-line .you { color: #fff; }
.term-line.muted { color: #999; }
.term-line .ok { color: var(--lime); }
.term-line .warn { color: #FFC44D; }
.term-line .err { color: var(--orange); }
.term-line .key { color: #7BB7FF; }
.term-line .str { color: #FFE599; }

.term-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.term-input-line input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font: inherit;
  caret-color: var(--lime);
}
.term-hint {
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
.term-hint kbd {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  margin: 0 2px;
  color: #fff;
}

/* ─── Projects ─────────────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.project {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 28px;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.project:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 10px 14px 0 0 var(--ink);
}
.project.wide { grid-column: span 7; }
.project.tall { grid-column: span 5; min-height: 460px; }
.project.half { grid-column: span 6; }
.project.full { grid-column: span 12; min-height: 280px; }

.project .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-right: 72px;
  min-height: 24px;
}
.project .meta-row .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  white-space: nowrap;
}
.project .meta-row .live::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--lime);
  border-radius: 999px;
  flex-shrink: 0;
}
.project .meta-row .archived {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--ink);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.project .meta-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.project h3 {
  margin-top: auto;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.project p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 42ch;
}
.project .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project .tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--ink);
}

.project.alt { background: var(--orange); color: #fff; }
.project.alt p, .project.alt .meta-row { color: rgba(255,255,255,0.85); }
.project.alt .tags span { background: rgba(0,0,0,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }
.project.alt .meta-row .live { background: #fff; color: var(--orange); }

.project.dark { background: var(--ink); color: var(--bg); }
.project.dark p { color: rgba(255,255,255,0.7); }
.project.dark .meta-row { color: rgba(255,255,255,0.5); }
.project.dark .tags span { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.25); }
.project.dark .meta-row .live { background: var(--lime); color: var(--ink); }

.project.blue { background: var(--blue); color: #fff; }
.project.blue p { color: rgba(255,255,255,0.85); }
.project.blue .meta-row { color: rgba(255,255,255,0.7); }
.project.blue .tags span { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.35); }

/* Project decorative SVG / shape */
.project .deco {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  opacity: 0.95;
  pointer-events: none;
}
.project .corner-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.project:hover .corner-arrow {
  transform: rotate(-45deg);
  background: var(--lime);
  color: var(--ink);
  border-color: var(--ink);
}

/* ─── Tech stack ───────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.stack-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--ink);
}
.stack-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid rgba(15,15,15,0.1);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: padding 0.2s;
}
.stack-row:hover {
  padding-left: 16px;
}
.stack-row:hover .name { color: var(--orange); }
.stack-row .name { transition: color 0.2s; }
.stack-row .level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 2px;
}
.stack-row .level .b {
  width: 8px; height: 14px;
  background: var(--ink);
  border-radius: 1px;
}
.stack-row .level .b.off { background: rgba(15,15,15,0.15); }

/* Marquee */
.marquee {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  margin: 60px 0 0;
  background: var(--lime);
}
.marquee-track {
  display: inline-flex;
  gap: 40px;
  animation: marquee 30s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 40px; }
.marquee-track .star {
  display: inline-block;
  color: var(--orange);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ─── Career timeline ──────────────────────────────────────── */
.career { position: relative; }
.timeline {
  position: relative;
  margin-left: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 220px;
  top: 0; bottom: 0;
  width: 1.5px;
  background: var(--ink);
}
.tl-row {
  display: grid;
  grid-template-columns: 220px 40px 1fr;
  gap: 0;
  padding: 32px 0;
  border-bottom: 1px dashed rgba(15,15,15,0.15);
  position: relative;
}
.tl-row:first-child { padding-top: 0; }
.tl-row:last-child { border-bottom: none; }
.tl-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tl-year .end {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.tl-dot {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.tl-dot::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--ink);
  z-index: 1;
}
.tl-row.now .tl-dot::before {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255,77,31,0.2);
}
.tl-content {
  padding-left: 32px;
  padding-top: 4px;
}
.tl-content .role {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tl-content .role .now-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tl-content .org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tl-content .summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.tl-content .highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tl-content .highlights span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--ink);
}

/* ─── Uses grid ────────────────────────────────────────────── */
.uses-block { background: var(--paper); }
.uses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.use-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s;
}
.use-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 10px 0 0 var(--ink);
}
.use-card.feature { grid-column: span 2; }
.use-card .img-wrap {
  position: relative;
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1.5px solid var(--ink);
}
.use-card.feature .img-wrap { aspect-ratio: 16 / 7; }
.use-card image-slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-soft) 0px,
      var(--bg-soft) 8px,
      var(--paper) 8px,
      var(--paper) 16px
    );
  --is-border-color: rgba(15,15,15,0.18);
}
.use-card .cat {
  position: absolute;
  top: 12px; left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}
.use-card .info {
  padding: 18px 20px 22px;
}
.use-card .info .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.use-card .info .model {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.use-card .info .note {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ─── Changelog ────────────────────────────────────────────── */
.changelog-block { background: var(--bg); }
.changelog {
  font-family: 'JetBrains Mono', monospace;
  max-width: 900px;
}
.cl-entry {
  display: grid;
  grid-template-columns: 130px 90px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15,15,15,0.1);
  align-items: baseline;
  font-size: 14px;
}
.cl-entry:first-child {
  border-top: 1px solid rgba(15,15,15,0.1);
}
.cl-entry .date {
  color: var(--muted);
  font-size: 12px;
}
.cl-entry .hash {
  color: var(--blue);
  font-weight: 500;
}
.cl-entry .msg {
  color: var(--ink);
  line-height: 1.55;
}
.cl-entry .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 4px;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}
.cl-entry .tag.feat { background: var(--lime); color: var(--ink); }
.cl-entry .tag.fix { background: var(--orange); color: #fff; }
.cl-entry .tag.style { background: var(--blue); color: #fff; }
.cl-entry .tag.chore { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--ink); }
.cl-entry .tag.init { background: var(--ink); color: var(--lime); }
.cl-entry:hover .msg { color: var(--orange); }

.cl-foot {
  margin-top: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 24px;
  align-items: center;
}
.cl-foot .pulse-d {
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 999px;
  display: inline-block;
  animation: blink 1.4s infinite;
}

/* ─── Theme toggle ──────────────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 1.5px solid currentColor;
  margin-right: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(20deg); }
.theme-toggle svg {
  width: 14px; height: 14px;
  position: absolute;
  transition: transform 0.45s cubic-bezier(.5,1.5,.5,1), opacity 0.3s;
}
.theme-toggle .sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* ─── Visitor wall ────────────────────────────────────────── */
.wall-block { background: var(--bg); }
.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}
.sticky {
  position: relative;
  padding: 22px 22px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 6px 8px 0 0 var(--note-shadow);
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s;
  break-inside: avoid;
}
.sticky:nth-child(3n) { transform: rotate(-1.2deg); }
.sticky:nth-child(3n+1) { transform: rotate(0.8deg); }
.sticky:nth-child(3n+2) { transform: rotate(-0.5deg); }
.sticky:hover {
  transform: rotate(0) translateY(-4px);
  box-shadow: 10px 14px 0 0 var(--note-shadow);
  z-index: 2;
}
.sticky.lime { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.sticky.orange { background: var(--orange); color: #fff; border-color: var(--ink); }
.sticky.blue { background: var(--blue); color: #fff; border-color: var(--ink); }
.sticky.dark { background: var(--deep); color: var(--deep-fg); border-color: var(--deep-fg); }
.sticky .pin {
  position: absolute;
  top: -8px;
  left: 16px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: 1px 2px 0 0 rgba(0,0,0,0.2);
}
.sticky.orange .pin { background: var(--lime); }
.sticky.lime .pin { background: var(--blue); }
.sticky.blue .pin { background: var(--lime); }
.sticky.dark .pin { background: var(--orange); border-color: var(--deep-fg); }
.sticky .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.sticky .head .name { font-weight: 700; letter-spacing: -0.01em; }
.sticky .head .ts { opacity: 0.65; font-size: 11px; }
.sticky .msg {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.sticky .reply {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed currentColor;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  opacity: 0.92;
}
.sticky .reply .who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.sticky .reply .who::before {
  content: "";
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 999px;
}
.sticky .reply.loading::after {
  content: " 转场中";
  display: inline-block;
}

.note-form {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 12px;
  padding: 22px;
  border: 1.5px dashed var(--ink);
  border-radius: 10px;
  background: var(--bg-soft);
  margin-bottom: 8px;
  align-items: center;
}
.note-form input, .note-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  resize: none;
  width: 100%;
}
.note-form textarea {
  min-height: 48px;
  font-family: inherit;
}
.note-form input:focus, .note-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 3px 3px 0 0 var(--orange);
}
.note-form button {
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.note-form button:hover { transform: translateY(-2px); background: var(--orange); }
.note-form button:disabled { opacity: 0.4; cursor: not-allowed; }
.note-form .form-hint {
  grid-column: span 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}

/* ─── Boot overlay ────────────────────────────────────────── */
#boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink);
  padding: 40px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#boot.fade {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}
#boot .wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin-bottom: 24px;
  position: relative;
}
#boot .wordmark .l { color: var(--orange); font-style: italic; font-weight: 500; }
#boot .wordmark .slash { color: var(--blue); }
#boot .wordmark .caret {
  display: inline-block;
  width: 0.06em;
  height: 0.7em;
  background: var(--ink);
  vertical-align: -0.1em;
  margin-left: 0.05em;
  animation: caret 0.8s steps(2) infinite;
}
#boot .lines {
  font-size: 13px;
  line-height: 1.85;
  text-align: left;
  min-height: 110px;
  width: min(420px, 90%);
  color: var(--muted);
}
#boot .lines .ok { color: var(--ink); }
#boot .lines .ok::before { content: "✓ "; color: var(--orange); font-weight: 700; }
#boot .progress {
  margin-top: 28px;
  width: min(420px, 90%);
  height: 4px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
#boot .progress::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--ink);
  border-radius: 99px;
  animation: bootbar 1.9s cubic-bezier(.45,.05,.55,1) forwards;
}
@keyframes bootbar {
  0% { width: 0; }
  30% { width: 22%; }
  55% { width: 48%; }
  80% { width: 80%; }
  100% { width: 100%; }
}
#boot .footer-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Contact ─────────────────────────────────────────────── */
.contact {
  background: var(--deep);
  color: var(--deep-fg);
  padding: 120px 40px 60px;
  position: relative;
  overflow: hidden;
}
.contact .big {
  font-size: clamp(64px, 12vw, 200px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.contact .big .accent { color: var(--lime); font-style: italic; font-weight: 500; }
.contact .big .arrow {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  background: var(--orange);
  border-radius: 999px;
  vertical-align: -0.1em;
  margin: 0 0.1em;
  position: relative;
}
.contact .big .arrow::after {
  content: "→";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 0.5em;
  font-weight: 700;
}

.contact-sub {
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1.5px solid rgba(255,255,255,0.15);
}
.contact-card {
  border: 1.5px solid var(--deep-line);
  border-radius: 12px;
  padding: 22px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}
.contact-card:hover {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  transform: translateY(-4px);
}
.contact-card .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 24px;
}
.contact-card .value {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-card .arrow {
  position: absolute;
  top: 22px; right: 22px;
  opacity: 0.5;
  font-size: 14px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--deep-line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* parallax floats */
.float {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav .links { display: none; }
  .hero { padding: 100px 20px 60px; }
  .hero-bottom { grid-template-columns: 1fr; gap: 30px; }
  section.block { padding: 80px 20px; }
  .projects { grid-template-columns: 1fr; }
  .project.wide, .project.tall, .project.half, .project.full { grid-column: span 1; min-height: 320px; }
  .stack-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact { padding: 80px 20px 40px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .block-head { flex-wrap: wrap; }
  .block-head .desc { margin-left: 0; width: 100%; text-align: left; }
  .sticker { display: none; }
  .timeline::before { left: 70px; }
  .tl-row { grid-template-columns: 70px 30px 1fr; padding: 24px 0; }
  .tl-year { font-size: 18px; }
  .tl-year .end { font-size: 11px; }
  .tl-content { padding-left: 16px; }
  .tl-content .role { font-size: 18px; flex-wrap: wrap; }
  .uses-grid { grid-template-columns: 1fr; }
  .use-card.feature { grid-column: span 1; }
  .cl-entry { grid-template-columns: 1fr; gap: 4px; }
  .wall-grid { grid-template-columns: 1fr; }
  .note-form { grid-template-columns: 1fr; grid-column: span 1; }
  .note-form .form-hint { grid-column: span 1; }
  .theme-toggle { width: 30px; height: 30px; margin-right: 8px; }
}
