@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --primary:    #162232;
  --nav-bg:     #c8dcea;
  --nav-text:   #1e3d52;
  --accent:     #7aacc2;
  --accent-dk:  #3d7a9e;
  --accent-lt:  #e5f1f8;
  --light-bg:   #f7f9fb;
  --border:     #dde8ef;
  --text:       #252525;
  --muted:      #6b7f8c;
  --page-bg:    #fcfcfb;
  --footer-bg:  #c8dcea;
}

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

body {
  font-family: 'Lato', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.75;
  background: var(--page-bg);
}

/* ─── NAV ─────────────────────────────────────────────── */
nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #aac5d8;
  box-shadow: 0 1px 6px rgba(22,34,50,0.07);
}

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

.nav-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 0.9rem 0;
}

nav ul { list-style: none; display: flex; }

nav a {
  display: block;
  padding: 0.9rem 1rem;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 0.15s;
}

nav a:hover { color: var(--primary); }

nav a.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 2px solid var(--accent-dk);
}

/* ─── PAGE BANNER ─────────────────────────────────────── */
.page-banner {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(22,34,50,0.25), rgba(22,34,50,0.65));
}

.page-banner-title {
  position: relative;
  z-index: 1;
  padding: 1.25rem 2rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ─── LAYOUT ──────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero img {
  width: 145px;
  height: 145px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 3px 14px rgba(22,34,50,0.14);
}

.hero-text h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.hero-text .subtitle {
  font-size: 0.93rem;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 0.97rem;
  margin-bottom: 0.7rem;
  color: #3a3a3a;
  text-align: justify;
}

.contact-links {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-links a {
  color: var(--accent-dk);
  text-decoration: none;
  font-size: 0.88rem;
}

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

/* ─── SOCIAL BUTTONS ──────────────────────────────────── */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-dk);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.social-links a:hover {
  background: var(--accent-dk);
  color: #fff;
  border-color: var(--accent-dk);
}

/* ─── SUBNAV ──────────────────────────────────────────── */
.subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.subnav a {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.subnav a:hover { color: var(--primary); border-color: var(--accent); }

.subnav-active {
  background: var(--accent-dk) !important;
  color: #fff !important;
  border-color: var(--accent-dk) !important;
}

/* ─── SECTION HEADINGS ────────────────────────────────── */
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-lt);
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--accent-dk);
}

h2:first-child { margin-top: 1.5rem; }

h3 {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

/* ─── PAPERS ──────────────────────────────────────────── */
.paper {
  margin-bottom: 0.75rem;
  padding: 1rem 1rem 1rem 1.2rem;
  border-left: 3px solid var(--accent-lt);
  border-radius: 0 5px 5px 0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22,34,50,0.04);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.paper:hover {
  background: var(--accent-lt);
  border-left-color: var(--accent-dk);
  box-shadow: 0 3px 10px rgba(61,122,158,0.10);
}

.paper-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.paper-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.paper-meta .journal { font-style: italic; }

.abstract-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 0.74rem;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.2rem 0.7rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.abstract-toggle:hover {
  background: var(--accent-lt);
  border-color: var(--accent-dk);
  color: var(--accent-dk);
}

.abstract-text {
  display: none;
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.75;
  text-align: justify;
  background: var(--light-bg);
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1.1rem;
  border-radius: 0 4px 4px 0;
}

.paper-links {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.paper-links a {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-dk);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.paper-links a:hover {
  background: var(--accent-dk);
  color: #fff;
  border-color: var(--accent-dk);
}

/* ─── MEDIA LIST ──────────────────────────────────────── */
.media-list { list-style: none; padding: 0; }

.media-list li {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--accent-lt);
  border-radius: 0 4px 4px 0;
  background: #fff;
  font-size: 0.91rem;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(22,34,50,0.04);
  transition: border-color 0.15s, background 0.15s;
}

.media-list li:hover {
  border-left-color: var(--accent-dk);
  background: var(--accent-lt);
}

.media-list a { color: var(--accent-dk); text-decoration: none; }
.media-list a:hover { text-decoration: underline; }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dk);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  padding-left: 0.1rem;
}

.section-label:first-of-type { margin-top: 0; }

/* ─── TEACHING ────────────────────────────────────────── */
.institution { margin-bottom: 2.25rem; }

.institution h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.course-table th {
  background: var(--accent-dk);
  color: rgba(255,255,255,0.92);
  padding: 0.5rem 0.85rem;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-table td {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.course-table tr:last-child td { border-bottom: none; }
.course-table tr:nth-child(even) td { background: var(--light-bg); }

/* ─── CONTACT ─────────────────────────────────────────── */
.contact-block { margin-bottom: 2rem; }
.contact-block p { margin-bottom: 0.35rem; font-size: 0.94rem; }
.contact-block a { color: var(--accent-dk); text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dk);
  margin-bottom: 0.6rem;
}

.ups-logo {
  display: block;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.ups-logo img {
  height: 60px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.ups-logo img:hover { opacity: 1; }

/* ─── FOOTER ──────────────────────────────────────────── */
footer {
  background: var(--footer-bg);
  color: var(--nav-text);
  font-size: 0.78rem;
  margin-top: 2rem;
  border-top: 1px solid #aac5d8;
}

footer .footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  letter-spacing: 0.03em;
  text-align: center;
}

/* ─── HAMBURGER ───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { flex-direction: column; gap: 1.5rem; }
  .page-banner { height: 130px; }
  .page-banner-title { font-size: 1.3rem; padding: 1rem 1.5rem; }
  .hamburger { display: flex; }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  nav ul.open { display: flex; }

  nav a {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
  }

  nav a.active {
    border-left: 3px solid var(--accent-dk);
    padding-left: calc(1.5rem - 3px);
  }
}
