/* ========== Base ========== */
:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --color-accent-gold: #f4c542;
  --color-accent-cool: #4f8fbf;
  --color-accent-soft: #e2f0fb;
  --color-border: #d1d5db;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background: radial-gradient(circle at top left, #e9f3ff 0, #f5f7fb 45%, #f5f7fb 100%);
  line-height: 1.6;
}

/* ========== Layout ========== */

.site-header {
  background: linear-gradient(120deg, #111827, #1f2933 40%, #4f8fbf 100%);
  color: #f9fafb;
  padding: 1.5rem 1rem 1.25rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.site-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.site-tagline {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.navbar a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(249, 250, 251, 0.15);
  color: #f9fafb;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.navbar a:hover {
  background: rgba(249, 250, 251, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.45);
}

.navbar a[aria-current="page"] {
  background: linear-gradient(135deg, var(--color-accent-gold), #facc15);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.08);
}

/* ========== Main Content ========== */

main {
  max-width: 1040px;
  margin: 1.75rem auto 2.5rem;
  padding: 0 1rem;
}

.page-title {
  font-size: 1.9rem;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  margin-top: 0;
  font-size: 0.98rem;
  color: var(--color-muted);
}

/* ========== Index / Home ========== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
  background: radial-gradient(circle at top right, var(--color-accent-soft), #ffffff);
  border-radius: 1.5rem;
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow-soft);
  align-items: center;
}

.hero-text h1 {
  font-size: 2.1rem;
  margin-top: 0;
}

.hero-text p {
  margin-bottom: 0.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.hero-pill {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(79, 143, 191, 0.1);
  border: 1px solid rgba(79, 143, 191, 0.25);
  color: #1f2933;
}

.hero-cta {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  text-decoration: none;
  font-weight: 600;
}

.button-primary {
  background: linear-gradient(135deg, var(--color-accent-gold), #f59e0b);
  color: #111827;
  box-shadow: 0 9px 20px rgba(180, 83, 9, 0.35);
}

.button-primary:hover {
  box-shadow: 0 12px 26px rgba(180, 83, 9, 0.45);
  transform: translateY(-1px);
}

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

.button-secondary:hover {
  background: rgba(79, 143, 191, 0.06);
}

.hero-figure {
  justify-self: center;
}

.hero-portrait {
  width: 260px;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.8);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.hero-portrait img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ========== Sections & Cards ========== */

.section {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.25rem;
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.section-title {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-top: 0;
  margin-bottom: 1.1rem;
}

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

.card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1rem;
  border: 1px solid rgba(209, 213, 219, 0.75);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.card-tagline {
  font-size: 0.86rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* ========== Project Layout ========== */

.project-item {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 1rem;
  margin-bottom: 1.4rem;
  align-items: center;
}

.project-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-text h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.project-text p {
  margin-top: 0.25rem;
}

.project-links {
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.project-links a {
  color: var(--color-accent-cool);
  text-decoration: none;
}

.project-links a:hover {
  text-decoration: underline;
}

.project-thumb {
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #e5e7eb;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ========== Readings / Lists ========== */

.reading-group-title {
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
}

.reading-list {
  list-style: none;
  padding-left: 0;
  margin: 0.3rem 0 0.1rem;
}

.reading-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.reading-citation {
  font-size: 0.92rem;
}

.reading-annotation {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

/* ========== Coursework ========== */

.course-group-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.course-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.course-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(209, 213, 219, 0.5);
}

.course-item-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.course-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

.course-description {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ========== Resume Page ========== */

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.25rem;
}

.resume-section-title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.resume-downloads a {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-accent-cool);
}

.resume-photo {
  margin: 0 0 1rem;
  text-align: center;
}

.resume-photo img {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-right: 0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(79, 143, 191, 0.08);
}

/* ========== Footer ========== */

.site-footer {
  border-top: 1px solid rgba(209, 213, 219, 0.7);
  padding: 1rem 1rem 1.3rem;
  font-size: 0.84rem;
  color: var(--color-muted);
}

.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-contact a {
  color: var(--color-accent-cool);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* ========== Utilities ========== */

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  background: #111827;
  color: #f9fafb;
  padding: 0.4rem 0.6rem;
  z-index: 50;
}

/* ========== Responsive ========== */

@media (max-width: 768px) {
  .hero,
  .project-item,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    text-align: left;
  }

  .hero-figure {
    order: -1;
  }

  .site-header {
    padding-bottom: 1.4rem;
  }

  .page-title {
    font-size: 1.9rem;
    margin-bottom: 0.25rem;
  }
}