/* ============================================================
   Raymond Wong — Portfolio  ·  "Amber CRT terminal" system
   ============================================================ */

:root {
  /* palette ------------------------------------------------ */
  --bg:           #161513;
  --bg-2:         #1c1b18;
  --surface:      #201f1c;
  --surface-2:    #26241f;
  --border:       rgba(245, 240, 232, 0.085);
  --border-str:   rgba(245, 240, 232, 0.16);
  --text:         #f5f0e8;
  --muted:        #9a938a;
  --faint:        #6b655d;

  /* accent (overridden by tweak) -------------------------- */
  --accent:       #f97316;
  --accent-2:     #fb923c;
  --accent-deep:  #c2410c;
  --accent-rgb:   249, 115, 22;
  --accent-glow:  rgba(var(--accent-rgb), 0.30);

  /* type -------------------------------------------------- */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* layout ------------------------------------------------ */
  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 66px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ---- ambient texture: grain + scanlines ----------------- */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}
/* grain */
body::before {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* scanlines (toggled) */
body::after {
  opacity: 0;
  transition: opacity .4s ease;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.16) 3px,
    rgba(0,0,0,0) 4px
  );
  mix-blend-mode: multiply;
}
html[data-scanlines="on"] body::after { opacity: 1; }

/* ambient accent bloom anchored top */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 78% -8%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    radial-gradient(50vw 40vh at 8% 4%, rgba(var(--accent-rgb), 0.07), transparent 55%);
}

/* ============================================================
   shared primitives
   ============================================================ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.mono { font-family: var(--font-mono); }

.accent { color: var(--accent); }

.cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1.05em;
  margin-left: 2px;
  transform: translateY(0.16em);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* section frame ------------------------------------------- */
section[data-sec] {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 11vh, 132px);
  scroll-margin-top: var(--nav-h);
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.sec-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sec-kicker::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent-glow);
}
.sec-title {
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.04;
}
.sec-rule {
  flex: 1;
  min-width: 60px;
  height: 1px;
  background: linear-gradient(to right, var(--border-str), transparent);
  align-self: center;
}

/* buttons ------------------------------------------------- */
.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  white-space: nowrap;
  border: 1px solid var(--border-str);
  background: rgba(255,255,255,0.015);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s, transform .12s;
}
.btn .pre { color: var(--accent); }
.btn:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb),0.25), 0 8px 30px -12px var(--accent-glow);
  transform: translateY(-1px);
}
.btn.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1206;
  font-weight: 600;
}
.btn.solid .pre { color: #1a1206; }
.btn.solid:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 10px 34px -10px var(--accent-glow);
}

/* window-chrome card -------------------------------------- */
.win {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.8);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 15px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 7px; }
.dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--faint);
  display: block;
}
.dots i:nth-child(1) { background: var(--accent); }
.dots i:nth-child(2) { background: rgba(var(--accent-rgb),0.5); }
.dots i:nth-child(3) { background: rgba(var(--accent-rgb),0.25); }
.win-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.win-name .accent { color: var(--accent); }

/* chips/tags ---------------------------------------------- */
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255,255,255,0.015);
  white-space: nowrap;
}
.tag::before { content: "› "; color: var(--accent); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(22,21,19,0.6);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav[data-stuck="1"] {
  border-bottom-color: var(--border);
  background: rgba(22,21,19,0.82);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.01em;
}
.brand .sigil {
  color: var(--accent);
  font-weight: 700;
}
.brand .blink { color: var(--accent); animation: blink 1.05s steps(1) infinite; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  padding: 9px 13px;
  position: relative;
  transition: color .2s;
}
.nav-links a .idx { color: var(--accent); opacity: .6; margin-right: 5px; font-size: 11px; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.nav-cta { display: inline-flex; }
.nav-cta .btn { padding: 9px 15px; font-size: 13px; }

.nav-burger {
  display: none;
  font-family: var(--font-mono);
  font-size: 20px;
  background: none;
  border: 1px solid var(--border-str);
  color: var(--text);
  width: 40px; height: 40px;
  cursor: pointer;
  border-radius: 6px;
}

@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(22,21,19,0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 18px;
    gap: 2px;
  }
  .nav-links.open a { padding: 12px 4px; }
}

/* ============================================================
   HERO  (3 treatments, toggled by html[data-hero])
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  padding-bottom: 40px;
}
.hero-variant { display: none; width: 100%; }
html[data-hero="boot"]  .hero-variant.v-boot  { display: block; }
html[data-hero="type"]  .hero-variant.v-type  { display: block; }
html[data-hero="split"] .hero-variant.v-split { display: grid; }

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5fd38a;
  box-shadow: 0 0 0 0 rgba(95,211,138,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95,211,138,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(95,211,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(95,211,138,0); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}
.hero-socials {
  display: flex;
  gap: 22px;
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.hero-socials a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.hero-socials a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* -- variant: big type ------------------------------------ */
.v-type .eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 18px;
}
.v-type h1 {
  font-size: clamp(46px, 9vw, 116px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.94;
  margin: 0 0 18px;
}
.v-type h1 .ln2 { color: var(--muted); }
.v-type .role {
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.4vw, 24px);
  color: var(--text);
  min-height: 1.4em;
}
.v-type .role .scramble { color: var(--accent); }
.v-type .blurb {
  margin-top: 26px;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 18px);
}

/* -- variant: terminal boot ------------------------------- */
.v-boot { max-width: 860px; margin: 0 auto; }
.v-boot .term { min-height: 340px; }
.v-boot .term-body {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.95;
  padding: 26px 26px 30px;
}
.boot-line { white-space: pre-wrap; word-break: break-word; }
.boot-line .prompt { color: var(--accent); }
.boot-line .path { color: var(--accent-2); }
.boot-line .out { color: var(--text); }
.boot-line.big .out {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-block;
  margin: 4px 0;
}
.boot-line .comment { color: var(--faint); }

/* -- variant: split readout ------------------------------- */
.v-split {
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
}
.v-split .lead .eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 16px;
}
.v-split h1 {
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 16px;
}
.v-split .role {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 20px);
  color: var(--muted);
}
.v-split .role .scramble { color: var(--accent); }
.readout .term-body {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 20px 22px 22px;
}
.readout .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.readout .row:last-child { border-bottom: none; }
.readout .k { color: var(--faint); }
.readout .v { color: var(--text); text-align: right; }
.readout .v.ok { color: #5fd38a; }
.readout .v.accent { color: var(--accent); }
.readout .bars { margin-top: 14px; }
.readout .barline { color: var(--accent); letter-spacing: 1px; }

@media (max-width: 820px) {
  html[data-hero="split"] .hero-variant.v-split { grid-template-columns: 1fr; }
  .v-split .readout { order: -1; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.about-body p {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.72;
  color: #ddd6cc;
  margin: 0 0 22px;
  max-width: 60ch;
  text-wrap: pretty;
}
.about-body p .accent { font-weight: 500; }
.about-body strong { color: var(--text); font-weight: 600; }
.about-facts .win-bar .win-name { color: var(--muted); }
.about-facts .term-body {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 18px 20px;
  line-height: 1.5;
}
.about-facts .fact {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.about-facts .fact:last-child { border-bottom: none; }
.about-facts .fact .k { color: var(--faint); }
.about-facts .fact .v { color: var(--text); text-align: right; }
.about-facts .fact .v.ok { color: #5fd38a; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skill-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 22px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 22px 24px;
  transition: border-color .25s, transform .25s;
}
.skill-card:hover { border-color: var(--border-str); transform: translateY(-2px); }
.skill-card h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.skill-card h3::before { content: "▸"; opacity: .7; }
.meter { margin-bottom: 16px; }
.meter:last-child { margin-bottom: 0; }
.meter-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 7px;
}
.meter-top .lvl { color: var(--faint); }
.meter-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}
.skill-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.5;
}
.skill-note .accent { color: var(--accent); }
.skill-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects { display: flex; flex-direction: column; gap: 26px; }

.proj.feature .win-body {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
}
.proj .win-body { padding: 0; }
.proj-main { padding: 30px 32px 32px; }
.proj-side {
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  padding: 26px 28px;
  font-family: var(--font-mono);
}
.proj h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.proj .proj-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 18px;
}
.proj p {
  color: #cfc8bd;
  margin: 0 0 18px;
  max-width: 60ch;
  line-height: 1.68;
  text-wrap: pretty;
}
.proj .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.proj-links { display: flex; gap: 12px; flex-wrap: wrap; }
.proj-links .btn { padding: 10px 16px; font-size: 13px; }

.proj-side .side-h {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.proj-side ul { list-style: none; margin: 0 0 20px; padding: 0; }
.proj-side li {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  display: flex;
  gap: 9px;
  line-height: 1.45;
}
.proj-side li::before { content: "+"; color: var(--accent); }
.proj-side .metric { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; }
.proj-side .metric .num { color: var(--accent); font-size: 20px; font-weight: 600; }
.proj-side .metric .lbl { color: var(--faint); font-size: 12px; }

/* placeholder project slot */
.proj.slot .win-body {
  padding: 30px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.proj.slot .plus {
  width: 46px; height: 46px;
  border: 1px dashed var(--border-str);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 24px;
  flex-shrink: 0;
}
.proj.slot .slot-txt b { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; }
.proj.slot .slot-txt span { font-size: 13px; color: var(--faint); }
.proj.slot { opacity: .85; }

@media (max-width: 760px) {
  .proj.feature .win-body { grid-template-columns: 1fr; }
  .proj-side { border-left: none; border-top: 1px solid var(--border); }
}

/* ============================================================
   EXPERIENCE / EDUCATION (timeline)
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 64px);
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.tl-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.tl-label::before { content: ""; width: 7px; height: 7px; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }

.timeline {
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--border-str), var(--border), transparent);
}
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -26px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 12px var(--accent-glow);
}
.tl-when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
  margin-bottom: 5px;
}
.tl-role { font-size: 19px; font-weight: 600; margin: 0 0 3px; letter-spacing: -0.01em; }
.tl-org { font-family: var(--font-mono); font-size: 13.5px; color: var(--accent); margin-bottom: 10px; }
.tl-desc { color: var(--muted); font-size: 15.5px; line-height: 1.62; max-width: 46ch; text-wrap: pretty; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tl-item.placeholder .tl-role { color: var(--muted); }
.tl-item.placeholder::before { border-style: dashed; background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 16px;
}
.edu-card .tl-when { margin-bottom: 8px; }
.edu-honor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 14px;
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 5px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-card { max-width: 860px; margin: 0 auto; }
.contact-card .term-body {
  padding: clamp(30px, 5vw, 52px);
  text-align: center;
}
.contact-card .prompt-line {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
}
.contact-card h2 {
  font-size: clamp(28px, 4.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  line-height: 1.05;
}
.contact-card p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 32px;
  font-size: 17px;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  justify-content: center;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.contact-links a { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; transition: color .2s; }
.contact-links a:hover { color: var(--accent); }
.contact-links a .k { color: var(--faint); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.foot .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--faint);
}
.foot .left .accent { color: var(--accent); }
.foot a { color: var(--muted); transition: color .2s; }
.foot a:hover { color: var(--accent); }
.foot .totop {
  border: 1px solid var(--border-str);
  padding: 8px 13px;
  border-radius: 6px;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}
.foot .totop:hover { border-color: var(--accent); color: var(--accent); }

/* reveal on scroll ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
