/* ====================================================
   Vivid Scholar – Elegant Classic CSS (Flexbox Only)
   ====================================================
   Brand: Timeless, elegant classic with refined elements
   Fonts: Montserrat (display), Roboto (body); interpreted as modern-serifs for classic feel
   Colors: #1A2742 (blue), #6EC2A9 (muted teal), #F2F1E8 (light accent), with deep grays
   ==================================================== */

/* === 1. CSS RESET & NORMALIZE === */
html { box-sizing: border-box; font-size: 16px; }
*, *::before, *::after { box-sizing: inherit; margin: 0; padding: 0; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; border: none; background: none; }
img { max-width: 100%; display: block; }

/* === 2. BASE COLORS & TYPOGRAPHY === */
:root {
  --brand-primary: #1A2742;
  --brand-secondary: #6EC2A9;
  --brand-accent: #F2F1E8;
  --brand-dark: #181A1F;
  --brand-muted: #E3E0D3;
  --brand-grey: #6B6A6B;
  --brand-white: #FFF;
  --shadow-main: 0 2px 16px rgba(26,39,66,0.07);
  --shadow-card: 0 4px 24px rgba(26,39,66,0.11);
  --radius-main: 12px;
  --radius-card: 16px;
  --transition-main: all 0.23s cubic-bezier(.41,.98,.69,.96);
  --font-sans: 'Montserrat', 'Georgia', Serif, Arial, sans-serif;
  --font-body: 'Roboto', 'Georgia', Serif, Arial, sans-serif;
}
body {
  background: var(--brand-accent);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  min-height: 100vh;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--brand-primary);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.25rem; margin-bottom: 20px; }
h2 { font-size: 1.5rem; margin-bottom: 18px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }

p, ul, ol {
  font-size: 1.125rem;
  margin-bottom: 18px;
}
strong, b {
  font-weight: 600;
  color: var(--brand-primary);
}
blockquote {
  border-left: 4px solid var(--brand-secondary);
  background: #f4f7f6;
  padding: 20px 30px;
  font-style: italic;
  color: var(--brand-dark);
  border-radius: 6px;
  margin: 24px 0 24px 0;
}

/* Subheadline styling */
.subheadline {
  font-size: 1.375rem;
  color: var(--brand-grey);
  margin-bottom: 28px;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: .01em;
}

/* === 3. CONTAINERS & LAYOUTS (Flexbox) === */
.container {
  width: 100%;
  max-width: 1160px;
  padding: 0 20px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  margin: 0 auto;
  width: 100%;
  max-width: 860px;
}

/* Section spacing requirements */
section, .section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: var(--radius-main);
  display: flex;
  flex-direction: column;
}
.section:last-child { margin-bottom: 0; }

/* Card containers, Flex only! */
.card-container, .project-cards, .publication-grid, .team-profiles, .media-snippets {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 18px 0;
}
.card, .project-card, .publication-item, .profile-card, .press-item {
  background: var(--brand-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 270px;
  min-width: 250px;
  max-width: 370px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow .19s cubic-bezier(.54,.05,.57,.95), transform .20s cubic-bezier(.32,.9,.67,1);
}
.card:hover, .project-card:hover, .publication-item:hover, .profile-card:hover {
  box-shadow: 0 6px 36px rgba(26,39,66,0.15);
  transform: translateY(-5px) scale(1.025);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8fafb;
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-main);
  color: var(--brand-dark);
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--brand-accent);
  padding: 20px 18px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(26,39,66,0.06);
}

ul, ol {
  padding-left: 20px;
  margin-bottom: 18px;
  list-style-position: inside;
}
ul li, ol li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
ul li img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  vertical-align: middle;
}

ol { list-style-type: decimal; }

/* === 4. HEADER AND NAVBAR === */
header {
  background: var(--brand-white);
  box-shadow: 0 2px 11px rgba(26,39,66,0.08);
  padding: 0 0 0 0;
  margin-bottom: 0px;
  z-index: 50;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px 16px 20px;
}
.header-logo img, header img {
  max-width: 154px;
  height: auto;
  margin-right: 32px;
}
nav {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
}
nav a {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--brand-primary);
  font-size: 1rem;
  padding: 5px 0;
  position: relative;
  transition: color .16s, border-color .15s;
}
nav a:hover {
  color: var(--brand-secondary);
}
nav a.active, nav a[aria-current='page'] {
  color: var(--brand-secondary);
  font-weight: 600;
}
footer nav a {
  font-size: 0.98rem;
}

.cta-button {
  background: var(--brand-primary);
  color: var(--brand-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 14px 38px;
  border-radius: 32px;
  box-shadow: 0 2px 8px rgba(26,39,66,0.027);
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 6px;
  border: none;
  transition: background .18s, color .16s, box-shadow .18s, transform .22s;
  display: inline-block;
  outline: none;
}
.cta-button:hover, .cta-button:focus {
  background: var(--brand-secondary);
  color: var(--brand-dark);
  box-shadow: 0 4px 24px rgba(26,39,66,0.11);
  transform: translateY(-2px) scale(1.04);
}

/* === 5. FOOTER === */
footer {
  background: var(--brand-white);
  color: var(--brand-primary);
  box-shadow: 0 -2px 11px rgba(26,39,66,0.08);
  margin-top: 60px;
  padding: 34px 0 24px 0;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  gap: 32px;
  justify-content: space-between;
}
.footer-logo img {
  width: 70px;
  display: block;
  margin-bottom: 10px;
}
footer nav {
  flex-direction: column;
  gap: 8px;
}
.footer-contact {
  font-size: 0.98rem;
  color: var(--brand-grey);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* === 6. RESPONSIVE (Mobile First) === */
@media (max-width: 1000px) {
  .container, header .container, footer .container {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
@media (max-width: 768px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.17rem; }
  .container, .content-wrapper, header .container, footer .container {
    padding: 0 12px;
    max-width: 98vw;
  }
  section, .section { padding: 28px 8px; margin-bottom: 36px; }
  .card-container, .project-cards, .publication-grid, .team-profiles { gap: 14px; }
  .card, .project-card, .publication-item, .profile-card, .press-item {
    min-width: 90vw;
    max-width: 100vw;
    padding: 18px 12px;
  }
  .content-grid, .text-image-section {
    flex-direction: column;
    gap: 18px;
  }
  .cta-button { width: 100%; text-align: center; }
}

/* === 7. MOBILE NAVIGATION BURGER MENU === */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 1200;
  background: var(--brand-primary);
  color: var(--brand-accent);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 16px rgba(26,39,66,0.11);
  align-items: center;
  justify-content: center;
  transition: background .16s, color .16s;
}
.mobile-menu-toggle:focus {
  outline: 2px solid var(--brand-secondary);
}

@media (max-width: 900px) {
  nav, .cta-button {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--brand-accent);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.43,.98,.56,.97);
  box-shadow: 2px 0 30px rgba(26,39,66,0.11);
  padding: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  background: var(--brand-primary);
  color: var(--brand-accent);
  border-radius: 50%;
  margin: 20px 24px;
  width: 42px;
  height: 42px;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.mobile-menu-close:hover {
  background: var(--brand-secondary);
  color: var(--brand-dark);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100vw;
  margin: 40px 0 0 0;
  align-items: flex-start;
  padding-left: 38px;
}
.mobile-nav a {
  font-family: var(--font-sans);
  font-size: 1.275rem;
  color: var(--brand-primary);
  font-weight: 500;
  padding: 7px 0;
  margin-bottom: 4px;
  transition: color .18s, border-color .13s;
  border-bottom: 1px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--brand-secondary);
  border-bottom: 1px solid var(--brand-secondary);
}
.mobile-nav a:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* === 8. CARDS & SPECIAL SECTIONS === */
.project-card, .publication-item, .profile-card, .press-item {
  background: var(--brand-accent);
  border: 1px solid #e9e7db;
  color: var(--brand-primary);
}
.project-card h3, .publication-item h3, .profile-card h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
  color: var(--brand-primary);
  font-family: var(--font-sans);
}
.press-item {
  background: #f8fafb;
  border: 1px solid #ececec;
  color: var(--brand-dark);
}
.press-item p, .press-item a {
  color: var(--brand-dark);
  font-style: italic;
}

/* Publication download links */
.publication-item a {
  color: var(--brand-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--brand-secondary);
  transition: color .13s, border-color .13s;
}
.publication-item a:hover {
  color: var(--brand-primary);
  border-bottom: 1px solid var(--brand-primary);
}

/* === 9. TESTIMONIALS/CARDS (Contrast Must!) === */
.testimonial-card {
  background: #f0f5f6;
  color: var(--brand-dark);
  border: 1px solid #e3e6f1;
  font-family: var(--font-body);
  font-size: 1.13rem;
}

/* === 10. FORMS === */
input, textarea {
  background: var(--brand-white);
  border: 1px solid #d5d7da;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 1rem;
  color: var(--brand-primary);
  margin-bottom: 14px;
  width: 100%;
  transition: border .15s;
}
input:focus, textarea:focus {
  border-color: var(--brand-secondary);
}

label {
  font-family: var(--font-sans);
  color: var(--brand-dark);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

/* === 11. COOKIE CONSENT BANNER === */
.cookie-banner {
  position: fixed;
  left: 0; bottom: 0;
  width: 100vw;
  background: #23273aee;
  color: var(--brand-accent);
  font-size: 1rem;
  z-index: 1700;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  gap: 24px;
  box-shadow: 0 -2px 22px rgba(26,39,66,0.16);
  transition: transform .4s cubic-bezier(.36,.98,.47,1);
}
.cookie-banner.hide {
  transform: translateY(110%);
}
.cookie-banner .cookie-buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-left: 12px;
}
.cookie-btn {
  font-family: var(--font-sans);
  border-radius: 24px;
  padding: 10px 22px;
  background: var(--brand-secondary);
  color: var(--brand-primary);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  margin: 0 2px;
  box-shadow: 0 1px 7px rgba(26,39,66,0.06);
  transition: background .16s,color .15s,box-shadow .12s,transform .15s;
}
.cookie-btn.secondary-btn {
  background: var(--brand-white);
  color: var(--brand-primary);
  border: 1px solid #d2d7df;
}
.cookie-btn.settings-btn {
  background: var(--brand-accent);
  color: var(--brand-primary);
  border: 1px solid var(--brand-secondary);
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--brand-primary);
  color: var(--brand-accent);
  transform: translateY(-2px) scale(1.06);
}

/* Cookie modal */
.cookie-modal {
  display: none;
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%) scale(1);
  background: var(--brand-white);
  color: var(--brand-primary);
  border-radius: 18px;
  box-shadow: 0 12px 44px rgba(26,39,66,0.16);
  z-index: 1800;
  min-width: 330px; max-width: 94vw;
  padding: 36px 28px 28px 28px;
  flex-direction: column;
  gap: 18px;
  font-size: 1.15rem;
  animation: cookie-modal-in .36s cubic-bezier(.32,.88,.62,1.05);
}
@keyframes cookie-modal-in { from { transform: translate(-50%,-70%) scale(0.98); opacity: 0; } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.cookie-modal.open { display: flex; }
.cookie-modal h3 {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  margin-bottom: 14px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 1.03rem;
}
.cookie-toggle {
  width: 36px;
  height: 20px;
  border-radius: 14px;
  border: 1px solid #c9d3df;
  background: var(--brand-grey);
  position: relative;
  cursor: pointer;
  margin-top: 3px;
}
.cookie-toggle input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0; top: 0;
  z-index: 1;
}
.cookie-toggle span {
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand-accent);
  transition: left .19s;
}
.cookie-toggle input:checked + span {
  left: 18px;
  background: var(--brand-secondary);
}
.cookie-essential { color: var(--brand-grey); font-style: italic; }
.cookie-actions {
  display: flex; gap: 14px; justify-content: flex-end;
  margin-top: 18px;
}

/* Overlay when modal is open */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  left:0; top:0; width:100vw; height:100vh;
  z-index: 1750;
  background: rgba(26,39,66,0.17);
}
.cookie-modal.open + .cookie-modal-overlay {
  display: block;
}

@media (max-width: 500px) {
  .cookie-modal { padding: 22px 8px 16px 8px; font-size: .98rem; min-width:unset; }
}

/* === 12. ACCESSIBILITY & INTERACTIONS === */
a, button, .cta-button {
  transition: color .13s, background .18s, box-shadow .11s, border-color .13s;
}
a:focus, button:focus, .cta-button:focus {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

/* --- Special Typography for Elegant Classic --- */
h1, h2, h3, h4, .subheadline {
  text-rendering: optimizeLegibility;
  font-variant-ligatures: common-ligatures;
}

/* --- Subtle section dividers --- */
section:not(:last-child), .section:not(:last-child) {
  border-bottom: 1px solid #e2e3df;
  box-shadow: none;
}

/* --- Focused card for classic touch --- */
.card, .project-card, .publication-item, .profile-card {
  border: 1px solid #e9e7db;
}

/* --- Animate buttons on hover (micro-interactions) --- */
.cta-button, .cookie-btn {
  transition: all .22s cubic-bezier(.53,.91,.48,1.09);
}

/* --- Utilities --- */
.d-none { display: none !important; }
.visible { display: block !important; }

/* Elegant hover underline for links */
a:not(.cta-button):not(.cookie-btn) {
  position: relative;
}
a:not(.cta-button):not(.cookie-btn)::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--brand-secondary);
  transition: width .19s cubic-bezier(.6,.01,.6,1);
  position: absolute;
  left: 0; bottom: -3px;
}
a:not(.cta-button):not(.cookie-btn):hover::after {
  width: 100%;
}

/* === END CSS === */
