/*
  :root behaves like a small global constants table.
  In C++ terms, these custom properties are close to constexpr values or
  macro definitions that let the rest of the file stay consistent.
*/
:root {
  color-scheme: dark;
  --bg: #090807;
  --surface: rgba(255, 255, 255, 0.02);
  --surface-strong: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.06);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.68);
  --soft: rgba(244, 241, 234, 0.48);
  --display: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(167, 133, 88, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible {
  color: #ffffff;
}

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

/*
  Skip links are accessibility shortcuts.
  They let keyboard users jump past repeated content, similar to a fast-forward
  button or a debugger's continue command.
*/
.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  transform: translateY(-220%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 8, 7, 0.92);
  color: var(--text);
  font-size: 0.82rem;
  text-decoration: none;
  z-index: 20;
}

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

/*
  The page shell is the centered outer frame.
  It is like a fixed-width stack frame for the whole document layout.
*/
.page-shell {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 46px;
}

/*
  Flexbox is the browser's built-in layout math engine.
  flex-direction: column tells the browser to stack the hero elements vertically
  instead of requiring manual Y-coordinate placement.
*/
.hero-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

/*
  The avatar is treated as a bounded object in the DOM.
  aspect-ratio, object-fit, and border-radius together prevent stretching and
  preserve the circle regardless of the source image dimensions.
*/
.avatar {
  width: 100px;
  height: 100px;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  object-fit: cover;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

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

h1 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 500;
}

.headline {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(1rem, 2.1vw, 1.1rem);
  line-height: 1.45;
  font-weight: 500;
}

.subheadline {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.lead-summary {
  max-width: 60ch;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1rem;
}

/*
  Flex wrapping makes the metadata behave like a row of compact records.
  Each list item is like a small struct with a label field and a value field.
*/
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 0;
  list-style: none;
  color: var(--soft);
  font-size: 0.88rem;
}

.meta-row li {
  min-width: 0;
}

.meta-row strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/*
  Grid is another built-in layout engine.
  It replaces manual row and column math with declarative spacing rules.
*/
.content-grid {
  display: grid;
  gap: 28px;
}

/*
  fit-content shrinks the heading box to the width of its text so the border
  only spans the words instead of stretching across the whole screen.
*/
h2 {
  width: fit-content;
  margin-bottom: 24px;
  color: #ffffff;
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.skills-list,
.project-list,
.cert-list,
.links-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills-list {
  display: grid;
  gap: 14px;
}

.skills-list dt {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.skills-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.cert-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.cert-list strong {
  color: var(--text);
  font-weight: 500;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-list article {
  padding-top: 0;
}

.project-list h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-tag {
  display: inline-block;
  margin-left: 6px;
  color: rgba(244, 241, 234, 0.48);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-list p,
.leadership p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 22px;
}

.link-row a {
  color: #f8f6f1;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 4px;
}

.link-row a:hover,
.link-row a:focus-visible {
  text-decoration-color: #ffffff;
}

/*
  The counter is centered like a stacked status badge.
  Flex column keeps the title and the number aligned without extra math.
*/
.counter-panel {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.counter-panel h2 {
  align-self: center;
  border-bottom: none;
  margin-bottom: 8px;
}

.counter-number {
  color: #ffffff;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.footer-note {
  margin-top: 36px;
  color: rgba(244, 241, 234, 0.36);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 28px, 720px);
    padding: 76px 0 56px;
  }

  .hero-top {
    gap: 18px;
  }

  .avatar {
    width: 84px;
    height: 84px;
  }

  .meta-row {
    gap: 14px 22px;
  }

  .counter-panel {
    min-height: 96px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}