:root {
  color-scheme: dark;
  --bg: #070807;
  --bg-2: #0e1110;
  --panel: #141816;
  --panel-2: #191d1a;
  --line: rgba(236, 241, 230, 0.13);
  --text: #f5f7ef;
  --muted: #aeb7aa;
  --soft: #dfe6d8;
  --green: #40e6a1;
  --green-deep: #143e30;
  --amber: #f1be63;
  --rust: #d96e47;
  --violet: #a997ff;
  --shadow: rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(245, 247, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 247, 239, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

::selection {
  background: rgba(64, 230, 161, 0.32);
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px 14px;
  color: var(--text);
  transition: transform 180ms ease;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--amber));
  box-shadow: 0 0 22px rgba(64, 230, 161, 0.42);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(7, 8, 7, 0.78);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(7, 8, 7, 0.92);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(64, 230, 161, 0.45);
  border-radius: var(--radius);
  background: #10211a;
  color: var(--green);
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 180ms ease;
}

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

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

.section-band {
  position: relative;
  padding: 104px 0;
  overflow: hidden;
}

.section-shell,
.hero-grid {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 76px);
  padding-top: 80px;
  padding-bottom: 72px;
}

.hero::before,
.work::before,
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(64, 230, 161, 0.08), transparent 32%),
    linear-gradient(300deg, rgba(241, 190, 99, 0.08), transparent 36%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 4.35rem;
}

h2 {
  max-width: 800px;
  margin-bottom: 0;
  font-size: 2.8rem;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.hero-lede {
  max-width: 680px;
  color: var(--soft);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.button-primary {
  border-color: rgba(64, 230, 161, 0.55);
  background: var(--green);
  color: #07100c;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.signal-row div {
  position: relative;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 24, 22, 0.72);
  padding: 18px;
  overflow: hidden;
}

.signal-row div:first-child,
.signal-row div:nth-child(2),
.signal-row div:nth-child(3) {
  border-color: rgba(64, 230, 161, 0.26);
}

.signal-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.2;
}

.signal-row span {
  display: block;
  color: var(--muted);
  font-size: 0.93rem;
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.portrait-wrap {
  --portrait-x: 50%;
  --portrait-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: absolute;
  right: 24px;
  bottom: 0;
  width: min(390px, 88%);
  min-height: 500px;
  border: 1px solid rgba(64, 230, 161, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(20, 62, 48, 0.88), rgba(25, 29, 26, 0.64)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px);
  box-shadow: 0 28px 80px var(--shadow);
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  will-change: transform;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at var(--portrait-x) var(--portrait-y), rgba(64, 230, 161, 0.24), transparent 30%),
    radial-gradient(circle at calc(var(--portrait-x) + 10%) calc(var(--portrait-y) + 8%), rgba(241, 190, 99, 0.13), transparent 28%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  height: 28%;
  background: linear-gradient(transparent, rgba(7, 8, 7, 0.46));
  pointer-events: none;
}

.portrait-wrap:hover,
.portrait-wrap.is-tilting {
  border-color: rgba(64, 230, 161, 0.54);
  box-shadow: 0 32px 92px rgba(0, 0, 0, 0.46), 0 0 48px rgba(64, 230, 161, 0.13);
}

.portrait-wrap:hover::before,
.portrait-wrap.is-tilting::before {
  opacity: 1;
}

.portrait-vector-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  fill: none;
  opacity: 0.54;
  pointer-events: none;
  stroke: rgba(64, 230, 161, 0.46);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transform: translateZ(28px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.portrait-wrap:hover .portrait-vector-lines,
.portrait-wrap.is-tilting .portrait-vector-lines {
  opacity: 0.86;
  transform: translateZ(42px) scale(1.018);
}

.portrait-wrap img {
  position: absolute;
  z-index: 2;
  right: -24px;
  bottom: -4px;
  width: 112%;
  max-width: none;
  filter:
    contrast(1.08)
    saturate(0.9)
    drop-shadow(0 0 1px rgba(64, 230, 161, 0.95))
    drop-shadow(0 0 5px rgba(64, 230, 161, 0.28))
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
  transform: translateZ(34px);
  transition: transform 220ms ease, filter 220ms ease;
}

.portrait-wrap:hover img,
.portrait-wrap.is-tilting img {
  filter:
    contrast(1.1)
    saturate(0.95)
    drop-shadow(0 0 1px rgba(64, 230, 161, 1))
    drop-shadow(0 0 8px rgba(64, 230, 161, 0.38))
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.38));
  transform: translateZ(54px) scale(1.018);
}

.focus-card {
  position: absolute;
  z-index: 2;
  max-width: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 17, 16, 0.88);
  padding: 14px 16px;
  box-shadow: 0 16px 48px var(--shadow);
  backdrop-filter: blur(16px);
}

.focus-card span {
  display: block;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.focus-card strong {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
}

.focus-card-top {
  top: 86px;
  left: 6px;
}

.focus-card-bottom {
  right: 0;
  bottom: 62px;
}

.about,
.experience {
  background: rgba(14, 17, 16, 0.72);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: 34px;
}

.about-story {
  border-left: 3px solid var(--green);
  padding-left: 26px;
}

.about-story p {
  max-width: 720px;
  color: var(--soft);
  font-size: 1.08rem;
}

.about-story p:last-child,
.principles p:last-child,
.skill-card p:last-child,
.project-card p:last-child,
.timeline-item p:last-child,
.contact-panel p:last-child {
  margin-bottom: 0;
}

.principles {
  display: grid;
  gap: 12px;
}

.principles div,
.skill-card,
.project-card,
.timeline-item,
.contact-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 24, 22, 0.76);
  overflow: hidden;
}

.principles div {
  padding: 20px;
}

.principles span {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
}

.principles strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.05rem;
}

.principles p,
.skill-card p,
.project-card p,
.timeline-item p,
.contact-panel p,
.site-footer p {
  color: var(--muted);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 24px;
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(64, 230, 161, 0.34);
  border-radius: var(--radius);
  background: rgba(64, 230, 161, 0.08);
  color: var(--green);
  font-weight: 900;
}

.tag-list,
.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span,
.project-tools span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 6px 10px;
  color: var(--soft);
  font-size: 0.84rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 280px;
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(64, 230, 161, 0.38);
  background: rgba(25, 29, 26, 0.92);
}

[data-spotlight] {
  --spotlight-x: 50%;
  --spotlight-y: 50%;
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at var(--spotlight-x) var(--spotlight-y), rgba(64, 230, 161, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

[data-spotlight] > * {
  position: relative;
  z-index: 1;
}

[data-spotlight]:hover::before,
[data-spotlight].is-lit::before {
  opacity: 1;
}

.skill-card:hover,
.timeline-item:hover,
.principles div:hover,
.signal-row div:hover,
.contact-panel:hover {
  border-color: rgba(64, 230, 161, 0.34);
}

.project-card.featured {
  background:
    linear-gradient(135deg, rgba(64, 230, 161, 0.14), rgba(20, 24, 22, 0.82) 44%),
    rgba(20, 24, 22, 0.78);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 42px;
}

.project-meta span {
  border: 1px solid rgba(241, 190, 99, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
}

.sample-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  border: 1px solid rgba(64, 230, 161, 0.32);
  border-radius: var(--radius);
  background: #10211a;
  padding: 20px 22px;
}

.sample-strip p {
  margin: 0;
  color: var(--soft);
  font-weight: 700;
}

.sample-strip a {
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--green);
  padding: 11px 14px;
  color: #07100c;
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 26px;
  padding: 24px;
}

.timeline-year {
  color: var(--amber);
  font-weight: 900;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 0.65fr);
  gap: 42px;
  align-items: start;
}

.contact-shell .section-heading {
  display: block;
  margin-bottom: 0;
}

.contact-panel {
  padding: 24px;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.contact-links a {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
  transition: border-color 180ms ease, background 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: rgba(64, 230, 161, 0.42);
  background: rgba(64, 230, 161, 0.06);
}

.contact-links span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-links strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.95rem;
}

.copy-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(64, 230, 161, 0.42);
  border-radius: var(--radius);
  background: transparent;
  padding: 0 16px;
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.copy-email svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.copy-email.is-copied {
  background: rgba(64, 230, 161, 0.12);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

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

@media (max-width: 980px) {
  .section-band {
    padding: 82px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
  }

  .hero-grid,
  .about-grid,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 40px;
  }

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .hero-visual {
    min-height: 560px;
  }

  .portrait-wrap {
    left: 50%;
    right: auto;
    transform: translateX(-50%) perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    width: min(380px, 92%);
  }

  .focus-card-top {
    left: 4%;
  }

  .focus-card-bottom {
    right: 4%;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .section-shell,
  .hero-grid,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 14px;
    right: 14px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(14, 17, 16, 0.98);
    padding: 10px;
    box-shadow: 0 18px 44px var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

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

  .nav-links a {
    padding: 12px;
  }

  .hero {
    padding-top: 48px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.88rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

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

  .hero-visual {
    min-height: 520px;
  }

  .portrait-wrap {
    min-height: 500px;
  }

  .focus-card {
    max-width: 220px;
    padding: 12px 14px;
  }

  .focus-card-top {
    top: 18px;
    left: 0;
  }

  .focus-card-bottom {
    right: 0;
    bottom: 20px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sample-strip,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .section-band {
    padding: 66px 0;
  }

  .hero {
    padding-top: 38px;
  }

  h1 {
    font-size: 2.18rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-visual {
    min-height: 480px;
  }

  .portrait-wrap {
    min-height: 430px;
  }

  .portrait-wrap img {
    right: -20px;
    bottom: -16px;
  }

  .focus-card {
    max-width: 190px;
  }

  .sample-strip a,
  .copy-email {
    width: 100%;
    text-align: center;
  }
}

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

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

  .portrait-wrap {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
  }
}
