
:root {
  --ink: #17202a;
  --muted: #5d6976;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --tint: #eef3f1;
  --accent: #315f57;
  --accent-dark: #21463f;
  --border: #d9dfdc;
  --shadow: 0 16px 40px rgba(24, 39, 35, 0.08);
  --radius: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(217, 223, 220, 0.8);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.3rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 7rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 760px;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 750;
  text-decoration: none;
}

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

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

.button.primary:hover {
  background: var(--accent-dark);
  color: white;
}

.text-link {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover,
.project-link:hover {
  text-decoration: underline;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quick-facts div {
  padding: 1.25rem 1.2rem;
}

.quick-facts div + div {
  border-left: 1px solid var(--border);
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 6rem 0;
}

.section-tinted {
  background: var(--tint);
}

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

.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Projects ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(24, 39, 35, 0.03);
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 1rem 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.18;
}

.project-card p {
  color: var(--muted);
}

.contribution {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.94rem;
}

.contribution strong {
  color: var(--ink);
}

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

.tags li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.project-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.more-projects {
  margin-top: 3rem;
}

.more-projects > h3 {
  font-size: 1.3rem;
}

.compact-projects {
  border-top: 1px solid var(--border);
}

.compact-projects a {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

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

.compact-projects span {
  color: var(--muted);
}

/* ---------- Experience ---------- */
.timeline {
  border-top: 1px solid var(--border);
}

.experience-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
}

.experience-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.experience-meta .date {
  color: var(--ink);
  font-weight: 800;
}

.role {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.experience-item h3,
.earlier-grid h3 {
  margin: 0.25rem 0 0.8rem;
  font-size: 1.35rem;
}

.experience-item ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.experience-item li + li {
  margin-top: 0.55rem;
}

.earlier-experience {
  padding: 1.25rem 0;
}

.earlier-experience summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.earlier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-top: 1.25rem;
}

.earlier-grid article {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
}

.earlier-grid p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* ---------- Skills ---------- */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skill-groups article {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.skill-groups h3 {
  margin: 0 0 0.45rem;
}

.skill-groups p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Contact and footer ---------- */
.contact-section {
  padding: 6rem 0;
  background: var(--ink);
  color: white;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 2rem;
}

.contact-inner p:not(.eyebrow) {
  max-width: 650px;
  color: #c4ccd2;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.contact-actions .button.primary {
  background: white;
  border-color: white;
  color: var(--ink);
}

.contact-actions .text-link {
  color: white;
}

.footer {
  padding: 1.25rem 0;
  background: #11181f;
  color: #aeb8bf;
  font-size: 0.85rem;
}

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

.footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

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

  .section-heading,
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1rem;
  }

  .nav-links {
    gap: 0.8rem 1rem;
  }

  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .quick-facts div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .section {
    padding: 4.5rem 0;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .earlier-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .compact-projects a {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer .container {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .project-card,
  .button {
    transition: transform 160ms ease, box-shadow 160ms ease,
      background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  }
}
