:root {
  --background-deep: #020203;
  --background-base: #050506;
  --background-elevated: #0a0a0c;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --foreground: #ededf0;
  --foreground-muted: #8a8f98;
  --foreground-subtle: rgba(255, 255, 255, 0.6);
  --accent: #5e6ad2;
  --accent-bright: #6872d9;
  --accent-glow: rgba(94, 106, 210, 0.3);
  --border-default: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(94, 106, 210, 0.3);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 20px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(94, 106, 210, 0.1);
  --shadow-accent: 0 0 0 1px rgba(94, 106, 210, 0.5), 0 4px 12px rgba(94, 106, 210, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at top, #0a0a0f 0%, var(--background-base) 52%, var(--background-deep) 100%),
    var(--background-base);
  color: var(--foreground);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: geometricPrecision;
}

@media (hover: hover) and (pointer: fine) {
  body,
  body * {
    cursor: url("../Hollow%20Knight%20%26%20Game%20Arrow/hollow-cursor-32.png") 2 2, auto !important;
  }

  body.cursor-selecting,
  body.cursor-selecting * {
    cursor: url("../Hollow%20Knight%20%26%20Game%20Arrow/hollow-pointer-32.png") 16 20, pointer !important;
  }

  a,
  button,
  input,
  textarea,
  select,
  summary,
  label,
  [role="button"],
  .button,
  .menu-toggle,
  .nav-cta {
    cursor: url("../Hollow%20Knight%20%26%20Game%20Arrow/hollow-cursor-32.png") 2 2, pointer !important;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.45'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

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

p,
h1,
h2,
h3 {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

h1 {
  max-width: 980px;
  font-size: clamp(3.25rem, 8vw, 7.5rem);
  background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.95) 48%, rgba(255, 255, 255, 0.68));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 span,
h2 span {
  display: block;
  background: linear-gradient(90deg, var(--accent), #9ca3ff, var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}

h2 {
  max-width: 780px;
  font-size: clamp(2.3rem, 5vw, 4.75rem);
  background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: var(--foreground);
}

ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--foreground-muted);
}

li + li {
  margin-top: 0.45rem;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -4;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(140px);
  transform: translateZ(0);
  will-change: transform;
}

.blob-primary {
  width: min(92vw, 1200px);
  height: min(92vw, 1200px);
  top: -48%;
  left: 50%;
  background: rgba(94, 106, 210, 0.25);
  transform: translateX(-50%);
  animation: ambient-float 10s ease-in-out infinite;
}

.blob-secondary {
  width: 720px;
  height: 720px;
  top: 15%;
  left: -22%;
  background: rgba(147, 88, 255, 0.15);
  animation: ambient-float-alt 9s ease-in-out infinite;
}

.blob-tertiary {
  width: 640px;
  height: 640px;
  top: 26%;
  right: -20%;
  background: rgba(69, 116, 255, 0.12);
  animation: ambient-float 8s ease-in-out infinite;
}

.blob-bottom {
  width: 900px;
  height: 520px;
  left: 50%;
  bottom: -32%;
  background: rgba(94, 106, 210, 0.1);
  transform: translateX(-50%);
  animation: glow-pulse 8s ease-in-out infinite;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-accent);
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 72px;
  border-bottom: 1px solid var(--border-default);
  background: rgba(5, 5, 6, 0.74);
  padding: 0 32px;
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--foreground);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-orb {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, var(--accent-bright), #2f3578);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 24px rgba(94, 106, 210, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 0 0.85rem;
  color: var(--foreground-muted);
  font-size: 0.9rem;
  transition: color 200ms var(--ease-out-expo), background 200ms var(--ease-out-expo), box-shadow 200ms var(--ease-out-expo);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--foreground);
}

.site-nav .nav-cta {
  margin-left: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--foreground);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-default);
  cursor: inherit;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: var(--foreground);
  transition: transform 200ms var(--ease-out-expo), opacity 200ms var(--ease-out-expo);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.container {
  width: min(100% - 40px, 1180px);
  margin-inline: auto;
}

.narrow {
  width: min(100% - 40px, 920px);
}

.section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.section-bordered {
  border-top: 1px solid var(--border-default);
}

.section-bordered::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: min(720px, 70vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: translateX(-50%);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
}

.compact-hero {
  min-height: 62vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}

.hero-copy,
.section-heading {
  display: grid;
  gap: 1.35rem;
}

.lead,
.section-heading p,
.bento-card p,
.project-row p,
.article-panel p,
.note p,
.contact-card p {
  color: var(--foreground-muted);
}

.lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.eyebrow,
.card-index,
.inline-callout span {
  color: var(--foreground-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.button {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  padding: 0 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 200ms var(--ease-out-expo), background 200ms var(--ease-out-expo), box-shadow 200ms var(--ease-out-expo), color 200ms var(--ease-out-expo);
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.28) 48%, transparent 72%);
  transform: translateX(-120%);
  transition: transform 550ms var(--ease-out-expo);
}

.button:hover::after {
  transform: translateX(120%);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.button-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.65), 0 8px 22px rgba(94, 106, 210, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.button-secondary {
  background: var(--surface);
  color: var(--foreground);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--border-default);
}

.button-secondary:hover {
  background: var(--surface-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px var(--border-hover), 0 0 34px rgba(94, 106, 210, 0.12);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.55), 0 0 0 5px var(--background-base);
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 82px;
  height: 82px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-120px, -120px, 0);
  transition: opacity 180ms var(--ease-out-expo);
  will-change: transform;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.cursor-deer {
  position: absolute;
  left: 4px;
  top: 2px;
  width: 64px;
  height: 66px;
  transform-origin: 42px 44px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 18px rgba(94, 106, 210, 0.22));
  transition: scale 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), filter 180ms var(--ease-out-expo);
}

.cursor-deer {
  display: none;
}

.custom-cursor.is-hovering .cursor-deer {
  scale: 1;
  transform: rotate(-2deg);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 26px rgba(94, 106, 210, 0.36));
}

.custom-cursor.is-clicking .cursor-deer {
  transform: rotate(3deg);
  scale: 0.9;
  filter: drop-shadow(0 0 30px rgba(94, 106, 210, 0.62)) drop-shadow(0 16px 26px rgba(0, 0, 0, 0.52));
}

.face {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 36px;
  height: 31px;
  border-radius: 42% 42% 48% 48%;
  background:
    radial-gradient(circle at 35% 48%, rgba(163, 171, 214, 0.52) 0 11%, transparent 12%),
    radial-gradient(circle at 66% 48%, rgba(163, 171, 214, 0.5) 0 10%, transparent 11%),
    radial-gradient(circle at 50% 65%, rgba(94, 106, 210, 0.2), transparent 32%),
    linear-gradient(145deg, #232735, #151926 58%, #090c14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -7px 14px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.face,
.antler,
.ear,
.glasses,
.scarf {
  opacity: 0;
  transition: opacity 150ms var(--ease-out-expo), transform 180ms var(--ease-out-expo);
}

.custom-cursor.is-hovering .face,
.custom-cursor.is-hovering .antler,
.custom-cursor.is-hovering .ear,
.custom-cursor.is-hovering .glasses,
.custom-cursor.is-hovering .scarf {
  opacity: 1;
}

.face::before,
.face::after,
.antler::before,
.antler::after,
.ear::before {
  content: "";
  position: absolute;
}

.face::before {
  left: 2px;
  top: 3px;
  width: 34px;
  height: 28px;
  border-radius: inherit;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1.2px);
  background-size: 6px 6px;
  opacity: 0.42;
  mix-blend-mode: soft-light;
}

.face::after {
  left: 17px;
  top: 19px;
  width: 6px;
  height: 4px;
  border-radius: 999px;
  background: rgba(237, 237, 240, 0.62);
}

.ear {
  position: absolute;
  top: 20px;
  width: 14px;
  height: 18px;
  border-radius: 70% 70% 50% 50%;
  background: linear-gradient(145deg, #252b3a, #090c14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ear::before {
  inset: 4px 3px 3px;
  border-radius: inherit;
  background: rgba(94, 106, 210, 0.34);
}

.ear-left {
  left: 5px;
  transform: rotate(-25deg);
}

.ear-right {
  right: 1px;
  transform: rotate(25deg);
}

.antler {
  position: absolute;
  top: 2px;
  width: 10px;
  height: 25px;
  border-radius: 999px;
  background: linear-gradient(180deg, #32384c, #111522);
  transform-origin: bottom center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.antler::before,
.antler::after {
  width: 8px;
  height: 16px;
  border-radius: 999px;
  background: inherit;
  top: 4px;
}

.antler-left {
  left: 14px;
  transform: rotate(-28deg);
}

.antler-left::before {
  left: -7px;
  transform: rotate(-42deg);
}

.antler-left::after {
  right: -6px;
  top: 8px;
  transform: rotate(38deg);
}

.antler-right {
  right: 10px;
  transform: rotate(28deg);
}

.antler-right::before {
  right: -7px;
  transform: rotate(42deg);
}

.antler-right::after {
  left: -6px;
  top: 8px;
  transform: rotate(-38deg);
}

.glasses {
  position: absolute;
  left: 10px;
  top: 30px;
  width: 42px;
  height: 15px;
}

.glasses::before,
.glasses::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px;
  height: 14px;
  border: 4px solid #050506;
  border-radius: 999px;
  background: rgba(94, 106, 210, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 12px rgba(94, 106, 210, 0.16);
}

.glasses::before {
  left: 0;
}

.glasses::after {
  right: 0;
}

.scarf {
  position: absolute;
  left: 8px;
  top: 47px;
  width: 44px;
  height: 18px;
  border-radius: 999px 999px 14px 14px;
  background: linear-gradient(180deg, #0f1424, #04060b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(94, 106, 210, 0.16);
}

.scarf::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 11px;
  width: 11px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0d1220, #03050a);
  transform: rotate(-4deg);
}

.cursor-pointer {
  position: absolute;
  left: 6px;
  top: 7px;
  width: 50px;
  height: 62px;
  clip-path: polygon(0 0, 0 100%, 16px 75%, 26px 96%, 34px 92%, 24px 70%, 48px 70%);
  background: linear-gradient(135deg, #f4f7ff 0%, #c8cffd 46%, #6f79e6 100%);
  filter: drop-shadow(0 0 10px rgba(94, 106, 210, 0.42)) drop-shadow(0 9px 12px rgba(0, 0, 0, 0.42));
  opacity: 1;
  transform-origin: 8px 8px;
  transition: opacity 140ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), filter 180ms var(--ease-out-expo);
}

.cursor-pointer::before {
  content: "";
  position: absolute;
  inset: 9px 10px 12px 10px;
  clip-path: polygon(0 0, 0 100%, 10px 72%, 19px 92%, 22px 90%, 13px 66%, 34px 66%);
  background: #060811;
}

.cursor-pointer::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 29px;
  height: 39px;
  clip-path: polygon(0 0, 0 100%, 10px 70%, 30px 63%);
  background: linear-gradient(135deg, rgba(94, 106, 210, 0.3), transparent 70%);
}

.custom-cursor.is-hovering .cursor-pointer {
  opacity: 0;
  transform: scale(0.82) rotate(-8deg);
  filter: drop-shadow(0 0 18px rgba(94, 106, 210, 0.18));
}

.cursor-burst {
  position: absolute;
  left: -8px;
  top: -10px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.35);
  background:
    radial-gradient(circle, rgba(174, 181, 255, 0.95) 0 2px, transparent 3px) 50% 0 / 12px 12px no-repeat,
    radial-gradient(circle, rgba(94, 106, 210, 0.9) 0 3px, transparent 4px) 92% 28% / 13px 13px no-repeat,
    radial-gradient(circle, rgba(174, 181, 255, 0.9) 0 2px, transparent 3px) 78% 86% / 12px 12px no-repeat,
    radial-gradient(circle, rgba(94, 106, 210, 0.86) 0 3px, transparent 4px) 15% 76% / 13px 13px no-repeat,
    radial-gradient(circle, rgba(174, 181, 255, 0.95) 0 2px, transparent 3px) 5% 25% / 12px 12px no-repeat,
    radial-gradient(circle, rgba(94, 106, 210, 0.26), transparent 58%);
  box-shadow: 0 0 34px rgba(94, 106, 210, 0.52), 0 0 78px rgba(94, 106, 210, 0.18);
  transition: opacity 180ms var(--ease-out-expo), transform 260ms var(--ease-out-expo);
}

.custom-cursor.is-clicking .cursor-burst {
  opacity: 1;
  transform: scale(1);
}

.spotlight-card,
.bento-card,
.hero-console,
.project-row,
.article-panel,
.note,
.contact-card,
.toc {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow-card);
  isolation: isolate;
  transition: transform 260ms var(--ease-out-expo), box-shadow 260ms var(--ease-out-expo), background 260ms var(--ease-out-expo);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(300px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(94, 106, 210, 0.15), transparent 42%);
  opacity: 0;
  transition: opacity 220ms var(--ease-out-expo);
  pointer-events: none;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035));
}

.spotlight-card:hover::after {
  opacity: 1;
}

.hero-console {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.console-top {
  display: flex;
  gap: 0.45rem;
  border-bottom: 1px solid var(--border-default);
  padding: 0.25rem 0 1rem;
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.metric-row {
  display: grid;
  gap: 0.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
}

.metric-row span {
  color: var(--foreground-subtle);
  font-size: 0.8rem;
}

.metric-row strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--foreground-muted);
  font-size: 0.92rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7ee787;
  box-shadow: 0 0 18px rgba(126, 231, 135, 0.6);
}

.section-heading {
  max-width: 820px;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(180px, auto);
  gap: 1rem;
}

.bento-card {
  display: grid;
  align-content: end;
  gap: 0.85rem;
  min-height: 220px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.bento-card:nth-child(1) {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 420px;
}

.bento-card:nth-child(2),
.bento-card:nth-child(3) {
  grid-column: span 2;
}

.bento-card:nth-child(4) {
  grid-column: span 3;
}

.bento-card:nth-child(5) {
  grid-column: span 3;
}

.bento-large {
  background:
    radial-gradient(circle at 72% 18%, rgba(94, 106, 210, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.026));
}

.bento-wide {
  background:
    radial-gradient(circle at 18% 16%, rgba(104, 114, 217, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.card-index {
  color: rgba(156, 163, 255, 0.86);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.project-stack {
  display: grid;
  gap: 1rem;
}

.project-row {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
}

.project-row-detailed {
  align-items: start;
}

.project-row-heading,
.project-row-body {
  display: grid;
  gap: 0.75rem;
}

.project-status,
.project-category {
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.project-status {
  background: rgba(126, 231, 135, 0.1);
}

.project-category {
  background: rgba(156, 163, 255, 0.12);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-tag {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.34rem 0.62rem;
  color: var(--foreground-subtle);
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.ai-demo-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.ai-demo-compact {
  align-items: center;
}

.ai-demo-copy {
  align-content: center;
  margin-bottom: 0;
}

.ai-demo-link-card {
  display: grid;
  gap: 1.1rem;
  align-content: center;
  justify-items: start;
  min-height: 220px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.ai-demo-link-card p {
  max-width: 520px;
  color: var(--foreground-muted);
}

.ai-demo-chat {
  width: 100%;
  min-height: 420px;
}

.ai-demo-chat[hidden] {
  display: none;
}

.ai-demo-link-card:has(.ai-demo-chat:not([hidden])) {
  align-content: stretch;
}

.button-small {
  width: fit-content;
  min-height: 40px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
}

.contact-section {
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.contact-card {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.contact-card h2 {
  max-width: 900px;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.toc a {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 0 0.75rem;
  color: var(--foreground-muted);
  font-size: 0.92rem;
  transition: background 200ms var(--ease-out-expo), color 200ms var(--ease-out-expo), transform 200ms var(--ease-out-expo);
}

.toc a:hover {
  background: var(--surface);
  color: var(--foreground);
  transform: translateX(4px);
}

.article-flow {
  display: grid;
  gap: 1rem;
}

.resume-card-section {
  display: grid;
  gap: 1rem;
}

.compact-heading {
  margin-bottom: 0.25rem;
}

.compact-heading h2 {
  max-width: 820px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.resume-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.resume-card {
  display: grid;
  gap: 1rem;
  min-height: 320px;
  align-content: start;
  padding: clamp(1.2rem, 3vw, 1.6rem);
}

.resume-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.privacy-pill {
  width: fit-content;
  border-radius: 999px;
  background: rgba(126, 231, 135, 0.1);
  padding: 0.34rem 0.62rem;
  color: rgba(217, 255, 221, 0.86);
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(126, 231, 135, 0.18);
}

.resume-card-body {
  display: grid;
  gap: 0.7rem;
}

.resume-card-body h3 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.resume-card-subtitle,
.privacy-note {
  color: var(--foreground-subtle);
  font-size: 0.88rem;
}

.privacy-note {
  margin-top: auto;
}

.article-panel {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.article-panel h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.project-detail-card {
  gap: 1.35rem;
}

.project-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.project-summary {
  color: var(--foreground);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.project-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
  gap: 1rem;
}

.project-fact,
.project-process {
  display: grid;
  gap: 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.project-fact > span,
.project-process > span {
  color: rgba(156, 163, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
}

.project-fact ul,
.project-process ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.15rem;
  color: var(--foreground-muted);
}

.project-process ol {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style-position: outside;
}

.inline-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.inline-callout a:not(.button) {
  color: var(--foreground);
  font-weight: 600;
}

.demo-callout {
  align-items: center;
}

.demo-callout > span {
  max-width: 680px;
  color: var(--foreground-muted);
}

.mini-grid,
.notes-grid {
  display: grid;
  gap: 1rem;
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-grid div {
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.mini-grid strong {
  display: block;
  margin-bottom: 0.35rem;
}

.notes-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note {
  display: grid;
  gap: 0.85rem;
  min-height: 240px;
  align-content: start;
  padding: 1.25rem;
}

.note time {
  color: rgba(156, 163, 255, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-default);
  background: var(--background-deep);
  padding: 2rem 32px;
  color: var(--foreground-muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--foreground);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ambient-float {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  50% {
    transform: translateX(-50%) translateY(-20px) rotate(1deg);
  }
}

@keyframes ambient-float-alt {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(1deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.78;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.03);
  }
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .split-layout,
  .ai-demo-shell,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento-card,
  .bento-card:nth-child(1),
  .bento-card:nth-child(2),
  .bento-card:nth-child(3),
  .bento-card:nth-child(4),
  .bento-card:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 260px;
  }

  .notes-grid,
  .mini-grid,
  .resume-card-grid,
  .project-process ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-visual-grid {
    grid-template-columns: 1fr;
  }

  .ai-demo-link-card {
    min-height: 200px;
  }

  .ai-demo-chat {
    min-height: 360px;
  }

  .toc {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: grid;
    gap: 0.25rem;
    border-radius: var(--radius-lg);
    background: rgba(5, 5, 6, 0.95);
    padding: 0.75rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 200ms var(--ease-out-expo), transform 200ms var(--ease-out-expo);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    justify-content: space-between;
    min-height: 48px;
  }

  .site-nav .nav-cta {
    margin-left: 0;
    justify-content: center;
  }

  .container,
  .narrow {
    width: min(100% - 32px, 1180px);
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .bento-grid,
  .notes-grid,
  .mini-grid,
  .resume-card-grid,
  .project-process ol {
    grid-template-columns: 1fr;
  }

  .project-row {
    grid-template-columns: 1fr;
  }

  .project-detail-header {
    align-items: flex-start;
  }

  .actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

.ai-assistant {
  bottom: 24px;
  display: grid;
  justify-items: end;
  position: fixed;
  right: 24px;
  z-index: 80;
}

.ai-assistant-embedded {
  bottom: auto;
  height: 100%;
  justify-items: stretch;
  position: relative;
  right: auto;
  z-index: 1;
}

.ai-assistant-toggle {
  align-items: center;
  background: #f5c542;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  color: #111;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  letter-spacing: 0;
  width: 58px;
}

.ai-assistant-panel {
  background: rgba(12, 13, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  bottom: 72px;
  box-shadow: var(--shadow-card);
  color: #f8f4e8;
  display: grid;
  grid-template-rows: auto minmax(220px, 360px) auto;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(12px);
  transition: opacity 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo);
  width: min(380px, calc(100vw - 32px));
}

.ai-assistant-embedded .ai-assistant-panel {
  bottom: auto;
  grid-template-rows: auto minmax(210px, 1fr) auto;
  height: 100%;
  min-height: 420px;
  opacity: 1;
  pointer-events: auto;
  position: relative;
  right: auto;
  transform: none;
  width: 100%;
}

.ai-assistant.is-open .ai-assistant-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ai-assistant-header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.ai-assistant-header strong,
.ai-assistant-header span {
  display: block;
}

.ai-assistant-header span {
  color: rgba(248, 244, 232, 0.68);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.ai-quick-questions {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1rem 0;
  scrollbar-width: none;
  transition: max-height 220ms var(--ease-out-expo), opacity 180ms var(--ease-out-expo), padding 180ms var(--ease-out-expo);
}

.ai-quick-questions::-webkit-scrollbar {
  display: none;
}

.ai-quick-questions.is-collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-bottom: 0;
  padding-top: 0;
  pointer-events: none;
}

.ai-quick-question {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 244, 232, 0.84);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 0 0.75rem;
  transition: background 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo), color 180ms var(--ease-out-expo);
}

.ai-quick-question:hover {
  border-color: rgba(245, 197, 66, 0.32);
  background: rgba(245, 197, 66, 0.1);
  color: #f8f4e8;
}

.ai-assistant-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #f8f4e8;
  cursor: pointer;
  height: 34px;
  width: 34px;
}

.ai-assistant-messages {
  display: grid;
  gap: 0.75rem;
  overflow-y: auto;
  padding: 1rem;
}

.ai-message {
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.65;
  max-width: 88%;
  padding: 0.75rem 0.85rem;
  white-space: pre-wrap;
}

.ai-message.is-stage-changing {
  animation: aiStageFade 260ms var(--ease-out-expo);
}

.ai-message-bot {
  background: rgba(255, 255, 255, 0.08);
  justify-self: start;
}

.ai-message-user {
  background: #f5c542;
  color: #111;
  justify-self: end;
}

.ai-message-error {
  background: rgba(168, 84, 72, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 150, 130, 0.16);
}

.ai-message-error strong,
.ai-message-error p {
  display: block;
  margin: 0;
}

.ai-message-error p {
  margin-top: 0.25rem;
  color: rgba(248, 244, 232, 0.72);
}

.ai-waiting-message {
  display: grid;
  gap: 0.55rem;
}

.ai-waiting-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ai-waiting-tone {
  width: fit-content;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.11);
  color: rgba(255, 224, 131, 0.92);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.36rem 0.55rem;
}

.ai-waiting-text,
.ai-waiting-hint {
  margin: 0;
}

.ai-waiting-hint {
  color: rgba(248, 244, 232, 0.62);
  font-size: 0.8rem;
}

.ai-typing-dots {
  display: inline-flex;
  gap: 0.22rem;
}

.ai-typing-dots i {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.9);
  animation: aiDotPulse 950ms ease-in-out infinite;
}

.ai-typing-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.ai-typing-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.ai-waiting-skeleton {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.15rem;
}

.ai-waiting-skeleton span {
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  background-size: 220% 100%;
  animation: aiSkeletonSweep 1500ms ease-in-out infinite;
}

.ai-waiting-skeleton span:nth-child(2) {
  width: 68%;
}

.ai-soft-progress {
  overflow: hidden;
  height: 0.26rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ai-soft-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.4), rgba(245, 197, 66, 0.95));
  animation: aiSoftProgress 2400ms var(--ease-out-expo) infinite;
}

.ai-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.ai-message-actions button {
  min-height: 32px;
  border: 1px solid rgba(245, 197, 66, 0.22);
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.08);
  color: rgba(255, 224, 131, 0.95);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.65rem;
}

.ai-assistant-form {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto;
  padding: 0.85rem;
}

.ai-assistant-form textarea {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f8f4e8;
  font: inherit;
  min-height: 48px;
  padding: 0.7rem;
  resize: none;
}

.ai-assistant-form button {
  background: #f5c542;
  border: 0;
  border-radius: 8px;
  color: #111;
  cursor: pointer;
  font-weight: 700;
  min-width: 64px;
  position: relative;
}

.ai-assistant-form button.is-loading {
  padding-left: 1.8rem;
}

.ai-assistant-form button.is-loading::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 0.72rem;
  height: 0.72rem;
  margin-top: -0.36rem;
  border: 2px solid rgba(17, 17, 17, 0.24);
  border-top-color: #111;
  border-radius: 999px;
  animation: aiButtonSpin 800ms linear infinite;
}

.ai-assistant-form button:disabled,
.ai-assistant-form textarea:disabled {
  cursor: wait;
  opacity: 0.68;
}

@media (max-width: 760px) {
  .ai-assistant {
    bottom: 16px;
    right: 16px;
  }

  .ai-assistant-panel {
    bottom: 68px;
    grid-template-rows: auto minmax(260px, 58vh) auto;
  }

  .ai-assistant-embedded .ai-assistant-panel {
    bottom: auto;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    min-height: 360px;
  }

  .ai-quick-questions {
    padding-inline: 0.85rem;
  }

  .ai-message {
    max-width: 92%;
  }
}

@keyframes aiStageFade {
  from {
    opacity: 0.58;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aiDotPulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes aiSkeletonSweep {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes aiSoftProgress {
  0% {
    transform: translateX(-80%);
  }
  55% {
    transform: translateX(90%);
  }
  100% {
    transform: translateX(160%);
  }
}

@keyframes aiButtonSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 150ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .custom-cursor,
  .cursor-deer,
  .cursor-burst {
    transition-duration: 0.01ms !important;
  }
}
