:root {
  --bg: #151312;
  --surface: #1f1d1c;
  --surface-2: #2c2a29;
  --white: #fff;
  --muted: #a8a0a0;       /* body copy: 7.2:1 on --bg */
  --dim: #857d7d;         /* dimmed heading lines: 4.6:1 on --bg */
  --lime: #c5ff41;
  --orange: #f46c38;
  --orange-ink: #c94d18;  /* orange that holds 4.5:1 against white */
  --grey: #5f6063;        /* tagline on white: 6.3:1 */
  --line: rgba(182, 180, 189, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:has(.modal[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: "Poppins", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
section { scroll-margin-top: 80px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--white);
  transition: background 0.25s, color 0.25s;
}
.nav a:hover { background: var(--surface-2); }
.nav svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The active section's label slides out next to its icon */
.nav-label {
  max-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}
.nav a.active { background: var(--white); color: var(--bg); }
.nav a.active .nav-label { max-width: 110px; margin-left: 6px; opacity: 1; }

/* Tooltip for the inactive items */
.nav a::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--white);
  background: var(--surface-2);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.nav a:not(.active):hover::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 344px minmax(0, 696px);
  justify-content: center;
  gap: 100px;
  padding: 100px 40px 0;
}

/* ---------- Profile card ---------- */
.profile-wrap { position: relative; }
.profile {
  position: sticky;
  top: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 30px 36px;
  background: var(--white);
  color: var(--bg);
  border-radius: 20px;
  text-align: center;
}
.arc {
  position: absolute;
  width: 200px;
  height: 200px;
  fill: none;
  stroke: #ff7a00;
  stroke-width: 3;
  stroke-dasharray: 10 8;
  pointer-events: none;
  animation: spin 40s linear infinite;
}
.arc-top { top: -118px; left: -80px; }
.arc-mid { top: 222px; left: -158px; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.profile-photo {
  position: relative;
  display: block;
  width: 240px;
  height: 284px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 16px;
  background: #4a4a3a;
}
.profile-name {
  margin-top: 26px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.resume-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  background: var(--orange-ink);
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}
.resume-btn:hover { background: #b0420f; transform: translateY(-1px); }
.resume-download {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: var(--orange-ink);
  border: 1.5px solid var(--orange-ink);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.resume-download:hover { color: var(--white); background: var(--orange-ink); }
.resume-btn svg,
.resume-download svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-tagline {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.2;
  color: var(--grey);
}
.profile-social {
  display: flex;
  gap: 18px;
  margin-top: 24px;
}
.profile-social svg {
  width: 20px;
  height: 20px;
  fill: var(--orange-ink);
  transition: transform 0.2s;
}
.profile-social svg.stroke {
  fill: none;
  stroke: var(--orange-ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.profile-social a:hover svg { transform: translateY(-2px); }

/* ---------- Content ---------- */
.section { padding-bottom: 140px; }
.display {
  font-size: 90px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero .display { font-size: 110px; }
.display span { display: block; color: var(--white); }
.display span:last-child { color: var(--dim); }
/* Scroll reveal: lines start dim and light up as they enter the viewport.
   The last line of each heading stays dim. */
.js .reveal span { color: var(--dim); transition: color 0.6s ease; }
.js .reveal span.lit:not(:last-child) { color: var(--white); }

.lead, .prose {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}
.lead { margin-top: 28px; max-width: 520px; }
.prose { margin-top: 30px; }
.prose p + p { margin-top: 18px; }
.prose strong { color: #e2dcdc; font-weight: 600; }

.stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
}
.stat-num {
  display: block;
  font-size: 66px;
  font-weight: 500;
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  text-transform: uppercase;
}

.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 60px;
}
.feature {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 24px 22px;
  border-radius: 10px;
  color: var(--bg);
}
.feature-orange { background: var(--orange); }
.feature-lime { background: var(--lime); }
.feature-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 3;
  pointer-events: none;
}
.feature-orange .feature-bg { stroke: rgba(196, 70, 30, 0.6); }
.feature-lime .feature-bg { stroke: rgba(70, 200, 220, 0.6); }
.feature-icon {
  position: relative;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.feature-eyebrow {
  position: relative;
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feature-title {
  position: relative;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ---------- Experience ---------- */
.jobs { list-style: none; margin: 40px 0 0; padding: 0; }
.job {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 16px;
  border-radius: 10px;
  transition: background 0.25s;
}
.job:hover, .job:focus-visible { background: var(--surface); }
.job h3 { font-size: 26px; font-weight: 600; }
.job-role { display: block; margin-top: 2px; font-size: 16px; font-weight: 500; color: var(--orange); }
.job p {
  max-width: 460px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.job-date { display: block; margin-top: 14px; font-size: 15px; color: var(--muted); }
.job-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 10px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.6;
  stroke-linecap: round;
  transition: transform 0.25s;
}
.job:hover .job-arrow { transform: translate(2px, -2px); }

/* ---------- Modal ---------- */
.modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 64px);
  padding: 0;
  color: var(--white);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
}
.modal[open] { animation: modal-in 0.25s ease; }
.modal::backdrop { background: rgba(10, 9, 8, 0.7); backdrop-filter: blur(4px); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
.modal-body { padding: 36px 36px 40px; }
.modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: var(--surface-2);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.modal-close:hover { background: #3a3837; }
.modal-role .modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
}
.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.modal-company {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-title {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}
.modal-date { margin-top: 8px; font-size: 15px; color: var(--orange); }
.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.modal-chips li {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bg);
  background: var(--lime);
  border-radius: 999px;
}
.modal-list {
  margin: 26px 0 0;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.55;
  color: #cfc8c8;
}
.modal-list li + li { margin-top: 12px; }
.modal-list li::marker { color: var(--orange); }

/* Resume modal: near full-screen PDF viewer */
.modal-resume {
  width: min(1100px, calc(100% - 48px));
  height: calc(100dvh - 48px);
  max-height: none;
  overflow: hidden;
}
.modal-resume[open] { display: flex; flex-direction: column; }
.resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 22px;
  border-bottom: 1px solid var(--line);
}
.resume-bar h3 { font-size: 16px; font-weight: 600; }
.resume-bar-actions { display: flex; align-items: center; gap: 8px; }
.bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--surface-2);
  border-radius: 999px;
  transition: background 0.2s;
}
.bar-btn:hover { background: #3a3837; }
.bar-btn-primary { color: var(--bg); background: var(--orange); }
.bar-btn-primary:hover { background: #ff7d4b; }
.bar-btn-icon { width: 36px; padding: 0; }
.bar-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.resume-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #525659;
}

/* ---------- Superpowers ---------- */
.powers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px 40px;
  margin-top: 40px;
  padding: 0 16px;
}
.power h3 { font-size: 24px; font-weight: 500; }
.power p {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-intro { max-width: 520px; margin-top: 60px; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.btn svg.fill { fill: currentColor; stroke: none; }
.btn-primary { color: var(--bg); background: var(--orange); }
.btn-primary:hover { background: #ff7d4b; }
.btn-secondary { color: var(--white); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--white); }

.footer {
  padding: 0 16px 60px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1079px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); gap: 50px; padding-inline: 32px; }
  .display { font-size: 64px; }
  .hero .display { font-size: 80px; }
  .profile-photo { width: 220px; height: 260px; }
}

@media (max-width: 809px) {
  .layout { grid-template-columns: 1fr; gap: 60px; padding: 84px 16px 0; }
  .profile { position: relative; top: 0; max-width: 344px; margin: 0 auto; }
  .display { font-size: 44px; }
  .hero .display { font-size: 56px; }
  .lead, .prose { font-size: 16px; }
  .section { padding-bottom: 90px; }
  .stats { gap: 24px; }
  .stat-num { font-size: 40px; }
  .feature-cards, .powers { grid-template-columns: 1fr; }
  .powers { gap: 32px; padding: 0; }
  .job { padding-inline: 0; }
  .job h3 { font-size: 22px; }
  .modal-body { padding: 28px 22px 32px; }
  .modal-title { font-size: 26px; }
  .footer { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arc { animation: none; }
  .modal[open] { animation: none; }
}
