/* ========== Root and base ========== */
:root {
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --ink: #0f172a;
  --ink-muted: #4b5563;
  --border-soft: rgba(148, 163, 184, 0.5);

  --accent: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.06);
  --accent-strong: #1d4ed8;

  --chip-bg: #e5e7eb;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.14);
}



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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* ========== Header and navigation ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-bar {
  backdrop-filter: blur(18px);
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* brand */

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.brand-link {
  text-decoration: none;
}

.brand-name {
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e5e7eb;
  font-family: "Spectral", "Times New Roman", serif;
}

/* nav desktop */

.nav-wrapper {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: #e5e7eb;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
}

.nav-link.active {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.7);
  color: #e0ecff;
}

/* hamburger button */

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 0.35rem;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: #e5e7eb;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle.open .nav-toggle-line:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-line:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* ========== Page container ========== */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.4rem 1.4rem 3.2rem;
}

/* card shell for content */

.surface-main {
  background: var(--bg-alt);
  border-radius: 1.3rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 2.1rem 2.2rem 2.3rem;
}

/* ========== Hero and sections ========== */

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-title {
  font-family: "Spectral", Georgia, serif;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.2;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}


.hero-subtitle {
  font-size: 0.98rem;
  color: var(--ink-muted);
  max-width: 40rem;
}

.hero-meta {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.meta-chip {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--chip-bg);
  color: var(--ink-muted);
}

.primary-chip {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.7);
  color: var(--accent-strong);
}

/* layout: hero grid (used on interior pages if needed) */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.hero-aside {
  font-size: 0.88rem;
  color: var(--ink-muted);
  border-left: 1px solid var(--border-soft);
  padding-left: 1.2rem;
}

/* sections */

.section {
  margin-top: 2.1rem;
}

.section-header {
  margin-bottom: 1.2rem;
}

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-title {
  font-size: 1.3rem;
  margin-top: 0.3rem;
}

.section-lead {
  font-size: 0.94rem;
  color: var(--ink-muted);
  max-width: 40rem;
}

/* generic text */

p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

h2,
h3,
h4 {
  color: var(--ink);
  margin-top: 1.7rem;
  margin-bottom: 0.5rem;
}

/* lists */

.item-list {
  list-style: none;
  padding-left: 0;
  margin: 0.2rem 0 0.4rem;
}

.item-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.3rem;
  font-size: 0.93rem;
  color: var(--ink-muted);
}

.item-list li::before {
  content: "▪";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.55rem;
}

/* split columns */

.columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 1.8rem;
  margin-top: 1.1rem;
}

/* cards */

.card {
  border-radius: 1rem;
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  padding: 1rem 1.1rem 1.1rem;
}

.card-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}

.card-heading {
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.card p {
  font-size: 0.9rem;
  margin: 0.2rem 0;
}

/* publication list */

.pub-list {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0.4rem;
}

.pub-list li {
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.pub-title {
  font-weight: 600;
  color: var(--ink);
}

.pub-meta {
  font-style: italic;
}

/* teaching list */

.course-list {
  columns: 2;
  column-gap: 1.5rem;
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0.4rem;
}

.course-list li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* contact form */

.form {
  max-width: 26rem;
  display: grid;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.input,
.textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border-soft);
  font: inherit;
  color: var(--ink);
  background: #f9fafb;
}

.input:focus,
.textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.button-primary:hover {
  background: var(--accent-strong);
}

/* footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: #020617;
  color: #9ca3af;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.4rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.86rem;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* generic links */

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

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* ========== Home hero layout ========== */

.home-shell {
  padding-top: 2.1rem;
  padding-bottom: 2.1rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2rem;
  min-height: 320px;
}

.home-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.home-hero-text .hero-title {
  margin-bottom: 0;
}

.home-hero-text .hero-subtitle {
  margin-top: 0.1rem;
  font-size: 0.98rem;
}

.home-hero-links {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Home photo */

.home-visual {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.home-visual img {
  max-width: 100%;
  border-radius: 1.3rem;
  display: block;
  box-shadow: var(--shadow-soft);
}

/* desktop photo size tweak */

@media (min-width: 900px) {
  .home-visual img {
    max-width: 67%;
  }
}

/* homepage highlight strip */

.home-strip {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.strip-item {
  min-width: 0;
}

.strip-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.strip-value {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* scroll-to-top button */

.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  background: #111827;
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.25);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

@media (max-width: 720px) {
  .header-inner {
    padding-inline: 1.2rem;
    gap: 0.6rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.45rem 1.4rem 0.8rem;
    background: rgba(15, 23, 42, 0.97);
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .nav-wrapper.open {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .home-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-visual {
    justify-content: center;
    order: -1;
  }

  .home-hero-links {
    justify-content: center;
  }

  .home-strip {
    grid-template-columns: 1fr;
  }

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

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

  .course-list {
    columns: 1;
  }
}

/* ========== Reusable fade-up animation ========== */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fade-up 0.6s ease-out;
}
.contact-button {
  background: #4b5563;       /* gray */
  border-color: #4b5563;     /* gray border */
  color: white;
}

.contact-button:hover {
  background: #374151;       /* slightly darker gray on hover */
  border-color: #374151;
}
