/* =====================================================================
   hawntddev — portfolio design system
   Structural spine: everything reads like a Roblox instance tree.
   Two accents, two jobs: --accent (brand / CTA) and --signal (system /
   interactive feedback — cursor, explorer, terminal). Do not blend them.
   ===================================================================== */
:root {
  --bg: #f7f3ec;
  --bg-2: #efe7d9;
  --surface: #ffffff;
  --surface-2: #f4ede1;
  --border: rgba(35,25,15,.10);
  --border-strong: rgba(35,25,15,.20);
  --text: #17120c;
  --text-soft: #443a2e;
  --muted: #756a5a;
  --dim: #8c8071;

  --accent: #f97316;
  --accent-ink: #b7440a;
  --accent-soft: rgba(249,115,22,.12);
  --accent-ring: rgba(249,115,22,.30);
  --on-accent: #180d04;
  --grad: linear-gradient(135deg, #ffab45 0%, #fb8a1e 48%, #f9700f 100%);

  --signal: #0f9aad;
  --signal-ink: #0c7c8c;
  --signal-soft: rgba(15,154,173,.10);
  --signal-ring: rgba(15,154,173,.35);

  --nav-bg: rgba(247,243,236,.78);
  --menu-bg: rgba(247,243,236,.98);
  --shadow-sm: 0 1px 2px rgba(30,20,10,.05), 0 2px 8px -2px rgba(30,20,10,.08);
  --shadow: 0 1px 2px rgba(30,20,10,.05), 0 20px 44px -18px rgba(30,20,10,.28);
  --backdrop: rgba(20,14,8,.55);

  --code-bg: #16110b;
  --code-border: rgba(255,255,255,.08);
  --code-text: #efe3d3;
  --code-c: #8a7a67;
  --code-k: #ffb066;
  --code-s: #8fe3d0;
  --code-f: #7fd6ff;

  --container: 1160px;
  --nav-h: 64px;
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* one shared motion language — every hand-built interaction uses these */
  --ease: cubic-bezier(.16,.8,.24,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-fast: .18s;
  --dur: .35s;
  --dur-slow: .6s;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  --bg: #0d0f10;
  --bg-2: #101315;
  --surface: #15181a;
  --surface-2: #1b1f22;
  --border: rgba(235,238,240,.08);
  --border-strong: rgba(235,238,240,.16);
  --text: #f2efe9;
  --text-soft: #cfc9bf;
  --muted: #93897c;
  --dim: #6b635a;

  --accent: #ff8a3d;
  --accent-ink: #ffa866;
  --accent-soft: rgba(255,138,61,.14);
  --accent-ring: rgba(255,138,61,.34);
  --on-accent: #180d04;
  --grad: linear-gradient(135deg, #ffb04d 0%, #ff8524 48%, #f96a14 100%);

  --signal: #38d6ea;
  --signal-ink: #5be2f2;
  --signal-soft: rgba(56,214,234,.12);
  --signal-ring: rgba(56,214,234,.34);

  --nav-bg: rgba(13,15,16,.78);
  --menu-bg: rgba(13,15,16,.97);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 22px 48px -18px rgba(0,0,0,.7);
  --backdrop: rgba(4,5,6,.82);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 14px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  cursor: none;
}
::selection { background: var(--accent-ring); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease !important;
}

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-fill { width: 20px; height: 20px; fill: currentColor; stroke: none; flex: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* path-style label used as the section eyebrow everywhere — real Roblox
   instance syntax, doubles as the site's connective tissue */
.path {
  font-family: var(--mono); font-size: 12.5px; color: var(--dim); letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
}
.path b { color: var(--signal-ink); font-weight: 500; }
.path .sep { color: var(--dim); opacity: .5; }

/* ---------- Custom cursor (desktop + fine pointer only) ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 999; pointer-events: none;
  will-change: transform; }
.cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--signal); transition: opacity .15s ease, background-color .2s ease;
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1.5px solid var(--signal); display: grid; place-items: center;
  transition: width .25s var(--ease-spring), height .25s var(--ease-spring),
              margin .25s var(--ease-spring), border-radius .25s var(--ease-spring),
              border-color .2s ease, border-width .2s ease,
              background-color .2s ease, opacity .15s ease;
}
.cursor-ring span {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .04em;
  color: var(--on-accent); opacity: 0; transform: scale(.6);
  transition: opacity .15s ease, transform .2s var(--ease-spring), color .2s ease;
}
html.cursor-active .cursor-dot, html.cursor-active .cursor-ring { opacity: 1; }
.cursor-dot, .cursor-ring { opacity: 0; }
html.cursor-hover .cursor-ring {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50pt; border-width: 2px;
  background: var(--signal-soft); border-color: var(--signal);
}
html.cursor-hover .cursor-dot { opacity: .5; }
html.cursor-hover .cursor-ring span { opacity: .5; transform: scale(1); color: var(--signal-ink); }
html.cursor-drag .cursor-ring { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: var(--accent); border-color: var(--accent); }
html.cursor-drag .cursor-ring span { opacity: 0; transform: scale(1); color: var(--on-accent); }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; };
}
/* ---------- Nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--nav-h);
  background: var(--nav-bg); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border); transition: height .25s var(--ease);
}
.nav-inner { max-width: var(--container); height: 100%; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.logo { font-family: var(--mono); font-weight: 500; font-size: 16.5px; letter-spacing: -.01em; justify-self: start; display: inline-flex; align-items: baseline; }
.logo-suffix { color: var(--accent-ink); }
.nav-links { display: flex; gap: 2px; position: relative; }
.nav-links a {
  position: relative; font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 999px; transition: color .18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent-ink); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-link { display: inline-flex; color: var(--muted); transition: color .15s; }
.icon-link:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--text-soft); }
.menu-btn .ico { width: 22px; height: 22px; }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-ink); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle .ico { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Magnetic wrap (buttons + nav items get this behaviour via JS) ----------
   No CSS transition here on purpose — script.js lerps the transform every
   frame, so a competing CSS transition is what caused the old jumpy/glitchy
   overshoot. Let the JS own the motion entirely. */
[data-magnet] { will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, filter .2s;
}
.btn .ico { transition: transform .2s var(--ease-spring); }
.btn:hover .ico { transform: translateX(3px); }
.btn-primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 14px 30px -10px var(--accent); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 500; }
.btn-outline:hover { border-color: var(--signal); color: var(--signal-ink); background: var(--signal-soft); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 70% at 8% 0%, var(--accent-soft), transparent 62%),
              radial-gradient(38% 60% at 100% 8%, var(--signal-soft), transparent 62%);
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--container); margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 24px clamp(72px, 9vw, 116px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 40px;
}
.hero-copy { opacity: 0; transform: translateY(10px); animation: rise .7s var(--ease) .05s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); line-height: 1.07; letter-spacing: -.035em; font-weight: 700; }
.hero h1 span { display: block; }
.hero h1 .word { display: inline-block; transition: transform .35s var(--ease-spring), color .35s ease; }
.hero h1 .word:hover { color: var(--accent-ink); transform: translateY(-3px); }
.hero p { margin-top: 20px; max-width: 46ch; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { margin-top: 40px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-meta div { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.hero-meta b { display: block; font-family: var(--font); font-size: 15px; font-weight: 650; color: var(--text-soft); margin-bottom: 2px; }

/* ----- The Part Rig: a small cluster of Roblox-style Parts that drift
   and tilt in 3D with the cursor at different depths. Literal to the
   subject (Roblox is built from Parts), not a decorative blob. ----- */
.part-rig {
  position: relative; height: clamp(280px, 34vw, 420px); perspective: 1200px;
}
.part-rig-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(22deg); transition: transform .2s linear;
}
/* each .part is a true 3D box: --w/--h/--d set size, --x/--y/--z place it
   within the rig. Faces are real rotated planes, not a flat illusion. */
.part {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--w); height: var(--h); transform-style: preserve-3d;
  transform: translateZ(var(--z)) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .5s var(--ease-spring);
}
.part-face { position: absolute; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.part-face.front { width: var(--w); height: var(--h); transform: translateZ(calc(var(--d) / 2)); background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.part-face.top { width: var(--w); height: var(--d); top: 0; transform: rotateX(90deg) translateZ(calc(var(--h) / -2)); transform-origin: top; background: var(--surface-2); }
.part-face.right { width: var(--d); height: var(--h); right: 0; transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); transform-origin: right; background: var(--surface-2); filter: brightness(.94); }
.part.accent .part-face { border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong)); }
.part.accent .part-face.front { background: linear-gradient(160deg, var(--accent-soft), var(--surface)); }
.part.signal .part-face { border-color: color-mix(in srgb, var(--signal) 50%, var(--border-strong)); }
.part.signal .part-face.front { background: linear-gradient(160deg, var(--signal-soft), var(--surface)); }
.part-tag {
  position: absolute; left: 0; bottom: -24px; font-family: var(--mono); font-size: 10.5px; color: var(--dim);
  opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease; white-space: nowrap;
  transform-style: flat;
}
.part:hover .part-tag { opacity: 1; transform: none; }
.part:hover { transform: translateZ(calc(var(--z) + 14px)) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--border); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { position: relative; text-align: center; padding: 44px 12px; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: var(--border); }
.stat-num { display: inline-block; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-num::after { content: attr(data-suffix); color: var(--accent-ink); }
.stat-label { margin-top: 8px; font-size: 13.5px; color: var(--muted); font-family: var(--mono); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.page { border-top: 1px solid var(--border); padding: 100px 0; }
#about { background: var(--bg-2); }
#explorer { background: var(--surface); }
.page-title { font-size: clamp(32px, 4.6vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.page-sub { margin-top: 10px; color: var(--muted); font-size: 15.5px; max-width: 54ch; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.link-more { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .15s; }
.link-more:hover { color: var(--signal-ink); }
.link-more .ico { width: 13px; height: 13px; }

/* ---------- Featured cards (tilt on cursor) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transform: perspective(900px);
  transition: border-color .2s ease, box-shadow .3s ease, transform .12s linear;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 2.06 / 1; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); transform: translateZ(0) scale(1.001); }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.card-desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { font-size: 11.5px; font-weight: 500; line-height: 1; padding: 7px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); }
.card .tags { margin-top: auto; padding-top: 10px; }

/* ---------- Open source band ---------- */
.os-band { padding-top: 20px; }
.os-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding-top: 60px; border-top: 1px solid var(--border); }
.os-left { display: flex; align-items: center; gap: 30px; }
.hex { width: 96px; height: auto; flex: none; filter: drop-shadow(0 14px 22px var(--accent-ring)); }
.hex-body { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.hex-top { fill: var(--accent); opacity: .55; }
.hex-left { fill: var(--accent); opacity: .85; }
.hex-right { fill: var(--accent); opacity: 1; }
.os-left h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.os-left p { margin: 8px 0 20px; color: var(--muted); font-size: 14.5px; }
.code-box { position: relative; background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius); padding: 24px 26px 46px; box-shadow: var(--shadow); }
.code-box pre { margin: 0; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--code-text); }
.code-box .c { color: var(--code-c); } .code-box .k { color: var(--code-k); } .code-box .s { color: var(--code-s); } .code-box .f { color: var(--code-f); }
.code-box .lang { position: absolute; right: 20px; bottom: 15px; font-family: var(--mono); font-size: 11.5px; color: var(--code-c); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 38px 0 16px; }
.pill { height: 33px; padding: 0 15px; border-radius: 7px; cursor: pointer; background: transparent; border: 1px solid var(--border-strong); color: var(--text-soft); font-size: 12.5px; font-weight: 500; font-family: var(--mono); transition: background-color .15s, color .15s, border-color .15s; }
.pill:hover { border-color: var(--signal); color: var(--signal-ink); }
.pill.active { background: var(--signal-soft); border-color: var(--signal); color: var(--signal-ink); font-weight: 600; }
.enter { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Project rows — tilt + magnetic arrow ---------- */
.rows { margin-top: 4px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; padding: 26px 0;
  transform: perspective(1000px); transition: transform .12s linear;
}
.row:not([hidden]) ~ .row:not([hidden]) { border-top: 1px solid var(--border); }
.row-img { width: 168px; aspect-ratio: 1.3 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); transition: box-shadow .3s; }
.row-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.row:hover .row-img { box-shadow: var(--shadow); }
.row:hover .row-img img { transform: scale(1.07); }
.row-title { font-size: 17.5px; font-weight: 650; letter-spacing: -.01em; transition: color .2s; }
.row:hover .row-title { color: var(--accent-ink); }
.row-desc { margin-top: 6px; font-size: 13.5px; color: var(--muted); max-width: 540px; }
.row .tags { margin-top: 13px; }
.row-arrow { color: var(--dim); transition: transform .25s var(--ease-spring), color .2s; }
.row-arrow .ico { width: 19px; height: 19px; }
.row:hover .row-arrow { transform: translateX(6px); color: var(--signal-ink); }

/* ---------- Open source repo list ---------- */
.repos { display: grid; gap: 10px; margin-top: 20px; }
.repo {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 21px 23px 21px 20px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid transparent;
  border-radius: 10px; box-shadow: var(--shadow-sm); transition: border-color .15s, background-color .15s;
}
.repo:hover { border-color: var(--border); border-left-color: var(--accent); background: var(--surface-2); }
.repo-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: transparent; border: 1px solid var(--border-strong); color: var(--dim); transition: border-color .15s, color .15s; }
.repo:hover .repo-icon { border-color: var(--accent); color: var(--accent-ink); }
.repo-icon .ico { width: 19px; height: 19px; stroke-width: 1.6; }
.repo-body { min-width: 0; }
.repo-name { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.repo-name a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.repo-name a:focus-visible { outline: none; }
.repo:has(.repo-name a:focus-visible) { outline: 2px solid var(--signal); outline-offset: 3px; }
.repo-desc { margin-top: 5px; font-size: 13.5px; color: var(--muted); line-height: 1.55; max-width: 60ch; }
.repo-tech { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .01em; }
.repo-meta { display: flex; gap: 18px; margin-top: 8px; font-size: 12.5px; color: var(--dim); }
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; }
.repo-meta .ico { width: 13px; height: 13px; }
.repo-meta span:first-child .ico { color: var(--accent); }
.repo-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; }
.repo-actions .preview-btn { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.repo-actions .preview-btn:hover { border-color: var(--signal); background: var(--signal-soft); color: var(--signal-ink); }
.preview-btn .ico { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.preview-btn:hover .ico { transform: none; }
.repo:hover .row-arrow { transform: translateX(4px); color: var(--accent-ink); }

/* ---------- Preview modal ---------- */
html.modal-open { overflow: hidden; }
.modal { width: min(860px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.modal::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal[open] { animation: pop .25s var(--ease-spring) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15.5px; font-weight: 650; font-family: var(--mono); }
.modal-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text-soft); cursor: pointer; transition: background-color .15s, color .15s; }
.modal-close:hover { background: var(--signal-soft); color: var(--signal-ink); }
.modal-close .ico { width: 18px; height: 18px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player .empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; font-size: 13.5px; color: #a8a49c; }
.player .empty .ico { width: 44px; height: 44px; stroke-width: 1.3; color: var(--accent); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 16px 22px; border-top: 1px solid var(--border); }
.modal-foot p { font-size: 13.5px; color: var(--muted); }

/* =====================================================================
   EXPLORER — a working Roblox Studio–style tree of the site's own
   structure. Clicking a node scrolls to the matching section and fills
   the Properties panel, mirroring how Studio actually behaves.
   ===================================================================== */
.explorer-shell {
  margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--surface);
}
.explorer-pane { display: flex; flex-direction: column; min-width: 0; }
.explorer-pane + .explorer-pane { border-left: 1px solid var(--border); }
.explorer-titlebar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .02em;
}
.explorer-titlebar .ico { width: 13px; height: 13px; }
.tree { list-style: none; margin: 0; padding: 8px; font-family: var(--mono); font-size: 13px; overflow: auto; max-height: 420px; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; }
.tnode { position: relative; }
.tnode-row {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer;
  color: var(--text-soft); transition: background-color .12s ease, color .12s ease;
}
.tnode-row:hover { background: var(--surface-2); }
.tnode-row.selected { background: var(--signal-soft); color: var(--signal-ink); }
.tnode-toggle {
  width: 14px; height: 14px; flex: none; display: grid; place-items: center; color: var(--dim);
  transition: transform .2s var(--ease-spring);
}
.tnode.open > .tnode-row .tnode-toggle { transform: rotate(90deg); }
.tnode-toggle svg { width: 9px; height: 9px; }
.tnode-leaf-spacer { width: 14px; flex: none; }
.tnode-icon { width: 15px; height: 15px; flex: none; }
.tnode-icon.folder { color: var(--accent-ink); }
.tnode-icon.script { color: var(--signal-ink); }
.tnode-icon.model { color: var(--dim); }
.tnode-name { white-space: nowrap; }
.tnode-count { margin-left: auto; font-size: 10.5px; color: var(--dim); padding-left: 10px; }
.tnode > ul { display: none; }
.tnode.open > ul { display: block; }

.props-body { padding: 14px; overflow: auto; max-height: 420px; }
.props-empty { padding: 30px 14px; text-align: center; color: var(--dim); font-size: 13px; }
.props-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; margin-bottom: 4px; }
.props-class { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 16px; }
.props-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.props-table tr { border-top: 1px solid var(--border); }
.props-table tr:first-child { border-top: 0; }
.props-table td { padding: 8px 4px; vertical-align: top; }
.props-table td:first-child { width: 40%; color: var(--dim); font-family: var(--mono); font-size: 11.5px; }
.props-table td:last-child { color: var(--text-soft); text-align: right; }
.props-desc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); line-height: 1.6; }
.props-go { margin-top: 16px; width: 100%; justify-content: center; }

/* ---------- About: interactive timeline + skills ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 260px; gap: 16px 56px; margin-top: 8px; }
.about-copy { grid-column: 1; }
.about-lead { margin-top: 18px; font-size: 16.5px; color: var(--text-soft); }
.about-text { margin-top: 16px; max-width: 560px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.about-photo { grid-column: 2; grid-row: 1; align-self: start; margin-top: 6px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-strong); aspect-ratio: 1.07 / 1; background: var(--surface-2); box-shadow: 9px 9px 0 var(--accent-soft), var(--shadow); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.skills { grid-column: 1 / -1; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--border); }
.skills h3 { font-size: 13px; font-weight: 600; font-family: var(--mono); color: var(--dim); margin-bottom: 18px; }
.skill-list { display: grid; gap: 14px; max-width: 560px; }
.skill { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 14px; }
.skill-name { font-size: 13.5px; font-weight: 600; color: var(--text-soft); }
.skill-bar { position: relative; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.skill-bar span { position: absolute; inset: 0; width: 0; border-radius: 999px; background: var(--grad); transition: width 1s var(--ease); }
.skill.in-view .skill-bar span { width: var(--pct); }
.skill-pct { font-family: var(--mono); font-size: 11.5px; color: var(--dim); width: 34px; text-align: right; }

.timeline { grid-column: 1 / -1; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--border); }
.timeline h3 { font-size: 13px; font-weight: 600; font-family: var(--mono); color: var(--dim); margin-bottom: 22px; }
.tl-list { position: relative; display: grid; gap: 0; max-width: 640px; }
.tl-item { position: relative; padding: 0 0 30px 30px; border-left: 1px solid var(--border); }
.tl-item:last-child { border-color: transparent; padding-bottom: 2px; }
.tl-dot { position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--dim); transition: border-color .25s ease, background-color .25s ease, transform .25s var(--ease-spring); }
.tl-item.in-view .tl-dot { border-color: var(--accent); background: var(--accent); transform: scale(1.15); }
.tl-year { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.tl-title { margin-top: 3px; font-size: 14.5px; font-weight: 650; }
.tl-desc { margin-top: 4px; font-size: 13.5px; color: var(--muted); max-width: 48ch; }

/* ---------- Contact: terminal ---------- */
.terminal {
  max-width: 720px; margin-top: 32px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: var(--code-bg);
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--code-border); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--code-c); }
.term-body { padding: 18px 18px 8px; font-family: var(--mono); font-size: 13.5px; line-height: 1.85; color: var(--code-text); min-height: 220px; cursor: text; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .p { color: var(--code-k); }
.term-line .ok { color: var(--code-f); }
.term-line .err { color: #ff8a8a; }
.term-line .dim { color: var(--code-c); }
.term-input-row { display: flex; align-items: center; gap: 8px; }
.term-input-row .p { flex: none; }
.term-input {
  flex: 1; background: transparent; border: 0; color: var(--code-text); font-family: var(--mono); font-size: 13.5px;
  caret-color: var(--signal);
}
.term-input:focus { outline: none; }
.term-hint { padding: 10px 18px 16px; font-family: var(--mono); font-size: 11px; color: var(--code-c); border-top: 1px solid var(--code-border); margin-top: 10px; }
.term-hint kbd { background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 5px; font-size: 10.5px; }

.socials { display: flex; justify-content: center; gap: 14px; margin-top: 60px; }
.socials a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); box-shadow: var(--shadow-sm); transition: color .15s, transform .15s, border-color .15s, background-color .15s; }
.socials a:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.socials .ico-fill { width: 21px; height: 21px; }

.footer { text-align: center; padding: 26px 24px 40px; font-size: 12px; color: var(--dim); font-family: var(--mono); }

/* ---------- Scroll-reveal (single, restrained system) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .part-rig { order: -1; height: 220px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .os-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .explorer-shell { grid-template-columns: 1fr; }
  .explorer-pane + .explorer-pane { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .menu-btn { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 24px 14px; background: var(--menu-bg); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 15px; border-radius: 0; border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .nav-links a:last-child { border-bottom: 0; }
  .stat { padding: 34px 6px; }
  .stat-num { font-size: 27px; }
  .section { padding: 60px 0; }
  .page { padding: 72px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { grid-column: 1; grid-row: auto; order: 3; max-width: 320px; }
  .skill { grid-template-columns: 92px 1fr auto; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .row { grid-template-columns: 88px 1fr auto; gap: 14px; align-items: start; padding: 20px 0; }
  .row-img { width: 88px; border-radius: 10px; }
  .row-arrow { align-self: center; }
  .os-left { flex-direction: column; align-items: flex-start; gap: 18px; }
  .repo { grid-template-columns: auto minmax(0, 1fr); padding: 15px; gap: 13px; }
  .repo-actions { grid-column: 2; }
  .repo-actions .row-arrow { display: none; }
  .modal-foot { flex-direction: column; align-items: flex-start; }
  .repo-icon { width: 42px; height: 42px; }
  .section-head { align-items: center; }
  .section-head h2, .os-left h2 { font-size: 22px; }
  .socials { margin-top: 48px; }
}
@media (max-width: 520px) {
  .nav-right { gap: 8px; }
  .nav-right .icon-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after,
  html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { animation: none !important; transition: none !important; }
  .cursor-dot, .cursor-ring { display: none; }
}