:root {
  color-scheme: dark;
  --bg: #080a0d;
  --bg-elevated: #101419;
  --bg-band: #151911;
  --text: #f4f1e9;
  --muted: #b6b3aa;
  --soft: #d8d2c3;
  --line: rgba(244, 241, 233, 0.14);
  --line-strong: rgba(244, 241, 233, 0.24);
  --teal: #4fd0be;
  --amber: #e5b567;
  --green: #9ab56f;
  --rust: #c77d4a;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(244, 241, 233, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 233, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  color: rgba(244, 241, 233, 0.9);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    padding 180ms ease;
}

.site-header.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(8, 10, 13, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions,
.tag-list,
.project-stats {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--teal);
  font-size: 0.78rem;
}

.nav-links {
  justify-content: center;
  gap: clamp(14px, 2.6vw, 36px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a,
.header-link {
  transition: color 160ms ease;
}

.nav-links a:hover,
.header-link:hover {
  color: var(--text);
}

.header-link {
  color: var(--amber);
  font-weight: 700;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 88svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 132px clamp(20px, 6vw, 72px) 72px;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background:
    url("assets/capstone-neural-feedback-vs-direct-shooting.jpg") center / cover no-repeat,
    #111;
  filter: saturate(0.78) contrast(1.05) brightness(0.78);
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 10, 13, 0.95) 0%, rgba(8, 10, 13, 0.76) 42%, rgba(8, 10, 13, 0.32) 100%),
    linear-gradient(0deg, rgba(8, 10, 13, 0.96) 0%, rgba(8, 10, 13, 0.1) 38%, rgba(8, 10, 13, 0.72) 100%);
}

.hero-content {
  width: min(780px, 100%);
}

.eyebrow,
.section-kicker,
.project-index {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 940px;
  margin-bottom: 20px;
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--soft);
  font-size: clamp(1.02rem, 1.8vw, 1.26rem);
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(244, 241, 233, 0.06);
  color: var(--text);
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 208, 190, 0.62);
  background: rgba(79, 208, 190, 0.12);
}

.button-primary {
  border-color: rgba(229, 181, 103, 0.6);
  background: var(--amber);
  color: #17110a;
}

.button-primary:hover {
  border-color: var(--amber);
  background: #f0c47d;
}

.button-muted {
  cursor: default;
  color: var(--muted);
}

.button-muted:hover {
  transform: none;
  border-color: var(--line-strong);
  background: rgba(244, 241, 233, 0.06);
}

.hero-signal {
  position: absolute;
  right: clamp(20px, 5vw, 72px);
  bottom: 42px;
  width: min(280px, calc(100% - 40px));
  padding-left: 18px;
  border-left: 2px solid var(--teal);
  color: var(--muted);
}

.hero-signal strong {
  display: block;
  color: var(--text);
  font-size: 2.55rem;
  line-height: 1;
}

.hero-signal span,
.hero-signal small {
  display: block;
}

.intro-band,
.metrics-band,
.evidence-band,
.contact-section {
  padding: clamp(64px, 9vw, 112px) clamp(20px, 6vw, 72px);
}

.intro-band {
  background: #10120f;
}

.intro-grid {
  display: grid;
  max-width: var(--max);
  margin: 0 auto;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(34px, 6vw, 84px);
  align-items: center;
}

.profile-photo-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #161616;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.intro-copy p {
  max-width: 760px;
  color: var(--soft);
}

.profile-facts {
  display: grid;
  gap: 1px;
  margin: 30px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.profile-facts div {
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) 1fr;
  gap: 20px;
  padding: 18px;
  background: #10120f;
}

.profile-facts dt {
  color: var(--amber);
  font-weight: 800;
}

.profile-facts dd {
  margin: 0;
  color: var(--soft);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  padding-top: 1px;
  padding-bottom: 1px;
}

.metric {
  min-height: 154px;
  padding: 28px clamp(18px, 2.8vw, 34px);
  background: #0b0e12;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 12px 0 6px;
  color: var(--green);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(76px, 10vw, 128px) clamp(20px, 5vw, 42px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) 1fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  margin-bottom: 42px;
}

.section-heading p:not(.section-kicker) {
  max-width: 620px;
  color: var(--muted);
}

.section-heading.narrow {
  display: block;
}

.feature-project {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1px;
  margin-bottom: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.project-media,
.project-card > img {
  min-height: 360px;
  background: #151515;
}

.project-media img,
.project-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media-stack {
  position: relative;
  min-height: 560px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(79, 208, 190, 0.16), transparent 36%),
    #111417;
}

.project-media-stack .project-primary-image {
  border-radius: 6px;
  object-position: center 64%;
}

.project-media-stack .project-inset-image {
  position: absolute;
  right: 26px;
  bottom: 26px;
  width: min(42%, 290px);
  height: 32%;
  border: 1px solid rgba(244, 241, 233, 0.34);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.52);
  object-fit: cover;
}

.project-content,
.project-card-body {
  padding: clamp(24px, 4vw, 44px);
  background: var(--bg-elevated);
}

.project-content p,
.project-card-body p {
  color: var(--soft);
}

.tag-list {
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.82rem;
}

.inline-link {
  color: var(--amber);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.project-detail-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--soft);
  list-style: none;
}

.project-detail-list li {
  padding-left: 16px;
  border-left: 2px solid rgba(79, 208, 190, 0.58);
}

.project-detail-list strong {
  color: var(--text);
}

.project-stats {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.project-stats span {
  padding: 10px 12px;
  border-left: 2px solid var(--green);
  background: rgba(154, 181, 111, 0.1);
  color: var(--text);
  font-size: 0.9rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.project-card {
  min-width: 0;
  background: var(--bg-elevated);
}

.project-card > img {
  width: 100%;
  height: 270px;
}

.project-media-triptych {
  display: grid;
  min-height: 640px;
  grid-template-rows: minmax(250px, 0.88fr) minmax(260px, 1fr);
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(229, 181, 103, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(79, 208, 190, 0.12), transparent 42%),
    #111417;
}

.project-media-triptych .project-primary-image {
  width: 100%;
  height: 100%;
  padding: 10px;
  border-radius: 6px;
  background: #f2f6f4;
  object-fit: contain;
}

.project-secondary-row {
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.project-secondary-row img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 6px;
  background: #f4f4f1;
  object-fit: cover;
}

.card-image-stack {
  display: grid;
  min-height: 320px;
  grid-template-columns: 1fr 0.72fr;
  gap: 1px;
  background: var(--line);
}

.card-image-stack img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: #f7f7f2;
}

.card-image-stack img:nth-child(2) {
  object-position: center;
}

.project-card-text {
  display: flex;
  min-height: 405px;
}

.project-card-text .project-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.evidence-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  background: var(--bg-band);
}

.evidence-copy {
  max-width: 520px;
  justify-self: end;
}

.evidence-copy p {
  color: var(--soft);
}

.evidence-visuals {
  display: grid;
  gap: 12px;
}

.evidence-figure {
  margin: 0;
}

.evidence-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.evidence-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.evidence-main img {
  background: #f7f7f5;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.skill-group {
  min-height: 260px;
  padding: 28px;
  background: #0f1216;
}

.skill-group h3 {
  color: var(--amber);
  font-size: 1.08rem;
}

.skill-group p,
.timeline span,
.contact-section p {
  color: var(--soft);
}

.timeline {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  list-style: none;
  background: var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(110px, 0.18fr) minmax(170px, 0.28fr) 1fr;
  gap: 26px;
  padding: 24px;
  background: #10120f;
}

.timeline time {
  color: var(--green);
  font-weight: 800;
}

.timeline strong {
  color: var(--text);
}

.contact-section {
  display: grid;
  min-height: 82svh;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(79, 208, 190, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(199, 125, 74, 0.12), transparent 30%),
    #080a0d;
}

.contact-section h2 {
  max-width: 760px;
}

.contact-section p {
  max-width: 720px;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 6vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 86svh;
  }

  .hero-signal {
    position: static;
    width: 100%;
    margin-top: 34px;
  }

  .intro-grid,
  .section-heading,
  .feature-project,
  .evidence-band,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .evidence-copy {
    justify-self: start;
  }

  .metrics-band,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero {
    padding-right: 20px;
    padding-left: 20px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .metrics-band,
  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .profile-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .project-media,
  .project-card > img {
    min-height: 230px;
  }

  .card-image-stack {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .card-image-stack img {
    height: 230px;
  }

  .project-media-stack {
    min-height: 440px;
  }

  .project-media-stack .project-inset-image {
    right: 18px;
    bottom: 18px;
    width: 48%;
    height: 26%;
  }

  .project-media-triptych {
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .project-media-triptych .project-primary-image {
    height: auto;
    min-height: 210px;
  }

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

  .project-secondary-row img {
    height: 230px;
  }

  .project-card > img {
    height: 230px;
  }

  .project-card-text {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
