* { box-sizing: border-box; }

/* BASE */
html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, #101426 0, #050711 55%, #03040a 100%);
  color: #e5e9f5;
}
a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(5, 7, 17, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #111628;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  font-size: 26px;
}
.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.brand-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9aa7c8;
}

/* NAV TABS */
.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.nav::-webkit-scrollbar {
  height: 3px;
}
.nav::-webkit-scrollbar-thumb {
  background: #252a3b;
}
.nav .tab {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #262c3f;
  font-size: 11px;
  color: #a3b0cf;
  white-space: nowrap;
  text-transform: uppercase;
}
.nav .tab.active {
  background: #1a4cff;
  border-color: #1a4cff;
  color: #fff;
}

/* TICKER */
.ticker {
  background: #071024;
  border-bottom: 1px solid #151a28;
  overflow: hidden;
}
/* WEATHER MULTI-CITY STRIP */
.ticker.weather-multi {
  background: #071024;
  border-bottom: 1px solid #151a28;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ticker.weather-multi::-webkit-scrollbar {
  height: 6px;
}
.ticker.weather-multi::-webkit-scrollbar-thumb {
  background: #1a4cff;
  border-radius: 4px;
}

.weather-row {
  display: flex;
  gap: 18px;
  padding: 4px 18px 6px;
  align-items: stretch;
  white-space: nowrap;
}
.weather-ticker {
    width: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding: 6px 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.weather-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: scrollWeather 35s linear infinite;
}

.weather-ticker .city {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@keyframes scrollWeather {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Control size of each widget */
.weather-multi .weatherwidget-io {
  min-width: 220px !important;
  max-width: 260px !important;
  height: 80px !important;
}

.ticker .tick a {
  color: #cdd9ff;
  font-size: 12px;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* MAIN LAYOUT */
.container {
  max-width: 1200px;
  margin: 18px auto 34px;
  padding: 0 18px;
}

/* CATEGORY / TIME BAR */
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
}
.pill-cat {
  background: #1a4cff;
  color: #fff;
  font-weight: 600;
}
.pill-time {
  background: #121829;
  color: #a3b0cf;
}

/* GRID: HERO + LIST */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 3fr 2.2fr;
  gap: 16px;
}

/* First item = hero card */
.card-list > li:first-child {
  grid-row: span 2;
}

/* HERO */
.card-list > li:first-child .card {
  flex-direction: column;
  padding: 14px;
}
.card-list > li:first-child .card-thumb {
  width: 100%;
  height: 220px;
  margin-bottom: 10px;
}
.card-list > li:first-child .card-title {
  font-size: 18px;
  line-height: 1.3;
}
.card-list > li:first-child .card-summary {
  font-size: 13px;
}

/* STANDARD CARDS */
.card {
  background: #080d1b;
  border-radius: 14px;
  border: 1px solid #131827;
  padding: 9px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  transition:
    transform 0.08s ease-out,
    box-shadow 0.08s ease-out,
    border-color 0.08s ease-out,
    background 0.08s ease-out;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #2c4fff;
  background: radial-gradient(circle at top left, #151b38 0, #070b17 55%, #050712 100%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* SMALL THUMBNAILS FOR REGULAR CARDS */
.card-thumb {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #101628;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
}
.card-title:hover {
  text-decoration: underline;
}
.card-meta {
  font-size: 11px;
  color: #8f9abb;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-summary {
  font-size: 12px;
  color: #b1bddb;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid #151a28;
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: #8f9abb;
  background: #060815;
}
.site-footer a {
  color: #d0dbff;
  text-decoration: underline;
}

/* STATIC PAGES (about/contact) */
.static-page {
  max-width: 800px;
}
.static-page h2 {
  margin-top: 0;
  margin-bottom: 10px;
}
.static-page p {
  font-size: 14px;
  line-height: 1.6;
  color: #c5d0f0;
}
.static-page ul {
  padding-left: 18px;
  font-size: 14px;
  color: #c5d0f0;
}

/* LIGHT MODE OVERRIDE */
@media (prefers-color-scheme: light) {
  html, body {
    background: #f4f6fb;
    color: #111827;
  }
  .site-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: #e5e7eb;
  }
  .brand-text p { color: #6b7280; }
  .ticker {
    background: #0b5fff;
    border-bottom-color: #e5e7eb;
  }
  .ticker .tick a { color: #fff; }
  .pill-time {
    background: #e5e7eb;
    color: #4b5563;
  }
  .card {
    background: #ffffff;
    border-color: #e5e7eb;
  }
  .card-summary { color: #4b5563; }
  .site-footer {
    background: #f9fafb;
    border-top-color: #e5e7eb;
    color: #6b7280;
  }
}

/* TABLET & MOBILE LAYOUT */
@media (max-width: 900px) {
  .card-list {
    grid-template-columns: 1fr;
  }
  .card-list > li:first-child {
    grid-row: auto;
  }
  .card-list > li:first-child .card-thumb {
    height: 190px;
  }
}

/* SMALL MOBILE */
@media (max-width: 640px) {
  .site-header {
    padding: 8px 10px;
  }
  .brand-text h1 {
    font-size: 16px;
  }
  .brand-text p {
    font-size: 11px;
  }

  .container {
    padding: 0 12px;
  }

  .card {
    flex-direction: column;
  }
  .card-thumb {
    width: 100%;
    height: 160px;
  }
  .card-title {
    font-size: 14px;
  }
  .card-summary {
    font-size: 13px;
  }
}
