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

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* light mode defaults */
  --bg:          #ffffff;
  --surface:     #f4f4f5;
  --surface2:    #eaeaec;
  --text:        #111111;
  --text-sec:    #555555;
  --border:      #e2e2e2;
  --accent:      #2563eb;
  --accent-alt:  #1d4ed8;
  --red:         #2563eb;
  --card-bg:     #ffffff;
  --nav-bg:      rgba(255,255,255,0.96);
  --footer-bg:   #0d1117;
  --footer-text: #f0f6fc;
  --footer-muted:#8b949e;
  --font-body:   'Source Sans 3', Georgia, serif;
  --font-display:'Inter', system-ui, sans-serif;
  --font-mono:   'Space Mono', 'Courier New', monospace;
}

html.dark {
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface2:    #21262d;
  --text:        #f0f6fc;
  --text-sec:    #c9d1d9;
  --border:      #30363d;
  --card-bg:     #161b22;
  --nav-bg:      rgba(13,17,23,0.97);
  --footer-bg:   #0a0d12;
  --footer-text: #f0f6fc;
  --footer-muted:#8b949e;
}

/* ── BASE ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  transition: background 0.25s, border-color 0.25s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--text);
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sec);
  transition: color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  line-height: 0;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* light mode: show moon (click → dark). dark mode: show sun (click → light) */
.icon-sun  { display: none; }
.icon-moon { display: block; }
html.dark .icon-sun  { display: block; }
html.dark .icon-moon { display: none; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--accent-alt); }

/* ── BREAKING TICKER ────────────────────────────────────────── */
.ticker {
  background: var(--accent);
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 80px;
  animation: ticker 32s linear infinite;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffffff;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  background-color: #0d1117;
  background-size: cover;
  background-position: center top;
  min-height: 500px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1e2530;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(13,17,23,0.97) 0%, rgba(13,17,23,0.90) 52%, rgba(13,17,23,0.55) 100%);
  pointer-events: none;
}

.hero-z {
  position: relative;
  z-index: 1;
  padding: 72px 0;
}

.hero-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 780px;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: #9ca3af;
  margin-bottom: 22px;
}

.hero-meta .dot { color: var(--accent); }

.hero p {
  font-size: 1.1rem;
  color: #d1d5db;
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #111111;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.hero-read-more:hover { background: #e5e7eb; }

/* ── SECTION HEADERS ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}

.section-header a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.2s;
}

.section-header a:hover { opacity: 0.75; }

/* ── CARD GRID ──────────────────────────────────────────────── */
.grid-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.25s;
}

.grid-section:nth-of-type(even) { background: var(--surface); }

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

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.card-img {
  width: 100%;
  height: 210px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(37,99,235,0.12);
}

.card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.card-category {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.6;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.73rem;
  color: var(--text-sec);
}

.card-read {
  color: var(--accent);
  font-weight: 600;
}

/* ── AI HAMMOCK CTA ─────────────────────────────────────────── */
.hammock-cta {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  padding: 32px 36px;
  margin: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: background 0.25s;
}

.hammock-cta-text .eyebrow {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

.hammock-cta-text h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.25;
  color: var(--text);
}

.hammock-cta-text p {
  font-size: 0.92rem;
  color: var(--text-sec);
  max-width: 520px;
  line-height: 1.6;
}

.hammock-cta-btn {
  background: var(--accent);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.hammock-cta-btn:hover { background: var(--accent-alt); }

@media (max-width: 700px) {
  .hammock-cta { flex-direction: column; text-align: center; border-left: none; border-top: 4px solid var(--accent); border-radius: 0 0 6px 6px; }
  .hammock-cta-text p { max-width: 100%; }
}

/* ── NEWSLETTER INLINE ──────────────────────────────────────── */
.newsletter-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.25s;
}

.newsletter-box {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 52px 48px;
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  background: var(--card-bg);
  transition: background 0.25s, border-color 0.25s;
}

.newsletter-box .eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

.newsletter-box h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
  color: var(--text);
}

.newsletter-box p {
  color: var(--text-sec);
  font-size: 0.95rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 11px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.25s;
}

.newsletter-form input::placeholder { color: var(--text-sec); }
.newsletter-form input:focus { outline: none; border-color: var(--accent); }

.newsletter-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--accent-alt); }

@media (max-width: 500px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-box { padding: 32px 20px; }
}

/* ── NEWSLETTER STICKY BAR ──────────────────────────────────── */
.newsletter-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111827;
  border-top: 1px solid #374151;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-bar.visible { transform: translateY(0); }

.newsletter-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.newsletter-bar-text {
  color: #e5e7eb;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-bar-text strong { color: #ffffff; }

.newsletter-bar-form {
  display: flex;
  gap: 8px;
  flex: 1;
}

.newsletter-bar-form input {
  flex: 1;
  max-width: 280px;
  padding: 9px 14px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 4px;
  color: #f9fafb;
  font-size: 0.88rem;
  font-family: var(--font-body);
}

.newsletter-bar-form input::placeholder { color: #6b7280; }
.newsletter-bar-form input:focus { outline: none; border-color: var(--accent); }

.newsletter-bar-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.newsletter-bar-form button:hover { background: var(--accent-alt); }

.newsletter-bar-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.newsletter-bar-close:hover { color: #ffffff; }

@media (max-width: 700px) {
  .newsletter-bar-inner { flex-wrap: wrap; gap: 12px; }
  .newsletter-bar-text { white-space: normal; }
  .newsletter-bar-form { width: 100%; }
  .newsletter-bar-form input { max-width: none; }
}

/* ── ARTICLE PAGE ───────────────────────────────────────────── */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  margin-bottom: 36px;
}

@media (max-width: 600px) { .article-hero-img { height: 220px; } }

.article-category {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 0.83rem;
  color: var(--text-sec);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

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

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin: 40px 0 16px;
  letter-spacing: -0.02em;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 30px 0 12px;
}

.article-body p { margin-bottom: 22px; }
.article-body strong { font-weight: 700; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 22px 26px; }
.article-body li { margin-bottom: 8px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--footer-text);
}

.footer-logo span { color: var(--accent); }

.footer-brand p {
  font-size: 0.875rem;
  color: var(--footer-muted);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  color: var(--footer-text);
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--footer-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--footer-text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid #1e2530;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--footer-muted);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 400px) {
  .nav-cta { display: none; }
}
