:root {
  /* Brand palette — blue accent kept for non-button accents */
  --brand: #2563eb;

  /* Neutral greys theme */
  --bg: #f3f4f6;           /* page background: light grey */
  --card: #f8fafc;         /* card background: very light grey */
  --text: #1f2937;         /* main text: dark grey */
  --muted: #6b7280;        /* secondary text: mid grey */

  /* Header & Button greys */
  --header-bg: #343a40;    /* updated dark grey header */
  --header-text: #f8fafc;  /* header text (white-ish) */
  --btn-bg: #e5e7eb;       /* button background grey */
  --btn-text: #111827;     /* button text dark */
  --btn-outline: #d1d5db;  /* subtle border */

  /* Layout */
  --maxw: 80%;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

/* Optional: automatic dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;         /* dark grey */
    --card: #1f2937;       /* darker card */
    --text: #e5e7eb;       /* light text */
    --muted: #9ca3af;      /* muted light grey */

    /* Keep header consistent in dark mode */
    --header-bg: #343a40;
    --header-text: #f8fafc;

    --btn-bg: #374151;     /* dark grey button */
    --btn-text: #f9fafb;   /* light button text */
    --btn-outline: #4b5563;/* dark outline */

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.container { width: min(100%, var(--maxw)); margin-inline: auto; padding: 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; }

/* Header */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #24323e;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (prefers-color-scheme: dark) {
  header.site-header { background: rgba(17, 24, 39, 0.6); border-bottom-color: rgba(229, 231, 235, 0.08); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 12px; }
header .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; color: var(--header-text); }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); box-shadow: var(--shadow); }
header nav a { text-decoration: none; color: var(--header-text); opacity: 0.9; margin-left: 16px; font-weight: 600; }
header nav a:hover { opacity: 1; color: #E57200}
header div a:hover { opacity: 1; color: #E57200}

/* Hero */
.hero-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 48px); }
.hero h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 8px; letter-spacing: 0.2px; }
.hero .subtitle { color: var(--muted); margin: 0 0 12px; max-width: 70ch; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; text-decoration: none; font-weight: 600; background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-outline); }
.btn-primary { background: #343a40; color: #f8fafc; border: 0px solid var(--btn-outline); box-shadow: var(--shadow); }
.btn-secondary { background: #343a40; color: #f8fafc; border: 0px solid var(--btn-outline); box-shadow: var(--shadow); }

section { margin-block: 40px; }
.section-title { font-size: clamp(20px, 3vw, 28px); margin-bottom: 16px; }

/* Full-bleed strip */
.hero-strip {
  position: relative;
  width: 100vw;            /* truly full width */
  margin-left: 50%;
  transform: translateX(-50%);
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  min-height: clamp(360px, 60vh, 640px);
  display: flex;
  align-items: end;        /* pushes content lower */
}

/* Page-specific image (home page) */
.hero-strip.home-hero {
  /* add a soft gradient for legibility */
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 75%),
    url("../images/bg/uvads3.jpg");   /* ← change to your path */
}

/* Inner box with your site width */
.hero-inner {
  width: min(100%, var(--maxw));  /* reuses your --maxw setting */
  margin-inline: auto;
  padding: clamp(24px, 6vw, 72px) 20px;
  color: #fff;
}

/* Titles over the image */
.hero-title {
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
  font-size: clamp(32px, 6vw, 64px);
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.hero-sub {
  margin: 6px 0 0;
  font-weight: 600;
  line-height: 1.15;
  font-size: clamp(18px, 3.2vw, 28px);
  opacity: .95;
}

/* Buttons on image: higher contrast */
.hero-strip .btn.btn-primary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.hero-strip .btn.btn-primary:hover { background: rgba(255,255,255,0.16); }

/* Optional: if you want the image not to break out of the container,
   delete width/margin/transform on .hero-strip and keep everything else. */

   /* 1) Remove the gap between header and hero */
section.hero-strip { margin-block: 0; }   /* overrides section { margin-block: 40px } */
#main { padding-top: 0; }                 /* your .container adds 20px; zero it for the home page */
/* If you prefer not to change #main globally, use this instead: */
/* #main > .hero-strip { margin-top: -20px; }  /* cancels the container's top padding only for the hero */ 

/* 2) Offset the background image upward (show more of the top of the photo) */
.hero-strip.home-hero {
  background-position: center 50%;        /* try 20–40% until it looks right */
}

/* ==========================
Image Carousel (no deps)
========================== */
.gallery { margin-block: 40px; }


.carousel {
position: relative;
display: grid;
grid-auto-flow: column;
grid-auto-columns: 85%;
overflow-x:hidden;
gap: 20px;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
border-radius: var(--radius);
}
.carousel:focus { outline: 2px solid var(--btn-outline); outline-offset: 2px; }
.carousel::-webkit-scrollbar { height: 10px; }
.carousel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }


.slide {
scroll-snap-align: start;
position: relative;
background: var(--card);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
}
.slide img { display: block; width: 100%; height: 500px; object-fit: cover; }
.slide-caption {
position: absolute; left: 0; right: 0; bottom: 0;
padding: 12px 16px;
color: #fff;
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 70%);
}


.carousel-controls { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel-controls .btn { min-width: 44px; }


/* search bar*/ 
/* Right side grouping (nav + search) */
.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
/* Boxy input */
.site-search { position: relative; min-width: 280px; }
.site-search input {
  height: 40px;
  padding: 0 88px 0 12px;      /* leave room for the two buttons on the right */
  border-radius: 8px;          /* set 0 for perfectly square */
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: var(--header-text);
}
.site-search input::placeholder { color: rgba(255,255,255,0.7); }
.site-search input:focus {
  border-color: #E57200;
  box-shadow: 0 0 0 2px rgba(229,114,0,0.25);
}

/* Magnifier INSIDE the box (no background, orange glyph) */
.search-icon {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: #E57200;               /* orange icon */
  cursor: pointer;
}

/* Clear (X) INSIDE the box, with a subtle ring */
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--header-text);
  cursor: pointer;
}
.search-clear:hover { border-color: rgba(255,255,255,0.4); }

/* Results panel corners a bit boxier to match the input */
.search-panel { border-radius: 10px; }

/* Dark mode tweaks */
@media (prefers-color-scheme: dark) {
  .site-search input {
    border-color: rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.06);
  }
  .search-panel { border-color: #374151; }
}


/* News */
.news-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.news-item { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.news-item time { font-size: 0.85rem; color: var(--muted); }
.news-item h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.news-item p { margin: 0; color: var(--muted); }

footer { border-top: 1px solid rgba(17, 24, 39, 0.12); padding-block: 24px; color: var(--muted); }

/* Simple responsive two-column helper */
.grid-two { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 800px) { .grid-two { grid-template-columns: 1.5fr 1fr; } }

/* NEWS page: lock alignment with 3-column grid (Date | Title | Summary) */
.news-list.compact { display: block !important; } /* override base grid */

.news-list.compact .news-item {
  display: grid !important;
  grid-template-columns: 100px minmax(280px, 420px) 1fr; /* date | title | summary */
  align-items: start;
  column-gap: 16px;
  width: 100%;
  padding: 8px 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
}
.news-list.compact .news-item:last-child { border-bottom: none; }

/* Date column */
.news-list.compact time {
  grid-column: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* Title column */
.news-list.compact h3 {
  grid-column: 2;
  margin: 0;
  font-size: 1rem;
}
.news-list.compact h3 a { text-decoration: none; }
.news-list.compact h3 a:hover { text-decoration: underline; }

/* Summary column */
.news-list.compact p {
  grid-column: 3;
  margin: 0;
  color: var(--muted);
}

/* Remove previous inline/pipe hacks */
.news-list.compact time::after,
.news-list.compact h3::after { content: none !important; }
.news-list.compact h3 + p { margin-left: 0 !important; }

/* Small screens: stack neatly */
@media (max-width: 640px) {
  .news-list.compact .news-item { grid-template-columns: 1fr; row-gap: 2px; padding: 12px 0; }
  .news-list.compact time,
  .news-list.compact h3,
  .news-list.compact p { grid-column: 1; }
}

/* People */
.page-title { font-size: clamp(28px, 5vw, 40px); margin: 32px 0 8px; }
.people-section { margin-block: 36px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 24px; justify-items: center; }
.people-grid.single { grid-template-columns: 1fr; }


.person-card { text-align: center; }
.avatar { width: 120px; height: 120px; border-radius: 9999px; object-fit: cover; box-shadow: var(--shadow); border: 4px solid var(--card); background: #ddd; }
.director .avatar { width: 160px; height: 160px; }


.person-name { margin: 12px 0 2px; font-size: 1.05rem; }
.person-name a { color: var(--brand); text-decoration: none; font-weight: 700; }
.person-name a:hover { text-decoration: underline; }
.person-role { color: var(--muted); margin: 0 0 10px; }


.person-links { display: flex; gap: 10px; justify-content: center; }
.icon-btn {
width: 36px; height: 36px;
display: inline-flex; align-items: center; justify-content: center;
border-radius: 9999px; text-decoration: none;
background: var(--btn-bg); color: var(--brand);
border: 1px solid var(--btn-outline);
font-size: 18px; line-height: 1; user-select: none;
}
.icon-btn:hover { filter: brightness(0.98); }
.muted { color: var(--muted); }

#phd-grid, #ms-grid, #ug-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { #phd-grid, #ms-grid, #ug-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { #phd-grid, #ms-grid, #ug-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { #phd-grid, #ms-grid, #ug-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { #phd-grid, #ms-grid, #ug-grid { grid-template-columns: 1fr; } }

/* Extra meta lines under names/roles */
.person-meta { margin: 2px 0; color: var(--muted); }

/* Alumni formatting */
.alumni-item { padding: 8px 0; }
.alumni-name { font-weight: 700; }
.alumni-meta, .alumni-employment { color: var(--muted); font-size: 0.95rem; }

/* --- People page: bar colors by level --- */
.person-block[data-level="advisor"] .person-bar { background: #E57200; } /* orange */
.person-block[data-level="phd"]     .person-bar { background: #E57200; } /* slate */
.person-block[data-level="ms"]      .person-bar { background: #24323e; } /* brand blue */
.person-block[data-level="ug"]      .person-bar { background: #24323e; } /* muted grey */

/* (Already applied on index, but repeat here if not present)
   Make portraits a bit larger on wider screens */
.person-card.row { grid-template-columns: 160px 1fr; gap: 18px; }
@media (min-width: 1024px) { .person-card.row { grid-template-columns: 180px 1fr; } }
@media (min-width: 1280px) { .person-card.row { grid-template-columns: 200px 1fr; } }



/* Publications: one card per row, info left + image right */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-card {
  display: grid;
  grid-template-columns: 1fr 240px; /* left info | right image (if present) */
  gap: 16px;
  align-items: stretch;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* When no image is present we collapse to one column */
.pub-card.no-thumb { grid-template-columns: 1fr; }

.pub-main { display: grid; row-gap: 8px; align-content: start; }
.pub-title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.pub-title a { color: var(--text); text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }

.pub-meta { margin: 0; color: var(--muted); font-size: 0.95rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* Reuse icon-btn style but shrink slightly */
.pub-links .icon-btn {
  width: 32px; height: 32px; font-size: 16px;
}

/* Right-side thumbnail */
.pub-aside { display: flex; align-items: center; justify-content: flex-end; }
.pub-thumb {
  width: 100%;
  max-width: 240px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--btn-outline);
  background: #ddd;
}

/* Mobile: stack image below */
@media (max-width: 720px) {
  .pub-card,
  .pub-card.no-thumb { grid-template-columns: 1fr; }
  .pub-aside { justify-content: flex-start; }
  .pub-thumb { max-width: 100%; height: 180px; }
}

/* Publications — group headings + stacked lists */
.pub-list { display: block; }             /* outer container, sections handle spacing */
.pub-year { margin-block: 28px; }
.pub-year:first-child { margin-top: 0; }

.pub-year-heading {
  margin: 8px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

.pub-year-list {
  display: flex;
  flex-direction: column;
  gap: 16px;                               /* one card per row with spacing */
}

/* Publications: make icon buttons square (match People cards) */
.pub-links .icon-btn {
  border-radius: 0;          /* square, not pill/circle */
  width: 36px;               /* optional: bump to 36 for consistency */
  height: 36px;              /* optional: larger tap target */
  font-size: 18px;           /* optional: scale glyph a bit */
}

/* Optional: clearer keyboard focus */
.pub-links .icon-btn:focus-visible {
  outline: 2px solid #E57200;
  outline-offset: 2px;
}

/* index-people */
/* ===== People (row-of-3 horizontal cards) ===== */
.people-section { margin-block: 40px; }

.people-row3 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;            /* mobile */
}
@media (min-width: 720px)  { .people-row3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .people-row3 { grid-template-columns: repeat(3, 1fr); } }

/* Wrapper = OUTSIDE bar + card (bar stays outside the card box) */
.person-block {
  display: grid;
  grid-template-rows: 4px auto;          /* thin bar, then card */
  row-gap: 10px;                          /* small gap between bar and card */
}
.person-bar { height: 4px; background: #E57200; }

/* Card (sharp corners, no internal bar) */
.person-card.row {
  display: grid;
  grid-template-columns: 160 1fr;       /* portrait | info */
  gap: 18px;
  background: var(--card);
  border-radius: 0;                        /* sharp corners */
  box-shadow: var(--shadow);
  padding: 14px;
  align-items: stretch;
  height: 100%;
  overflow: hidden;                        /* keep media edges inside */
}

/* Portrait (sharp) */
.person-media { display: flex; align-items: center; justify-content: center; }
.portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0;                        /* sharp */
  border: 1px solid var(--btn-outline);
  background: #ddd;
}

/* Right column: center-align content; rows = name | role | desc | icons */
.person-info {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  row-gap: 6px;
  align-content: start;
  min-width: 0;
  text-align: center;                      /* centers name/role/desc/icons */
}

/* Name (bigger) */
.person-name {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.25;
  font-weight: 800;
}
.person-name a { color: var(--text); text-decoration: none; }
.person-name a:hover { text-decoration: underline; }

/* Role directly under name */
.person-role {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.98rem;
}

/* Description + links */
.person-bio { margin: 6px 0 0; color: var(--muted); }
.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;                 /* center icon row */
  margin-top: 8px;
}

/* Icon buttons (sharp) */
.people-section .icon-btn { border-radius: 0; }

/* Small screens: stack image above on very small widths */
@media (max-width: 380px) {
  .person-card.row { grid-template-columns: 1fr; }
  .person-media { justify-content: flex-start; }
  .portrait { max-width: 160px; }
}

@media (min-width: 1024px) {
  .person-card.row { grid-template-columns: 180px 1fr; }
}
@media (min-width: 1280px) {
  .person-card.row { grid-template-columns: 200px 1fr; }
}

@media (min-width: 1200px) { .people-row3 { grid-template-columns: repeat(3, 1fr); } }


/* =========================
   Square design overrides
   Paste at end of styles.css
   ========================= */

/* 1) Global: no rounding anywhere that uses --radius */
:root { --radius: 0; }

/* 2) Force-square anything that had fixed radii before */
.btn,
.icon-btn,
.person-card.row,
.person-card .portrait,
.avatar,
.pub-card,
.pub-thumb,
.slide,
.carousel,
.hero-card,
.news-item,
.search-panel,
.site-search input,
.search-clear,
.brand .logo {
  border-radius: 0 !important;
}

/* (optional) If you kept any other thumbnails or images with custom rounding */
img, .card, .thumb { border-radius: 0 !important; }

/* 3) Keep borders as-is; just ensure thumbnails don’t round */
.pub-thumb { border: 1px solid var(--btn-outline); }