:root {
  --ink: #e7edf7;
  --ink-strong: #ffffff;
  --ink-muted: #a8b3c7;
  --canvas: #0b1220;
  --canvas-soft: #101a2e;
  --surface: #142138;
  --surface-raised: #182943;
  --line: #2a3b55;
  --accent: #5eead4;
  --accent-dark: #0f766e;
  --accent-soft: rgba(94, 234, 212, 0.1);
  --warm: #f8c47c;
  --max-width: 1160px;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 5%, rgba(94, 234, 212, 0.08), transparent 27rem),
    radial-gradient(circle at 10% 35%, rgba(66, 98, 255, 0.07), transparent 30rem);
  content: "";
  pointer-events: none;
}

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

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

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

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink-strong);
  color: var(--canvas);
  transform: translateY(-150%);
}

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

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(42, 59, 85, 0.75);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  width: min(calc(100% - 2.5rem), var(--max-width));
  min-height: 4.75rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--ink-strong);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-logo span,
.hero h1 span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--canvas-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--ink);
}

.hero {
  display: grid;
  min-height: calc(100vh - 4.75rem);
  min-height: calc(100svh - 4.75rem);
  align-items: center;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.75fr);
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink-strong);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.75rem, 6.5vw, 5.7rem);
}

.hero-lead {
  max-width: 43rem;
  margin: 0 0 2rem;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.hero-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #061512;
}

.button-primary:hover {
  background: #99f6e4;
}

.button-secondary,
.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-strong);
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-facts {
  display: grid;
  max-width: 43rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.hero-facts div {
  display: grid;
}

.hero-facts dt {
  color: var(--ink-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-facts dd {
  margin: 0.2rem 0 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.portrait-panel {
  justify-self: end;
}

.portrait-frame {
  position: relative;
  max-width: 23rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.14), rgba(20, 33, 56, 0.9));
  box-shadow: var(--shadow);
}

.portrait-frame::before {
  position: absolute;
  top: -1.1rem;
  right: -1.1rem;
  z-index: -1;
  width: 7rem;
  height: 7rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  content: "";
  opacity: 0.35;
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1.45rem;
  object-fit: cover;
}

.portrait-panel > p {
  display: grid;
  margin: 1rem 0 0;
  padding-left: 0.25rem;
  color: var(--ink-strong);
  font-size: 0.9rem;
}

.portrait-panel > p span {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
  border-top: 1px solid rgba(42, 59, 85, 0.6);
}

.section-muted {
  background: rgba(16, 26, 46, 0.76);
}

.section h2 {
  max-width: 18ch;
  margin-bottom: 2.25rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.split-section {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.prose {
  max-width: 43rem;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  margin-bottom: 2.75rem;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-link {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 750;
  white-space: nowrap;
}

.project-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  display: flex;
  min-height: 32rem;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  flex-direction: column;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.project-featured {
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.12), var(--surface) 45%);
}

.project-topline {
  display: flex;
  margin-bottom: 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.project-number {
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.live-status,
.repository-status {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-status span {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: var(--accent);
}

.repository-status {
  border-color: var(--line);
  color: var(--ink-muted);
}

.project-card h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.project-summary,
.project-outcomes {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.project-outcomes {
  margin: 0.25rem 0 1.4rem;
  padding-left: 1.1rem;
}

.project-outcomes li + li {
  margin-top: 0.45rem;
}

.tag-list {
  display: flex;
  margin: auto 0 1.5rem;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.tag-list li {
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: var(--canvas-soft);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.skills-grid {
  display: grid;
  margin-top: 3rem;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skills-grid article {
  padding: 2rem;
  background: var(--canvas);
}

.skills-grid h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.skills-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.timeline {
  display: grid;
  max-width: 52rem;
  margin-top: 3rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  gap: 2.5rem;
}

.timeline article {
  position: relative;
}

.timeline-marker {
  position: absolute;
  top: 0.35rem;
  left: -1.94rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 3px solid var(--canvas-soft);
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.timeline h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
}

.timeline article > p:last-child {
  margin: 0;
  color: var(--ink-muted);
}

.credential-row {
  display: flex;
  margin-top: 3rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.credential-row a {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.credential-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact {
  border-top-color: var(--accent-dark);
  background: var(--accent);
  color: #09201c;
}

.contact-panel {
  display: grid;
  align-items: end;
  gap: 3rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
}

.contact .section-kicker,
.contact h2 {
  color: #09201c;
}

.contact h2 {
  max-width: 15ch;
  margin-bottom: 1rem;
}

.contact p {
  max-width: 43rem;
  margin-bottom: 0;
}

.contact-actions {
  display: grid;
  gap: 1.25rem;
}

.button-light {
  background: #09201c;
  color: var(--ink-strong);
  word-break: break-word;
}

.button-light:hover {
  background: #143a34;
}

.contact-actions > div {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact-actions > div a {
  border-bottom: 1px solid #09201c;
  font-size: 0.86rem;
  font-weight: 800;
}

.site-footer {
  padding-block: 2rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 1.25rem;
    left: 1.25rem;
    display: none;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem;
  }

  .hero-grid,
  .split-section,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .portrait-panel {
    width: min(100%, 22rem);
    justify-self: start;
  }

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

  .project-card {
    min-height: auto;
  }

  .tag-list {
    margin-top: 1rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .nav {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

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

  .hero-facts div {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(42, 59, 85, 0.7);
  }

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

  .button {
    width: 100%;
  }

  .skills-grid article {
    padding: 1.4rem;
  }

  .contact-actions > div,
  .site-footer .container {
    flex-direction: column;
  }
}

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

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