:root {
  color-scheme: light dark;
  --ink: light-dark(#102c44, #edf4fa);
  --muted: light-dark(#4d6170, #b0c1d0);
  --coral: #ed533e;
  --accent: light-dark(#ad3425, #ff917e);
  --line: light-dark(#dce5ed, #30465a);
  --wash: light-dark(#f3f6f9, #122537);
  --surface: light-dark(#fff, #0b1b2a);
  --primary: light-dark(#102c44, #f39885);
  --primary-text: light-dark(#fff, #142437);
  --primary-hover: light-dark(#244b6b, #ffae9d);
  --control-line: light-dark(#b6c4d1, #60788d);
  --mono: "Cascadia Mono", Consolas, monospace;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--coral); outline-offset: 5px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-block-start: 1.5rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; }

.shell { width: min(74rem, calc(100% - 5rem)); margin-inline: auto; }
.skip { position: absolute; z-index: 1; background: var(--surface); padding: .5rem 1rem; transform: translateY(-120%); }
.skip:focus { transform: none; }
.header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-size: 1.25rem; font-weight: 800; letter-spacing: -.055em; }
.brand img { margin-right: .55rem; background: light-dark(transparent, #edf4fa); border-radius: .25rem; padding: 2px; }
.brand span { color: var(--accent); }
nav { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.65rem); flex-wrap: wrap; }
nav a { font-size: .9375rem; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--accent); }
.nav-github { padding: .48rem .9rem; border: 1px solid var(--line); border-radius: .35rem; }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: clamp(4rem, 8vw, 7rem); }
.eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--accent); font: 700 .875rem/1.4 var(--mono); letter-spacing: .075em; text-transform: uppercase; }
.eyebrow span { width: 1.35rem; height: 2px; background: var(--coral); }
h1 { margin-top: 1.25rem; font-size: clamp(3rem, 6vw, 6rem); letter-spacing: -.083em; line-height: .96; }
h1 em { display: block; color: var(--accent); font-style: normal; }
.lede { max-width: 32rem; margin-top: 1.65rem; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; border: 1px solid transparent; border-radius: .35rem; padding: .6rem 1.2rem; text-decoration: none; font-weight: 700; transition: background-color .18s, color .18s, border-color .18s; }
.primary { background: var(--primary); color: var(--primary-text); }
.primary:hover { background: var(--primary-hover); }
.secondary { border-color: var(--control-line); }
.secondary:hover { border-color: var(--ink); background: var(--wash); }

.brand-panel {
  display: grid;
  place-items: center;
  aspect-ratio: 1.1;
  background-color: #f5f8fb;
  background-image: linear-gradient(#102c440c 1px, transparent 1px), linear-gradient(90deg, #102c440c 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: .45rem;
}
.grid-frame { position: relative; display: grid; place-items: center; width: 72%; height: 74%; border: 1px solid #c8d6e1; }
.grid-frame img { width: 85%; height: 87%; object-fit: contain; }
.grid-frame i { position: absolute; width: .45rem; height: .45rem; background: var(--coral); }
.grid-frame i:nth-child(1) { top: -.225rem; left: -.225rem; }
.grid-frame i:nth-child(2) { top: -.225rem; right: -.225rem; }
.grid-frame i:nth-child(3) { bottom: -.225rem; left: -.225rem; }
.grid-frame i:nth-child(4) { bottom: -.225rem; right: -.225rem; }

.projects { padding-block: clamp(3rem, 6vw, 5rem); background: var(--wash); border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.7rem; }
h2 { margin-top: .55rem; font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -.075em; }
.text-link { width: fit-content; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: #9eafbf; text-underline-offset: .25em; }
.text-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.project-showcase {
  display: grid;
  grid-template-columns: minmax(13rem, 2fr) 3fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
}

.project-art {
  display: grid;
  place-items: center;
  min-height: 13rem;
  background: radial-gradient(ellipse at center, #284963, #102c44 76%);
}

.project-art img {
  display: block;
  width: min(45%, 10rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.project-content { padding: clamp(1.3rem, 4vw, 3rem); }
.project-content h3 { margin-block: .45rem .8rem; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.06em; }
.project-content > p:not(.eyebrow) { color: var(--muted); }
.project-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.project-platforms li { padding: .18rem .55rem; border: 1px solid var(--line); border-radius: .3rem; font-size: .875rem; }
.project-actions { margin-top: 1.15rem; }
.project-note { margin-top: .75rem; font-size: .875rem; }

@media (max-width: 720px) {
  .project-showcase { grid-template-columns: 1fr; }
}

.about { background: light-dark(#102c44, #081624); color: #fff; padding-block: clamp(3.5rem, 7vw, 6rem); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.about .eyebrow { color: #ff9a89; }
.about-inner > div > p:not(.eyebrow) { max-width: 34rem; color: #d7e3ed; font-size: 1.1rem; }
.light { margin-top: 1.1rem; border-color: #7790a4; }
.light:hover { background: #edf4fa; color: #102c44; }
.footer-inner { min-height: 5.4rem; }

@media (max-width: 800px) {
  .shell { width: calc(100% - 2.75rem); }
  .hero { grid-template-columns: 1fr; }
  .brand-panel { width: min(100%, 31rem); }
  .about-inner { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 420px) {
  .header-inner { align-items: flex-start; justify-content: center; flex-direction: column; gap: .45rem; padding-block: .85rem; }
  h1 { font-size: clamp(2.55rem, 11vw, 3.1rem); }
  .hero { padding-block: 3rem; }
  .footer .text-link { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--control-line);
  border-radius: .35rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover { background: var(--wash); color: var(--accent); }
.theme-toggle span::before { content: "\263E"; font-size: 1.4rem; line-height: 1; }
.theme-toggle[aria-pressed="true"] span::before { content: "\2600"; }

@media (max-width: 420px) {
  .nav-github { padding-inline: .5rem; }
}

.project-showcase + .project-showcase { margin-top: 1.25rem; }

.project-art-nxtcore {
  padding: 1rem;
  background-color: #102c44;
  background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  background-position: center;
}

.project-art-nxtcore img { width: min(45%, 8rem); }
