:root {
  color-scheme: light;
  --ink: #111316;
  --muted: #5f6875;
  --paper: #f7f4ee;
  --surface: #fffdfa;
  --line: #ddd6ca;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --sun: #d97706;
  --berry: #be3455;
  --sky: #2563eb;
  --shadow: 0 24px 70px rgba(17, 19, 22, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 19, 22, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.24em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.7);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-140%);
  border: 1px solid var(--ink);
  background: var(--surface);
  padding: 0.65rem 0.9rem;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(17, 19, 22, 0.1);
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, var(--max));
  min-height: 74px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  content: "";
}

.nav-toggle {
  flex-direction: column;
  gap: 5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  border-radius: var(--radius);
  padding: 0.62rem 0.76rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(15, 118, 110, 0.11);
  color: var(--ink);
}

.page-main {
  overflow: hidden;
}

.section,
.hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(3rem, 7vw, 7rem) 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 2px;
  background: var(--accent);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  font-size: clamp(3.35rem, 8.5vw, 7.4rem);
}

h2 {
  font-size: clamp(2.05rem, 5vw, 4.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.info-card h2,
.project-card h2,
.timeline-item h2,
.skill-group h2,
.contact-card h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.12;
}

.lede {
  max-width: 760px;
  margin: 1.4rem 0 0;
  color: #3e4650;
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.76rem 1rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(17, 19, 22, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(17, 19, 22, 0.18);
  color: var(--ink);
}

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

.button.primary:hover {
  background: var(--accent-strong);
  color: var(--surface);
}

.button.subtle {
  box-shadow: none;
}

.hero-card {
  position: relative;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  container-type: inline-size;
}

.hero-card::before {
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  border: 1px solid rgba(17, 19, 22, 0.3);
  border-radius: var(--radius);
  background: rgba(217, 119, 6, 0.18);
  content: "";
}

.portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  object-fit: cover;
  object-position: 50% 28%;
}

.hero-panel {
  padding: clamp(1.1rem, 5cqw, 1.6rem);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 900;
}

.status-dot {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 5px rgba(34, 160, 107, 0.16);
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.metric,
.info-card,
.project-card,
.timeline-item,
.skill-group,
.contact-card {
  border: 1px solid rgba(17, 19, 22, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.82);
}

.metric {
  padding: 1rem;
}

.metric strong {
  display: block;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.section {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.info-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.info-card p,
.project-card p,
.timeline-item p,
.skill-group p {
  color: var(--muted);
}

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

.tag-list li {
  border: 1px solid rgba(17, 19, 22, 0.15);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: rgba(255, 255, 255, 0.62);
  color: #38414c;
  font-size: 0.83rem;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.timeline-meta {
  color: var(--muted);
  font-weight: 900;
}

.timeline-meta span {
  display: block;
  color: var(--accent-strong);
  font-size: 0.86rem;
}

.clean-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.clean-list li {
  margin: 0.55rem 0;
  color: #38414c;
}

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

.project-card,
.skill-group,
.contact-card {
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.project-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.card-kicker {
  margin: 0 0 0.6rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.6fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.profile-img {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 28%;
}

.page-hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.page-hero h1 {
  max-width: 1040px;
  font-size: clamp(3rem, 7vw, 6.5rem);
}

.page-hero .lede {
  max-width: 850px;
}

.site-footer {
  border-top: 1px solid rgba(17, 19, 22, 0.12);
  background: rgba(255, 253, 250, 0.78);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  gap: 1rem;
  padding: 1.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-weight: 800;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 74px 0 auto;
    display: grid;
    max-height: calc(100vh - 74px);
    gap: 0;
    border-bottom: 1px solid rgba(17, 19, 22, 0.12);
    background: var(--surface);
    padding: 1rem;
    pointer-events: none;
    transform: translateY(-120%);
    transition: transform 180ms ease;
    visibility: hidden;
  }

  body.nav-open .site-nav {
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav a {
    padding: 0.9rem;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-card {
    max-width: 520px;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  .section,
  .hero,
  .page-hero,
  .footer-shell {
    width: min(100% - 24px, var(--max));
  }

  .brand-copy small {
    display: none;
  }

  .metrics,
  .project-grid,
  .skills-grid,
  .contact-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .action-row,
  .footer-shell {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
