/* ==========================================
   MOSAIC MAGAZINE - DESIGN SYSTEM
   Inspired by Pacer NYC & Premium Publications
   ========================================== */

/* ========== CSS VARIABLES ========== */
:root {
  /* Color Palette */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1e40af;
  --accent-gold: #f59e0b;
  --accent-warm: #f97316;

  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;

  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;

  /* Typography */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', system-ui, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-blue);
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

.serif {
  font-family: var(--font-serif);
}

.sans {
  font-family: var(--font-sans);
}

/* ========== LAYOUT CONTAINER ========== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ========== HEADER & MASTHEAD ========== */
.top-bar {
  background: var(--bg-dark);
  color: var(--bg-white);
  padding: var(--spacing-xs) 0;
  font-size: 0.875rem;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-links a {
  color: var(--bg-white);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.social-links a:hover {
  opacity: 1;
  color: var(--accent-gold);
}

.masthead {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary-blue);
  padding: var(--spacing-lg) 0;
}

.masthead-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo-image {
  height: 80px;
  width: auto;
  flex-shrink: 0;
}

.masthead-text {
  text-align: center;
  position: relative;
  width: 100%;
  margin: 1rem 0;
}

@media (min-width: 969px) {
  .masthead-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: auto;
  }
}

.logo {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
}

.tagline {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.school-name {
  color: var(--accent-warm);
  font-weight: 600;
}

/* ========== NAVIGATION ========== */
.main-nav {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  -webkit-box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-list {
  display: flex;
  display: -webkit-flex;
  justify-content: center;
  -webkit-justify-content: center;
  align-items: center;
  -webkit-align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  -webkit-flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list li {
  flex-shrink: 0;
  -webkit-flex-shrink: 0;
}

.nav-list a {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-align: center;

  /* Glassmorphism base */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

  /* Remove tap highlight */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;

  /* Text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* HOME - Blue */
.nav-list li:nth-child(1) a {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #1e40af;
}

.nav-list li:nth-child(1) a:hover,
.nav-list li:nth-child(1) a.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.28));
  border-color: rgba(59, 130, 246, 0.8);
  color: #1e3a8a;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* WRITING/ARTICLES - Red */
.nav-list li:nth-child(2) a {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
  color: #991b1b;
}

.nav-list li:nth-child(2) a:hover,
.nav-list li:nth-child(2) a.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.28));
  border-color: rgba(239, 68, 68, 0.8);
  color: #7f1d1d;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

/* PROJECT ROOM - Emerald */
.nav-list li:nth-child(3) a {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  color: #065f46;
}

.nav-list li:nth-child(3) a:hover,
.nav-list li:nth-child(3) a.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.28));
  border-color: rgba(16, 185, 129, 0.8);
  color: #064e3b;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* ART GALLERY - Violet */
.nav-list li:nth-child(4) a {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.15));
  color: #5b21b6;
}

.nav-list li:nth-child(4) a:hover,
.nav-list li:nth-child(4) a.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(124, 58, 237, 0.28));
  border-color: rgba(139, 92, 246, 0.8);
  color: #4c1d95;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* HI CLUBS - Amber */
.nav-list li:nth-child(5) a {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
  color: #92400e;
}

.nav-list li:nth-child(5) a:hover,
.nav-list li:nth-child(5) a.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.28));
  border-color: rgba(245, 158, 11, 0.8);
  color: #78350f;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

/* STUDENT OPPORTUNITIES - Cyan */
.nav-list li:nth-child(6) a {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(8, 145, 178, 0.15));
  color: #155e75;
}

.nav-list li:nth-child(6) a:hover,
.nav-list li:nth-child(6) a.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.35), rgba(8, 145, 178, 0.28));
  border-color: rgba(6, 182, 212, 0.8);
  color: #164e63;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

/* TEACHER PAGE - Pink */
.nav-list li:nth-child(7) a {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(219, 39, 119, 0.15));
  color: #9f1239;
}

.nav-list li:nth-child(7) a:hover,
.nav-list li:nth-child(7) a.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(219, 39, 119, 0.28));
  border-color: rgba(236, 72, 153, 0.8);
  color: #831843;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
}

/* ISSUES - Orange */
.nav-list li:nth-child(8) a {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.15));
  color: #9a3412;
}

.nav-list li:nth-child(8) a:hover,
.nav-list li:nth-child(8) a.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(234, 88, 12, 0.28));
  border-color: rgba(249, 115, 22, 0.8);
  color: #7c2d12;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
}

/* ABOUT - Indigo */
.nav-list li:nth-child(9) a {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.15));
  color: #3730a3;
}

.nav-list li:nth-child(9) a:hover,
.nav-list li:nth-child(9) a.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.28));
  border-color: rgba(99, 102, 241, 0.8);
  color: #312e81;
  transform: scale(1.08) translateY(-2px);
  -webkit-transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  -webkit-box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-list a {
    min-height: 44px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
  }
}


/* ========== SECTION HEADERS ========== */
.section-header {
  border-bottom: 3px solid var(--primary-blue);
  margin: var(--spacing-2xl) 0 var(--spacing-lg) 0;
  padding-bottom: var(--spacing-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== FEATURED ARTICLE ========== */
.featured-section {
  margin: var(--spacing-xl) 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-lg);
}

.featured-main {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
}

.featured-main:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.featured-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  object-position: center center;
  background: #f3f4f6;
  clip-path: inset(0 0 20% 0);
  -webkit-clip-path: inset(0 0 20% 0);
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: var(--spacing-xl);
  color: var(--bg-white);
}

.featured-category {
  display: inline-block;
  background: var(--accent-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.featured-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--bg-white);
}

.featured-excerpt {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--spacing-sm);
}

.featured-meta {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ========== SIDEBAR (Trending) ========== */
.trending-sidebar {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 1rem;
  max-height: 600px;
  overflow-y: scroll;
  /* Force scrollbar */
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: var(--primary-blue) var(--bg-light);
  /* Firefox */
}

/* Custom Scrollbar Styling (Webkit/Blink) */
.trending-sidebar::-webkit-scrollbar {
  width: 8px;
}

.trending-sidebar::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 8px;
}

.trending-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--primary-blue);
  border-radius: 20px;
  border: 2px solid var(--bg-light);
}

.trending-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-warm);
}

.trending-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trending-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary-blue);
  transition: color var(--transition-fast);
}

.trending-item:hover h4 {
  color: var(--accent-warm);
}


.toc-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.toc-link:hover {
  text-decoration: underline;
  color: var(--accent-warm);
}

.trending-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table of Contents Styling */
.page-number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-blue);
  min-width: 40px;
  line-height: 1;
  flex-shrink: 0;
}

.toc-content {
  flex: 1;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0 0;
}

.toc-list li {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  padding-left: 1rem;
  position: relative;
}

.toc-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: bold;
}

.toc-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.toc-list li em {
  color: var(--text-light);
  font-size: 0.8rem;
  font-style: normal;
}

.toc-author {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  font-style: italic;
}

/* ========== ARTICLE GRID ========== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.article-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.article-link-wrapper {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.article-content {
  padding: var(--spacing-md);
}

.article-category {
  display: inline-block;
  background: var(--primary-blue);
  color: var(--bg-white);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
}

.article-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.article-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  gap: var(--spacing-sm);
}

/* ========== PEOPLE SPOTLIGHT GRID ========== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.people-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-normal);
}

.people-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.people-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.people-content {
  padding: var(--spacing-md);
}

.people-name {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-blue);
}

.people-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--spacing-xs);
}

.people-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-dark);
  color: var(--bg-white);
  padding: var(--spacing-xl) 0 var(--spacing-md) 0;
  margin-top: var(--spacing-2xl);
}

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

.footer-logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: var(--spacing-sm);
}

.footer-text {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.6;
}


/* ========== PRINCIPAL HERO IMAGE ========== */
.principal-hero {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.principal-hero-image {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  clip-path: inset(0 0 20% 0);
  -webkit-clip-path: inset(0 0 20% 0);
}

/* ========== FULL ARTICLE PAGE ========== */
.article-full {
  max-width: 800px;
  margin: var(--spacing-2xl) auto;
  padding: 0 var(--spacing-md);
}

.article-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 2px solid var(--border-light);
}

.article-full-title {
  font-size: 3rem;
  margin: var(--spacing-sm) 0;
  color: var(--primary-blue);
}

.article-meta-large {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-md);
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 1rem;
  text-align: left;
}

.article-inline-image {
  float: left;
  max-width: 350px;
  width: 45%;
  /* Responsive width */
  aspect-ratio: 3/4;
  /* Crops height to avoid wasted space */
  object-fit: cover;
  object-position: top center;
  /* Focus on face */
  margin: 0.5rem 1.5rem 0.5rem 0;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  /* Removed clip-path to fix layout flow issues */
}

@media (max-width: 640px) {
  .article-inline-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
    height: 400px;
    /* Fixed height for mobile */
  }
}

.article-references {
  clear: both;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-references h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.article-references ul {
  list-style: none;
  padding: 0;
}

.article-references li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-warm);
}

.article-body h2 {
  color: var(--primary-blue);
  font-size: 2rem;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.lead-paragraph {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.foundation-list {
  list-style: none;
  padding-left: 0;
  margin: var(--spacing-lg) 0;
}

.foundation-list li {
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  position: relative;
}

.foundation-list li::before {
  content: "•";
  color: var(--primary-blue);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
}

.closing {
  font-style: italic;
  color: var(--text-secondary);
  margin-top: var(--spacing-md);
}

.article-footer {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--border-light);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--primary-blue);
  font-weight: 600;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--primary-blue);
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.back-link:hover {
  background: var(--primary-blue);
  color: var(--bg-white);
}

/* Make featured article clickable */
.featured-main {
  cursor: pointer;
  text-decoration: none;
  display: block;
}


/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Adjust navigation for tablets */
  .nav-list a {
    font-size: 0.8rem;
    padding: 1rem 0.9rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 968px) {

  /* Fix Masthead Overlap */
  .masthead-content {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
    position: relative;
    justify-content: center;
  }



  .logo-image {
    height: 60px;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 2.5rem;
  }


  /* Modern Scrollable Nav for Mobile */
  .nav-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0.5rem 1rem;
    gap: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
  }

  .nav-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .nav-list a {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Reset after pseudo-element */
  .nav-list li:not(:last-child)::after {
    display: none;
  }

  /* Stack Grids */
  .article-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .featured-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 2rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .masthead {
    padding: 1rem 0;
  }
}

/* Dropdown Navigation */
.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  min-width: 240px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown li {
  width: 100%;
  margin: 0;
  flex-shrink: 0;
}

.dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 8px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  backdrop-filter: none;
}

.dropdown a:hover {
  background: var(--bg-light) !important;
  color: var(--primary-blue) !important;
  transform: none !important;
}

/* Ensure Nav Overflow on Desktop */
@media (min-width: 1024px) {
  .nav-list {
    overflow: visible;
    justify-content: center;
  }
}

/* Poetry Styling */
.poem-stanza {
  margin-bottom: 2rem;
  line-height: 1.8;
  font-family: var(--font-serif);
  /* Optional: Use serif for poetry */
  font-size: 1.1rem;
}

/* Credits Box */
.credits-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary-blue);
  padding: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.credits-box h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 1.05rem;
}

/* Project / Magazine Grid Layout */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.project-grid .article-page {
  margin: 0;
}

.project-grid img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  transition: transform 0.2s ease;
}

/* Zoom effect on hover */
.project-grid img:hover {
  transform: scale(1.02);
  z-index: 10;
}

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