/* ---------------------------------------------------------------------
   Gedik Group — shared site styles (header, nav, footer, content patterns)
   Used by every page. Page-specific extras may follow in a page's own
   <style> block, which is loaded after this file and wins on ties.
--------------------------------------------------------------------- */

:root {
  --maroon: #a3123a;
  --maroon-dark: #7a0e2b;
  --rose: #cc9999;
  --rose-light: #f3e6e6;
  --ink: #232323;
  --gray: #5a5a5a;
  --gray-light: #8a8a8a;
  --bg: #fbfafa;
  --card-bg: #ffffff;
  --border: #e7dcdc;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-width: 1320px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 0% 0%, var(--rose-light) 0%, transparent 55%),
    radial-gradient(1200px 500px at 100% 0%, var(--rose-light) 0%, transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon); }
a:hover { color: var(--maroon-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rose); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--maroon); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--maroon);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 3px solid var(--maroon);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text .group-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text .group-tagline {
  font-size: 0.75rem;
  color: var(--gray-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--maroon);
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.contact-btn:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Nav ---------- */

.site-nav {
  background: var(--maroon-dark);
  position: sticky;
  top: 78px;
  z-index: 49;
}

.site-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0 24px;
  max-width: var(--max-width);
  margin-inline: auto;
}

.site-nav a {
  display: block;
  padding: 12px 18px;
  color: #f6e9e9 !important;
  font-weight: 600 !important;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-bottom: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--rose);
  color: #fff !important;
}

.site-nav a.active {
  color: #fff !important;
  border-bottom-color: #fff;
}

/* ---------- Layout ---------- */

.layout {
  max-width: var(--max-width);
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.content { min-width: 0; }

/* ---------- Hero / slideshow (home page) ---------- */

.hero {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.slideshow { position: relative; }

.slide { display: none; margin: 0; }

.slide.active { display: flex; flex-direction: column; }

.slide-figure a.slide-image-link { display: block; background: #f4f0f0; }

.slide-figure img {
  display: block;
  width: 100%;
  height: min(48vw, 440px);
  min-height: 260px;
  object-fit: contain;
  background: #f4f0f0;
}

.slide-caption {
  margin: 0;
  padding: 16px 60px;
  text-align: center;
  font-size: 0.98rem;
  color: var(--ink);
  border-top: 1px solid var(--border);
}

.slide-caption a { color: var(--ink) !important; font-weight: 600 !important; text-decoration: none !important; }
.slide-caption a:hover { text-decoration: underline !important; }

.slide-nav-btn {
  position: absolute;
  top: calc(50% - 20px);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--maroon);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}

.slide-nav-btn:hover { background: var(--maroon); color: #fff; transform: translateY(-1px); }
.slide-nav-btn.prev { left: 14px; }
.slide-nav-btn.next { right: 14px; }

.slide-dots { display: flex; justify-content: center; gap: 8px; padding: 14px 0; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dot.active, .dot:hover { background: var(--maroon); transform: scale(1.2); }

/* ---------- Intro (home page) ---------- */

.intro {
  margin-top: 28px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.intro-text { flex: 1 1 420px; min-width: 0; }

.intro h1 { margin: 0 0 14px; font-size: 1.5rem; color: var(--maroon-dark); font-weight: 700; }
.intro p { margin: 0 0 12px; line-height: 1.75; color: var(--gray); font-size: 0.97rem; }
.intro p:last-child { margin-bottom: 0; }

.intro-image { flex: 0 0 220px; }
.intro-image img { width: 100%; height: auto; display: block; }

/* ---------- News panel ---------- */

.news-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 132px;
}

.news-panel h2 {
  margin: 0;
  padding: 14px 18px;
  background: var(--maroon);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
}

.news-panel iframe { width: 100%; height: 480px; border: none; display: block; }

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

.site-footer {
  text-align: center;
  padding: 28px 24px 36px;
  color: var(--gray-light);
  font-size: 0.8rem;
}

/* ---------- Generic page/content patterns (inner pages) ---------- */

.page-header { margin-bottom: 24px; }
.page-header h1 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--maroon-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin-bottom: 24px;
  scroll-margin-top: 140px;
}

.content h2 {
  font-size: 1.2rem;
  color: var(--maroon-dark);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rose-light);
}

.content h3 {
  font-size: 1rem;
  color: var(--ink);
  margin: 22px 0 10px;
}

p.body {
  margin: 0 0 14px;
  line-height: 1.75;
  color: var(--gray);
  font-size: 0.97rem;
}

p.body2 {
  margin: 0;
  line-height: 1.7;
  color: var(--gray);
  font-size: 0.95rem;
}

/* Tab switcher: research / materials / selected recent papers */

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-nav a {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--ink) !important;
  font-weight: 600 !important;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tab-nav a:hover { border-color: var(--rose); background: var(--rose-light); }

.tab-nav a.active { background: var(--maroon); border-color: var(--maroon); color: #fff !important; }

/* Text + image panel (research / materials topic sections) */

.panel {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.panel-text { flex: 1 1 420px; min-width: 0; }
.panel-text p.body { margin-bottom: 14px; }
.panel-text p.body:last-child { margin-bottom: 0; }

.panel-media {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.panel-media img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  background: #fafafa;
}

.panel-media figcaption {
  font-size: 0.78rem;
  color: var(--gray-light);
  text-align: center;
  margin: 0;
}

.panel.reverse { flex-direction: row-reverse; }

.panel + .panel { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }

/* People grid (members page) */

.pi-card {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.pi-card img { width: 260px; height: 325px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.person-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.person-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--rose-light); }

.person-card .person-info { padding: 14px 16px 18px; }

.person-card .person-name { font-weight: 700 !important; font-size: 0.92rem; text-decoration: none !important; }

.person-card .person-role { font-size: 0.78rem; color: var(--gray-light); margin: 4px 0 8px; }

.person-card .person-meta { font-size: 0.8rem; color: var(--gray); line-height: 1.6; }

.alumni-group + .alumni-group { margin-top: 8px; }

.alumni-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px 28px;
}

.alumni-list p.body {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

/* Photo grid (pictures page) */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.photo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-card a { display: block; }
.photo-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.photo-card figcaption { padding: 12px 16px; font-size: 0.85rem; color: var(--gray); line-height: 1.5; }

/* Info card (openings/contact) */

.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 20px;
  margin-top: 6px;
}

.info-grid dt { font-weight: 600; color: var(--gray-light); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.info-grid dd { margin: 0; color: var(--ink); font-size: 0.97rem; }

/* ---------- Selected Recent Papers: legacy layout modernized via ID overrides.
   The page's own HTML (~19 repeated blocks) is left byte-for-byte untouched;
   these rules re-flow the existing #RPboundary/#fahadtext/#alexAPL etc.
   float layout into responsive cards. ---------- */

#RPboundary,
#RPboundary2 {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin: 0 0 24px;
  width: auto;
  float: none;
}

#fahadtext, #iridatetext, #cpgetext {
  width: auto;
  float: none;
  margin: 0;
  flex: 1 1 380px;
  min-width: 0;
}

#fahadtext p.body2 strong a,
#iridatetext p.body2 strong a,
#cpgetext p.body2 strong a {
  font-size: 1.08rem;
  line-height: 1.4;
  color: var(--maroon-dark) !important;
}

#alexAPL, #floquet, #dantext, #fahadnatmat, #iridate1,
#cpge1, #cpge2, #arpeshome1, #shgpp, #shgs, #gaps {
  width: auto !important;
  height: auto !important;
  float: none;
  margin: 0 !important;
  flex: 0 0 260px;
}

#alexAPL img, #floquet img, #dantext img, #fahadnatmat img, #iridate1 img,
#cpge1 img, #cpge2 img, #arpeshome1 img, #shgpp img, #shgs img, #gaps img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

#indent { width: auto; float: none; margin: 14px 0 0; }
#indent ul { margin: 0; padding-left: 18px; }
#indent li { margin: 0; }

@media (max-width: 800px) {
  #RPboundary, #RPboundary2 { padding: 20px; }
  #alexAPL, #floquet, #dantext, #fahadnatmat, #iridate1,
  #cpge1, #cpge2, #arpeshome1, #shgpp, #shgs, #gaps {
    flex: 1 1 100%;
    max-width: 320px;
    margin: 0 auto !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .news-panel { position: static; }
  .news-panel iframe { height: 320px; }
}

@media (max-width: 800px) {
  .panel, .panel.reverse { flex-direction: column; }
  .panel-media { flex: 0 0 auto; max-width: 320px; width: 100%; margin: 0 auto; }
}

@media (max-width: 700px) {
  .brand-text .group-tagline { display: none; }

  .nav-toggle { display: flex; }

  .site-nav { display: none; }
  .site-nav.open { display: block; }

  .site-nav ul { flex-direction: column; padding: 8px 0; }

  .site-nav a { padding: 12px 24px; border-bottom: none; border-left: 3px solid transparent; }

  .site-nav a:hover, .site-nav a.active { border-left-color: var(--rose); border-bottom-color: transparent; }

  .intro { flex-direction: column; padding: 22px; }
  .intro-image { flex: 0 0 auto; max-width: 200px; }

  .slide-caption { padding: 14px 44px; font-size: 0.9rem; }

  .layout { margin: 20px auto; gap: 20px; }

  .card { padding: 22px; }

  .pi-card { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .header-inner { padding: 10px 14px; gap: 10px; }
  .brand { gap: 8px; }
  .header-actions { gap: 6px; }
  .contact-btn { padding: 8px 12px; }
}
