:root {
  --ink: #10131a;
  --muted: #5e6677;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --line: #ded8cc;
  --blue: #0d5c75;
  --green: #1f7a5c;
  --coral: #c6533c;
  --gold: #b58524;
  --shadow: 0 22px 60px rgba(16, 19, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

address {
  font-style: normal;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 40;
  transform: translateY(-180%);
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

main > .section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  line-height: 1.15;
}

.hero-text {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  border: 1px solid var(--ink);
}

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

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(13, 92, 117, 0.13), rgba(31, 122, 92, 0.05)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -80px;
  width: 270px;
  height: 270px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(13, 92, 117, 0.16) 48%, rgba(13, 92, 117, 0.16) 52%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(198, 83, 60, 0.14) 48%, rgba(198, 83, 60, 0.14) 52%, transparent 53%);
  background-size: 26px 26px;
  transform: rotate(8deg);
}

.avatar {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  border-radius: 8px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 16px 36px rgba(16, 19, 26, 0.18);
}

.panel-label,
.role,
.project-type {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.stats div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats dt {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}

.stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 36px;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.timeline-card,
.project-card,
.skill-grid article,
.proof-card,
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}

.timeline-card.accent {
  background: var(--ink);
  color: #fff;
}

.timeline-card.accent p {
  color: rgba(255, 255, 255, 0.76);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: #f0ece2;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #333847;
  font-size: 0.78rem;
  font-weight: 750;
}

.timeline-card.accent .tags span {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
}

.project-card.featured {
  grid-column: span 1;
  background:
    linear-gradient(180deg, rgba(181, 133, 36, 0.08), transparent 60%),
    var(--panel);
}

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

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-top a {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
}

.project-card .tags {
  margin-top: auto;
  padding-top: 22px;
}

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

.skill-grid p {
  color: var(--muted);
}

.proof {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  gap: 18px;
}

.proof-card {
  background: var(--blue);
  color: #fff;
}

.proof-card .eyebrow,
.proof-card p {
  color: rgba(255, 255, 255, 0.78);
}

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

.proof-list p {
  margin: 0;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.contact {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.72fr);
  gap: 32px;
  align-items: start;
}

.contact p {
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-card {
  display: grid;
  gap: 12px;
}

.contact-card a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 0 14px;
  background: #f0ece2;
  border-radius: 8px;
  font-weight: 850;
}

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

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

.footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer a {
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 980px) {
  .hero,
  .timeline,
  .proof,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 58px;
  }

  .hero-panel {
    min-height: 420px;
  }

  .project-grid,
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    height: 68px;
  }

  .menu-button {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .section {
    padding: 64px 0;
  }

  .hero {
    min-height: auto;
    gap: 28px;
  }

  .hero-panel {
    min-height: 390px;
    padding: 22px;
  }

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

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

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

  .footer {
    flex-direction: column;
  }
}
