/*--------------------------------------------------------------
  ArchLab Theme

  All design tokens live in :root below. To restyle the site,
  change these variables and update the Google Fonts link in
  layout.html to match.
--------------------------------------------------------------*/

:root {
  /* Fonts */
  --main-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --main-font-weight: 300;
  --display-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display-font-weight: 600;

  /* Core palette */
  --color-body: #444444;
  --color-heading: #37517e;
  --color-accent: #47b2e4;

  /* Neutral palette */
  --color-muted: #666666;
  --color-light: #999999;
  --color-faint: #888888;
  --color-surface: #f8f9fa;
  --color-border: #e0e0e0;
  --color-card-text: #555555;
  --color-white: #ffffff;

  /* Header */
  --header-bg: #ffffff;
  --header-bg-transparent: #ffffff;
  --header-overlay: rgba(40, 58, 90, 0.35);

  /* Navigation */
  --nav-color: #222222;
  --nav-hover-color: var(--color-accent);
  --nav-dropdown-bg: var(--color-white);
  --nav-dropdown-color: var(--color-body);
  --nav-dropdown-hover-color: var(--color-accent);

  /* Body text size */
  --body-font-size: 1.25rem;

  scroll-behavior: smooth;
}


/*--------------------------------------------------------------
  Sphinx overrides — neutralize basic-theme defaults
--------------------------------------------------------------*/

div.document,
div.documentwrapper,
div.bodywrapper,
div.body {
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

div.sphinxsidebar,
div.related,
div.footer,
div.clearer {
  display: none;
}

a.headerlink {
  display: none;
}


/*--------------------------------------------------------------
  Base typography
--------------------------------------------------------------*/

html {
  font-size: 80%;   /* scale everything down — 1rem = 12.8px */
}

body {
  color: var(--color-body);
  background-color: var(--color-white);
  font-family: var(--main-font);
  font-weight: var(--main-font-weight);
  margin: 0;
  padding: 0;
}

a, a:hover, a:focus, a:active, a:visited {
  color: var(--color-accent);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: var(--color-heading);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-family: var(--main-font);
  background: none;
  border: none;
}


/*--------------------------------------------------------------
  Header
--------------------------------------------------------------*/

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  background-color: var(--header-bg);
  padding: 15px 0;
  transition: all 0.5s;
  z-index: 997;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: auto;
  line-height: 1;
}

.sitename {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: #222222;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--main-font);
}

body:not(.scrolled) .header {
  background-color: var(--header-bg-transparent);
}

body.scrolled .header {
  background-color: var(--header-bg);
}

@media (max-width: 768px) {
  .logo { order: 1; }
  .navmenu { order: 3; }
}


/*--------------------------------------------------------------
  Navigation — Desktop
--------------------------------------------------------------*/

@media (min-width: 769px) {
  .navmenu {
    padding: 0;
  }

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
  }

  .navmenu li {
    position: relative;
  }

  .navmenu a,
  .navmenu a:focus,
  .navmenu a:visited {
    color: var(--nav-color);
    padding: 18px 15px;
    font-size: 1.05rem;
    font-family: var(--display-font);
    font-weight: var(--display-font-weight);
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .navmenu a i,
  .navmenu a:focus i {
    font-size: 0.75rem;
    line-height: 0;
    margin-left: 5px;
    transition: 0.3s;
  }

  .navmenu li:last-child a {
    padding-right: 0;
  }

  .navmenu li:hover > a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
  }

  /* Dropdown panel */
  .navmenu .dropdown ul {
    margin: 0;
    padding: 10px 0;
    background: var(--nav-dropdown-bg);
    display: block;
    position: absolute;
    visibility: hidden;
    left: 14px;
    top: 130%;
    opacity: 0;
    transition: 0.3s;
    border-radius: 4px;
    z-index: 99;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  }

  .navmenu .dropdown ul li {
    min-width: 220px;
  }

  .navmenu .dropdown ul a,
  .navmenu .dropdown ul a:visited {
    padding: 10px 20px;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--nav-dropdown-color);
  }

  .navmenu .dropdown ul a:hover,
  .navmenu .dropdown ul li:hover > a {
    color: var(--nav-dropdown-hover-color);
  }

  .navmenu .dropdown:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }

  /* Hide mobile hamburger on desktop */
  .mobile-nav-toggle {
    display: none;
  }
}


/*--------------------------------------------------------------
  Navigation — Mobile
--------------------------------------------------------------*/

@media (max-width: 768px) {
  .mobile-nav-toggle {
    color: var(--nav-color);
    font-size: 1.75rem;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s;
  }

  .navmenu {
    padding: 0;
    z-index: 9997;
  }

  .navmenu ul {
    display: none;
    list-style: none;
    position: absolute;
    inset: 60px 20px 20px 20px;
    padding: 10px 0;
    margin: 0;
    border-radius: 6px;
    background-color: var(--color-white);
    overflow-y: auto;
    transition: 0.3s;
    z-index: 9998;
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-dropdown-color);
    padding: 10px 20px;
    font-family: var(--display-font);
    font-size: 0.875rem;
    font-weight: var(--display-font-weight);
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: color 0.3s;
  }

  .navmenu a i,
  .navmenu a:focus i {
    font-size: 0.75rem;
    line-height: 0;
    margin-left: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    background-color: color-mix(in srgb, var(--color-accent), transparent 90%);
  }

  .navmenu a i:hover,
  .navmenu a:focus i:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
  }

  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-dropdown-hover-color);
  }

  .navmenu .dropdown ul {
    position: static;
    display: none;
    z-index: 99;
    padding: 10px 0;
    margin: 10px 20px;
    background-color: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    transition: all 0.5s ease-in-out;
  }

  .navmenu .dropdown > .dropdown-active {
    display: block;
  }

  .mobile-nav-active {
    overflow: hidden;
  }

  .mobile-nav-active .mobile-nav-toggle {
    color: var(--color-white);
    position: absolute;
    font-size: 2rem;
    top: 15px;
    right: 15px;
    margin-right: 0;
    z-index: 9999;
  }

  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background: rgba(33, 37, 41, 0.8);
    transition: 0.3s;
  }

  .mobile-nav-active .navmenu > ul {
    display: block;
  }
}


/*--------------------------------------------------------------
  Hero banner
--------------------------------------------------------------*/

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 55vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
}

.hero-banner img {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--header-overlay);
  z-index: 1;
}

.hero-banner .hero-overlay {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  padding: 60px 1rem 0;
}

.hero-banner h1 {
  font-family: var(--display-font);
  font-size: 3.5rem;
  font-weight: var(--display-font-weight);
  font-style: normal;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
  color: var(--color-white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-banner .hero-sub {
  font-family: var(--main-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .hero-banner { min-height: 35vh; }
  .hero-banner h1 { font-size: 2.2rem; }
}


/*--------------------------------------------------------------
  Main content area — general RST content
--------------------------------------------------------------*/

.main {
  padding-top: 20px;
}

.content-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  font-size: var(--body-font-size);
}

.content-area h1,
.content-area h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 10px;
  position: relative;
}

.content-area h1::after,
.content-area h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  left: 0;
  bottom: 0;
}

.content-area section:first-of-type h1 {
  margin-top: 1rem;
}

.content-area h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-area p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.content-area ul, .content-area ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-area li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.content-area strong {
  color: var(--color-heading);
}

.content-area hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .content-area {
    padding: 1rem 1rem 0;
  }
}


/*--------------------------------------------------------------
  Tagline (homepage)
--------------------------------------------------------------*/

.tagline-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.tagline {
  font-family: var(--main-font);
  font-size: 1.2rem;
  color: var(--color-body);
  line-height: 1.6;
  font-weight: 500;
  font-style: italic;
  max-width: 850px;
  margin-left: 1.5rem;
}

@media (max-width: 900px) {
  .tagline { font-size: 1.25rem; }
}

@media (max-width: 768px) {
  .tagline-section { padding: 2rem 0; }
  .tagline { font-size: 1.1rem; }
}


/*--------------------------------------------------------------
  Archlab sections (homepage section blocks)
--------------------------------------------------------------*/

.archlab-section {
  padding: 1rem 0 1.5rem;
}

.archlab-section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 15px;
}

.archlab-section h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--color-accent);
  left: 0;
  bottom: 0;
}


/*--------------------------------------------------------------
  Project cards
--------------------------------------------------------------*/

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.project-card .card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
  height: 100%;
  overflow: hidden;
}

.project-card .card:hover {
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.project-card .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-card .card-body {
  padding: 1.25rem;
  flex: 1;
}

.project-card .card-title {
  font-family: var(--main-font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}

.project-card .card-title a {
  color: var(--color-heading);
}

.project-card .card-title a:hover {
  color: var(--color-accent);
}

.project-card .card-caption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-light);
  margin-bottom: 0.75rem;
}

.project-card .card-text {
  font-size: 1rem;
  color: var(--color-card-text);
  line-height: 1.65;
}

.btn-more {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-heading);
  border: 1.5px solid var(--color-heading);
  border-radius: 3px;
  transition: 0.3s;
}

.btn-more:hover {
  background: var(--color-heading);
  color: var(--color-white);
}


/*--------------------------------------------------------------
  Photo cards (image grid without links)
--------------------------------------------------------------*/

.photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.photo-card-caption {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0.75rem 1rem;
  line-height: 1.5;
  background: var(--color-white);
}

.photo-card-name {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-body);
}

.photo-card-role {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
}


/*--------------------------------------------------------------
  Icon list (publications, awards, etc.)
--------------------------------------------------------------*/

.icon-list {
  list-style: none;
  padding-left: 0;
}

.icon-list li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: var(--body-font-size);
  line-height: 1.65;
  color: var(--color-card-text);
}

.icon-list li::before {
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 0.3em;
  font-size: 1.1rem;
  color: var(--color-accent);
}

.icon-list li em {
  color: var(--color-heading);
}

.icon-list li strong {
  color: var(--color-accent);
}

.icon-list li a {
  color: var(--color-heading);
}

.icon-list li p {
  margin-bottom: 0;
}

/* --- pub-list: publication entries with clickable icon + title --- */

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

.pub-list li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: var(--body-font-size);
  line-height: 1.65;
  color: var(--color-card-text);
}

.pub-list li::before {
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 0.3em;
  font-size: 1.1rem;
  color: var(--color-accent);
  pointer-events: none;
}

.pub-list li a.pub-link {
  color: var(--color-card-text);
  text-decoration: none;
}

.pub-list li a.pub-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.pub-list li a.pub-link:hover {
  color: var(--color-body);
}

.pub-list li a.pub-link:hover .pub-title {
  color: var(--color-accent);
}

.pub-list .pub-title {
  color: var(--color-heading);
  transition: color 0.3s;
}

.pub-list li strong {
  color: var(--color-accent);
}


/*--------------------------------------------------------------
  Closing quote
--------------------------------------------------------------*/

.closing-quote {
  font-size: var(--body-font-size);
  color: var(--color-muted);
  line-height: 1.75;
  font-style: italic;
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  border-radius: 0 4px 4px 0;
}


/*--------------------------------------------------------------
  Full-width photo
--------------------------------------------------------------*/

.fullwidth-photo {
  margin: 2rem 0;
}

.fullwidth-photo img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.fullwidth-photo figcaption {
  font-size: 0.85rem;
  color: var(--color-light);
  margin-top: 0.5rem;
  font-style: italic;
}


/*--------------------------------------------------------------
  Visit page — two-column layout
--------------------------------------------------------------*/

.visit-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem;
  align-items: start;
}

.visit-text h2 {
  margin-top: 0;
}

.visit-text p {
  font-size: var(--body-font-size);
  line-height: 1.65;
  color: var(--color-card-text);
}

.visit-map {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .visit-layout {
    grid-template-columns: 1fr;
  }
}


/*--------------------------------------------------------------
  CTA button
--------------------------------------------------------------*/

.cta-section {
  margin: 2.5rem 0 3rem;
  text-align: center;
}

.btn-cta,
.btn-cta:visited,
.btn-cta:focus,
.btn-cta:active,
.btn-cta:hover {
  display: inline-block;
  font-family: var(--display-font);
  font-weight: var(--display-font-weight);
  font-size: 1rem;
  letter-spacing: 1px;
  padding: 12px 36px;
  border-radius: 50px;
  background: var(--color-accent);
  color: var(--color-white);
  transition: 0.3s;
}

.btn-cta:hover {
  background: color-mix(in srgb, var(--color-accent), transparent 15%);
}


/*--------------------------------------------------------------
  Profile page — photo + contact card
--------------------------------------------------------------*/

.profile-photo {
  float: right;
  max-width: 380px;
  margin: 0 0 2rem 2.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.contact-card .card-seal {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  opacity: 0.7;
}

.contact-card .card-info {
  font-size: var(--body-font-size);
  line-height: 1.6;
  color: var(--color-body);
}

.contact-card .card-name {
  font-family: var(--display-font);
  font-weight: var(--display-font-weight);
  font-size: 1.4rem;
  color: var(--color-heading);
}

.contact-card .card-detail {
  font-size: var(--body-font-size);
  color: var(--color-muted);
}

@media (max-width: 768px) {
  .profile-photo {
    float: none;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
  }
}

@media (max-width: 480px) {
  .contact-card {
    flex-direction: column;
    text-align: center;
  }
}


/*--------------------------------------------------------------
  Indented sections — heading left, content right
  Collapses to stacked layout on mobile.
--------------------------------------------------------------*/

.indent-section section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0 2rem;
  align-items: baseline;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.indent-section section > h1,
.indent-section section > h2 {
  grid-column: 1;
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  font-size: 1.2rem;
  white-space: nowrap;
}

.indent-section section > h1::after,
.indent-section section > h2::after {
  display: none;
}

.indent-section section > *:not(h1):not(h2):not(a.headerlink) {
  grid-column: 2;
}

.indent-section section > p:first-of-type,
.indent-section section > ul:first-of-type,
.indent-section section > div:first-of-type {
  margin-top: 0;
}

@media (max-width: 768px) {
  .indent-section section {
    display: block;
  }

  .indent-section section > h1,
  .indent-section section > h2 {
    margin-bottom: 0.75rem;
    padding-bottom: 10px;
  }

  .indent-section section > h1::after,
  .indent-section section > h2::after {
    display: block;
  }
}


/*--------------------------------------------------------------
  Footer
--------------------------------------------------------------*/

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  text-align: center;
}

.footer-lab {
  font-family: var(--main-font);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-heading);
  margin-bottom: 0.3rem;
}

.footer-dept {
  font-size: 0.85rem;
  color: var(--color-faint);
}

.footer-logo {
  margin-top: 1rem;
}

.footer-logo img {
  height: 40px;
  opacity: 0.6;
  transition: 0.3s;
}

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