/* Card-based single-page portfolio styles */

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --soft: #f9fafb;
  --blue: #7c3aed;
  --teal: #f59e0b;
  --indigo-bg: #f3e8ff;
  --indigo-text: #6d28d9;
  --green-bg: #dcfce7;
  --green-text: #166534;
  --amber-bg: #fef3c7;
  --amber-text: #92400e;
  --gray-bg: #f3f4f6;
  --gray-text: #6b7280;
  --max-width: 900px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
  max-width: 1040px;
}

.site-nav__brand {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--text);
}

.site-nav__brand:hover {
  text-decoration: none;
  color: var(--blue);
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.site-nav__links a:hover {
  color: var(--blue);
  text-decoration: none;
}

/* Badges / pills
   ========================================================================== */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gray-bg);
  color: var(--gray-text);
}

.badge--role,
.badge--ongoing {
  background: var(--indigo-bg);
  color: var(--indigo-text);
}

.badge--published {
  background: var(--green-bg);
  color: var(--green-text);
}

.badge--accepted {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 6px 8px 0;
  border-radius: 999px;
  background: var(--indigo-bg);
  color: var(--indigo-text);
  font-size: 13px;
  font-weight: 600;
}

/* Hero
   ========================================================================== */

.hero {
  padding: 56px 0 40px;
}

.hero__grid {
  display: flex;
  align-items: center;
  gap: 36px;
}

.hero__avatar {
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--blue);
}

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

.hero__body {
  flex: 1 1 auto;
  min-width: 0;
}

.hero h1 {
  margin: 12px 0 10px;
  font-size: 2.1em;
  line-height: 1.2;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tagline {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.btn:hover {
  border-color: var(--text);
  text-decoration: none;
}

.btn--accent {
  border: none;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  color: #fff;
}

.btn--accent:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

.hero__social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero__social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.hero__social a:hover {
  background: var(--indigo-bg);
  color: var(--indigo-text);
  text-decoration: none;
}

/* Stat tiles
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.stat {
  padding: 16px;
  text-align: center;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat__num {
  font-size: 1.6em;
  font-weight: 800;
  color: var(--blue);
}

.stat__label {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Sections
   ========================================================================== */

section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

section h2 {
  margin: 0 0 22px;
  font-size: 1.6em;
}

section p {
  margin: 0 0 14px;
}

section ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

section li {
  margin-bottom: 6px;
}

.lede {
  color: var(--muted);
  margin-bottom: 20px;
}

/* Card
   ========================================================================== */

.card {
  padding: 22px 24px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card:last-child {
  margin-bottom: 0;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.1em;
}

.card .meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9em;
}

.card p {
  margin: 0 0 10px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  font-weight: 600;
}

/* Teaching: semester groups inside a card */

.semester {
  margin: 14px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--indigo-text);
}

/* Two-column card grid (projects, if any) */

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

.grid-2 .card {
  margin-bottom: 0;
}

/* Details / accordion (course syllabi)
   ========================================================================== */

details {
  margin-bottom: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

details p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.93em;
}

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

.site-footer {
  padding: 28px 0 60px;
  color: var(--muted);
  font-size: 0.9em;
}

@media (max-width: 640px) {
  .hero__grid {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }

  .hero__tagline {
    margin: 0 auto;
  }

  .hero__cta,
  .hero__social {
    justify-content: center;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero h1 {
    font-size: 1.7em;
  }

  section {
    padding: 30px 0;
  }
}
