:root {
  color-scheme: dark;
  --ink: #f5f8f7;
  --muted: #c5cecb;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(15, 20, 19, 0.78);
  --panel-solid: #111614;
  --paper: #f4f6f3;
  --paper-ink: #161a18;
  --paper-muted: #52605a;
  --teal: #4fd4d6;
  --amber: #f3a43b;
  --green: #73d18b;
  --coal: #080b0b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--coal);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.6;
}

body::before {
  background-image:
    linear-gradient(rgba(79, 212, 214, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 212, 214, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(8, 11, 11, 0.74);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(18px, 5vw, 64px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.site-header::after {
  background: linear-gradient(90deg, transparent, rgba(79, 212, 214, 0.72), rgba(243, 164, 59, 0.45), transparent);
  bottom: -1px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 12px;
}

.brand-signal {
  align-items: flex-end;
  display: flex;
  gap: 3px;
  height: 26px;
  width: 25px;
}

.brand-signal i {
  background: var(--teal);
  display: block;
  width: 4px;
}

.brand-signal i:nth-child(1) {
  height: 10px;
}

.brand-signal i:nth-child(2) {
  background: var(--amber);
  height: 24px;
}

.brand-signal i:nth-child(3) {
  height: 17px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--teal);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.63rem;
  line-height: 1.2;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2.5vw, 28px);
  justify-content: flex-end;
}

nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

nav a:hover,
nav a:focus-visible,
nav a[aria-current="true"] {
  color: var(--ink);
}

nav a[aria-current="true"] {
  box-shadow: 0 2px 0 var(--teal);
}

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.hero {
  isolation: isolate;
  min-height: 88vh;
  overflow: hidden;
  padding: clamp(104px, 16vh, 158px) clamp(18px, 5vw, 72px) 78px;
  position: relative;
}

.hero::before {
  background-image:
    linear-gradient(rgba(79, 212, 214, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 212, 214, 0.09) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 42%, black 74%, black 100%);
  opacity: 0.4;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.hero-image,
.hero-shade {
  inset: 0;
  position: absolute;
}

.hero-image {
  height: 100%;
  object-fit: cover;
  object-position: 46% center;
  width: 100%;
  z-index: -3;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 11, 11, 0.92) 0%, rgba(8, 11, 11, 0.62) 38%, rgba(8, 11, 11, 0.2) 72%),
    linear-gradient(0deg, rgba(8, 11, 11, 0.94) 0%, transparent 34%);
  z-index: -2;
}

.hero-content {
  max-width: 730px;
  padding-top: clamp(16px, 8vh, 72px);
}

.eyebrow {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.eyebrow,
.panel-meta,
.timeline-label,
.repo-index,
.repo-tech {
  font-family: "Cascadia Code", Consolas, monospace;
}

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

h1 {
  font-size: clamp(3.25rem, 7.2vw, 6.7rem);
  line-height: 0.96;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  line-height: 1.08;
  margin-bottom: 0;
  max-width: 880px;
}

h3 {
  font-size: 1.13rem;
  line-height: 1.3;
  margin-bottom: 12px;
}

.hero-role {
  color: var(--teal);
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-copy {
  color: #d5dcda;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.75;
  max-width: 670px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  position: relative;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button::after {
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  content: "";
  height: 6px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #051011;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.button.text-button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.quick-facts {
  background: var(--paper);
  color: var(--paper-ink);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: profile-fact;
}

.quick-facts article {
  background: var(--paper);
  border-right: 1px solid #d9dfdb;
  min-height: 150px;
  padding: clamp(22px, 3vw, 34px);
  position: relative;
}

.quick-facts article::before {
  color: #7b8a84;
  content: "0" counter(profile-fact);
  counter-increment: profile-fact;
  display: block;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.quick-facts strong {
  display: block;
  font-size: clamp(1.55rem, 2.6vw, 2.8rem);
  line-height: 1;
  margin-bottom: 12px;
}

.quick-facts span {
  color: var(--paper-muted);
  display: block;
  line-height: 1.5;
}

.section {
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 72px);
}

.section-heading {
  margin-bottom: clamp(32px, 5vw, 58px);
}

.section-heading::after {
  background: linear-gradient(90deg, var(--teal), var(--amber), transparent);
  content: "";
  display: block;
  height: 1px;
  margin-top: 28px;
  max-width: 420px;
}

.split {
  background: linear-gradient(135deg, #0a0e0d 0%, #151311 54%, #0d1412 100%);
}

.work-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.panel,
.practice-board,
.skill-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  background: var(--panel);
  padding: clamp(24px, 3vw, 38px);
}

.panel-meta,
.timeline-label {
  color: var(--green);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.panel p,
.skill-card p,
.timeline-card p,
.contact-section p,
.practice-row p {
  color: var(--muted);
  line-height: 1.65;
}

.clean-list {
  color: #dce3e0;
  display: grid;
  gap: 12px;
  line-height: 1.55;
  margin: 24px 0 0;
  padding-left: 18px;
}

.practice-board {
  background: #0d1211;
  overflow: hidden;
}

.board-header {
  align-items: center;
  background: #151b19;
  border-bottom: 1px solid var(--line);
  color: #e8eeeb;
  display: flex;
  font-size: 0.76rem;
  font-weight: 800;
  justify-content: space-between;
  padding: 15px 20px;
  text-transform: uppercase;
}

.status {
  align-items: center;
  color: var(--green);
  display: inline-flex;
  gap: 8px;
}

.status i {
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(115, 209, 139, 0.12);
  height: 7px;
  width: 7px;
}

.practice-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 116px;
  padding: 22px;
}

.practice-row:last-child {
  border-bottom: 0;
}

.practice-row p {
  margin: 6px 0 0;
}

.practice-code {
  border: 1px solid rgba(79, 212, 214, 0.4);
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 900;
  padding: 5px 7px;
  text-align: center;
}

.skill-matrix,
.learning-grid {
  display: grid;
  gap: 16px;
}

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

.skill-card {
  background: rgba(244, 246, 243, 0.06);
  min-height: 220px;
  padding: 24px;
}

.skill-card::before {
  background: linear-gradient(90deg, var(--teal), var(--amber));
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 24px;
  width: 42px;
}

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

.code-section {
  background:
    linear-gradient(105deg, rgba(79, 212, 214, 0.07), transparent 38%),
    #090d0c;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 72px);
  position: relative;
}

.code-section::before {
  background: linear-gradient(180deg, var(--teal), var(--amber));
  content: "";
  height: 86px;
  left: 0;
  position: absolute;
  top: clamp(72px, 10vw, 132px);
  width: 3px;
}

.code-intro {
  align-items: end;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.code-intro > div > p:last-child {
  color: var(--muted);
  line-height: 1.7;
  margin: 24px 0 0;
  max-width: 720px;
}

.github-cta {
  border-bottom: 1px solid rgba(79, 212, 214, 0.7);
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 16px 0;
}

.github-cta span {
  color: var(--teal);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
}

.github-cta strong {
  font-size: 0.95rem;
}

.repo-spectrum {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.repo-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.repo-card::before {
  background: linear-gradient(90deg, var(--teal), transparent);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.repo-card:nth-child(1) {
  grid-column: span 5;
}

.repo-card:nth-child(2) {
  grid-column: span 4;
}

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

.repo-card:nth-child(4) {
  grid-column: span 7;
}

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

.repo-index {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 28px;
}

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

.repo-tech {
  border-top: 1px solid var(--line);
  color: #aab7b2;
  font-size: 0.68rem;
  margin-top: auto;
  padding-top: 16px;
  text-transform: uppercase;
}

.timeline-card {
  background: #101412;
  padding: 26px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #d6ddda;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
}

.thesis-section {
  align-items: start;
  background: var(--paper);
  color: var(--paper-ink);
  display: grid;
  gap: clamp(40px, 7vw, 100px);
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 72px);
}

.thesis-section .eyebrow {
  color: #95600f;
}

.thesis-copy > p:not(.eyebrow) {
  color: var(--paper-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-top: 26px;
  max-width: 760px;
}

.thesis-note {
  border-left: 3px solid var(--teal);
  padding-left: 18px;
}

.framework-stack {
  border-top: 1px solid #cad2cd;
}

.framework-stack > div {
  align-items: start;
  border-bottom: 1px solid #cad2cd;
  display: grid;
  gap: 16px;
  grid-template-columns: 32px 68px minmax(0, 1fr);
  padding: 20px 0;
}

.framework-stack span {
  color: #95600f;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.framework-stack p {
  color: var(--paper-muted);
  line-height: 1.55;
  margin: 0;
}

.framework-stack .incident-line {
  background: var(--paper-ink);
  color: var(--paper);
  grid-template-columns: 84px minmax(0, 1fr);
  margin-top: 20px;
  padding: 20px;
}

.contact-section {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(79, 212, 214, 0.18), transparent 38%),
    linear-gradient(140deg, #0a0e0d, #15100e);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(72px, 10vw, 120px) clamp(18px, 5vw, 72px);
}

.contact-section h2 {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  max-width: 760px;
}

.contact-section p {
  max-width: 680px;
  margin-top: 22px;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px);
}

@media (max-width: 980px) {
  .quick-facts,
  .skill-matrix,
  .learning-grid,
  .work-grid,
  .contact-section,
  .thesis-section {
    grid-template-columns: 1fr 1fr;
  }

  .code-intro {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .github-cta {
    max-width: 320px;
  }

  .repo-spectrum {
    grid-template-columns: 1fr 1fr;
  }

  .repo-card:nth-child(n) {
    grid-column: auto;
  }

  .repo-card:last-child {
    grid-column: 1 / -1;
  }

  .work-grid .panel,
  .work-grid .practice-board,
  .contact-section > div:first-child {
    grid-column: 1 / -1;
  }

  .contact-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .thesis-copy,
  .framework-stack {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    position: absolute;
  }

  nav {
    gap: 10px 18px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    width: 100%;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    font-size: 0.8rem;
  }

  .hero {
    min-height: 86vh;
    padding-top: 142px;
  }

  .hero-image {
    object-position: center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(8, 11, 11, 0.94), rgba(8, 11, 11, 0.74)),
      linear-gradient(0deg, rgba(8, 11, 11, 0.98), transparent 48%);
  }

  h1 {
    font-size: clamp(3.15rem, 16vw, 4.8rem);
  }

  .quick-facts,
  .skill-matrix,
  .learning-grid,
  .work-grid,
  .contact-section,
  .thesis-section {
    grid-template-columns: 1fr;
  }

  .repo-spectrum {
    grid-template-columns: 1fr;
  }

  .repo-card:last-child {
    grid-column: auto;
  }

  .repo-card {
    min-height: 210px;
  }

  .quick-facts article,
  .skill-card,
  .timeline-card {
    min-height: auto;
  }

  .practice-row {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 20px 16px;
  }

  .framework-stack > div {
    grid-template-columns: 28px 62px minmax(0, 1fr);
  }

  .framework-stack .incident-line {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

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

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}
