/*   
    :root {
      --bg: #0b0d12;
      --card: #121621;
      --fg: #e7ecf3;
      --muted: #9aa7b6;
      --ring: 0 0 0 2px rgba(99, 102, 241, 0.5);
      --radius: 18px;
      --shadow: 0 10px 30px rgba(0,0,0,.35);
    } */

    
    /* body {
      margin: 0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji";
      background: radial-gradient(1200px 700px at 10% 0%, rgba(99,102,241,.12), transparent 40%),
                  radial-gradient(900px 600px at 90% 20%, rgba(56,189,248,.10), transparent 35%),
                  var(--bg);
      color: var(--fg);
      -webkit-font-smoothing: antialiased;
    } */

    /* .container {
      max-width: 1100px;
      margin: 40px auto;
      padding: 0 20px;
    } */

    /* header { text-align: center; margin-bottom: 22px; } */
    h1 { font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem); margin: 0; }
    /* p.lead { color: var(--muted); margin: 8px auto 0; max-width: 60ch; } */

    /* --- Responsive Grid Gallery --- */
    .gallery {
      display: grid;
      gap: 16px;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .tile {
      position: relative;
      border-radius: var(--radius);
      overflow: hidden;
      background: var(--card);
      box-shadow: var(--shadow);
      transition: transform .2s ease, box-shadow .2s ease;
      isolation: isolate;
    }
    .tile:focus-within { outline: none; box-shadow: var(--shadow), var(--ring); }
    .tile:hover { transform: translateY(-2px); }

    /* Maintain aspect ratio without JS */
    .media {
      width: 100%;
      aspect-ratio: 1 / 1; /* square cards; change to 4/3 or 3/4 if you like */
      background: #111;
      display: block;
    }
    .media img { width: 100%; height: 100%; object-fit: cover; display: block; }

    /* Caption overlay */
    .caption {
      position: absolute;
      inset: auto 0 0 0;
      padding: 10px 12px;
      background: linear-gradient(to top, rgba(0,0,0,.55), transparent 70%);
      font-size: 0.95rem;
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 8px;
    }
    .caption span { color: #eaeef6; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
    .caption button {
      border: 0; background: rgba(255,255,255,.1); color: var(--fg);
      padding: 6px 10px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px);
    }
    .caption button:hover { background: rgba(255,255,255,.18); }

    /* Optional: make a couple of tiles wider on big screens */
    @media (min-width: 900px) {
      .tile.span-2 { grid-column: span 2; }
      .tile.tall   { grid-row: span 2; }
      .tile.span-2 .media { aspect-ratio: 16 / 9; }
      .tile.tall .media { aspect-ratio: 2 / 3; }
    }

    /* Light, clean link reset */
    a { color: inherit; text-decoration: none; }

    /* --- Simple CSS lightbox (no JS) using <dialog> --- */
    dialog[open] { 
      display: grid; 
      place-items: center; 
      gap: 10px; 
      border: 0; 
      padding: 0; 
      background: rgba(0,0,0,.75);
      width: 100vw; height: 100vh; 
      position: fixed; inset: 0;
      animation: fade .15s ease;
    }
    dialog::backdrop { background: transparent; }
    @keyframes fade { from { opacity: 0 } to { opacity: 1 } }
    .lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
    .close-btn {
      position: fixed; top: 18px; right: 18px; 
      background: rgba(255,255,255,.12); color: #fff; 
      border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer;
    }

    /* --- Optional: Masonry variant (uncomment to use) --- */
    /*
    .gallery { column-count: 3; column-gap: 16px; }
    @media (max-width: 900px) { .gallery { column-count: 2; } }
    @media (max-width: 560px) { .gallery { column-count: 1; } }
    .tile { break-inside: avoid; margin-bottom: 16px; }
    .media { aspect-ratio: auto; }
    */
  /* Ensure dialog is hidden unless opened via JS */
dialog {
  display: none;         /* hides by default */
  border: none;
  padding: 0;
  background: transparent;
}

dialog[open] {
  display: flex;         /* only visible when opened */
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
} */
/* Base nav-tabs container */
.nav-tabs {
  border-bottom: 2px solid #ddd;
  justify-content: center; /* center tabs */
  margin-bottom: 20px;
}

/* Each tab item */
.nav-tabs .nav-item {
  margin: 0 5px;
}

/* Tab links */
.nav-tabs .nav-link {
  color: #555;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  transition: all 0.3s ease;
  background: transparent;
}

/* Hover effect */
.nav-tabs .nav-link:hover {
  color: #000;
  border-bottom: 2px solid #aaa;
}

/* Active tab */
.nav-tabs .nav-link.active {
  color: #002147; /* highlight color */
  font-weight: 600;
  border-bottom: 2px solid #fdc800;
  background: #fdc800;
}
