/* =========================================================
   Global / Tokens
========================================================= */
:root {
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --border: 1px solid rgba(0, 0, 0, .08);
  --text: #141414;
  --muted: #6c757d;
  --brand: #007bff;

  /* Surface alignment (intro ↔ header ↔ experience) */
  --surface-day: linear-gradient(180deg, #fafafa, #f6f9ff);
  --surface-night: linear-gradient(180deg, #161616, #0f0f14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  margin: 0;
  padding: 0;
  padding-top: 100px;
  /* space for fixed header */
  overflow-x: hidden;
  background: #fff;
}

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

/* Smooth transitions */
body,
header,
footer,
button,
.button2,
section,
.blog-post,
.gallery-item,
.experience-card,
.cca-card,
.project-card,
.night-mode-btn,
.proj-card,
.tile,
.xp-card {
  transition: background-color .3s ease, color .3s ease,
    border-color .3s ease, box-shadow .3s ease, transform .2s ease;
}

/* Anchor offset so fixed header doesn't hide section anchors */
section {
  scroll-margin-top: 110px;
}

/* =========================================================
   Header / Nav
========================================================= */
header {
  background: var(--surface-day);
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  display: inline-block;
  margin: 0 15px;
}

nav ul li button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

nav ul li button:hover {
  transform: translateY(-2px);
}

.night-mode-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.night-mode-btn i {
  font-size: 20px;
  pointer-events: none;
}

.dropdown-btn {
  display: none;
}

/* Others popup */
.others-popup {
  display: none;
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  z-index: 1001;
  width: 300px;
  text-align: center;
  border-radius: var(--radius);
}

.others-popup button {
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 0;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.others-popup button:last-child {
  margin-bottom: 0;
}

/* Night header surface */
body.night-mode header {
  background: var(--surface-night);
  border-bottom: 1px solid #555;
}

/* =========================================================
   Sections (global)
========================================================= */
section {
  padding: 50px 20px;
  text-align: center;
}

section h2 {
  display: inline-block;
  background: linear-gradient(135deg, #ffb3e4 0%, #ffd18b 100%);
  color: #000;
  border: 1px solid #000;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  margin: 20px 0;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* =========================================================
   Tile primitives (used on index hero)
========================================================= */
.tile {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.tile .tile-title {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

/* Intro color tiles */
.c-candy {
  background: linear-gradient(135deg, #ffb3e4 0%, #ffd18b 100%);
}

.c-ink {
  background: #141414;
}

.c-sand {
  background: #f1e9db;
}

.c-ocean {
  background: linear-gradient(135deg, #7dd3fc 0%, #c7d2fe 100%);
}

.c-sun {
  background: linear-gradient(135deg, #fff3b0 0%, #ffd1a8 100%);
}

.c-lilac {
  background: #efe7ff;
}

.c-mint {
  background: #e7fff3;
}

.c-ink * {
  color: #f8f8f8;
}

/* =========================================================
   INDEX HERO (scoped to index.html only)
   - Use id="index-intro" on the hero section
========================================================= */
#index-intro.hero-wrap {
  background: var(--surface-day);
  padding-top: 14px;
  /* tight top gap */
  padding-bottom: 22px;
}

#index-intro .hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  padding-left: clamp(12px, 2vw, 24px);
  padding-right: clamp(12px, 2vw, 24px);
  grid-auto-rows: 118px;
  /* controls height rhythm */
  max-width: none;
  width: 100%;
}

/* Named components (per your sketch) */
#index-intro .component-hero-headline {
  grid-column: 1 / span 3;
  grid-row: 1 / span 4;
  padding: 16px 18px;
}

#index-intro .component-portrait {
  grid-column: 4 / span 7;
  grid-row: 1 / span 4;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#index-intro .component-quick-links {
  grid-column: 11 / span 2;
  grid-row: 1 / span 5;
  padding: 16px;
}

#index-intro .component-about {
  grid-column: 1 / span 5;
  grid-row: 5 / span 1;
  padding: 12px 16px;
}

#index-intro .component-contact {
  grid-column: 6 / span 5;
  grid-row: 5 / span 1;
  padding: 12px 16px;
}

/* Hero content */
.hero-title {
  font-family: Fraunces, serif;
  font-size: clamp(28px, 3.8vw, 56px);
  line-height: 1.05;
  margin: 6px 0 12px;
}

.hero-kicker {
  font-size: clamp(14px, 1.6vw, 18px);
  opacity: .9;
  margin: 0 0 16px;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cta {
  background: #111;
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.cta.ghost {
  background: transparent;
  border: 1px solid #111;
  color: #111;
  border-radius: 12px;
}

/* Portrait perfect fit */
#index-intro .component-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Quick links */
.quick-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .65);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .06);
  color: #141414;
}

.quick-list a i {
  opacity: .6;
}

.quick-list a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

/* Mobile stack */
@media (max-width:900px) {
  #index-intro .hero-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 14px;
  }

  #index-intro .component-hero-headline,
  #index-intro .component-portrait,
  #index-intro .component-quick-links,
  #index-intro .component-about,
  #index-intro .component-contact {
    grid-column: auto;
    grid-row: auto;
  }

  #index-intro .component-portrait {
    height: 380px;
  }
}

/* Night mode for hero tiles */
body.night-mode #index-intro.hero-wrap {
  background: var(--surface-night);
}

body.night-mode .tile {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 0 20px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .3);
}

body.night-mode .cta {
  background: #fff;
  color: #000;
}

body.night-mode .cta.ghost {
  border-color: #fff;
  color: #000;
}

/* requested: black text */
body.night-mode .quick-list a {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-color: rgba(255, 255, 255, .12);
}

/* Night mode for all section titles */
body.night-mode section h2 {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 6px 16px rgba(160, 133, 255, .25), 0 0 20px rgba(160, 133, 255, .15);
}

/* =========================================================
   Buttons (social)
========================================================= */
.button2-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.button2 {
  width: 50px;
  height: 50px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 12px;
  cursor: pointer;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.button2:hover {
  transform: translateY(-2px);
}

/* =========================================================
   Achievements Section
========================================================= */
.achievements-wrap {
  padding: 40px 20px;
  background: #fff;
  text-align: center;
}

.achievements-wrap h2 {
  margin-bottom: 30px;
  font-size: 32px;
  font-weight: 700;
  color: #000;
}

body.night-mode .achievements-wrap h2 {
  color: #fff;
}

.achievements-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* Hackathon section: allow wider project cards */
#achievements.achievements-wrap .achievements-content {
  max-width: 1700px;
}

/* Media page: allow wider content for 5-column books grid */
#media.achievements-wrap .achievements-content {
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.achievement-category {
  margin-bottom: 50px;
}

.achievement-category:last-child {
  margin-bottom: 0;
}

.achievement-category h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #000;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

body.night-mode .achievement-category h3 {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .1);
}

/* Collapsible sections */
.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  padding: 14px 16px;
  margin-bottom: 0;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  transition: all .2s ease;
  font-size: 17px;
}

.collapsible-header span {
  font-weight: 600;
}

.collapsible-header:hover {
  background: #f5f5f5;
  border-color: #d8d8d8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

body.night-mode .collapsible-header {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .08);
}

body.night-mode .collapsible-header:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
}

.collapsible-section.collapsed .collapsible-header {
  margin-bottom: 0;
  border-radius: 8px;
}

.collapse-icon {
  font-size: 13px;
  transition: transform .3s ease;
  margin-left: 12px;
  color: #888;
}

.collapsible-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.collapsible-content {
  max-height: 2500px;
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease, margin .3s ease;
  opacity: 1;
  margin-top: 16px;
}

.collapsible-section.collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

/* Education-specific styling */
#education .achievement-list li strong {
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

/* Style for organization names (not in collapsible sections) */
#education .achievement-category:not(.collapsible-section) .achievement-list li strong::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--brand);
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Better spacing for education items */
#education .achievement-list li {
  padding: 16px 0;
}

#education .collapsible-content .achievement-list li {
  padding: 14px 0;
}

/* Role/position emphasis */
#education .achievement-desc {
  margin-top: 6px;
  line-height: 1.6;
}

/* Education organizations list with role badges */
.edu-orgs-list li {
  padding: 16px 0;
}

.edu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.edu-header strong {
  display: inline;
  margin-bottom: 0;
  font-size: 15px;
}

.edu-header strong::before,
.edu-background-list li strong::before,
.edu-orgs-list li strong::before {
  content: none !important;
}

.edu-orgs-list .achievement-desc {
  margin: 6px 0 0;
  padding-left: 0;
}

/* Education background styling */
.edu-background-list li {
  padding: 18px 0;
}

.edu-background-list .edu-header strong {
  font-size: 16px;
}

.edu-background-list .achievement-desc {
  font-size: 14px;
  color: #777;
}

body.night-mode .edu-background-list .achievement-desc {
  color: #999;
}

/* Module list styling - emphasize module codes */
.collapsible-content .achievement-list li {
  position: relative;
  padding-left: 20px;
}

.collapsible-content .achievement-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-size: 14px;
  opacity: 0.7;
}

.collapsible-content .achievement-list li strong {
  font-size: 14px;
  color: #000;
  letter-spacing: 0.02em;
}

body.night-mode .collapsible-content .achievement-list li strong {
  color: #fff;
}

body.night-mode .collapsible-content .achievement-list li::before {
  color: #4da3ff;
}

/* Responsive adjustments for education */
@media (max-width:768px) {
  .edu-header {
    gap: 8px;
  }

  .edu-header strong {
    font-size: 14px;
  }

  .edu-background-list .edu-header strong {
    font-size: 15px;
  }

  .collapsible-header {
    padding: 12px 14px;
  }

  #education .achievement-list li {
    padding: 14px 0;
  }

  .edu-background-list li {
    padding: 16px 0;
  }
}

.achievement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.achievement-list li {
  padding: 14px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.achievement-list li:last-child {
  border-bottom: none;
}

.achievement-list li strong {
  color: #000;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.achievement-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Inline dates layout for fitness challenges */
.inline-dates li {
  display: block;
}

.inline-dates li strong {
  display: inline;
  margin-bottom: 0;
}

.inline-dates .achievement-desc {
  display: inline;
  margin: 0 0 0 8px;
}

/* Hackathon list with inline awards */
.hackathon-list li {
  padding: 16px 0;
}

.hackathon-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hackathon-header strong {
  display: inline;
  margin-bottom: 0;
  font-size: 15px;
}

.achievement-award {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

body.night-mode .achievement-award {
  color: #bbb;
  background: rgba(255, 255, 255, .08);
}

.hackathon-list .achievement-desc {
  margin: 6px 0 0;
  padding-left: 0;
}

.hackathon-list .achievement-link {
  margin-top: 10px;
}

.achievement-link {
  margin: 8px 0 0;
  font-size: 13px;
}

.achievement-link a {
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease, opacity .2s ease;
}

.achievement-link a:hover {
  color: #0056b3;
  opacity: 0.8;
}

.achievement-link i {
  font-size: 11px;
}

/* Night mode for achievements */
body.night-mode .achievements-wrap {
  background: #222;
}

body.night-mode .achievement-list li {
  color: #ccc;
  border-bottom-color: rgba(255, 255, 255, .05);
}

body.night-mode .achievement-list li strong {
  color: #fff;
}

body.night-mode .achievement-desc {
  color: #aaa;
}

body.night-mode .achievement-link a {
  color: #4da3ff;
}

body.night-mode .achievement-link a:hover {
  color: #6bb3ff;
}

/* Responsive */
@media (max-width:768px) {
  .achievements-content {
    padding: 0 10px;
  }

  .achievement-category {
    margin-bottom: 35px;
  }

  .achievement-category h3 {
    font-size: 17px;
    padding-bottom: 8px;
  }

  .achievement-list li {
    font-size: 14px;
    padding: 8px 0;
  }

  .hackathon-list li {
    padding: 12px 0;
  }

  .hackathon-header strong {
    font-size: 14px;
  }

  .achievement-award {
    font-size: 12px;
    padding: 2px 8px;
  }

  .country-list {
    column-count: 1;
  }
}

/* =========================================================
   About Me Navigator Cards
========================================================= */
.aboutme-wrap {
  padding-top: 24px;
  padding-bottom: 28px;
  background: var(--surface-day);
}

.aboutme-wrap h2 {
  margin-bottom: 24px;
}

.aboutme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.aboutme-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .3s ease;
  text-decoration: none;
  color: inherit;
  gap: 20px;
}

.aboutme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}

.aboutme-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  background: #f5f5f5;
}

.aboutme-meta {
  flex: 1;
}

.aboutme-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.aboutme-desc {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* Specific Category Gradients */
.aboutme-education .aboutme-icon {
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

.aboutme-blog .aboutme-icon {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff9eb5 100%);
}

.aboutme-art .aboutme-icon {
  background: linear-gradient(135deg, #ffa726 0%, #ffeb3b 100%);
}

.aboutme-hackathons .aboutme-icon {
  background: linear-gradient(135deg, #ffd700 0%, #ffa000 100%);
}

.aboutme-research .aboutme-icon {
  background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.aboutme-media .aboutme-icon {
  background: linear-gradient(135deg, #f97316 0%, #f472b6 100%);
}

.aboutme-adventures .aboutme-icon {
  background: linear-gradient(135deg, #ff6b35 0%, #ff9f43 100%);
}

.aboutme-fitness .aboutme-icon {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}


/* Adventures page extras */
.future-goals {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, .03);
  border-radius: 8px;
  font-size: 14px;
  color: #666;
}

body.night-mode .future-goals {
  background: rgba(255, 255, 255, .05);
  color: #aaa;
}

.country-list {
  column-count: 2;
  column-gap: 24px;
}

.country-list li {
  break-inside: avoid;
  padding: 8px 0;
}

.country-list li strong {
  display: inline;
}

/* Night mode */
body.night-mode .aboutme-wrap {
  background: var(--surface-night);
}

body.night-mode .aboutme-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 0 20px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .3);
}

body.night-mode .aboutme-card:hover {
  box-shadow: 0 0 30px rgba(255, 255, 255, .15), 0 14px 40px rgba(0, 0, 0, .4);
}

body.night-mode .aboutme-icon {
  color: #fff;
}

body.night-mode .aboutme-title {
  color: #fff;
}

body.night-mode .aboutme-desc {
  color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
  .aboutme-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
  }

  .aboutme-card {
    padding: 32px 20px;
    min-height: 180px;
  }

  .aboutme-icon {
    font-size: 40px;
    margin-bottom: 16px;
  }

  .aboutme-title {
    font-size: 20px;
  }

  .aboutme-desc {
    font-size: 14px;
  }
}

/* =========================================================
   Experience — Minimal 5-Tile Grid
========================================================= */
.xp-wrap {
  padding-top: 24px;
  padding-bottom: 28px;
  background: var(--surface-day);
  /* match intro surface */
}

.xp-wrap h2 {
  margin-bottom: 14px;
}

.xp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding-left: clamp(12px, 2vw, 24px);
  padding-right: clamp(12px, 2vw, 24px);
  max-width: none;
  width: 100%;
}

.xp-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.xp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.xp-logo {
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .08);
  background: #fff;
  padding: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

/* Day-mode logo backgrounds with brand colors */
.xp-jpmc .xp-logo {
  background: #8b5a3c;
}

.xp-augmodo .xp-logo {
  background: #4a9fb0;
}

.xp-htx .xp-logo {
  background: #482166;
}

.xp-protechs .xp-logo {
  background: #e6af5a;
}

.xp-omega .xp-logo {
  background: #a085ff;
}

.xp-meta {
  line-height: 1.25;
}

.xp-role {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.xp-company {
  margin: 4px 0 6px;
  font-weight: 700;
  color: #111;
}

.xp-dates {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.xp-desc {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin-top: 12px;
  font-weight: 400;
}

/* Day-mode subtle brand tints */
.xp-jpmc {
  background: linear-gradient(135deg, #f8efe9, #fff);
  border-color: #8b5a3c;
}

.xp-augmodo {
  background: linear-gradient(135deg, #eaf8fc, #fff);
  border-color: #4a9fb0;
}

.xp-htx {
  background: linear-gradient(135deg, #efe9f8, #fff);
  border-color: #482166;
}

.xp-protechs {
  background: linear-gradient(135deg, #fff4df, #fff);
  border-color: #e6af5a;
}

.xp-omega {
  background: linear-gradient(135deg, #efeaff, #fff);
  border-color: #300057;
}

/* Day-mode logo rings match brand */
.xp-jpmc .xp-logo {
  border-color: #8b5a3c;
  box-shadow: 0 0 0 4px rgba(163, 108, 75, .12), 0 12px 28px rgba(163, 108, 75, .22);
}

.xp-augmodo .xp-logo {
  border-color: #4a9fb0;
  box-shadow: 0 0 0 4px rgba(74, 159, 176, .12), 0 12px 28px rgba(74, 159, 176, .22);
}

.xp-htx .xp-logo {
  border-color: #482166;
  box-shadow: 0 0 0 4px rgba(72, 33, 102, .12), 0 12px 28px rgba(72, 33, 102, .22);
}

.xp-protechs .xp-logo {
  border-color: #e6af5a;
  box-shadow: 0 0 0 4px rgba(230, 175, 90, .12), 0 12px 28px rgba(230, 175, 90, .22);
}

.xp-omega .xp-logo {
  border-color: #a085ff;
  box-shadow: 0 0 0 4px rgba(160, 133, 255, .12), 0 12px 28px rgba(160, 133, 255, .22);
}

/* Night-mode surface + colored auras */
body.night-mode .xp-wrap {
  background: var(--surface-night);
}

body.night-mode .xp-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
}

body.night-mode .xp-logo {
  background: #222;
  border-color: #444;
}

body.night-mode .xp-company {
  color: #fff;
}

body.night-mode .xp-dates {
  color: #bbb;
}

body.night-mode .xp-desc {
  color: #aaa;
}

body.night-mode .xp-jpmc {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 28px 70px rgba(163, 108, 75, .35);
}

body.night-mode .xp-augmodo {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 28px 70px rgba(95, 183, 199, .35);
}

body.night-mode .xp-htx {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 28px 70px rgba(91, 44, 132, .40);
}

body.night-mode .xp-protechs {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 28px 70px rgba(248, 194, 113, .35);
}

body.night-mode .xp-omega {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), 0 28px 70px rgba(186, 160, 255, .40);
}

/* Responsive columns for XP grid */
@media (max-width:1200px) {
  .xp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width:992px) {
  .xp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width:700px) {
  .xp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* =========================================================
   BLOG PAGE styles
========================================================= */
.blog-post {
  background: transparent;
  color: #000;
  border: none;
  padding: 0;
  margin: 16px auto;
  text-align: left;
  box-shadow: none;
  border-radius: 0;
  line-height: 1.6;
  font-size: 16px;
  max-width: 800px;
  transition: transform .2s ease, box-shadow .3s ease;
}

.blog-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.blog-post h1 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #333;
}

.blog-post p {
  margin-bottom: 25px;
}

.blog-post ol {
  padding-left: 30px;
}

.blog-post li {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 8px;
  border-left: 4px solid #333;
}

.blog-post li strong {
  display: block;
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #222;
}

.blog-meta {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  font-size: .9em;
  color: #666;
}

.blog-meta .date {
  margin-right: 20px;
}

.blog-meta .tags span {
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 15px;
  margin-right: 10px;
}

.blog-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-header h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
}

.blog-content {
  font-family: 'Georgia', serif;
}

/* Sub-post links styling */
.sub-posts-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.sub-post-item {
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  transition: transform .2s ease, box-shadow .2s ease;
}

.sub-post-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.sub-post-link {
  text-decoration: none;
  color: #28a745;
  font-weight: 600;
  font-size: 18px;
  display: block;
  transition: color .2s ease;
}

.sub-post-link:hover {
  color: #218838;
}

.sub-post-desc {
  margin: 6px 0 0;
  color: #666;
  font-size: 14px;
}

/* Night mode for sub-posts */
body.night-mode .sub-post-item {
  background: rgba(255, 255, 255, .06);
  border-left-color: #4caf50;
}

body.night-mode .sub-post-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3), 0 0 20px rgba(76, 175, 80, .2);
}

body.night-mode .sub-post-link {
  color: #4caf50;
}

body.night-mode .sub-post-link:hover {
  color: #66bb6a;
}

body.night-mode .sub-post-desc {
  color: #aaa;
}

@media (max-width:768px) {
  .blog-post {
    padding: 20px;
    font-size: 16px;
  }

  .blog-post li {
    padding: 15px;
  }
}

.blog-info {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  transition: transform .2s ease, box-shadow .3s ease;
}

.blog-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.blog-date {
  flex: 0 0 100px;
  font-weight: 700;
  color: #555;
  font-size: 14px;
}

.blog-title {
  flex: 1;
  font-size: 20px;
  margin: 0;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  line-height: 1.4;
}

.blog-title:hover {
  text-decoration: underline;
}

.blog-post .btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  text-decoration: none;
  display: inline-block;
}

#filter-container {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#filter-container .filter-btn,
.tag-btn {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  transition: all .3s ease;
  border-radius: 12px;
  min-width: 100px;
  text-align: center;
}

#filter-container .filter-btn:hover,
.tag-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

/* Tag colors - matching the minimalistic theme */
.tag-btn.fitness {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.tag-btn.tech {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.tag-btn.philosophy {
  background: #ffc107;
  color: #000;
  border-color: #ffc107;
}

/* Filter button colors - more specific to override general styles */
#filter-container .filter-btn {
  background: #fff;
  color: #000;
  border-color: #000;
}

#filter-container .filter-btn.fitness {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

#filter-container .filter-btn.tech {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

#filter-container .filter-btn.philosophy {
  background: #ffc107;
  color: #000;
  border-color: #ffc107;
}

/* Blog post tags styling */
.blog-info .tags {
  margin-left: 16px;
}

.blog-info .tag-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  margin: 0;
  min-width: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

/* =========================================================
   Education Timeline Cards
========================================================= */
.edu-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 30px;
}

.edu-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, #e0e0e0 100%);
}

.edu-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  transition: transform .2s ease, box-shadow .3s ease;
}

.edu-card:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.edu-card::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--brand);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .2);
}

.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.edu-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.edu-card-date {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.edu-card-desc {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.edu-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #f5f5f5;
  padding: 4px;
}

/* Night mode */
body.night-mode .edu-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .edu-card-title {
  color: #fff;
}

body.night-mode .edu-card-desc {
  color: #bbb;
}

body.night-mode .edu-timeline::before {
  background: linear-gradient(180deg, #4da3ff 0%, rgba(255, 255, 255, .1) 100%);
}

/* =========================================================
   Module Chips Grid
========================================================= */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px 0;
}

.module-chip {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.module-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

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

.module-code {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.module-code.cs {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.module-code.ma {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.module-code.st {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.module-code.ge {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #333;
}

.module-code.other {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
}

.module-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

.module-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

/* Night mode */
body.night-mode .module-chip {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .module-name {
  color: #fff;
}

body.night-mode .module-desc {
  color: #aaa;
}

/* =========================================================
   Organization Role Cards
========================================================= */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.org-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow);
}

.org-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.org-icon {
  width: 48px;
  min-width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.org-icon.president {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.org-icon.director {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.org-icon.lead {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.org-icon.dev {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.org-icon.external {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.org-info {
  flex: 1;
}

.org-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.org-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 6px;
  display: inline-block;
}

.org-desc {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

/* Night mode */
body.night-mode .org-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .org-name {
  color: #fff;
}

body.night-mode .org-role {
  color: #4da3ff;
}

body.night-mode .org-desc {
  color: #bbb;
}

/* =========================================================
   Media Cover Cards
========================================================= */
.media-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.media-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  transition: transform .2s ease, box-shadow .3s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}

.media-cover-img {
  width: 90px;
  min-width: 90px;
  height: 120px;
  /* fixed height */
  border-radius: 12px;
  /* rounded corners inside card */
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Media cover icon placeholders */
.media-cover {
  width: 90px;
  min-width: 90px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
}

.media-cover.book {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
}

.media-cover.movie {
  background: linear-gradient(135deg, #f97316 0%, #f472b6 100%);
}

.media-info {
  padding: 0;
  /* padding handled by card now */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.media-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.media-author {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

.media-quote {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  font-style: italic;
}

/* Night mode */
body.night-mode .media-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .media-title {
  color: #fff;
}

body.night-mode .media-author {
  color: #4da3ff;
}

body.night-mode .media-quote {
  color: #bbb;
}

/* =========================================================
   Adventure Feature Cards
========================================================= */
.adventure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.adventure-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform .2s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}

.adventure-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}

.adventure-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #7dd3fc 0%, #c7d2fe 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin-bottom: 16px;
}

.adventure-card-icon.mountain {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
}

.adventure-card-icon.fitness {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
}

.adventure-card-icon.globe {
  background: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
}

.adventure-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.adventure-card-stat {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  margin: 8px 0;
}

.adventure-card-desc {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.adventure-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.adventure-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 20px;
  color: #555;
}

/* Night mode */
body.night-mode .adventure-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .adventure-card-title {
  color: #fff;
}

body.night-mode .adventure-card-desc {
  color: #bbb;
}

body.night-mode .adventure-card-stat {
  color: #4da3ff;
}

body.night-mode .adventure-tag {
  background: rgba(255, 255, 255, .1);
  color: #ccc;
}

/* =========================================================
   Media Cover Cards (Books & Movies)
========================================================= */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Books: Dynamic columns that fit to page width */
.media-grid.books-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

@media (max-width: 1400px) {
  .media-grid.books-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .media-grid.books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .media-grid.books-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}

.media-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.media-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .2s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}

.media-grid.books-grid .media-card {
  --book-cover-h: 118px;
  --book-card-vpad: 16px;
  padding: 16px;
  gap: 12px;
  height: calc(var(--book-cover-h) + (var(--book-card-vpad) * 2));
  min-height: 0;
  max-height: calc(var(--book-cover-h) + (var(--book-card-vpad) * 2));
  align-items: center;
}

.media-grid.books-grid .media-cover-img {
  width: 84px;
  min-width: 84px;
  height: var(--book-cover-h);
  object-fit: cover;
}

.media-grid.books-grid .media-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Movies: Dynamic columns that fit to page width */
.media-grid.movies-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

@media (max-width: 1400px) {
  .media-grid.movies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .media-grid.movies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .media-grid.movies-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}

.media-grid.movies-grid .media-card {
  --movie-poster-h: 120px;
  --movie-card-vpad: 16px;
  padding: 16px;
  gap: 12px;
  height: calc(var(--movie-poster-h) + (var(--movie-card-vpad) * 2));
  min-height: 0;
  max-height: calc(var(--movie-poster-h) + (var(--movie-card-vpad) * 2));
  align-items: center;
}

.media-grid.movies-grid .media-cover-img {
  width: 90px;
  min-width: 90px;
  height: var(--movie-poster-h);
  object-fit: cover;
}

.media-grid.movies-grid .media-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-grid.movies-grid .media-title {
  flex-shrink: 0;
}

.media-grid.movies-grid .media-author {
  flex-shrink: 0;
}

.media-grid.movies-grid .media-quote {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.media-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.media-card-overlay i {
  font-size: 2.5rem;
}

.media-card-link:hover .media-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.media-card-link:hover .media-card-overlay {
  opacity: 1;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.media-cover {
  width: 60px;
  min-width: 60px;
  height: 90px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.media-cover.book {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.media-cover.movie {
  background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.media-info {
  flex: 1;
}

.media-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.media-author {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.media-quote {
  margin: 0;
  font-size: 13px;
  color: #666;
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid #ddd;
  padding-left: 10px;
}

/* Night mode */
body.night-mode .media-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .media-title {
  color: #fff;
}

body.night-mode .media-quote {
  color: #bbb;
  border-color: rgba(255, 255, 255, .2);
}

/* =========================================================
   INDIVIDUAL BLOG POST PAGE styles (post001.html, post002.html, etc.)
========================================================= */

/* Back button styling */
#blog .button2 {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  transition: all .3s ease;
}

#blog .button2:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

/* Blog post title styling */
#blog h2 {
  margin-top: 60px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #ffb3e4 0%, #ffd18b 100%);
  color: #000;
  border: 1px solid #000;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  transition: all .3s ease;
}

/* Individual blog post content styling */
#blog .blog-post {
  background: transparent;
  color: #000;
  border: none;
  padding: 0;
  margin: 30px auto;
  text-align: left;
  border-radius: 0;
  box-shadow: none;
  line-height: 1.8;
  font-size: 18px;
  max-width: 800px;
  transition: all .3s ease;
}

#blog .blog-post:hover {
  transform: none;
  box-shadow: none;
}

#blog .blog-post h1 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #333;
}

#blog .blog-post h2 {
  font-size: 2em;
  margin: 30px 0 20px;
  color: #333;
}

#blog .blog-post p {
  margin-bottom: 25px;
}

#blog .blog-post ol {
  padding-left: 30px;
}

#blog .blog-post li {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 12px;
  border-left: 4px solid #333;
  transition: all .3s ease;
}

#blog .blog-post li:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

#blog .blog-post li strong {
  display: block;
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #222;
}

/* Blog post header and meta styling */
#blog .blog-header {
  margin-bottom: 30px;
}

#blog .blog-meta {
  display: flex;
  align-items: center;
  margin: 20px 0;
  font-size: .9em;
  color: #666;
  flex-wrap: wrap;
  gap: 10px;
}

#blog .blog-meta .date {
  font-weight: 600;
  color: #555;
}

#blog .blog-meta .tags span {
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

/* Blog post content styling */
#blog .blog-content {
  font-family: 'Georgia', serif;
}

/* Blockquote styling */
#blog blockquote {
  background: #f8f8f8;
  border-left: 4px solid #333;
  padding: 20px;
  margin: 30px 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

/* Figure styling */
#blog figure {
  margin: 30px 0;
  text-align: center;
}

#blog figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
}

#blog figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Blog post section positioning */
#blog {
  position: relative;
  padding-top: 20px;
}

/* Override inline styles for contact buttons in blog posts */
#blog .button2-container .button2 {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08) !important;
  transition: all .3s ease !important;
}

#blog .button2-container .button2:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12) !important;
}

/* Responsive design for blog posts */
@media (max-width:768px) {
  #blog .blog-post {
    padding: 20px;
    font-size: 16px;
    margin: 20px 10px;
  }

  #blog .blog-post li {
    padding: 15px;
  }

  #blog h2 {
    font-size: 20px;
    padding: 12px 20px;
    margin-top: 50px;
  }

  #blog .button2 {
    top: 15px;
    left: 15px;
  }
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.sources-list li {
  margin-bottom: 15px;
}

.sources-list a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}

.sources-list a:hover {
  border-bottom-color: #0066cc;
}

/* Night mode blog */
body.night-mode .blog-post {
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
}

body.night-mode .blog-post:hover {
  box-shadow: none;
}

body.night-mode .blog-info {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode .blog-info:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 25px rgba(255, 255, 255, .15);
}

body.night-mode .blog-post h1 {
  color: #fff;
}

body.night-mode .blog-post h3 {
  color: #ffa726;
}

body.night-mode .blog-meta {
  color: #bbb;
}

body.night-mode .blog-meta .tags span {
  background: #444;
  color: #ddd;
}

body.night-mode .blog-post li {
  background: rgba(255, 255, 255, .06);
  border-left-color: #ffa726;
}

body.night-mode .blog-post a {
  color: #4db8ff;
}

body.night-mode .blog-post a:hover {
  color: #80ccff;
}

body.night-mode .blog-date {
  color: #ccc;
}

body.night-mode .blog-title {
  color: #fff;
}

body.night-mode #filter-container .filter-btn,
body.night-mode #filter-container .tag-btn {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #filter-container .filter-btn:hover,
body.night-mode #filter-container .tag-btn:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4), 0 0 25px rgba(255, 255, 255, .15);
}

/* Night mode filter button colors - keep the brand colors visible */
body.night-mode #filter-container .filter-btn.fitness {
  background: rgba(40, 167, 69, .8);
  color: #fff;
  border-color: #28a745;
  box-shadow: 0 6px 16px rgba(40, 167, 69, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #filter-container .filter-btn.tech {
  background: rgba(0, 123, 255, .8);
  color: #fff;
  border-color: #007bff;
  box-shadow: 0 6px 16px rgba(0, 123, 255, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #filter-container .filter-btn.philosophy {
  background: rgba(255, 193, 7, .8);
  color: #000;
  border-color: #ffc107;
  box-shadow: 0 6px 16px rgba(255, 193, 7, .3), 0 0 20px rgba(255, 255, 255, .1);
}

/* Night mode for individual blog post pages */
body.night-mode #blog .button2 {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #blog .button2:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4), 0 0 25px rgba(255, 255, 255, .15);
}

body.night-mode #blog h2 {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 6px 16px rgba(255, 255, 255, .15), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #blog .blog-post {
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
}

body.night-mode #blog .blog-post:hover {
  box-shadow: none;
}

body.night-mode #blog .blog-post h1 {
  color: #fff;
}

body.night-mode #blog .blog-post li {
  background: rgba(255, 255, 255, .06);
  border-left-color: #ffa726;
}

body.night-mode #blog .blog-post li:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, .1);
}

body.night-mode #blog .blog-post h2 {
  color: #fff;
}

body.night-mode #blog .blog-meta {
  color: #bbb;
}

body.night-mode #blog .blog-meta .date {
  color: #ccc;
}

body.night-mode #blog .blog-meta .tags span {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

body.night-mode #blog .blog-content {
  color: #fff;
}

body.night-mode #blog blockquote {
  background: rgba(255, 255, 255, .06);
  border-left-color: #ffa726;
}

body.night-mode #blog figure img {
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode #blog figure figcaption {
  color: #bbb;
}

/* Night mode for contact buttons in blog posts */
body.night-mode #blog .button2-container .button2 {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .08) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1) !important;
}

body.night-mode #blog .button2-container .button2:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4), 0 0 25px rgba(255, 255, 255, .15) !important;
}

/* =========================================================
   ART PAGE styles
========================================================= */
section#gallery {
  background: #f4f4f4;
}

section#contact {
  background: #eaeaea;
}

/* View toggle button (mobile only) */
.view-toggle {
  display: none;
}

.view-toggle button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  margin: 0 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.view-toggle button.active {
  background: #000;
  color: #fff;
}

.view-toggle button:hover {
  transform: translateY(-2px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  overflow: hidden;
  transition: transform .15s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  display: block;
}

@media (max-width:768px) {
  .view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    max-width: 100%;
  }

  .gallery-grid.scroll-view {
    grid-template-columns: repeat(1, 1fr);
    max-width: 100%;
    margin: 0;
  }

  .gallery-item {
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0;
  }

  section {
    padding: 20px;
  }

  section h2 {
    font-size: 18px;
    padding: 15px 20px;
    margin-bottom: 20px;
  }
}

@media (max-width:480px) {
  .gallery-grid {
    gap: 0;
    padding: 0;
  }

  .gallery-grid.scroll-view {
    max-width: 100%;
  }

  .gallery-item {
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0;
  }

  section h2 {
    font-size: 16px;
    padding: 10px 15px;
  }

  /* Very small screens - make nav items smaller */
  nav ul li button {
    padding: 4px 8px;
    font-size: 12px;
  }

  .night-mode-btn {
    width: 28px;
    height: 28px;
  }
}

/* Night mode art */
body.night-mode section#gallery,
body.night-mode section#contact {
  background: #1a1a1a;
}

body.night-mode .gallery-item {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .gallery-item:hover {
  transform: scale(1.02);
}

body.night-mode .view-toggle button {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 20px rgba(255, 255, 255, .1);
}

body.night-mode .view-toggle button.active {
  background: rgba(255, 255, 255, .2);
  color: #000;
  border-color: rgba(255, 255, 255, .2);
}

body.night-mode .view-toggle button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4), 0 0 25px rgba(255, 255, 255, .15);
}

body.night-mode nav ul li button,
body.night-mode .button2 {
  background: #444;
  color: #fff;
  border-color: #fff;
}

body.night-mode .button2:hover {
  background: #666;
}

/* =========================================================
   GAMES PAGE styles
========================================================= */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.game-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all .3s ease;
  box-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(0, 0, 0, .1);
  position: relative;
}

.game-card:hover {
  top: -3px;
  left: -3px;
  box-shadow: 0 0 0 #000, 3px 3px 0 rgba(0, 0, 0, .1);
}

.game-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #000;
}

.game-card p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.game-card .play-btn {
  display: inline-block;
  background: #000;
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 3px 3px 0 #666;
}

.game-card .play-btn:hover {
  background: #333;
}

/* Night mode games */
body.night-mode .game-card {
  background: #333;
  border-color: #555;
  color: #fff;
  box-shadow: 3px 3px 0 #111, 6px 6px 0 rgba(255, 255, 255, .1);
}

body.night-mode .game-card h3 {
  color: #ffa726;
}

body.night-mode .game-card p {
  color: #ddd;
}

body.night-mode .game-card .play-btn {
  background: #ffa726;
  color: #000;
  box-shadow: 3px 3px 0 #cc8400;
}

body.night-mode .game-card .play-btn:hover {
  background: #ffb74d;
}

/* Mobile games */
@media (max-width:768px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .game-card {
    padding: 20px;
  }
}

/* =========================================================
   Night Mode (global quick touches)
========================================================= */
body.night-mode {
  background: #222;
  color: #fff;
}

body.night-mode footer {
  background: #333;
}

/* =========================================================
   Project Flip Cards (projects.html)
========================================================= */
.projects-wrap {
  padding-top: 24px;
  padding-bottom: 48px;
  background: var(--surface-day);
}

.projects-wrap h2 {
  margin-bottom: 30px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.proj-card {
  perspective: 1000px;
  height: 320px;
  cursor: pointer;
}

.proj-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.proj-card.flipped .proj-inner {
  transform: rotateY(180deg);
}

.proj-side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proj-front {
  background: #fff;
}

.proj-back {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
  transform: rotateY(180deg);
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Front side content */
.proj-front-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.proj-logo {
  width: 64px;
  height: 64px;
  min-width: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: #f5f5f5;
  padding: 8px;
}

.proj-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}

.proj-event {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(0, 123, 255, .08);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}

.proj-award {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}

.proj-desc {
  margin-top: auto;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.proj-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #aaa;
  text-align: center;
}

/* Back side content */
.proj-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.proj-back-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

.proj-back-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  max-width: 280px;
}

.proj-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Front-side links */
.proj-front-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
}

.proj-front-links .proj-btn {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all .2s ease;
}

.proj-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}

.proj-btn.ghost {
  background: transparent;
  color: #111;
  border: 1px solid #111;
}

/* Custom project card colors */
.proj-card[data-color="pink"] .proj-front {
  background: linear-gradient(135deg, #ffe4f0 0%, #fff 100%);
}

.proj-card[data-color="pink"] .proj-event {
  background: rgba(255, 85, 187, .1);
  color: #ff55bb;
}

.proj-card[data-color="blue"] .proj-front {
  background: linear-gradient(135deg, #e4f0ff 0%, #fff 100%);
}

.proj-card[data-color="blue"] .proj-event {
  background: rgba(27, 202, 255, .1);
  color: #0099cc;
}

.proj-card[data-color="green"] .proj-front {
  background: linear-gradient(135deg, #e4fff0 0%, #fff 100%);
}

.proj-card[data-color="green"] .proj-event {
  background: rgba(76, 175, 80, .1);
  color: #2e7d32;
}

.proj-card[data-color="purple"] .proj-front {
  background: linear-gradient(135deg, #f0e4ff 0%, #fff 100%);
}

.proj-card[data-color="purple"] .proj-event {
  background: rgba(156, 39, 176, .1);
  color: #7b1fa2;
}

.proj-card[data-color="gold"] .proj-front {
  background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
}

.proj-card[data-color="gold"] .proj-event {
  background: rgba(255, 193, 7, .15);
  color: #f57c00;
}

/* Night mode */
body.night-mode .projects-wrap {
  background: var(--surface-night);
}

body.night-mode .proj-front,
body.night-mode .proj-back {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

body.night-mode .proj-title,
body.night-mode .proj-back-title {
  color: #fff;
}

body.night-mode .proj-desc,
body.night-mode .proj-back-desc {
  color: #bbb;
}

body.night-mode .proj-award {
  background: rgba(255, 255, 255, .08);
  color: #ccc;
}

body.night-mode .proj-btn {
  background: #fff;
  color: #111;
}

body.night-mode .proj-btn.ghost {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

/* Night mode color variants */
body.night-mode .proj-card[data-color="pink"] .proj-front {
  background: linear-gradient(135deg, rgba(255, 85, 187, .15) 0%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 20px 50px rgba(255, 85, 187, .2);
}

body.night-mode .proj-card[data-color="pink"] .proj-event {
  background: rgba(255, 85, 187, .2);
  color: #ff8ac7;
}

body.night-mode .proj-card[data-color="blue"] .proj-front {
  background: linear-gradient(135deg, rgba(27, 202, 255, .15) 0%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 20px 50px rgba(27, 202, 255, .2);
}

body.night-mode .proj-card[data-color="blue"] .proj-event {
  background: rgba(27, 202, 255, .2);
  color: #5dd8ff;
}

body.night-mode .proj-card[data-color="green"] .proj-front {
  background: linear-gradient(135deg, rgba(76, 175, 80, .15) 0%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 20px 50px rgba(76, 175, 80, .2);
}

body.night-mode .proj-card[data-color="green"] .proj-event {
  background: rgba(76, 175, 80, .2);
  color: #81c784;
}

body.night-mode .proj-card[data-color="purple"] .proj-front {
  background: linear-gradient(135deg, rgba(156, 39, 176, .15) 0%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 20px 50px rgba(156, 39, 176, .2);
}

body.night-mode .proj-card[data-color="purple"] .proj-event {
  background: rgba(156, 39, 176, .2);
  color: #ce93d8;
}

body.night-mode .proj-card[data-color="gold"] .proj-front {
  background: linear-gradient(135deg, rgba(255, 193, 7, .15) 0%, rgba(255, 255, 255, .06) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 20px 50px rgba(255, 193, 7, .2);
}

body.night-mode .proj-card[data-color="gold"] .proj-event {
  background: rgba(255, 193, 7, .2);
  color: #ffd54f;
}

/* Responsive */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 20px;
  }

  .proj-card {
    height: 280px;
  }

  .proj-side {
    padding: 20px;
  }

  .proj-title {
    font-size: 18px;
  }
}

/* =========================================================
   Footer
========================================================= */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 10px 0;
}

/* =========================================================
   Responsive Nav
========================================================= */
@media (max-width:768px) {
  header {
    padding: 10px;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dropdown-btn {
    display: none;
  }

  nav ul li {
    display: block;
    margin: 0;
  }

  nav ul li button {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
  }

  .night-mode-btn {
    width: 32px;
    height: 32px;
  }

  section {
    padding: 20px;
  }

  section h2 {
    font-size: 18px;
    padding: 12px 18px;
    margin-bottom: 20px;
  }

  .button2 {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }
}

/* Clickable Project Cards */
.proj-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 320px;
  position: relative;
  cursor: pointer;
}

.proj-card-link:hover .proj-card {
  transform: translateY(-8px);
}

.proj-card-link .proj-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proj-card-link:hover .proj-side {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.proj-card-link:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Project Detail Pages */
.project-detail .project-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-radius: var(--radius);
}

.project-detail .project-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-detail .project-tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-detail .project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.project-detail .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.project-detail .meta-item i {
  color: var(--primary-color);
}

.project-detail .project-links-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tech-item {
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

@media (max-width: 768px) {
  .project-detail .project-header h1 {
    font-size: 2rem;
  }
  
  .project-detail .project-tagline {
    font-size: 1.2rem;
  }
  
  .project-detail .project-meta {
    flex-direction: column;
    align-items: center;
  }
  
  .tech-stack-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* =========================================================
   Clean Minimal Theme Overrides
   (About Me, Adventures, Education, and post-hackathon sections)
========================================================= */

/* About Me navigator: cleaner cards + subtle color accents */
#aboutme-nav .aboutme-grid {
  max-width: 1280px;
  gap: 14px;
}

#aboutme-nav .aboutme-card {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
}

#aboutme-nav .aboutme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#aboutme-nav .aboutme-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eef2ff !important;
  color: #4f46e5 !important;
  font-size: 18px;
  margin: 0;
}

#aboutme-nav .aboutme-card:nth-child(3n+1) .aboutme-icon {
  background: #ecfeff !important;
  color: #0f766e !important;
}

#aboutme-nav .aboutme-card:nth-child(3n+2) .aboutme-icon {
  background: #fff7ed !important;
  color: #c2410c !important;
}

#aboutme-nav .aboutme-card:nth-child(3n) .aboutme-icon {
  background: #eef2ff !important;
  color: #4338ca !important;
}

body.night-mode #aboutme-nav .aboutme-card {
  background: rgba(22, 24, 33, .92);
  border-color: rgba(129, 140, 248, .2);
  box-shadow: none;
}

body.night-mode #aboutme-nav .aboutme-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

body.night-mode #aboutme-nav .aboutme-icon {
  background: rgba(129, 140, 248, .2) !important;
  color: #c7d2fe !important;
}

/* Adventures + generic achievement cards: simpler visual language */
#adventures .adventure-grid,
#achievements .achievement-category:nth-child(n+2) .adventure-grid {
  max-width: 1280px;
}

#adventures .adventure-card,
#achievements .achievement-category:nth-child(n+2) .adventure-card {
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  padding: 20px;
}

#adventures .adventure-card:hover,
#achievements .achievement-category:nth-child(n+2) .adventure-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#adventures .adventure-card-icon,
#achievements .achievement-category:nth-child(n+2) .adventure-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 12px;
  background: #e0f2fe !important;
  color: #0369a1 !important;
}

#adventures .adventure-card-stat,
#achievements .achievement-category:nth-child(n+2) .adventure-card-stat {
  font-size: 22px;
  color: #111;
}

#adventures .adventure-tag,
#achievements .achievement-category:nth-child(n+2) .adventure-tag {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
}

body.night-mode #adventures .adventure-card,
body.night-mode #achievements .achievement-category:nth-child(n+2) .adventure-card {
  background: rgba(22, 24, 33, .92);
  border-color: rgba(129, 140, 248, .2);
  box-shadow: none;
}

body.night-mode #adventures .adventure-card-icon,
body.night-mode #achievements .achievement-category:nth-child(n+2) .adventure-card-icon {
  background: rgba(56, 189, 248, .18) !important;
  color: #bae6fd !important;
}

body.night-mode #adventures .adventure-card-stat,
body.night-mode #achievements .achievement-category:nth-child(n+2) .adventure-card-stat {
  color: #e4e4e7;
}

body.night-mode #adventures .adventure-tag,
body.night-mode #achievements .achievement-category:nth-child(n+2) .adventure-tag {
  background: rgba(129, 140, 248, .2);
  color: #c7d2fe;
}

/* Education: reduce colorful accents and icon prominence */
#education .edu-card {
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
}

#education .edu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#education .edu-card::before {
  background: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .2);
}

#education .edu-card-date {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
}

#education .achievement-category h3 {
  color: #111827;
  border-bottom-color: #e8ecff;
}

#education .collapsible-header {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  color: #111827;
}

#education .collapsible-header:hover {
  background: #f8faff;
  border-color: rgba(0, 0, 0, .16);
  box-shadow: none;
}

#education .collapsible-header .collapse-icon {
  color: #6366f1;
}

#education .module-chip {
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: none;
  border-radius: 12px;
}

#education .module-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
}

#education .module-code {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-radius: 999px;
}

#education .org-card {
  border: 1px solid rgba(0, 0, 0, .1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  border-radius: 12px;
}

#education .org-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#education .org-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 15px;
  background: #eef2ff !important;
  color: #4338ca !important;
}

body.night-mode #education .edu-card,
body.night-mode #education .module-chip,
body.night-mode #education .org-card {
  background: rgba(22, 24, 33, .92);
  border-color: rgba(129, 140, 248, .2);
  box-shadow: none;
}

body.night-mode #education .edu-card-date,
body.night-mode #education .module-code {
  background: rgba(129, 140, 248, .2) !important;
  color: #c7d2fe !important;
}

body.night-mode #education .org-icon {
  background: rgba(129, 140, 248, .2) !important;
  color: #c7d2fe !important;
}

body.night-mode #education .achievement-category h3 {
  color: #f3f4f6;
  border-bottom-color: rgba(129, 140, 248, .25);
}

body.night-mode #education .collapsible-header {
  background: rgba(30, 34, 48, .95);
  border-color: rgba(129, 140, 248, .25);
  color: #f3f4f6;
}

body.night-mode #education .collapsible-header:hover {
  background: rgba(37, 42, 59, .95);
  border-color: rgba(129, 140, 248, .35);
}

body.night-mode #education .collapsible-header .collapse-icon {
  color: #c7d2fe;
}

/* =========================================================
   Floating Section Reel (Hackathons/Education)
========================================================= */
.section-reel {
  position: fixed;
  left: 16px;
  top: 120px;
  z-index: 35;
  width: 238px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  border: 1px solid rgba(99, 102, 241, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  padding: 12px;
}

.section-reel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-reel-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #52525b;
}

.section-reel-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .8);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.section-reel-toggle:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.section-reel-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-reel-link {
  text-decoration: none;
  color: #3f3f46;
  font-size: 13.5px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.section-reel-link:hover {
  background: #f5f7ff;
  color: #3730a3;
  border-color: #e0e7ff;
}

.section-reel-link.active {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
  font-weight: 600;
}

.section-reel.is-collapsed {
  width: 54px;
  overflow: hidden;
  padding: 10px;
}

.section-reel.is-collapsed .section-reel-title,
.section-reel.is-collapsed .section-reel-nav {
  display: none;
}

/* prevent anchor sections from hiding behind header */
#achievements .achievement-category[id],
#education .achievement-category[id] {
  scroll-margin-top: 110px;
}

body.night-mode .section-reel {
  background: rgba(22, 24, 33, .72);
  border-color: rgba(129, 140, 248, .3);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}

body.night-mode .section-reel-title {
  color: #a1a1aa;
}

body.night-mode .section-reel-toggle {
  background: rgba(129, 140, 248, .16);
  border-color: rgba(129, 140, 248, .32);
  color: #c7d2fe;
}

body.night-mode .section-reel-toggle:hover {
  background: rgba(129, 140, 248, .24);
  border-color: rgba(129, 140, 248, .45);
}

body.night-mode .section-reel-link {
  color: #d4d4d8;
}

body.night-mode .section-reel-link:hover {
  background: rgba(129, 140, 248, .12);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, .25);
}

body.night-mode .section-reel-link.active {
  background: rgba(129, 140, 248, .2);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, .35);
}

@media (max-width: 980px) {
  .section-reel {
    top: auto;
    bottom: 14px;
    left: 12px;
    width: 220px;
    max-height: 58vh;
  }
}

/* =========================================================
   Back overlay (fixed top-left on About Me + book note pages)
========================================================= */
.page-back-row {
  position: fixed;
  top: 5.5rem;
  left: 1.5rem;
  z-index: 500;
  margin: 0;
  padding: 0;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.page-back-link:hover {
  transform: translateX(-2px);
  background: #e5e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

body.night-mode .page-back-link {
  color: #c7d2fe;
  background: rgba(129, 140, 248, .25);
  border-color: rgba(129, 140, 248, .4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

body.night-mode .page-back-link:hover {
  background: rgba(129, 140, 248, .35);
  border-color: rgba(129, 140, 248, .55);
  color: #e0e7ff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

/* =========================================================
   Quote of the Day Overlay (fixed top)
========================================================= */
.quote-of-day-overlay {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  max-width: 600px;
  width: calc(100% - 3rem);
  padding: 12px 18px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  text-align: center;
  pointer-events: none;
}

.quote-of-day-text {
  margin: 0 0 4px;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  font-style: italic;
  color: #141414;
  opacity: .9;
}

.quote-of-day-author {
  margin: 0;
  font-size: 12px;
  opacity: .7;
  font-style: normal;
  color: #141414;
}

body.night-mode .quote-of-day-overlay {
  background: rgba(30, 34, 48, .95);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

body.night-mode .quote-of-day-text,
body.night-mode .quote-of-day-author {
  color: #f3f4f6;
}

@media (max-width: 900px) {
  .quote-of-day-overlay {
    top: 5rem;
    width: calc(100% - 2rem);
    padding: 10px 14px;
  }
  
  .quote-of-day-text {
    font-size: 13px;
  }
  
  .quote-of-day-author {
    font-size: 11px;
  }
}

/* =========================================================
   Quote Overlay (Passive Top Banner)
========================================================= */
.quote-overlay {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 1001;
  max-width: 600px;
  width: calc(100% - 3rem);
  padding: 12px 18px 32px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  text-align: center;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.quote-overlay.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quote-overlay.is-minimized {
  opacity: 0;
  transform: translateX(-50%) translateY(-100px);
  pointer-events: none;
}

.quote-overlay-minimize {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
  padding: 0;
}

.quote-overlay-minimize:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
}

.quote-overlay-text {
  margin: 0 0 4px;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  font-style: italic;
  color: #141414;
  opacity: .9;
}

.quote-overlay-author {
  margin: 0;
  font-size: 12px;
  opacity: .7;
  font-style: normal;
  color: #141414;
}

.quote-overlay-timer {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: #999;
  font-weight: 600;
  opacity: 0.7;
}

/* Night mode for quote overlay */
body.night-mode .quote-overlay {
  background: rgba(30, 34, 48, .95);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

body.night-mode .quote-overlay-text,
body.night-mode .quote-overlay-author {
  color: #f3f4f6;
}

body.night-mode .quote-overlay-minimize {
  color: #a1a1aa;
}

body.night-mode .quote-overlay-minimize:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.night-mode .quote-overlay-timer {
  color: #a1a1aa;
}

@media (max-width: 900px) {
  .quote-overlay {
    top: 5rem;
    width: calc(100% - 2rem);
    padding: 10px 14px;
  }
  
  .quote-overlay-text {
    font-size: 13px;
  }
  
  .quote-overlay-author {
    font-size: 11px;
  }
}

/* =========================================================
   Blog Refresh (clean + serious)
========================================================= */
#blog {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

#blog .blog-post {
  max-width: 980px;
}

#blog .blog-info {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .1);
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  padding: 16px 18px;
}

#blog .blog-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#blog .blog-title {
  color: #111827;
}

#blog .blog-date {
  color: #6b7280;
}

#blog .blog-content {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #1f2937;
}

#blog .blog-content h3 {
  color: #111827;
  margin-top: 26px;
  margin-bottom: 10px;
}

/* Remove "card per list item" look */
#blog .blog-content ul,
#blog .blog-content ol {
  margin: 14px 0 20px;
  padding-left: 24px;
}

#blog .blog-content li {
  margin: 8px 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

#blog .blog-content li:hover {
  transform: none;
  box-shadow: none;
}

#blog .blog-content li strong {
  display: inline;
  margin: 0;
  font-size: inherit;
  color: inherit;
}

body.night-mode #blog .blog-info {
  background: rgba(22, 24, 33, .92);
  border-color: rgba(129, 140, 248, .2);
  box-shadow: none;
}

body.night-mode #blog .blog-title {
  color: #f3f4f6;
}

body.night-mode #blog .blog-date {
  color: #c4c4cc;
}

body.night-mode #blog .blog-content,
body.night-mode #blog .blog-content h3 {
  color: #e5e7eb;
}

/* =========================================================
   Hackathon Detail Enhancements (System Diagrams + Modern Tech Stack)
========================================================= */
.tech-stack-grid.modern {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .28);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  font-weight: 600;
  font-size: 13px;
  color: #1f2937;
}

.tech-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.tech-badge.no-logo {
  background: #f8fafc;
}

.tech-stack-note {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.system-diagram-card {
  margin-top: 14px;
  border: 1px solid rgba(99, 102, 241, .22);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  overflow: hidden;
}

.system-diagram {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.diagram-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.diagram-links .proj-btn {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.diagram-note {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

body.night-mode .tech-badge {
  background: rgba(255, 255, 255, .06);
  color: #e5e7eb;
  border-color: rgba(129, 140, 248, .32);
  box-shadow: none;
}

body.night-mode .tech-badge.no-logo {
  background: rgba(255, 255, 255, .08);
}

body.night-mode .tech-stack-note,
body.night-mode .diagram-note {
  color: #a1a1aa;
}

body.night-mode .system-diagram-card {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(129, 140, 248, .28);
}
