:root {
  --ink: #0d1826;
  --panel: #122238;
  --panel-2: #16283f;
  --line: #2c4a68;
  --line-soft: #1e364f;
  --paper: #e9edf1;
  --fog: #9db2c7;
  --white: #f3f6f9;
  --brass: #d3a24f;
  --brass-dim: #8c6b34;
  --sage: #7fb88f;
  --coral: #c96a4f;
  --radius: 10px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

/* blueprint grid backdrop */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
}

/* NAV */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 24, 38, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.mark .dot {
  width: 8px;
  height: 8px;
  background: var(--brass);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fog);
}

.nav-links a {
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--brass);
}

.nav-toggle {
  display: none;
}

@media (max-width:760px) {
  .nav-links {
    display: none;
  }
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--line-soft);
}

.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: 0.14em;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero h1 span {
  color: var(--brass);
}

.hero .role {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--fog);
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

.hero .bio {
  max-width: 46ch;
  color: var(--paper);
  font-size: 18.5px;
  margin-bottom: 30px;
}

.coords {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fog);
  margin-bottom: 34px;
  letter-spacing: 0.03em;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: #e3b364;
}

.btn-ghost {
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass);
}

/* HERO DIAGRAM */
.stack-diagram {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 22px;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fog);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}

.text-brass {
  color: var(--brass);
}

.stack-layer {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  background: var(--panel-2);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}

.stack-layer:last-child {
  margin-bottom: 0;
}

.stack-layer:hover,
.stack-layer.active {
  border-left-color: var(--brass);
  background: #1b3049;
}

.stack-layer .row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stack-layer .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}

.stack-layer .tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brass);
  border: 1px solid var(--brass-dim);
  padding: 2px 8px;
  border-radius: 20px;
}

.stack-layer .detail {
  font-size: 15px;
  color: var(--fog);
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .25s ease, opacity .25s ease, margin-top .25s ease;
}

.stack-layer.active .detail {
  max-height: 80px;
  opacity: 1;
}

.stack-layer .stack-tools {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--sage);
  margin-top: 6px;
}

/* SECTION SHELLS */
section {
  padding: 84px 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 44px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
}

.section-head .idx {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fog);
  letter-spacing: 0.08em;
}

/* ABOUT / STATS */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-copy p {
  color: var(--paper);
  font-size: 18.5px;
  margin-bottom: 16px;
  max-width: 56ch;
}

.stat-ledger {
  border-top: 1px solid var(--line);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}

.stat-row .num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brass);
}

.stat-row .lbl {
  color: var(--fog);
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: center;
}

/* EXPERIENCE TIMELINE */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.tl-item {
  position: relative;
  padding-bottom: 40px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--brass);
}

.tl-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.tl-role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
}

.tl-company {
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 15px;
}

.tl-dates {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fog);
  white-space: nowrap;
}

.tl-desc {
  color: var(--paper);
  font-size: 17px;
  max-width: 60ch;
}

/* PROJECTS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.pcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, transform .2s;
}

.pcard:hover {
  border-color: var(--brass-dim);
  transform: translateY(-2px);
}

.pcard .phead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.pcard h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.pcard .country {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fog);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.pcard .client {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--sage);
}

.pcard p {
  font-size: 16px;
  color: var(--paper);
  flex-grow: 1;
}

.tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tagrow span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brass);
  background: #1c2f47;
  padding: 3px 8px;
  border-radius: 5px;
}

.pcard .plink {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fog);
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
  margin-top: 4px;
}

.pcard .plink a:hover {
  color: var(--brass);
}

/* SKILLS */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  margin-bottom: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 14.5px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--paper);
}

.interest-row {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.interest-row h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  margin-bottom: 14px;
}

.interest-row .chip {
  color: var(--brass);
  border-color: var(--brass-dim);
}

/* EDU + ACHIEVEMENTS */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.edu-item {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
}

.edu-item:first-child {
  padding-top: 0;
}

.edu-degree {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 3px;
}

.edu-school {
  color: var(--fog);
  font-size: 15.5px;
  margin-bottom: 4px;
}

.edu-score {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--brass);
}

.badge-list {
  list-style: none;
}

.badge-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
  color: var(--paper);
}

.badge-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

.badge-sub {
  margin-top: 26px;
}

.badge-sub h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fog);
  margin-bottom: 8px;
}

/* CONTACT / FOOTER */
footer {
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

.contact-inner {
  position: relative;
  z-index: 2;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 48px);
  max-width: 16ch;
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 60px;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 15.5px;
  border: 1px solid var(--line);
  padding: 11px 18px;
  border-radius: var(--radius);
  transition: border-color .2s, color .2s;
}

.contact-links a:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--fog);
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
}

@media (max-width:860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

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

  .edu-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .wrap {
    padding: 0 20px;
  }
}