/* ===================================================
   ACADEMIC PROFILE — STYLESHEET v3
   Palette: Broken white, warm greys, bold terracotta
   =================================================== */

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

/* ── VARIABLES ── */
:root {
  --white:        #f8f4ee;
  --off-white:    #f2eee7;
  --grey-50:      #e8e5e0;
  --grey-100:     #d4d0ca;
  --grey-300:     #a09c96;
  --grey-500:     #6a6660;
  --grey-800:     #2c2a28;
  --ink:          #181614;

  --terracotta:        #b85c3e;
  --terracotta-mid:    #c97055;
  --terracotta-light:  #d9896d;
  --terracotta-pale:   #f0ddd7;
  --terracotta-faint:  #faf3f0;

  --sidebar-bg:        #2e1919;
  --sidebar-text:      #e8ddd8;
  --sidebar-muted:     #a89890;
  --sidebar-accent:    #d4826a;
  --sidebar-divider:   rgba(255,255,255,0.10);

  --nav-height: 64px;
  --sidebar-w:  360px;

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.35s var(--ease);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── NAVIGATION ── */
nav#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(210, 90, 68, 0.91);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  z-index: 1000;
  padding: 0 40px;
}

nav#topbar .nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

nav#topbar .nav-brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  margin-right: auto;
  transition: color var(--transition);
}
nav#topbar .nav-brand:hover { color: rgba(255,255,255,0.75); }

nav#topbar .nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav#topbar .nav-links a {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  padding: 6px 9px;
  border-radius: 5px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
nav#topbar .nav-links a:hover {
  color: #fff;
  background: rgba(0,0,0,0.15);
}
nav#topbar .nav-links a.active {
  color: #fff;
  background: rgba(0,0,0,0.22);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}

/* ── APP SHELL ── */
#app {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ── PAGE TRANSITIONS ── */
.page-section {
  display: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s ease, transform 0.42s ease;
  min-height: calc(100vh - var(--nav-height));
}
.page-section.active  { display: block; }
.page-section.visible { opacity: 1; transform: translateY(0); }

/* ── HOME LAYOUT ── */
#home { display: none; }
#home.active {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--nav-height));
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  /* Horizontal padding so the layout floats centered on wide screens */
  padding: 0 48px;
  gap: 0;
  box-sizing: border-box;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 60px 36px 52px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* Rounded corners on the sidebar since it floats */
  border-radius: 0 0 12px 12px;
  /* Subtle left margin from screen edge */
  margin-top: 0;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

/* Grain texture overlay */
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }

/* Profile photo */
.profile-photo-wrap {
  width: 192px;
  height: 192px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(212, 130, 106, 0.5);
  box-shadow:
    0 0 0 8px rgba(212, 130, 106, 0.10),
    0 20px 52px rgba(0,0,0,0.50);
  margin-bottom: 28px;
  flex-shrink: 0;
  transition: box-shadow var(--transition);
}
.profile-photo-wrap:hover {
  box-shadow:
    0 0 0 11px rgba(212, 130, 106, 0.18),
    0 26px 60px rgba(0,0,0,0.55);
}
.profile-photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}

.sidebar-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 6px;
}
.sidebar-title {
  font-size: 0.73rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--sidebar-accent);
  font-weight: 500;
  margin-bottom: 12px;
}
.sidebar-affil {
  font-size: 0.86rem;
  color: var(--sidebar-muted);
  line-height: 1.75;
  margin-bottom: 28px;
}
.sidebar-affil a {
  color: var(--sidebar-muted);
  transition: color var(--transition);
}
.sidebar-affil a:hover { color: #fff; }

.sidebar-divider {
  height: 1px;
  background: var(--sidebar-divider);
  margin: 2px 0 18px;
}

.sidebar-section-label {
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(168,152,144,0.55);
  font-weight: 500;
  margin-bottom: 10px;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 20px;
}
.sidebar-links a {
  font-size: 0.84rem;
  color: var(--sidebar-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.sidebar-links a:hover {
  color: #fff;
  background: rgba(212, 130, 106, 0.15);
}
.sidebar-links svg { flex-shrink: 0; opacity: 0.65; }
.sidebar-links a:hover svg { opacity: 1; }

.sidebar-spacer { flex: 1; min-height: 24px; }

.sidebar-cv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 6px;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
  margin-top: 8px;
}
.sidebar-cv-btn:hover {
  background: var(--terracotta-mid);
  transform: translateY(-1px);
  color: #fff;
}

/* ── MAIN CONTENT ── */
.main-content {
  padding: 80px 72px 100px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-content .eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.main-content .eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--terracotta);
  flex-shrink: 0;
}

.main-content h1 {
  font-family: var(--serif);
  font-size: 3.6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
}
.main-content h1 em {
  font-style: italic;
  color: var(--terracotta);
}
.main-content .tagline {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--grey-300);
  margin-bottom: 44px;
}
.main-content p {
  font-size: 1.03rem;
  line-height: 1.9;
  color: var(--grey-800);
  max-width: 600px;
  margin-bottom: 22px;
}

/* ── INTEREST PILLS ── */
.interest-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 36px;
}
.pill {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: var(--terracotta-faint);
  border: 1px solid var(--terracotta-pale);
  padding: 7px 18px;
  border-radius: 100px;
  font-weight: 500;
  cursor: default;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pill:hover {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}

/* ── HIGHLIGHT STRIP ── */
.highlight-strip {
  border-left: 3px solid var(--terracotta);
  padding: 14px 24px;
  background: var(--off-white);
  margin: 36px 0;
  max-width: 580px;
  border-radius: 0 6px 6px 0;
}
.highlight-strip p {
  margin-bottom: 0;
  font-style: italic;
  font-size: 0.97rem;
  color: var(--grey-800);
}

/* ── INNER PAGES ── */
.inner-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 76px 56px 110px;
}
.inner-page .page-header { margin-bottom: 56px; }

.inner-page .page-header .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.inner-page .page-header .eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--terracotta);
}
.inner-page .page-header h2 {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 10px;
}
.inner-page .page-header .sub {
  font-size: 0.9rem;
  color: var(--grey-300);
  font-style: italic;
}

.inner-page > p,
.inner-page .intro-text {
  font-size: 1.03rem;
  line-height: 1.9;
  color: var(--grey-800);
  max-width: 660px;
  margin-bottom: 22px;
}

/* ── SECTION SUBHEAD ── */
.section-subhead {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-300);
  font-weight: 500;
  margin: 48px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-subhead::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grey-100);
}

/* ── CARDS ── */
.card-list { display: flex; flex-direction: column; gap: 3px; }

.card {
  background: var(--white);
  border: 1px solid var(--grey-50);
  padding: 24px 28px 24px 32px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--terracotta);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}
.card:hover {
  border-color: var(--terracotta-pale);
  box-shadow: 0 6px 24px rgba(184,92,62,0.07);
  transform: translateY(-1px);
}
.card:hover::before { transform: scaleY(1); }

.card-year   { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); font-weight: 500; margin-bottom: 6px; }
.card-title  { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--ink); line-height: 1.4; margin-bottom: 8px; }
.card-meta   { font-size: 0.88rem; color: var(--grey-500); line-height: 1.7; }
.card-tags   { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tag         { font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--grey-500); background: var(--grey-50); padding: 4px 12px; border-radius: 100px; }

/* ── CONTACT INFO GRID ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.contact-item { padding: 26px; background: var(--off-white); border-radius: 8px; border: 1px solid var(--grey-100); transition: border-color var(--transition); }
.contact-item:hover { border-color: var(--terracotta-pale); }
.contact-item .label { font-size: 0.69rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--terracotta); font-weight: 500; margin-bottom: 8px; }
.contact-item .value { font-family: var(--serif); font-size: 1rem; color: var(--ink); line-height: 1.65; }

/* ── CONTACT FORM ── */
.contact-form {
  margin-top: 56px;
  max-width: 620px;
}
.contact-form h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}
.contact-form .form-sub {
  font-size: 0.9rem;
  color: var(--grey-500);
  margin-bottom: 36px;
  font-style: italic;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.71rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--grey-500);
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--off-white);
  border: 1px solid var(--grey-100);
  border-radius: 6px;
  padding: 13px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--terracotta-light);
  box-shadow: 0 0 0 3px rgba(184,92,62,0.08);
}
.form-group textarea { min-height: 150px; }

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.79rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.form-submit:hover {
  background: var(--terracotta-mid);
  transform: translateY(-1px);
}
.form-success {
  display: none;
  padding: 16px 22px;
  background: var(--terracotta-faint);
  border: 1px solid var(--terracotta-pale);
  border-radius: 8px;
  color: var(--terracotta);
  font-size: 0.92rem;
  margin-top: 16px;
}

/* ── NEWS ── */
.news-item { display: grid; grid-template-columns: 88px 1fr; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--grey-50); align-items: start; }
.news-item:last-child { border-bottom: none; }
.news-date  { font-family: var(--serif); font-size: 0.92rem; color: var(--grey-300); text-align: right; padding-top: 2px; font-style: italic; }
.news-title { font-size: 1rem; color: var(--ink); font-weight: 500; margin-bottom: 5px; }
.news-body  { font-size: 0.88rem; color: var(--grey-500); line-height: 1.7; }

/* ── AWARDS ── */
.award-item { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--grey-50); align-items: start; }
.award-item:last-child { border-bottom: none; }
.award-year  { font-size: 0.82rem; color: var(--terracotta); font-weight: 500; padding-top: 2px; }
.award-title { font-size: 1rem; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.award-org   { font-size: 0.86rem; color: var(--grey-500); }

/* ── TEACHING: COURSES ── */
.teaching-courses {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 0;
}

.course-card {
  background: var(--white);
  border: 1px solid var(--grey-50);
  padding: 20px 28px 20px 32px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.course-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--terracotta);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}

.course-card:hover {
  border-color: var(--terracotta-pale);
  box-shadow: 0 6px 24px rgba(184,92,62,0.07);
  transform: translateY(-1px);
}

.course-card:hover::before { transform: scaleY(1); }

.course-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.course-level {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: var(--terracotta-faint);
  border: 1px solid var(--terracotta-pale);
  padding: 3px 10px;
  border-radius: 100px;
}

.course-year {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
}

.course-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.course-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.course-title a:hover { color: var(--terracotta); }

.course-link-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.35;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.course-title a:hover .course-link-icon { opacity: 1; }

.course-institution {
  font-size: 0.88rem;
  color: var(--grey-500);
  line-height: 1.7;
  margin-bottom: 3px;
}

.course-unit {
  font-style: italic;
}

.course-role {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--grey-800);
}

.course-responsible { 
  color: var(--grey-300); 
  font-weight: 400; 
}

.course-theme {
  margin: 6px 0 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  font-style: italic;
  letter-spacing: 0.01em;
  position: relative;
  padding-left: 0.75rem;
}

.course-theme::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 3px;
  height: 0.9em;
  background: #c7c7c7;
  border-radius: 2px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--grey-100);
  padding: 32px 40px;
  text-align: center;
  font-size: 0.79rem;
  letter-spacing: 0.05em;
  color: var(--grey-300);
}

/* ── RESPONSIVE ── */
@media (max-width: 1080px) {
  #home.active {
    grid-template-columns: 1fr;
    padding: 0;
    max-width: 100%;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 48px 36px 40px;
    border-radius: 0;
  }
  .sidebar::after { display: none; }
  .main-content {
    padding: 56px 40px 80px;
    justify-content: flex-start;
  }
}
@media (max-width: 768px) {
  nav#topbar { padding: 0 20px; }
  nav#topbar .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: #c94b38;
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  }
  nav#topbar .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .inner-page { padding: 56px 24px 80px; }
  .main-content h1 { font-size: 2.8rem; }
  .inner-page .page-header h2 { font-size: 2.4rem; }
}
@media (max-width: 480px) {
  .main-content h1 { font-size: 2.2rem; }
  .inner-page .page-header h2 { font-size: 2rem; }
}