:root {
  --bg: #0e1110;
  --bg-soft: #171b19;
  --surface: rgba(20, 24, 22, 0.74);
  --surface-strong: rgba(20, 24, 22, 0.92);
  --text: #f5f7ef;
  --muted: #b7bcae;
  --muted-strong: #848b7b;
  --accent: #7ee0c4;
  --accent-2: #f5c76b;
  --accent-3: #f08f7f;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(126, 224, 196, 0.08), transparent 28%),
    linear-gradient(225deg, rgba(245, 199, 107, 0.08), transparent 32%),
    linear-gradient(180deg, #111310 0%, #151816 45%, #090b0a 100%);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
  opacity: 0.28;
}

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

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

.mesh-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(126, 224, 196, 0.14), transparent 28%),
    linear-gradient(310deg, rgba(245, 199, 107, 0.12), transparent 35%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 120px);
  transform: perspective(900px) rotateX(58deg) translateY(-32%);
  transform-origin: top;
  opacity: 0.72;
}

.background-grid {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 35%),
    radial-gradient(circle at 50% 0%, rgba(126, 224, 196, 0.08), transparent 50%);
  pointer-events: none;
}

.site-header,
.section-shell,
.site-footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(126, 224, 196, 0.2), rgba(136, 167, 255, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: "Fraunces", serif;
  font-weight: 800;
}

.brand strong,
.section-heading h2,
.hero h1,
.profile-card h2 {
  font-family: "Fraunces", serif;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
}

.section-shell {
  padding: 2rem 0;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.8fr);
  gap: 1.4rem;
  align-items: stretch;
  padding-top: 2.5rem;
}

.hero-copy,
.hero-card,
.section-panel,
.timeline-card,
.contact-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.section-panel,
.timeline-card,
.contact-card {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: clamp(1.5rem, 3vw, 3rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 5rem, 5.6rem);
  line-height: 0.98;
  max-width: 10ch;
}

.lede,
.about-grid p,
.contact-copy p,
.timeline-meta p {
  color: var(--muted);
}

.lede {
  max-width: 66ch;
  margin: 1.4rem 0 0;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--border);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.contact-card a:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #03111b;
  background: linear-gradient(135deg, var(--accent), #c8fff1);
  border-color: transparent;
  font-weight: 800;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.hero-facts div {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-facts dt {
  color: var(--muted-strong);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-facts dd {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.profile-card {
  padding: 1.4rem;
  border-radius: calc(var(--radius-xl) - 6px);
  background:
    radial-gradient(circle at top left, rgba(126, 224, 196, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(16, 30, 52, 0.95), rgba(8, 14, 24, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-scene {
  position: relative;
  min-height: 220px;
  border-radius: calc(var(--radius-xl) - 6px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(126, 224, 196, 0.12), transparent 40%),
    linear-gradient(315deg, rgba(240, 143, 127, 0.12), transparent 45%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transform-style: preserve-3d;
  perspective: 900px;
}

.scene-rail {
  position: absolute;
  inset: 2rem 1.3rem;
  border: 1px solid rgba(126, 224, 196, 0.18);
  transform: rotateX(62deg) rotateZ(-12deg);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(245, 199, 107, 0.08), inset 0 0 35px rgba(126, 224, 196, 0.08);
}

.scene-rail::before,
.scene-rail::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: inherit;
}

.scene-rail::after {
  inset: 36%;
}

.node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 4.4rem;
  aspect-ratio: 1;
  border-radius: 16px;
  color: #07110e;
  background: linear-gradient(145deg, #c8fff1, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 900;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.34);
  transform-style: preserve-3d;
  animation: float-node 6s ease-in-out infinite;
}

.node-core {
  left: calc(50% - 2.2rem);
  top: calc(50% - 2.2rem);
  transform: translateZ(70px);
}

.node-a {
  left: 12%;
  top: 18%;
  background: linear-gradient(145deg, #ffe3a0, var(--accent-2));
  animation-delay: -1.4s;
}

.node-b {
  right: 12%;
  top: 20%;
  background: linear-gradient(145deg, #ffd5cc, var(--accent-3));
  animation-delay: -2.8s;
}

.node-c {
  left: 18%;
  bottom: 16%;
  animation-delay: -4.2s;
}

.node-d {
  right: 18%;
  bottom: 14%;
  background: linear-gradient(145deg, #fff2c6, var(--accent-2));
  animation-delay: -5.4s;
}

.profile-label {
  margin: 0 0 0.35rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-card h2 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.05;
}

.profile-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.profile-list {
  display: grid;
  gap: 0.8rem;
}

.profile-list div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-list span {
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.profile-list strong {
  text-align: right;
  font-size: 0.95rem;
}

.section-heading {
  max-width: 58rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 2.7rem, 3.1rem);
  line-height: 1.04;
}

.section-panel {
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.about-grid,
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-grid p {
  margin: 0;
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.timeline-card {
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.timeline-meta h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: "Fraunces", serif;
}

.timeline-meta p {
  margin: 0;
}

.bullet-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.bullet-list li {
  color: var(--text);
}

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

.project-card,
.skill-card,
.education-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card:hover,
.skill-card:hover,
.education-card:hover,
.home-card:hover,
.text-card:hover,
.metric-card:hover {
  transform: perspective(900px) rotateX(1.5deg) rotateY(-1.5deg) translateY(-3px);
  border-color: rgba(126, 224, 196, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-top h3,
.education-card h3,
.skill-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-family: "Fraunces", serif;
}

.project-card p,
.education-card p,
.skill-card p {
  margin: 0;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  color: #dffaf4;
  background: rgba(126, 224, 196, 0.08);
  border: 1px solid rgba(126, 224, 196, 0.15);
  font-size: 0.82rem;
}

.project-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-links a {
  font-size: 0.92rem;
  color: #dffaf4;
  border-bottom: 1px solid rgba(223, 250, 244, 0.22);
}

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

.skill-card ul {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-card li {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.84rem;
}

.education-grid {
  align-items: stretch;
}

.education-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.contact-copy {
  padding: 1rem 0;
}

.contact-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.3rem, 2.7rem);
  line-height: 1.05;
  font-family: "Fraunces", serif;
}

.contact-copy p:last-child {
  max-width: 54ch;
}

.contact-card {
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.contact-card a {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease;
}

.site-footer {
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.page-hero {
  padding: 4.2rem 0 1rem;
  max-width: 62rem;
}

.page-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 4.4rem, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-lede {
  max-width: 60ch;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.home-grid,
.two-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

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

.home-card,
.text-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.home-card:hover {
  transform: translateY(-2px);
}

.home-card h3,
.text-card h3,
.text-card h2 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", serif;
}

.home-card p,
.text-card p {
  margin: 0;
  color: var(--muted);
}

.mini-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-section {
  padding-top: 2rem;
}

.text-link {
  color: #dffaf4;
  border-bottom: 1px solid rgba(223, 250, 244, 0.22);
}

.project-stack {
  display: grid;
  gap: 1rem;
}

.chip-row-large {
  margin-top: 1rem;
}

.chip-inline {
  align-self: flex-start;
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  min-height: 150px;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(150deg, rgba(126, 224, 196, 0.09), transparent 40%),
    rgba(255, 255, 255, 0.03);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.metric-card strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2.3rem;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
}

code {
  color: #07110e;
  background: var(--accent);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

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

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

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 18px, 0) scale(1.04);
  }
}

@keyframes float-node {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@media (max-width: 1024px) {
  .hero,
  .contact-section,
  .project-grid,
  .skills-grid,
  .about-grid,
  .education-grid,
  .home-grid,
  .two-col,
  .compact-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 28px;
    align-items: flex-start;
    padding: 0.95rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .mini-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 1.2rem;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .timeline-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-list div {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-list strong {
    text-align: left;
  }
}
