:root {
  --bg: #050a05;
  --fg: #a3a3a3;
  --heading: #e8e8e8;
  --line: #243028;
  --panel: #101510;
  --card: #121814;
  --mint: #98ff98;
  --gold: #ffd700;
  --ink: #050a05;
  --serif: Lora, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); color: var(--heading); font-weight: 600; line-height: 1.25; }
h1 { margin: 0 0 8px; font-size: clamp(32px, 4vw, 40px); font-weight: 700; line-height: 1.5; }
h2 { margin: 0 0 8px; font-size: 24px; color: var(--fg); font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 22px; }
p { margin: 0 0 16px; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-150%);
  background: var(--mint);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { transform: none; }

header {
  width: min(1152px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: flex-end;
}
.nav {
  background: #0c120e;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  display: flex;
  justify-content: center;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-family: var(--serif);
  text-decoration: none;
  color: var(--fg);
  padding: 8px 16px;
  border-radius: 999px;
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--heading); background: #1a221c; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--heading);
  padding: 10px 16px;
  cursor: pointer;
}

main { width: min(1152px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 48px 32px 16px;
}
.avatar {
  width: 200px;
  height: 200px;
  flex: none;
  border-radius: 50%;
  border: 4px solid #f3f3f3;
  background: radial-gradient(circle at 50% 35%, #3a3228, #0c0e0c 72%);
  object-fit: cover;
  object-position: center 18%;
}
.hero-copy { max-width: 660px; }
.hero-copy p { font-size: 16px; margin-bottom: 12px; }
.hero-copy em { color: var(--gold); font-style: normal; font-weight: 600; }
.caret {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  background: var(--heading);
  transform: translateY(2px);
  animation: blink 1s steps(1) infinite;
}
.cta {
  display: inline-block;
  margin-top: 8px;
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 12px 28px;
  border-radius: 999px;
}
.cta:hover { filter: brightness(1.05); }
.cta:focus-visible, .text-link:focus-visible, .nav-links a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.block { padding: 24px 0 32px; }
.about { padding-top: 12px; }
.about h2, .about h3 { color: var(--fg); font-weight: 600; }
.about h3 { font-size: 18px; margin: 16px 0 8px; }
.about p { font-size: 16px; margin: 8px 0 0; }
.skills, .chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.skills li, .chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--fg);
  font-size: 16px;
}
.skills svg, .skills img { width: 24px; height: 24px; flex: none; object-fit: contain; }
.chips { margin-top: 16px; }
.chips li { font-size: 14px; }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card {
  background: var(--card);
  border: 1px solid #1c2820;
  border-radius: 24px;
  padding: 16px;
}
.preview {
  background: #0b100d;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.preview svg { width: 100%; height: 100%; display: block; }
.card-body { padding: 8px 8px 6px; }
.card h3 { font-size: 28px; margin-top: 12px; }
.kicker {
  margin: 18px 0 4px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8e8e8e;
}
.text-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--heading);
  font-family: var(--serif);
  font-size: 20px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.date { margin: 12px 0 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #8e8e8e; }
.card .date + h3 { margin-top: 4px; }
.subhead { margin: 48px 0 16px; font-size: 20px; color: var(--fg); }
.note { margin: -8px 0 16px; font-size: 15px; color: #8e8e8e; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mini-card {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  padding: 4px 18px 16px;
  background: #0b100d;
}
.mini-card h4 { margin: 4px 0 6px; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--heading); }
.mini-card p { font-size: 15px; margin-bottom: 10px; }
.mini-card .stack { margin: 0; font-size: 13px; color: #cfcfcf; }
.company { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--heading); }
.certs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.certs li { display: flex; gap: 14px; align-items: center; }
.cert-title { margin: 0; color: var(--heading); }
.cert-from { margin: 0; font-size: 15px; }
.social { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0; }
.social a { display: inline-flex; color: #d6d6d6; }
.social a:hover { color: var(--mint); }
.social svg { width: 28px; height: 28px; }
.contact a { color: var(--heading); text-underline-offset: 3px; }
.org { display: flex; gap: 16px; align-items: center; margin: 8px 0 20px; }
.org .when { margin: 2px 0 0; }
.steps { list-style: none; margin: 0; padding: 0 0 0 30px; }
.steps li { position: relative; padding: 0 0 28px 34px; }
.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #667068;
}
.steps li:first-child::before { background: var(--mint); box-shadow: 0 0 0 4px #98ff9826; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  bottom: 0;
  width: 1px;
  background: #2c382f;
}
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0; }
.steps .when { margin-bottom: 4px; }
.steps .via { font-size: 14px; color: var(--gold); margin-bottom: 6px; }
.roles { list-style: none; margin: 8px 0 0; padding: 0 0 0 8px; }
.roles li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; position: relative; padding: 0 0 32px 28px; }
.roles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #667068;
}
.roles li:first-child::before { background: var(--mint); box-shadow: 0 0 0 4px #98ff9826; }
.roles li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: #2c382f;
}
.badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #161c18;
  border: 1px solid var(--line);
  color: var(--mint);
  display: grid;
  place-items: center;
}
.badge svg { width: 28px; height: 28px; }
.badge { font-family: var(--serif); font-weight: 700; font-size: 20px; text-transform: lowercase; }
.badge.small { width: 44px; height: 44px; flex: none; font-size: 17px; text-transform: none; color: var(--gold); }
.badge.logo { background: #fff; overflow: hidden; padding: 6px; }
.badge.logo img { width: 100%; height: 100%; object-fit: contain; }
.when { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #8e8e8e; }
.contact { padding-bottom: 80px; }
footer { border-top: 1px solid #222; padding: 22px 20px 32px; color: #8a8a8a; }
footer p { width: min(960px, calc(100% - 40px)); margin: 0 auto; }

dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #101510;
  color: var(--fg);
  border: 1px solid #31483a;
  border-radius: 20px;
  padding: 28px 24px 24px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
dialog h2 { margin-top: 0; color: var(--heading); font-size: 28px; }
dialog h3 { font-size: 18px; margin-top: 18px; }
dialog ul { margin: 8px 0 16px; padding-left: 18px; }
.stack { color: #cfcfcf; }
.close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--heading);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
@media (max-width: 800px) {
  .hero { flex-direction: column; text-align: left; min-height: 0; align-items: flex-start; gap: 24px; padding: 32px 0 8px; }
  .avatar { width: 150px; height: 150px; }
  .projects { grid-template-columns: 1fr; }
  .card h3 { font-size: 24px; }
  .nav { width: min(100%, 280px); border-radius: 20px; display: block; }
  .nav-toggle { display: block; width: 100%; text-align: left; }
  .nav-links { display: none; flex-direction: column; padding: 4px; }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { border-radius: 20px; }
}

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

@keyframes blink { 50% { opacity: 0; } }
