:root {
  --ink: #111315;
  --muted: #5b626b;
  --line: #d8dde3;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0a4f49;
  --warm: #f2b84b;
  --rose: #d95f59;
  --shadow: 0 20px 50px rgba(17, 19, 21, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(242, 184, 75, 0.16), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, #f3f6f5 48%, #fbfaf7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.home-page {
  --ink: #f7f7f7;
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(8, 8, 8, 0.58);
  --accent: #ff6f3d;
  --accent-dark: #ff956f;
  --warm: #ff5722;
  --rose: #ff8a65;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  background: #020202;
  color: var(--ink);
  min-height: 100svh;
  overflow-x: hidden;
}

body.home-page::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.12), transparent 22rem),
    radial-gradient(circle at 12% 50%, rgba(255, 87, 34, 0.18), transparent 20rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.74));
}

.paper-shader-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #020202;
  pointer-events: none;
}

.home-page main,
.home-page .site-footer {
  position: relative;
  z-index: 2;
}

.home-page .site-header {
  z-index: 10;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
nav,
.actions,
.contact-band,
.cv-contact {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.6rem;
  font-weight: 800;
}

nav {
  gap: 0.35rem;
}

nav a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  padding: 0.55rem 0.7rem;
}

nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--ink);
}

.home-page .site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 2, 2, 0.58);
}

.home-page nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100svh - 74px);
  padding-top: 3rem;
}

.flow-art {
  position: relative;
  margin: 1rem 0 0;
  background: #020202;
  isolation: isolate;
}

.flow-panel {
  position: relative;
  min-height: 118svh;
  overflow: visible;
}

.flow-panel:nth-child(1) {
  z-index: 1;
}

.flow-panel:nth-child(2) {
  z-index: 2;
}

.flow-panel:nth-child(3) {
  z-index: 3;
}

.flow-panel:nth-child(4) {
  z-index: 4;
}

.flow-panel:nth-child(5) {
  z-index: 5;
}

.flow-panel:last-child {
  min-height: 100svh;
}

.flow-inner {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 100svh;
  padding: clamp(2rem, 6vw, 4.5rem);
  transform-origin: bottom left;
  will-change: transform;
}

.flow-orange {
  background: #fd5200;
  color: white;
}

.flow-black {
  background: #020202;
  color: white;
}

.flow-paper {
  background: #f5f0e8;
  color: #080808;
}

.flow-blue {
  background: #1a3de8;
  color: white;
}

.flow-kicker {
  margin-bottom: 0;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flow-rule {
  border-top: 1px solid currentColor;
  opacity: 0.58;
}

.flow-title {
  max-width: 9ch;
  margin-bottom: 0;
  font-size: 6.6rem;
  font-weight: 950;
  line-height: 0.86;
  text-transform: uppercase;
}

.flow-copy {
  max-width: 54ch;
  margin-bottom: 0;
  color: currentColor;
  font-size: 1.45rem;
  line-height: 1.35;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.2rem);
}

.flow-grid h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flow-grid p {
  margin-bottom: 0;
  color: currentColor;
  opacity: 0.75;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 1.2rem;
  font-size: clamp(3.1rem, 9vw, 7.4rem);
  letter-spacing: 0;
  line-height: 0.9;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.actions {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.button,
button {
  border: 1px solid var(--ink);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.05rem;
  font: inherit;
  font-weight: 800;
}

.button.primary,
button {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: transparent;
}

.home-page .button.primary {
  border-color: white;
  background: white;
  color: #050505;
}

.home-page .button.secondary {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.home-page .button.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.identity-panel {
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 4vw, 2rem);
}

.panel-label,
.tag {
  margin: 1.4rem 0 0.35rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-title {
  margin-bottom: 1.6rem;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 850;
  line-height: 1.06;
}

.quick-facts {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.quick-facts div {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding-top: 0.8rem;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  font-weight: 750;
}

.split {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.stack,
.project-grid,
.note-grid,
.link-grid,
.status-board {
  display: grid;
  gap: 1rem;
}

.feature,
.project-card,
.note-card,
.status-board article {
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.2rem;
}

.home-page .identity-panel,
.home-page .feature,
.home-page .project-card,
.home-page .note-card,
.home-page .status-board article,
.home-page .link-grid a,
.home-page .repo-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.feature p,
.project-card p,
.note-card p,
.status-board p,
.cv-section p,
.cv-section li {
  color: var(--muted);
}

.small {
  font-size: 1.03rem;
}

.section-heading {
  max-width: 720px;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.project-card a {
  color: var(--accent-dark);
  font-weight: 850;
  margin-top: auto;
  padding-top: 1rem;
}

.tag {
  margin-top: 0;
  color: var(--rose);
}

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

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

.link-grid a {
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-dark);
  font-weight: 800;
  min-height: 76px;
  padding: 1rem;
}

.link-grid a:hover,
.project-card a:hover {
  color: var(--ink);
}

.status-board {
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-board h3 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.github-panel {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(220px, 0.35fr);
  gap: 1.5rem;
}

.github-stats {
  display: grid;
  gap: 1rem;
}

.github-stats div {
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  padding: 1.1rem;
}

.home-page .github-stats div {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(18px);
}

.github-stats span {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.github-stats p,
.muted {
  color: var(--muted);
}

.github-stats p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0.4rem 0 0;
}

.github-repos {
  display: grid;
  gap: 1rem;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repo-card {
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: var(--panel);
  min-height: 160px;
  padding: 1rem;
}

.repo-card a {
  color: var(--accent-dark);
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 850;
  margin-bottom: 0.6rem;
}

.repo-card p {
  color: var(--muted);
}

.contact-band {
  border-top: 1px solid var(--line);
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-band h2 {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
}

.cv-page {
  background: var(--paper);
}

.cv-shell {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto 4rem;
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 3rem);
}

.cv-hero {
  border-bottom: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding-bottom: 2rem;
}

.cv-hero h1 {
  max-width: none;
  margin-bottom: 0.7rem;
  font-size: clamp(3.2rem, 8vw, 6rem);
}

.cv-contact {
  align-items: flex-end;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.cv-section {
  border-bottom: 1px solid var(--line);
  padding: 1.7rem 0;
}

.cv-section h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.cv-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1rem 0;
}

.cv-item + .cv-item {
  border-top: 1px solid var(--line);
}

.cv-meta h3 {
  margin-bottom: 0.2rem;
}

.cv-meta span {
  color: var(--muted);
  display: block;
  font-weight: 700;
}

.cv-item ul {
  margin: 0;
  padding-left: 1.15rem;
}

.cv-item.compact p {
  margin-bottom: 0;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 750;
  padding: 0.45rem 0.7rem;
}

.print-actions {
  padding-top: 1.5rem;
}

@media (max-width: 980px) {
  .flow-title {
    font-size: 4.8rem;
  }

  .flow-copy {
    font-size: 1.2rem;
  }
}

@media (max-width: 760px) {
  .site-header,
  .contact-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .split,
  .project-grid,
  .note-grid,
  .link-grid,
  .status-board,
  .github-panel,
  .github-repos,
  .flow-grid,
  .cv-hero,
  .cv-item,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .flow-inner {
    min-height: 100svh;
    padding: 2rem 1rem;
  }

  .flow-title {
    font-size: 3.15rem;
  }

  .cv-contact {
    align-items: flex-start;
    text-align: left;
  }
}

@media print {
  body,
  .cv-page {
    background: white;
  }

  .site-header,
  .print-actions {
    display: none;
  }

  .cv-shell {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .cv-section {
    break-inside: avoid;
    padding: 1rem 0;
  }

  a {
    text-decoration: none;
  }
}
