/* Base */
:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-muted: #eef1f8;
  --text: #1c2431;
  --muted: #556079;
  --accent: #1f4b99;
  --accent-soft: rgba(31, 75, 153, 0.16);
  --border: #d7dbe6;
  --shadow: 0 24px 60px rgba(23, 32, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
 h2,
 h3,
 h4 {
  font-family: "Playfair Display", "Inter", serif;
  color: var(--text);
  letter-spacing: 0.01em;
}

h4 {
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
}

strong {
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
 a:focus-visible {
  color: #173d7a;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.site-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  background: rgba(31, 75, 153, 0.1);
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
}

.nav-toggle-bar {
  top: 50%;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translate(-50%, 6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translate(-50%, -6px) rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  background: rgba(31, 75, 153, 0.08);
}

.site-nav a[aria-current="page"],
.site-nav a[href]:is(:hover, :focus-visible) {
  font-weight: 600;
}

main {
  display: block;
}

.hero {
  background: radial-gradient(circle at top left, rgba(31, 75, 153, 0.16), transparent 55%), linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 60%);
  padding: 104px 0 80px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(31, 75, 153, 0.08);
  color: #1f3a6b;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4.8vw, 3.3rem);
  line-height: 1.1;
  margin: 24px 0 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--accent);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #244d9f, #1a7adf);
  border: none;
  box-shadow: 0 18px 40px rgba(31, 75, 153, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.9);
}

.btn.link {
  border: none;
  background: transparent;
  color: var(--muted);
  padding-left: 0;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(23, 32, 56, 0.18);
  border-color: rgba(31, 75, 153, 0.36);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  box-shadow: 0 22px 50px rgba(31, 75, 153, 0.34);
}

.btn.link:hover,
.btn.link:focus-visible {
  transform: none;
  box-shadow: none;
  color: var(--accent);
}

.hero-highlights {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.highlight {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid rgba(31, 75, 153, 0.14);
  padding: 20px 22px;
  box-shadow: 0 20px 48px rgba(23, 32, 56, 0.1);
  min-height: 168px;
}

.highlight .label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #1f3a6b;
  margin-bottom: 12px;
}

.highlight .value {
  font-size: 1.65rem;
  font-family: "Playfair Display", serif;
  margin: 0 0 10px;
}

.highlight .caption {
  color: var(--muted);
  margin: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: min(360px, 90%);
  background: var(--surface);
  border-radius: 26px;
  border: 1px solid var(--border);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
}

.hero-img {
  width: 100%;
  display: block;
  max-width: 300px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 36px rgba(31, 41, 55, 0.18));
  will-change: transform;
  transition: transform 0.25s ease-out;
}

.hero-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.note-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1f3a6b;
  font-weight: 600;
}

.note-body {
  display: grid;
  gap: 6px;
}

.note-role {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.note-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-quick-links .section-heading {
  max-width: 720px;
}

.quick-links-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.quick-card {
  display: grid;
  gap: 12px;
  padding: 28px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(31, 75, 153, 0.12);
  box-shadow: 0 20px 48px rgba(23, 32, 56, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-card h3 {
  margin: 0;
  font-size: 1.32rem;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.quick-card .quick-link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(23, 32, 56, 0.14);
  border-color: rgba(31, 75, 153, 0.24);
}

.quick-card:focus-visible {
  outline-offset: 4px;
}

.section {
  padding: 80px 0;
  scroll-margin-top: 120px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 34px;
  max-width: 640px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
}

.section-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 22px 24px;
  box-shadow: 0 20px 48px rgba(23, 32, 56, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 58px rgba(23, 32, 56, 0.14);
}

.card h4 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 600;
}

.card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid rgba(31, 75, 153, 0.16);
  font-size: 0.78rem;
}

.tags span img {
  width: 15px;
  height: 15px;
}

.card .links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.card .links a {
  font-weight: 600;
  color: var(--accent);
}

.card .links a:hover {
  color: #173d7a;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.timeline > li {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(31, 75, 153, 0.12);
  padding: 26px 32px 26px 60px;
  box-shadow: 0 18px 44px rgba(23, 32, 56, 0.1);
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 32px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.timeline > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 32px;
  top: calc(32px + 10px);
  bottom: -26px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-soft), rgba(31, 75, 153, 0));
}

.timeline h4 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  font-weight: 600;
}

.timeline span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.timeline ul {
  margin: 16px 0 0;
  padding-left: 1.6rem;
  color: var(--text);
  list-style: disc;
  list-style-position: outside;
}

.timeline ul li {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  position: static;
}

.timeline ul li + li {
  margin-top: 10px;
}

.timeline ul li::marker {
  color: var(--accent);
}

.timeline a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline a:hover {
  color: #173d7a;
}

.timeline .edu-list {
  list-style: disc;
}

.timeline .edu-subtitle {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.edu-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edu-meta .label {
  color: var(--text);
  font-weight: 600;
}

.edu-meta .value {
  color: var(--muted);
}

.role-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 10px;
}

.role-icons img {
  width: 20px;
  height: 20px;
  opacity: 0.92;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.links-row.secondary {
  margin-top: 12px;
}

#email-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.icon-link:hover,
.icon-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(31, 75, 153, 0.32);
  box-shadow: 0 16px 36px rgba(23, 32, 56, 0.12);
}

.about-page .about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.about-photo {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: inline-flex;
  max-width: 320px;
  overflow: hidden;
  padding: 0;
}

.about-photo img {
  width: 100%;
  display: block;
  height: auto;
}

.about-text h1 {
  margin: 16px 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.about-text p {
  color: var(--muted);
}

.about-page #skills-list p {
  margin: 6px 0;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  background: transparent;
}

.site-footer .container {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-icons img {
  width: 20px;
  height: 20px;
  opacity: 0.92;
}

@media (max-width: 960px) {
  .hero {
    padding: 96px 0 64px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-card {
    margin: 0 auto;
  }
}

@media (max-width: 900px) {
  .site-header .container {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(23, 32, 56, 0.18);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .site-nav[data-open="false"] {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .site-header .container {
    flex-wrap: wrap;
  }

  .hero-highlights {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .about-page .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 84px 0 56px;
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px;
  }

  .timeline > li {
    padding: 24px 22px 24px 50px;
  }

  .quick-card {
    padding: 24px;
  }

  .timeline > li::before {
    left: 24px;
  }

  .timeline > li:not(:last-child)::after {
    left: 28px;
  }
}
