:root {
  --bg: #f2fbff;
  --text: #0f172a;
  --muted: #1e293b;
  --surface: #f2fbff;
  --card: #f9fcfe;
  --border: #e2e8f0;
  --primary: #111827;
  --accent: #2563eb;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(2, 6, 23, 0.08);
  --container: 1250px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --header-h: 72px;
  --gutter: clamp(24px, 6vw, 56px);
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --surface: #0f172a;
  --card: #0c1324;
  --border: #1f2a3a;
  --primary: #e5e7eb;
  --accent: #60a5fa;
  --shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left), 32px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .site-header {
  background: rgba(12, 19, 36, 0.85);
}

.site-header .brand {
  display: inline-block;
  padding: var(--space-5) 0;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--text);
}

:root[data-theme="light"] .nav-links .resume-cta {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

:root[data-theme="dark"] .nav-links .resume-cta {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.resume-cta,
.nav-links .resume-cta {
  /* margin-left: auto; */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .resume-cta:hover {
  background: #1e293b;
}
:root[data-theme="dark"] .resume-cta {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}
:root[data-theme="dark"] .resume-cta:hover {
  background: #2563eb;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: #0f172a;
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
html[data-theme="dark"] .theme-toggle {
  background: #fff;
  color: #0f172a;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  overflow: clip;
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--surface);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  padding: var(--space-10) 0;
}

.hero__text {
  position: relative;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  padding: clamp(16px, 3.5vw, 24px);
  border-radius: 8px;
}
html[data-theme="dark"] .hero__text {
  background: rgba(15, 23, 42, 0.85);
}

.hero__text h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.18;
  color: var(--primary);
  margin: 0 0 var(--space-4);
}

.lede {
  color: var(--muted);
  max-width: 62ch;
}

.cta {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.hero__headshot {
  display: flex;
  justify-content: center;
}

.headshot-placeholder,
.headshot-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
}

.headshot-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 600;
}

.headshot-img {
  object-fit: cover;
  background: var(--card);
  box-shadow: var(--shadow);
}

.section {
  padding: var(--space-8) 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.section h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 var(--space-4);
  color: var(--primary);
}

.chips {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.chip {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(12, 1fr);
}

.card {
  grid-column: span 12;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__media {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
  padding: 0;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card__media .ph {
  background-image: linear-gradient(
    120deg,
    var(--surface),
    #fff0 40%,
    var(--surface)
  );
  background-size: 200% 100%;
  animation: shimmer 2.2s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.card__body {
  padding: var(--space-5);
  flex: 1;
}
.card__body h3 {
  margin: 0 0 var(--space-2);
  color: var(--primary);
}
.card__body p {
  margin: 0 0 var(--space-3);
  color: var(--muted);
}

.meta {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-5);
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.card__footer > * {
  white-space: nowrap;
}
.card__footer a {
  text-decoration: none;
}

html[data-theme="dark"] .card__footer a:first-child {
  color: #fff;
}
[data-theme="dark"] .card__footer a:first-child {
  color: #fff;
}

.tag {
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
}
.tag:hover {
  color: var(--text);
}

.timeline {
  display: grid;
  gap: var(--space-4);
}
.timeline__item {
  padding: var(--space-5);
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.timeline__item h3 {
  margin: 0 0 6px;
  color: var(--primary);
}
.timeline__item .muted {
  color: var(--muted);
  margin: 0 0 8px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--primary);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.05s ease-in;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn--ghost {
  background: #f9fcfe;
  color: var(--primary);
  border: 1px solid var(--primary);
}
html[data-theme="dark"] .btn--ghost {
  background: transparent;
}

.btn--primary {
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .btn--primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
html[data-theme="dark"] .btn--primary:hover {
  background: #1e4db7;
}

.site-footer {
  padding: var(--space-8) 0 var(--space-6);
  color: var(--muted);
  border-top: 1px solid var(--border);
}

a:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.edu-logo img {
  max-width: 150px;
  height: auto;
  object-fit: contain;
}
.edu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.edu-text {
  flex: 1;
  margin-right: 32px;
}

.email-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 16px;
  color: var(--text);
}
.email-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.85;
}
.email-address {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.email-address:hover {
  text-decoration: underline;
}

.hero__stats {
  display: flex;
  gap: var(--space-6);
  padding: 0;
  margin: var(--space-4) 0;
  list-style: none;
  color: var(--muted);
  flex-wrap: wrap;
}

.note {
  color: var(--muted);
}

.hero__top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero__top h1 {
  margin: 0;
  flex: 1;
}
.hero__top img {
  width: clamp(72px, 18vw, 120px);
  height: clamp(72px, 18vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  object-position: 90% 90%;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero__top img.headshot--small {
  object-fit: cover;
  object-position: 10% 60%;
}

.headshot--small {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  /* object-position: 90% 10%; */
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

@media (min-width: 860px) {
  .card {
    grid-column: span 6;
  }
}
@media (min-width: 1100px) {
  .card {
    grid-column: span 4;
  }
}
@media (max-width: 900px) {
  :root {
    --header-h: 88px;
  }
  .nav-toggle {
    display: inline-block;
  }
  .nav-links {
    position: absolute;
    right: max(var(--space-5), env(safe-area-inset-right), 32px);
    top: 64px;
    display: none;
    flex-direction: column;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  .nav-links.show {
    display: flex;
  }
  .hero {
    min-height: 76vh;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .hero__top {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .headshot--small {
    margin-top: 0;
  }
}

:root {
  --gutter-fix: clamp(24px, 6vw, 56px);
}
.container {
  padding-inline: max(var(--gutter-fix), env(safe-area-inset-left)) !important;
}
header.container,
.section.container,
.site-footer.container,
.hero__inner {
  padding-inline: var(--gutter-fix) !important;
}
@media (max-width: 900px) {
  .nav-links {
    right: max(var(--gutter-fix), env(safe-area-inset-right)) !important;
  }
}
