/* ==========================================================================
   AECAL — Affective Engineering and Computer Arts Lab
   Theme colors, shadows, and fonts are defined as variables in :root below.
   ========================================================================== */

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
b,
strong {
  font-weight: 700;
}
em,
i {
  font-style: italic;
}
img,
svg {
  display: block;
}
img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --header-h: 84px;
  --maxw: 80rem;

  --font-head: "Quicksand", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --red: #a8242b;
  --maroon: #8a161b;
  --dark: #6f0f12;
  --rose: #cf8a8d;
  --pink: #eecccd;
  --blue: #d9e6f6;

  --ink: #374151; /* body text */
  --ink-soft: #4b5563; /* secondary text */
  --ink-mute: #6b7280; /* muted text */
  --ink-faint: #9ca3af; /* faint, captions */
  --ink-strong: #1f2937; /* emphasized text */
  --line: #e5e7eb; /* hairline borders */

  --radius: 1rem;
  --shadow-card:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Page base — low-poly geometric background
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Crect%20width='160'%20height='160'%20fill='%23d9e6f6'/%3E%3Cpolygon%20points='0,0%20160,0%2080,80'%20fill='%23c6dbf0'/%3E%3Cpolygon%20points='160,0%20160,160%2080,80'%20fill='%23d0e0f2'/%3E%3Cpolygon%20points='160,160%200,160%2080,80'%20fill='%23b8d1ec'/%3E%3Cpolygon%20points='0,160%200,0%2080,80'%20fill='%23e1effb'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-attachment: fixed;
}

/* Anchor jumps clear the sticky topbar */
main > section,
.site-footer {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Header / sticky topbar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  user-select: none;
}
.brand-logo {
  height: 2.25rem;
  width: auto;
}
.brand-text {
  display: none;
  font-size: 11px;
  line-height: 1.25;
  color: var(--ink-faint);
  border-left: 1px solid var(--line);
  padding-left: 0.75rem;
}

/* Nav links + scroll-spy active state */
.nav-desktop {
  display: none;
  align-items: center;
}

.nav-link {
  position: relative;
  padding: 0.45rem 0.7rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav-link:hover {
  color: var(--red);
}
.nav-link.active {
  color: var(--red);
  font-weight: 800;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

/* Hamburger / close button (mobile) */
.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  color: var(--red);
}
.menu-btn:hover {
  background: rgba(217, 230, 246, 0.6);
}
.menu-btn svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Mobile dropdown nav */
.nav-mobile {
  padding-bottom: 0.75rem;
}
.mobile-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
}
.mobile-list > * + * {
  border-top: 1px solid #f3f4f6;
}
.nav-mobile .nav-link {
  display: block;
  padding: 0.75rem 1rem;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: 3rem 1rem;
}
.section--top {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}
.section--faculty {
  padding-bottom: 4rem;
}
.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}
.hero-eyebrow {
  color: var(--ink-mute);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.hero-logo {
  height: 7rem;
  width: auto;
  margin: 0 auto;
}
.hero-sub {
  color: var(--ink-mute);
  font-size: 0.875rem;
  line-height: 1.625;
  margin-top: 1.25rem;
}
.sep {
  display: none;
}

/* --------------------------------------------------------------------------
   Cards (the three on the landing section)
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem 1.75rem;
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 2rem;
  color: var(--ink);
  text-align: center;
  margin-bottom: 1rem;
  padding-right: 2.5rem;
}
.card-text,
.card-list {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.625;
}
.card-text {
  text-align: justify;
}
.card-list {
  list-style: disc;
  padding-left: 1.25rem;
}
.card-list li + li {
  margin-top: 0.75rem;
}
.card-list li::marker {
  color: var(--rose);
}
.card-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Panels — full-width white content blocks
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}
.panel-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 2rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-right: 3rem;
}
.panel-body {
  color: var(--ink-soft);
  line-height: 1.625;
  text-align: justify;
}
.panel-body > * + * {
  margin-top: 1.25rem;
}
.panel-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Corner icon badge (front square + lighter offset square behind) */
.icon-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
}
.card .icon-badge {
  top: 1.25rem;
  right: 1.25rem;
}
.icon-badge .back {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 100%;
  height: 100%;
  background: var(--pink);
  border-radius: 11px;
}
.icon-badge .front {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--rose);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
}
.icon-badge .front svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* --------------------------------------------------------------------------
   Laboratory photo grid (placeholders)
   -------------------------------------------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.photo {
  position: relative;
  overflow: hidden;
  height: 13rem;
  border-radius: 14px;
  background: linear-gradient(150deg, #b9c6d8, #7f8ea3 55%, #5d6b7e);
  box-shadow: 0 8px 20px rgba(40, 55, 80, 0.25);
  display: flex;
  align-items: flex-end;
}
.photo .label {
  position: relative;
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
}
.photo .cam {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.65);
}
.photo .cam svg {
  width: 2.25rem;
  height: 2.25rem;
}

.note {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 2.5rem;
}
.dots {
  text-align: center;
  color: var(--ink-faint);
  margin-top: 1.5rem;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Faculty list
   -------------------------------------------------------------------------- */
.intro {
  color: var(--ink-soft);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.member-list {
  color: var(--ink-soft);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.member-list > * + * {
  margin-top: 0.5rem;
}
.name {
  color: var(--ink-strong);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.42rem 1.1rem;
  border-radius: 0.6rem;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    background 0.15s ease,
    transform 0.08s ease;
}
.btn-red:hover {
  background: var(--maroon);
}
.btn-red:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
}

.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 2.5rem;
}
.footer-logo {
  display: block;
  width: min(100%, 10rem);
  height: auto;
}
.footer-doodle {
  display: block;
  width: min(100%, 9rem);
  height: auto;
  margin-top: 1rem;
  color: #fff;
}
.footer-doodle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-address {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  line-height: 1.625;
}
.footer-title {
  font-family: var(--font-head);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: 0.025em;
}
.footer-links {
  font-size: 0.875rem;
}
.footer-links > * + * {
  margin-top: 0.5rem;
}
.footer-link {
  color: rgba(255, 255, 255, 0.8);
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #fff;
  border-radius: 0.6rem;
  background: #fff;
  color: var(--dark);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.contact-btn:hover {
  background: transparent;
  color: #fff;
}
.contact-btn svg {
  width: 1rem;
  height: 1rem;
}

.footer-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1rem;
}
.footer-note a {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-copy {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .br-mobile {
    display: none;
  } /* hide the mobile line break */
  .sep {
    display: inline;
  } /* show the middot separator */
  .photo {
    height: 16rem;
  }
}

@media (min-width: 768px) {
  .topbar-row {
    height: 76px;
  }
  .brand-logo {
    height: 2.75rem;
  }
  .hero-eyebrow,
  .hero-sub {
    font-size: 1rem;
  }
  .hero-logo {
    height: 5.5rem;
  }
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .panel {
    padding: 2.5rem;
  }
  .panel-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .nav-mobile {
    display: none;
  }
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .photo--offset {
    transform: translateY(1.5rem);
  }
}

@media (min-width: 1280px) {
  .brand-text {
    display: block;
  }
}
