:root {
  color-scheme: light;
  --bg: #f5f3ef;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5a5a5a;
  --accent: #8f3cdd;
  --accent-light: #eadfff;
  --border: #e6e2dc;
  --header-bg: rgba(245, 243, 239, 0.9);
  --muted-section: #f0ede8;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  font-family: "Inter", "Helvetica Neue", system-ui, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --card: #1b1b1b;
  --text: #f2f2f2;
  --muted: #b5b5b5;
  --accent: #bd88ef;
  --accent-light: rgba(184, 153, 255, 0.22);
  --border: #2c2c2c;
  --header-bg: rgba(18, 18, 18, 0.9);
  --muted-section: #1a1a1a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.theme-fade {
  animation: themeFade 260ms ease;
}

@keyframes themeFade {
  0% {
    opacity: 0.65;
  }
  100% {
    opacity: 1;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a:focus-visible {
  color: var(--text);
  outline: none;
}

.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.hero {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0.6rem 0 1.2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.hero-card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.hero-card > ul {
  padding-left: 0;
  list-style-position: inside;
  margin-top: 0.75rem;
}

.hero-card ul ul {
  padding-left: 1.75rem;
  list-style-position: outside;
  margin-top: 0.35rem;
}

.hero-headshot {
  background: var(--card);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-headshot img {
  width: min(100%, 220px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.hero-headshot figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-bottom: 4rem;
}

.section.muted {
  background: var(--muted-section);
  border-radius: 24px;
  padding: 2.5rem;
}

.section-title {
  margin-bottom: 2rem;
}

.resume-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.resume-title h2 {
  margin-bottom: 0;
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.bullets {
  padding-left: 1.2rem;
}

.bullets li {
  margin-bottom: 0.6rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

.resume-card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.resume-card h3 {
  margin-bottom: 0.75rem;
}

.resume-card .meta {
  margin-top: 0.6rem;
}

.resume-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.resume-date-col {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.resume-entry-body .meta {
  margin-top: 0;
}

.resume-org {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.resume-item + .resume-item {
  margin-top: 1.2rem;
}

.resume-list {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.resume-list li {
  margin-bottom: 0.5rem;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.project-grid .tag-list {
  margin-bottom: 0.75rem;
}

.tag-list li {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.writing-list {
  display: grid;
  gap: 1.5rem;
}

.writing-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.writing-filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}

.writing-filter {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.writing-filter input,
.writing-filter select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
}

.card-link {
  display: block;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

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

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
}

.theme-toggle {
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  color: var(--accent);
}

.theme-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  position: absolute;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease 0.08s, transform 0.25s ease 0.08s;
  pointer-events: none;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
}

.theme-icon--moon {
  opacity: 1;
  transform: scale(1);
}

[data-theme="dark"] .theme-icon--moon {
  opacity: 0;
  transform: scale(0.9);
}

[data-theme="dark"] .theme-icon--sun {
  opacity: 1;
  transform: scale(1);
}

.nav-socials {
  display: inline-flex;
  gap: 0.75rem;
}

.icon-link {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  transition: transform 0.2s ease, color 0.2s ease;
}

.icon-link:hover {
  transform: translateY(-1px);
  color: var(--accent);
}

.icon-link svg {
  width: 18px;
  height: 18px;
}

.resume-download {
  margin-top: 0;
  color: var(--accent);
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  overflow: visible;
}

.resume-download svg {
  width: 48px;
  height: 48px;
}

.resume-download:hover {
  color: var(--text);
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.6rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content {
  margin-bottom: 2rem;
}

.post-nav {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.post-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.4rem;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section.muted {
    padding: 2rem 1.5rem;
  }

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