:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #11151a;
  --surface-soft: #151a20;
  --text: #f3f6f4;
  --muted: #a4adb5;
  --faint: #818b95;
  --border: #252b33;
  --border-strong: #343c46;
  --accent: #8ce99a;
  --accent-soft: rgba(140, 233, 154, 0.1);
  --accent-ink: #0a240f;
  --font: "Segoe UI Variable Text", "Aptos", "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Aptos Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --shell: min(1080px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shell,
.nav-shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(11, 13, 16, 0.88);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: grid;
  min-height: 76px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.wordmark {
  display: inline-flex;
  justify-self: start;
  align-items: center;
}

.brand-mark {
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
}

.brand-mark span {
  color: var(--accent);
}

.wordmark:hover .brand-mark,
.wordmark:focus-visible .brand-mark {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.nav-github {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="location"],
.nav-github:hover,
.nav-github:focus-visible {
  color: var(--text);
}

.nav-links a[aria-current="location"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 7px;
}

.nav-github {
  justify-self: end;
}

.nav-github span {
  margin-left: 5px;
  color: var(--accent);
}

.hero {
  display: flex;
  min-height: min(820px, 100svh);
  padding-top: 150px;
  padding-bottom: 64px;
  flex-direction: column;
  justify-content: center;
}

.hero-copy {
  max-width: 900px;
}

.eyebrow,
.section-number,
.toolbox-label {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  margin-bottom: 25px;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.6rem, 7.1vw, 6.25rem);
  font-weight: 690;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero h1 strong {
  color: var(--accent);
  font-weight: inherit;
}

.hero-intro {
  max-width: 690px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  margin-top: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #a5f2b0;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--muted);
  background: var(--surface);
}

.profile-summary {
  display: grid;
  margin: auto 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  grid-template-columns: repeat(3, 1fr);
}

.profile-summary div {
  padding: 0 28px;
  border-left: 1px solid var(--border);
}

.profile-summary div:first-child {
  padding-left: 0;
  border-left: 0;
}

.profile-summary dt,
.profile-summary dd {
  margin: 0;
}

.profile-summary dt {
  margin-bottom: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-summary dd {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.skills-section,
.about-section {
  padding-top: 112px;
}

.section-heading {
  display: grid;
  margin-bottom: 40px;
  grid-template-columns: 150px 1fr;
  align-items: start;
  gap: 34px;
}

.section-number {
  padding-top: 12px;
  color: var(--accent);
}

.section-heading h2,
.contact-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.55rem, 5vw, 4.3rem);
  font-weight: 670;
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-heading > div > p {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
}

.level-legend {
  display: flex;
  margin: 0 0 18px 184px;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.level-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 0.72rem;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.legend-dot.level-good {
  opacity: 0.72;
}

.legend-dot.level-mid {
  opacity: 0.46;
}

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

.skill-card {
  display: flex;
  min-height: 0;
  padding: 28px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 180ms ease;
}

.skill-card:hover {
  border-color: var(--border-strong);
}

.skill-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.skill-card-number {
  display: grid;
  width: 35px;
  height: 35px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.skill-card-heading p {
  margin: 0 0 2px;
  color: var(--faint);
  font-size: 0.72rem;
}

.skill-card-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.skill-card-intro {
  min-height: 72px;
  margin: 24px 0 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.skill-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 24px;
  list-style: none;
}

.skill-label {
  display: flex;
  margin-bottom: 9px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.skill-label > span {
  min-width: 0;
  overflow: visible;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

.skill-label strong {
  flex: none;
  padding-top: 1px;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 650;
}

.skill-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.skill-meter i {
  display: block;
  height: 6px;
  border-radius: 10px;
  background: var(--border-strong);
}

.skill-item[data-level="Advanced"] .skill-meter i:nth-child(-n + 4),
.skill-item[data-level="Proficient"] .skill-meter i:nth-child(-n + 3),
.skill-item[data-level="Intermediate"] .skill-meter i:nth-child(-n + 2) {
  background: var(--accent);
}

.skill-item[data-level="Proficient"] .skill-meter i:nth-child(-n + 3) {
  opacity: 0.78;
}

.skill-item[data-level="Intermediate"] .skill-meter i:nth-child(-n + 2) {
  opacity: 0.58;
}

.about-grid {
  display: grid;
  padding: 50px 0 0 184px;
  border-top: 1px solid var(--border);
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
}

.about-copy p {
  max-width: 610px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1rem;
}

.about-copy p:first-child {
  color: var(--text);
  font-size: 1.15rem;
}

.toolbox {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.toolbox-label {
  color: var(--faint);
}

.toolbox ul {
  display: flex;
  margin: 22px 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.toolbox li {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

.contact-section {
  padding-top: 112px;
  padding-bottom: 112px;
}

.contact-card {
  display: flex;
  padding: clamp(34px, 6vw, 64px);
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-ink);
}

.contact-card .section-number {
  margin-bottom: 18px;
  padding: 0;
  color: rgba(10, 36, 15, 0.7);
}

.contact-card h2 {
  max-width: 650px;
}

.contact-card p:last-child {
  margin: 15px 0 0;
  color: rgba(10, 36, 15, 0.76);
}

.contact-button {
  flex: none;
  border-color: var(--accent-ink);
  background: var(--accent-ink);
  color: var(--text);
}

.contact-button:hover,
.contact-button:focus-visible {
  background: #14381a;
}

.site-footer {
  display: grid;
  min-height: 92px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 20px;
  color: var(--faint);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer a {
  justify-self: end;
  color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

.not-found-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  text-align: center;
}

.not-found-kicker {
  margin-bottom: 18px;
  padding: 0;
  color: var(--accent);
}

.not-found-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.not-found-copy {
  max-width: 520px;
  margin: 24px auto;
  color: var(--muted);
}

.js .reveal {
  transform: translateY(12px);
  opacity: 0;
  transition: transform 420ms ease, opacity 420ms ease;
}

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

@media (max-width: 1050px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-card:last-child {
    grid-column: 1 / -1;
  }

  .about-grid {
    padding-left: 0;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-card {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-button {
    align-self: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: calc(100vw - 34px);
  }

  .nav-shell {
    min-height: 68px;
    grid-template-columns: 1fr auto auto;
    gap: 18px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a,
  .nav-github {
    font-size: 0.74rem;
  }

  .hero {
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 68px;
  }

  .hero h1 {
    font-size: clamp(3.05rem, 14.5vw, 4.8rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    justify-content: space-between;
  }

  .profile-summary {
    margin-top: 70px;
    grid-template-columns: 1fr;
  }

  .profile-summary div,
  .profile-summary div:first-child {
    padding: 15px 0;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .profile-summary div:last-child {
    border-bottom: 0;
  }

  .skills-section,
  .about-section,
  .contact-section {
    padding-top: 80px;
  }

  .contact-section {
    padding-bottom: 80px;
  }

  .section-heading {
    margin-bottom: 30px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-number {
    padding-top: 0;
  }

  .section-heading h2,
  .contact-card h2 {
    font-size: clamp(2.45rem, 12vw, 3.6rem);
  }

  .level-legend {
    margin-left: 0;
  }

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

  .skill-card:last-child {
    grid-column: auto;
  }

  .skill-card {
    padding: 23px;
  }

  .about-grid {
    padding-top: 34px;
  }

  .contact-card {
    padding: 30px 24px;
  }

  .contact-button {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-footer p:nth-child(2) {
    text-align: left;
  }

  .site-footer a {
    justify-self: start;
  }
}

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

  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .skill-label strong {
    font-size: 0.61rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    transform: none;
    opacity: 1;
  }
}
