/* =============================================================================
   ArchiTimes — Design System (v2)
   Light editorial theme · Dark header · FT-style logo · AI News inspired
   ============================================================================= */

/* Override & character in Playfair Display contexts with a clean sans-serif.
   Playfair's ampersand is decorative and can look unusual at large sizes. */
@font-face {
  font-family: 'AmpSans';
  src: local('Inter'), local('Helvetica Neue'), local('Arial');
  unicode-range: U+0026;
  font-weight: normal;
}

/* --- Design Tokens --------------------------------------------------------- */
:root {
  /* Header — always solid dark */
  --header-bg:        #1E1E1E;
  --header-text:      #FFFFFF;
  --header-border:    rgba(255, 255, 255, 0.08);

  /* Page body — pure white */
  --bg-primary:       #FFFFFF;
  --bg-surface:       #FFFFFF;
  --bg-card:          #FFFFFF;
  --bg-card-hover:    #FAFAFA;

  /* Text — dark on light */
  --text-primary:     #111111;
  --text-secondary:   #4A4A4A;
  --text-muted:       #909090;

  /* Accent */
  --accent-gold:        #B8902A;
  --accent-gold-light:  rgba(184, 144, 42, 0.14);
  --accent-gold-dim:    rgba(184, 144, 42, 0.07);
  --accent-gold-glow:   rgba(184, 144, 42, 0.25);

  /* Category — Architecture */
  --cat-architecture:   #2E6FA3;
  --cat-arch-bg:        rgba(46, 111, 163, 0.09);
  --cat-arch-border:    rgba(46, 111, 163, 0.22);

  /* Category — Interior */
  --cat-interior:       #A04A28;
  --cat-int-bg:         rgba(160, 74, 40, 0.09);
  --cat-int-border:     rgba(160, 74, 40, 0.22);

  /* Category — Landscape */
  --cat-landscape:      #3A7A45;
  --cat-land-bg:        rgba(58, 122, 69, 0.09);
  --cat-land-border:    rgba(58, 122, 69, 0.22);

  /* Category — Tech */
  --cat-tech:           #6049A0;
  --cat-tech-bg:        rgba(96, 73, 160, 0.09);
  --cat-tech-border:    rgba(96, 73, 160, 0.22);

  /* Category — Events */
  --cat-events:         #B53010;
  --cat-events-bg:      rgba(181, 48, 16, 0.09);
  --cat-events-border:  rgba(181, 48, 16, 0.22);

  /* Borders */
  --border:             #E2E0D8;
  --border-subtle:      #ECEAE4;
  --border-hover:       rgba(184, 144, 42, 0.35);

  /* Shadows */
  --shadow-card:        0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-hover:       0 6px 28px rgba(0,0,0,0.14);
  --shadow-glow:        0 0 24px rgba(184, 144, 42, 0.18);

  /* Border radius */
  --radius-xs:  3px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  /* Typography */
  --font-ft:      'AmpSans', 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-display: 'AmpSans', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Easing */
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:        cubic-bezier(0, 0, 0.2, 1);
  --transition:      0.22s var(--ease);
  --transition-med:  0.32s var(--ease);
  --transition-slow: 0.48s var(--ease);

  /* Layout */
  --header-height:     64px;
  --header-height-mob: 54px;
  --max-width:         1340px;
  --h-pad:             28px;
}


/* --- Reset & Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-height);  /* push content below fixed header */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar              { width: 5px; }
::-webkit-scrollbar-track        { background: var(--bg-primary); }
::-webkit-scrollbar-thumb        { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #ccc; }


/* ========================================================================== */
/* HEADER — always solid dark, like AI News                                  */
/* ========================================================================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: transform var(--transition-med);
}

#site-header.hide { transform: translateY(-100%); }

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--h-pad) 0 12px;   /* tight left edge for logo */
  height: 100%;
}

/* Logo — left side */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 30px;
  font-weight: 400; /* Archivo Black is naturally bold, standardizing to 400 */
  color: #FFFFFF;
  letter-spacing: -0.5px;
  white-space: nowrap;
  padding-right: 36px;
}

.logo-text em {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
}

/* Thin gold separator — removed (logo now on left) */

/* Category Nav — centered via CSS grid */
.cat-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;   /* center within its grid cell */
  overflow: hidden;
}

.cat-btn {
  padding: 7px 15px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition);
}

.cat-btn:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.07);
}

.cat-btn.active {
  color: var(--accent-gold);
  background-color: rgba(184, 144, 42, 0.1);
}

/* Thin separator before Contact */
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.15);
  margin: 0 8px;
  flex-shrink: 0;
}

/* Contact link — same white as other nav items */
.contact-link {
  color: #FFFFFF !important;
  text-decoration: none;
}
.contact-link:hover { background-color: rgba(255,255,255,0.07); }

/* Search + Social — right side */
.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.1);
  margin-left: 6px;
}

.header-social-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  margin-right: 4px;
}

.header-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.header-social-btn--ig {
  background: linear-gradient(45deg, #FCAF45 0%, #FD1D1D 50%, #833AB4 100%);
  border-color: transparent;
  color: #fff;
}
.header-social-btn--fb { background: #1877F2; border-color: #1877F2; color: #fff; }

.header-social-btn--ig:hover,
.header-social-btn--fb:hover { opacity: 0.82; color: #fff; transform: translateY(-2px); }

.header-social-btn svg { width: 16px; height: 16px; }

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

#search-input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 7px 14px 7px 32px;
  width: 190px;
  outline: none;
  transition: width var(--transition-med), border-color var(--transition), background-color var(--transition);
}

#search-input::placeholder { color: rgba(255,255,255,0.35); }

#search-input:focus {
  width: 240px;
  border-color: rgba(184,144,42,0.5);
  background: rgba(255,255,255,0.1);
}

/* Mobile category strip */
.mobile-cat-nav {
  display: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 4px;
  padding: 8px 16px;
  background: #161616;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-cat-nav::-webkit-scrollbar { display: none; }
.mobile-cat-nav .cat-btn { white-space: nowrap; font-size: 12px; }


/* ========================================================================== */
/* HERO — white featured article card                                        */
/* ========================================================================== */
#hero {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
}

/* Hero Skeleton */
.hero-skeleton {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px var(--h-pad);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 320px;
}

.hero-skeleton-shimmer {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.hero-skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-skeleton-content .skeleton-line {
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* Hero Content */
#hero-content {
  animation: fadeIn 0.5s var(--ease-out) both;
}

/* Featured card: image left, text right */
.hero-card {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px var(--h-pad);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 44px;
  align-items: center;
  min-height: 320px;
  cursor: pointer;
}

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #EBEBEB;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  display: block;
}

.hero-card:hover .hero-image-wrap img { transform: scale(1.04); }

.hero-text { display: flex; flex-direction: column; gap: 12px; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-source, .hero-date {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.hero-source::after { content: '·'; margin-left: 10px; opacity: 0.4; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-wrap: balance;
  transition: color var(--transition);
}

.hero-card:hover .hero-title { color: var(--accent-gold); }

.hero-deck {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hero-actions { margin-top: 8px; }

.hero-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  background: var(--accent-gold);
  color: #111;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(184, 144, 42, 0.35);
}

.hero-image-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #F0F0F0 0%, #E8E8E8 100%);
  border-radius: var(--radius-lg);
}


/* ========================================================================== */
/* SECTION HEADER                                                             */
/* ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px var(--h-pad) 24px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label {
  font-family: var(--font-ft);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* Gold rule accent */
.section-rule {
  height: 2px;
  width: 48px;
  background: var(--accent-gold);
  border-radius: 1px;
  flex-shrink: 0;
}

.article-count {
  font-size: 12.5px;
  color: var(--text-muted);
}


/* ========================================================================== */
/* MAIN GRID                                                                  */
/* ========================================================================== */
#main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--h-pad) 90px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}


/* ========================================================================== */
/* ARTICLE CARD                                                               */
/* ========================================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  outline: none;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;

  /* Entry animation */
  opacity: 0;
  transform: translateY(16px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity     0.38s var(--ease-out),
    transform   0.38s var(--ease-out),
    box-shadow  var(--transition),
    border-color var(--transition),
    background-color var(--transition);
}

.card.visible:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(184,144,42,0.2);
  background: var(--bg-card-hover);
}

.card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Skeleton stays visible */
.card.skeleton {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: none;
}

/* Card image */
.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #E8E6DE;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card.visible:hover .card-image img {
  transform: scale(1.05);
}

.card-image.no-image { background: linear-gradient(135deg, #E6E4DC 0%, #EFEDE6 100%); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  opacity: 0.25;
}

/* Category pill on image */
.card-image .cat-pill {
  position: absolute;
  top: 10px;
  left: 10px;
}

/* Card body */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.card.visible:hover .card-title { color: var(--accent-gold); }

.card-deck {
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Removed why it matters preview */

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.card-meta { display: flex; align-items: center; gap: 6px; }

.card-source {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.card-source::after { content: '·'; margin-left: 6px; opacity: 0.5; }

.card-date { font-size: 11px; color: var(--text-muted); }

.card-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }


/* ========================================================================== */
/* CATEGORY PILLS                                                             */
/* ========================================================================== */
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  line-height: 1.4;
}

.cat-pill.cat-architecture { background: var(--cat-arch-bg);   color: var(--cat-architecture); border: 1px solid var(--cat-arch-border); }
.cat-pill.cat-interior      { background: var(--cat-int-bg);    color: var(--cat-interior);     border: 1px solid var(--cat-int-border); }
.cat-pill.cat-landscape     { background: var(--cat-land-bg);   color: var(--cat-landscape);    border: 1px solid var(--cat-land-border); }
.cat-pill.cat-tech          { background: var(--cat-tech-bg);   color: var(--cat-tech);         border: 1px solid var(--cat-tech-border); }
.cat-pill.cat-events        { background: var(--cat-events-bg); color: var(--cat-events);       border: 1px solid var(--cat-events-border); }


/* ========================================================================== */
/* TAGS                                                                       */
/* ========================================================================== */
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: var(--bg-primary);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}


/* ========================================================================== */
/* SKELETON CARDS                                                             */
/* ========================================================================== */
.skeleton-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-line {
  display: block;
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-line + .skeleton-line { margin-top: 8px; }


/* ========================================================================== */
/* LOAD MORE                                                                  */
/* ========================================================================== */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 44px 0 18px;
}

.load-more-btn {
  padding: 11px 36px;
  border: 1.5px solid var(--border-hover);
  border-radius: 100px;
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  background: #fff;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.load-more-btn:hover {
  background: var(--accent-gold-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}


/* ========================================================================== */
/* EMPTY / ERROR STATES                                                       */
/* ========================================================================== */
.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 24px;
  text-align: center;
  animation: fadeIn 0.4s var(--ease-out) both;
}

.state-icon { font-size: 44px; opacity: 0.4; animation: float 4s ease-in-out infinite; }

.state-panel h3 {
  font-family: var(--font-ft);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.state-panel p { font-size: 14px; color: var(--text-muted); max-width: 380px; line-height: 1.6; }

.retry-btn {
  margin-top: 6px;
  padding: 9px 24px;
  border: 1.5px solid var(--border-hover);
  border-radius: 100px;
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  transition: background-color var(--transition);
}

.retry-btn:hover { background: var(--accent-gold-light); }


/* ========================================================================== */
/* ARTICLE MODAL                                                              */
/* ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.modal.open {
  pointer-events: all;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  background: #FFFFFF;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  border-top-color: #ddd;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px);
  transition: transform var(--transition-slow);
  box-shadow: 0 -12px 60px rgba(0,0,0,0.18);
}

.modal.open .modal-panel { transform: translateY(0); }

/* Drag handle */
.modal-panel::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: #DDD;
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 6px 16px 0;
  flex-shrink: 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: #F5F5F5;
  border: 1px solid #E8E8E8;
  transition: background-color var(--transition), color var(--transition);
}

.modal-close:hover { background: #E8E6DE; color: var(--text-primary); }

.modal-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.modal-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #E8E6DE;
}

.modal-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-article { padding: 26px 36px 36px; }

.modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.modal-source { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.modal-date   { font-size: 12px; color: var(--text-muted); }
.modal-source::after { content: '·'; margin-left: 12px; opacity: 0.4; }

.modal-article-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 14px;
  text-wrap: balance;
}

.modal-deck {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Removed why it matters modal CSS */

.image-caption { 
  font-family: 'Inter', sans-serif; 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  margin-top: 8px; 
  text-align: center; 
  border-bottom: 1px solid var(--border); 
  padding-bottom: 14px;
}

.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }

.modal-body {
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.modal-body > * + * { margin-top: 1em; }

.modal-body h2 { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text-primary); margin-top: 1.8em; }
.modal-body h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text-primary); margin-top: 1.6em; }
.modal-body a  { color: var(--accent-gold); text-decoration: underline; text-decoration-color: var(--accent-gold-light); }
.modal-body ul, .modal-body ol { padding-left: 22px; }
.modal-body li + li { margin-top: 5px; }
.modal-body strong  { color: var(--text-primary); font-weight: 600; }
.modal-body blockquote { border-left: 3px solid var(--accent-gold); padding-left: 16px; color: var(--text-muted); font-style: italic; }

.modal-footer {
  padding: 14px 36px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #FFFFFF;
}

.read-original-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1.5px solid var(--border-hover);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent-gold);
  background: #fff;
  transition: background-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.read-original-btn:hover {
  background: var(--accent-gold-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}


/* ========================================================================== */
/* FOOTER                                                                     */
/* ========================================================================== */
#site-footer {
  background: #0C0C0C;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px var(--h-pad);
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 40px;
  align-items: center;
}

.footer-logo {
  display: block;
  font-family: var(--font-ft);
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.footer-logo em { font-style: italic; font-weight: 400; color: var(--accent-gold); }

.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.35); line-height: 1.5; }

.footer-cats { display: flex; gap: 24px; }

.footer-cat-link {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}

.footer-cat-link:hover { color: var(--accent-gold); }

.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.footer-copy-sep { opacity: 0.4; }
.footer-copy-link { color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
.footer-copy-link:hover { color: var(--accent-gold); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.footer-social-links {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.18s;
}

.footer-social-btn--ig {
  background: linear-gradient(45deg, #FCAF45 0%, #FD1D1D 50%, #833AB4 100%);
  border-color: transparent;
  color: #fff;
}
.footer-social-btn--fb { background: #1877F2; border-color: #1877F2; color: #fff; }

.footer-social-btn--ig:hover,
.footer-social-btn--fb:hover { opacity: 0.82; color: #fff; transform: translateY(-2px); }

.footer-social-btn svg { width: 16px; height: 16px; }


/* ========================================================================== */
/* SCROLL TO TOP                                                              */
/* ========================================================================== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  width: 40px;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: transform var(--transition), color var(--transition), border-color var(--transition);
  opacity: 0;
}

.scroll-top.visible { opacity: 1; }

.scroll-top:hover {
  transform: translateY(-2px);
  color: var(--accent-gold);
  border-color: var(--border-hover);
}


/* ========================================================================== */
/* ANIMATIONS                                                                 */
/* ========================================================================== */
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}


/* ========================================================================== */
/* RESPONSIVE — TABLET (≤ 1080px)                                            */
/* ========================================================================== */
@media (max-width: 1080px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-body { padding-bottom: 48px; }

  /* Shrink cat nav labels */
  .cat-btn { padding: 6px 10px; font-size: 12px; }
}


/* ========================================================================== */
/* RESPONSIVE — MOBILE (≤ 768px)                                             */
/* ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: var(--header-height-mob);
    --h-pad: 16px;
  }

  body { padding-top: calc(var(--header-height-mob) + 44px); } /* header + mobile cat nav */

  .header-inner { height: var(--header-height-mob); padding: 0 14px; gap: 8px; }
  .header-social { display: none; }

  .cat-nav { display: none; }
  .mobile-cat-nav { display: flex; }
  .logo::before { display: none; }
  .logo-text { font-size: 17px; }

  #search-input { width: 130px; font-size: 12px; }
  #search-input:focus { width: 175px; }

  #hero { height: auto; min-height: unset; }
  .hero-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px 28px;
    min-height: unset;
  }
  .hero-deck { display: none; }

  .section-header { padding: 32px 16px 18px; }
  .section-label { font-size: 18px; }
  .articles-grid { grid-template-columns: 1fr; gap: 14px; }
  #main { padding-bottom: 60px; }

  .modal-panel { max-height: 96vh; }
  .modal-article { padding: 18px 18px 26px; }
  .modal-footer { padding: 12px 18px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 36px 16px; }
  .footer-cats { gap: 18px; flex-wrap: wrap; }
  .footer-social { flex-direction: row; align-items: center; gap: 16px; }
  .scroll-top { bottom: 18px; right: 14px; }
}


/* ========================================================================== */
/* RESPONSIVE — SMALL MOBILE (≤ 480px)                                       */
/* ========================================================================== */
@media (max-width: 480px) {
  .logo-text { font-size: 15px; }
  #search-input { width: 110px; }
  #search-input:focus { width: 150px; }
  .card-body { padding: 14px 14px 16px; }
}
