/* ========================================
   1. THEME SELECTION
   Keep exactly one @import active.
   ======================================== */
@import url("theme-oxford-gold.css");
/* @import url("theme-oxford-blue.css"); */

/* ========================================
   2. LAYOUT SETTINGS
   Change these values to customize the site.
   ======================================== */
:root {
  /* Switch between 1200px (wide) and 1050px (standard). */
  --container-width: 1050px;

  --container-padding: 30px;
  --sidebar-width: 260px;
  --profile-photo-width: 240px;
  --column-gap: 40px;
  --home-top-spacing: 55px;
  --home-bottom-spacing: 65px;
}

/* ========================================
   3. GENERAL SETTINGS
   ======================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.7;
}

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

a[href]:hover {
  text-decoration: underline;
}

a[href]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* ========================================
   4. NAVIGATION (all pages)
   ======================================== */
.site-header {
  background-color: var(--color-header-background);
  color: var(--color-header-text);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 22px var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-name {
  font-size: 23px;
  font-weight: 700;
  color: var(--color-header-text);
  text-decoration: none;
}

.site-name:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  font-size: 18px;
  color: var(--color-header-text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--color-header-text);
  border-bottom-color: var(--color-header-text);
  text-decoration: none;
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  font-weight: 600;
}

/* ========================================
   5. SHARED CONTENT CONTAINER
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ========================================
   6. HOMEPAGE ONLY
   Centered two-column layout; no dividers.
   The main column uses all remaining space.
   ======================================== */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  column-gap: var(--column-gap);
  align-items: start;
  padding-top: var(--home-top-spacing);
  padding-bottom: var(--home-bottom-spacing);
  flex: 1;
}

.profile-sidebar {
  min-width: 0;
  text-align: left;
}

.profile-photo {
  display: block;
  width: var(--profile-photo-width);
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.profile-placeholder {
  background-color: var(--color-photo-background);
  fill: var(--color-photo-placeholder);
}

.placeholder-label {
  fill: var(--color-photo-label);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.profile-name {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-heading);
  margin: 20px 0 7px;
}

.profile-credentials {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-secondary);
}

.profile-degree {
  color: var(--color-text);
}

.profile-links {
  list-style: none;
  padding: 0;
  margin: 25px 0 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: var(--color-link);
  overflow-wrap: anywhere;
}

/* Underline link text only, not icons. */
.profile-links a[href]:hover {
  text-decoration: none;
}

.profile-links a[href]:hover span {
  text-decoration: underline;
}

/* Locally hosted profile icons */
.profile-links img {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

/* Incomplete links remain visible but cannot be activated. */
.profile-links a[aria-disabled="true"] {
  cursor: default;
}

.home-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-section + .home-section {
  margin-top: 42px;
}

.home-section h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--color-heading);
}

.home-section .home-about-heading {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
}

.home-section .section-accent {
  margin: 15px 0 24px;
}

.home-main p {
  max-width: none;
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 20px;
}

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

.home-interests {
  margin: 0;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.7;
}

.home-interests li + li {
  margin-top: 7px;
}

/* ========================================
   7. HERO / INTRODUCTION
   Retained for existing Research/Teaching HTML.
   Homepage no longer uses the hero section.
   ======================================== */
.hero {
  padding: 90px 0 30px;
  background-color: var(--color-background);
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-heading);
}

.hero .subtitle {
  font-size: 19px;
  color: var(--color-secondary);
  margin-bottom: 24px;
}

.hero p {
  max-width: none;
  font-size: 17px;
  color: var(--color-secondary);
  margin-bottom: 30px;
}

/* ========================================
   8. BUTTONS
   Retained for existing pages.
   ======================================== */
.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-right: 12px;
  margin-bottom: 10px;
}

.button-primary {
  background-color: var(--color-link);
  color: var(--color-button-text);
}

.button-primary:hover {
  background-color: var(--color-button-hover);
  text-decoration: none;
}

.button-secondary {
  border: 1px solid var(--color-button-border);
  color: var(--color-link);
  background-color: var(--color-background);
}

.button-secondary:hover {
  background-color: var(--color-button-secondary-hover);
  text-decoration: none;
}

/* ========================================
   9. SECTIONS AND CARDS
   ======================================== */
section.content-section {
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--color-border);
}

/* Remove trailing margins so the section padding controls the final gap. */
section.content-section > :last-child {
  margin-bottom: 0;
}

/* Avoid extra baseline space below a final inline-block button. */
section.content-section > .button:last-child {
  vertical-align: bottom;
}

h2 {
  font-size: 26px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 22px;
  color: var(--color-heading);
}

.section-accent {
  width: 35px;
  height: 3px;
  background-color: var(--color-accent);
  margin-bottom: 24px;
}

.section-text {
  max-width: 850px;
  font-size: 16px;
  color: var(--color-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-background);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 5px 18px var(--color-card-shadow);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--color-heading);
}

.card p {
  color: var(--color-secondary);
  font-size: 15px;
}

.card a {
  font-weight: 600;
}

.contact-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ========================================
   10. TEACHING PAGE
   ======================================== */
.teaching-affiliation {
  margin-bottom: 20px;
}

.teaching-affiliation h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 5px;
}

.teaching-affiliation p {
  font-size: 16px;
  color: var(--color-secondary);
  margin: 0;
}

.course-list {
  margin-top: 20px;
  border-top: 1px solid var(--color-border);
}

.course {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.course:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.course h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 5px;
}

.course p {
  font-size: 15px;
  color: var(--color-secondary);
  margin: 0;
}

.course-list + .teaching-affiliation {
  margin-top: 40px;
}

/* ========================================
   11. RESEARCH PAGE — PUBLICATIONS
   ======================================== */
.publication-list {
  margin-top: 20px;
}

.publication {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.publication:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.publication-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 6px;
}

.publication-title a {
  color: var(--color-link);
  font-weight: 400;
  text-decoration: none;
}

.publication-title a:hover {
  text-decoration: underline;
}

.publication-authors {
  font-size: 14px;
  color: var(--color-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   12. RESEARCH PAGE — RESEARCH EXPERIENCE
   ======================================== */
.research-experience-list {
  margin-top: 20px;
}

.research-experience {
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.research-experience:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.research-experience h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 5px;
}

.research-experience p {
  font-size: 16px;
  color: var(--color-secondary);
  margin: 12px 0;
}

.research-experience .research-date {
  font-size: 15px;
  color: var(--color-secondary);
  margin: 0 0 12px;
}

.research-experience ul {
  padding-left: 24px;
  margin: 10px 0;
  color: var(--color-secondary);
  font-size: 16px;
}

.research-experience li {
  margin-bottom: 6px;
}

/* Normalize spacing after the final paragraph or list in each entry. */
.research-experience > :last-child {
  margin-bottom: 0;
}

.research-experience li:last-child {
  margin-bottom: 0;
}

/* ========================================
   13. FOOTER
   ======================================== */
footer {
  margin-top: 60px;
  background-color: var(--color-footer-background);
  color: var(--color-footer-text);
  text-align: center;
  padding: 25px;
  font-size: 14px;
}

footer a {
  color: var(--color-footer-text);
}

/* Bottom of viewport on short homepages, never fixed over content. */
.home-page footer {
  margin-top: auto;
}

/* ========================================
   14. RESPONSIVE DESIGN
   ======================================== */
/* Stack the homepage at tablet/mobile widths. */
@media (max-width: 800px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 38px;
    padding-top: 40px;
    padding-bottom: 45px;
  }

  .home-section .home-about-heading {
    font-size: 32px;
  }
}

/* Preserve the existing mobile navigation and other page rules. */
@media (max-width: 700px) {
  :root {
    --container-padding: 22px;
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .nav-links {
    gap: 18px;
  }

  .hero {
    padding: 65px 0;
  }

  .hero h1 {
    font-size: 38px;
  }

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

/* ========================================
   CV PAGE
   ======================================== */

section.cv-section {
  padding: 55px 0;
  border-bottom: none;
}

.cv-header {
  margin-bottom: 15px;
}

.cv-header h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-heading);
  margin: 0;
}

/* Right-aligned CV download link */
.cv-download {
  font-size: 16px;
  margin: 0 0 20px;
  text-align: right;
}

/* Embedded PDF viewer */
.cv-viewer {
  display: block;
  width: 100%;
  height: 85vh;
  border: 1px solid var(--color-border);
}

/* Alternative PDF viewing link */
.cv-fallback {
  font-size: 14px;
  color: var(--color-secondary);
  margin: 15px 0 0;
}
