:root {
  --bg: #ffffff;
  --bg-card: #f7f6f4;
  --text: #1a1a18;
  --text-muted: #6b6a67;
  --border: #e5e4e0;
  --card-hover: #f0efed;
  --shadow: rgba(0, 0, 0, 0.08);
}

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

/* Fluid root font — everything in rem scales with this */
html {
  font-size: clamp(15px, 1vw + 11px, 18px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Landing ── */

.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Full-viewport background image — fixed so it always fills the screen */
.landing-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  object-position: 80% 100%;
  z-index: 0;
}

/* Gradient overlay — also fixed, sits just above the image */
.landing::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.52) 45%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
}

.landing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(10vh, 15vh, 20vh);
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
  position: relative;
  z-index: 2;
}

/* ── Profile ── */

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(1rem, 4vw, 2rem);
  width: 100%;
}

.profile-photo {
  width: clamp(140px, 18vw, 190px);
  height: clamp(140px, 18vw, 190px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid rgba(255, 255, 255, 0.85);
  margin-bottom: clamp(1rem, 2.5vh, 1.5rem);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
}

.descriptors {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
}

.location {
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65);
}

/* ── Nav cards ── */

.card-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  width: min(560px, 90vw);
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(0.9rem, 2vw, 1.25rem) clamp(0.9rem, 2vw, 1.25rem);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: #1a1a18;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.nav-card:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.85);
}

.card-title {
  display: block;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.card-sub {
  display: block;
  font-size: clamp(0.82rem, 1.2vw, 0.95rem);
  color: var(--text-muted);
}

/* ── Modal backdrop ── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Modals ── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4vh, 2.5rem) clamp(0.75rem, 3vw, 1.5rem);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
  width: min(680px, 96vw);
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
  margin: auto;
}

.modal.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.1rem);
  right: clamp(0.75rem, 2vw, 1.1rem);
  background: none;
  border: none;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}

.modal-close:hover {
  color: var(--text);
  background: var(--card-hover);
}

.modal-card h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: clamp(1rem, 2.5vh, 1.5rem);
  padding-right: 2rem;
}

.modal-card h3 {
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
  margin-top: clamp(1.25rem, 3vh, 1.85rem);
  margin-bottom: 0.7rem;
}

.modal-card p {
  font-size: clamp(0.85rem, 1.4vw, 0.95rem);
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  line-height: 1.75;
}

.modal-card p strong {
  color: var(--text);
  font-weight: 600;
}

.modal-card p em {
  font-style: italic;
}

.modal-card p a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-card p a:hover {
  color: var(--text-muted);
}

/* Publications */

.pub {
  padding: clamp(0.65rem, 1.5vw, 0.9rem) clamp(0.75rem, 2vw, 1rem);
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 0.55rem;
}

.pub p {
  margin: 0;
  font-size: clamp(0.8rem, 1.3vw, 0.9rem);
}

/* Lists */

.modal-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.modal-card li {
  font-size: clamp(0.82rem, 1.3vw, 0.92rem);
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}

.modal-card li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--border);
}

.modal-card li strong {
  color: var(--text);
  font-weight: 500;
}

.note {
  font-size: clamp(0.76rem, 1.1vw, 0.84rem) !important;
  font-style: italic;
  margin-top: 0.25rem;
}

.contact-line {
  margin-top: 1.5rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: clamp(0.82rem, 1.3vw, 0.9rem) !important;
}
