:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --ink: #172033;
  --muted: #647084;
  --line: #d9e1ea;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #dff7f3;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(25, 38, 65, 0.08);
  --radius: 8px;
  --max: 1120px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

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

p,
ul {
  margin: 0;
}

ul {
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.45rem;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.8rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  transform: translateY(-140%);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--max) + 2rem);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 225, 234, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 800;
}

.brand-avatar {
  display: block;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-soft);
  box-shadow: 0 2px 8px rgba(25, 38, 65, 0.12);
}

.desktop-nav {
  display: flex;
  gap: 0.2rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.desktop-nav a {
  min-width: 4.6rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.resume-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(25, 38, 65, 0.05);
}

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

.button.secondary:hover,
.button.social:hover,
.resume-link:hover {
  border-color: #b6c4d4;
  background: var(--surface-soft);
}

.button.social {
  gap: 0.45rem;
  font-weight: 700;
}

.button.social svg,
.button.social .social-icon-img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  object-fit: contain;
  border-radius: 4px;
}

.hero,
.section,
.contact-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.25rem 1rem;
}

.hero {
  padding-top: 3.5rem;
  padding-bottom: 2.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.14;
}

h1 {
  max-width: 680px;
  font-size: clamp(2rem, 3.8vw, 3.35rem);
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-summary {
  max-width: 760px;
  margin-top: 1.05rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.signal-panel {
  display: grid;
  gap: 0.8rem;
}

.portrait-card,
.metric,
.focus-item,
.role,
.project-card,
.skill-group,
.education article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portrait-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.portrait-card img {
  display: block;
  width: 92px;
  height: 92px;
  border: 3px solid var(--accent-soft);
  border-radius: 50%;
  object-fit: cover;
}

.portrait-card strong,
.metric strong {
  display: block;
}

.portrait-card span,
.metric span {
  display: block;
  margin-top: 0.38rem;
  color: var(--muted);
  line-height: 1.45;
}

.metric {
  padding: 0.95rem 1rem;
  box-shadow: none;
}

.metric strong {
  color: var(--blue);
  font-size: 1.8rem;
  line-height: 1;
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 2.75rem;
}

.focus-item {
  padding: 1rem;
  box-shadow: none;
}

.focus-item span {
  color: var(--accent);
  font-weight: 900;
}

.focus-item h2 {
  margin-top: 0.9rem;
  font-size: 1.12rem;
}

.focus-item p {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.section-heading {
  position: sticky;
  top: 5.8rem;
}

.section-heading.compact {
  position: static;
  max-width: 760px;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  text-wrap: balance;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
}

.timeline::before {
  position: absolute;
  top: 0.7rem;
  bottom: 0.7rem;
  left: 0.85rem;
  width: 2px;
  content: "";
  background: var(--line);
}

.role {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1rem 1rem 1rem 2.2rem;
  box-shadow: none;
}

.role::before {
  position: absolute;
  top: 1.25rem;
  left: 0.52rem;
  width: 0.68rem;
  height: 0.68rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 0 1px var(--accent);
}

.role-meta h3,
.project-card h3,
.skill-group h3,
.education h3 {
  font-size: 1.08rem;
}

.role-meta p,
.role-meta time,
.project-kicker,
.education span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.role ul,
.project-card ul {
  color: #3c4658;
  line-height: 1.58;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.project-card {
  padding: 1rem;
  box-shadow: none;
}

.project-card.featured {
  grid-row: span 2;
  border-color: #a9d9d2;
  background: linear-gradient(180deg, #ffffff, #f0fbf8);
}

.project-card p:not(.project-kicker),
.education p,
.skill-group p {
  margin-top: 0.65rem;
  color: var(--muted);
  line-height: 1.62;
}

.project-card ul {
  margin-top: 0.9rem;
}

.project-card strong {
  display: block;
  margin-top: 1rem;
  color: var(--accent-strong);
}

.skills-section {
  padding-top: 3.5rem;
}

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

.skill-group,
.education article {
  padding: 1rem;
  box-shadow: none;
}

.education a {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--blue);
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 6rem;
}

.contact-section h2 {
  max-width: 760px;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  text-wrap: balance;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 0.38rem;
}

.contact-form span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  padding: 0.78rem 0.85rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  width: 100%;
  cursor: pointer;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-status {
  min-height: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.form-status.success {
  color: var(--accent-strong);
}

.form-status.error {
  color: #b42318;
}

.mobile-nav {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 12;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.mobile-nav a {
  min-width: 0;
  padding: 0.66rem 0.25rem;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
}

.mobile-nav a.active {
  background: var(--accent);
  color: white;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 1rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

@media (max-width: 900px) {
  .desktop-nav,
  .resume-link {
    display: none;
  }

  .topbar {
    justify-content: center;
  }

  .hero,
  .section,
  .contact-section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .hero {
    padding-top: 2.4rem;
    padding-bottom: 1.5rem;
  }

  .hero-grid,
  .split,
  .contact-section,
  .intro-band,
  .project-grid,
  .skills-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(1.9rem, 8.2vw, 2.65rem);
  }

  .hero-summary {
    font-size: 1rem;
  }

  .section-heading {
    position: static;
  }

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

  .project-card.featured {
    grid-row: auto;
  }

  .mobile-nav {
    display: grid;
  }

  .signal-panel .metric {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand {
    max-width: calc(100vw - 2rem);
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portrait-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.75rem;
  }

  .portrait-card img {
    width: 64px;
    height: 64px;
  }

  .hero-actions .button:not(.social),
  .contact-actions .button:not(.social) {
    width: 100%;
  }

  .button.social span,
  .footer-links a span {
    display: none;
  }

  .button.social {
    width: 2.65rem;
    min-width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    justify-content: center;
    flex: 0 0 auto;
  }

  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .contact-section {
    padding-bottom: 3rem;
  }

  .site-footer {
    padding-bottom: 5.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
