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

:root {
  --navy:       #0d1f3c;
  --navy-mid:   #1a3560;
  --teal:       #00b4d8;
  --teal-dark:  #0096b7;
  --teal-light: #e0f7fb;
  --gold:       #f0a500;
  --orange:     #e07b00;
  --bg:         #f4f7fb;
  --bg-white:   #ffffff;
  --text:       #1e2d3d;
  --text-light: #4a5568;
  --border:     #dde4ef;
  --code-bg:    #0d1f3c;
  --code-text:  #a8d8ea;
  --green:      #00a86b;
  --red:        #d94f3d;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

/* ─── Site Header (standart AS Bilim blog) ─── */
#main-header {
  background-color: #0a0f1d;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: 60px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
#main-header .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
#main-header .navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
#main-header .logo {
  display: flex;
  align-items: center;
}
#main-header .logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}
#main-header .logo-img {
  height: 40px;
  margin-right: 10px;
}
#main-header .logo span {
  color: #0056b3;
}
.h-24 {
  height: 60px;
}
@media (max-width: 768px) {
  #main-header { height: 50px; }
  #main-header .logo a { font-size: 1.2rem; }
  #main-header .logo-img { height: 32px; }
  .h-24 { height: 50px; }
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #0a3d62 100%);
  color: #fff;
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,180,216,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,180,216,0.18);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0,180,216,0.3);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 20px;
}
.hero h1 span { color: var(--teal); }
.hero-lead {
  font-size: 17px;
  color: rgba(255,255,255,0.78);
  max-width: 680px;
  margin: 0 auto 32px;
}
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  flex-wrap: wrap;
}
.hero-meta span { display: flex; align-items: center; gap: 5px; }
.hero-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.tag {
  background: rgba(0,180,216,0.15);
  color: var(--teal);
  border: 1px solid rgba(0,180,216,0.25);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ─── Layout ─── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ─── Article ─── */
article { min-width: 0; }

/* Intro box */
.intro-box {
  background: var(--bg-white);
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 24px 28px;
  margin-bottom: 40px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Section headings */
.section-block {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 36px 40px;
  margin-bottom: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--teal);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 12px;
}
h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.3;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-mid);
  margin: 24px 0 10px;
}

p { margin-bottom: 14px; color: var(--text); }
p:last-child { margin-bottom: 0; }

/* ─── Lifecycle table / diagram ─── */
.lifecycle {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 24px 0;
}
.lifecycle-step {
  text-align: center;
}
.lc-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 8px;
}
.lc-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
}
.lc-sub { font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}
thead th:first-child { border-radius: 8px 0 0 0; }
thead th:last-child  { border-radius: 0 8px 0 0; }
tbody tr:nth-child(even) { background: #f4f7fb; }
tbody tr:hover { background: var(--teal-light); transition: background 0.15s; }
tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
tbody td:first-child { font-weight: 600; color: var(--navy); }

/* ─── Code blocks ─── */
pre {
  background: var(--code-bg);
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}
pre .code-label {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}
code {
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: 13.5px;
  color: var(--code-text);
  line-height: 1.7;
  display: block;
}
p code, li code {
  display: inline;
  background: #e8f0f8;
  color: var(--navy);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13px;
}

/* ─── Callout boxes ─── */
.callout {
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-title { font-weight: 800; font-size: 14px; margin-bottom: 5px; }
.callout-body { font-size: 14px; line-height: 1.65; }
.callout.tip    { background: #e0f7fb; border-left: 4px solid var(--teal); }
.callout.tip .callout-title { color: var(--teal-dark); }
.callout.warn   { background: #fff3e0; border-left: 4px solid var(--orange); }
.callout.warn .callout-title { color: var(--orange); }
.callout.google { background: #e8f5e9; border-left: 4px solid var(--green); }
.callout.google .callout-title { color: var(--green); }
.callout.note   { background: #f0f4ff; border-left: 4px solid var(--navy-mid); }
.callout.note .callout-title { color: var(--navy-mid); }

/* ─── Before/After comparison ─── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.compare-box {
  border-radius: 10px;
  padding: 20px;
}
.compare-box.before {
  background: #fff1f0;
  border: 1.5px solid #ffcdd2;
}
.compare-box.after {
  background: #e8f5e9;
  border: 1.5px solid #c8e6c9;
}
.compare-head {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.compare-box.before .compare-head { color: var(--red); }
.compare-box.after  .compare-head { color: var(--green); }
.compare-box ul { list-style: none; }
.compare-box li {
  font-size: 14px;
  padding: 5px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.compare-box li:last-child { border-bottom: none; }
.compare-box.before li::before { content: '✕'; color: var(--red); font-weight: 700; flex-shrink: 0; }
.compare-box.after  li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ─── URL table (route map) ─── */
.route-table tbody td:first-child { font-family: monospace; font-size: 13px; color: var(--teal-dark); font-weight: 700; }

/* ─── CWV cards ─── */
.cwv-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.cwv-card {
  border-radius: 12px;
  padding: 22px;
  border: 2px solid;
  text-align: center;
}
.cwv-card.lcp { border-color: var(--teal); background: var(--teal-light); }
.cwv-card.inp { border-color: var(--teal); background: var(--teal-light); }
.cwv-card.cls { border-color: var(--gold); background: #fff8e1; }
.cwv-acronym { font-size: 32px; font-weight: 900; margin-bottom: 2px; }
.cwv-card.lcp .cwv-acronym,
.cwv-card.inp .cwv-acronym { color: var(--teal-dark); }
.cwv-card.cls .cwv-acronym { color: var(--gold); }
.cwv-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-light); margin-bottom: 10px; }
.cwv-target { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.cwv-desc { font-size: 12px; color: var(--text-light); }

/* ─── 90 day timeline ─── */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.tl-block {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 18px;
  border-top: 4px solid;
}
.tl-block:nth-child(1) { border-color: var(--teal); }
.tl-block:nth-child(2) { border-color: var(--navy-mid); }
.tl-block:nth-child(3) { border-color: var(--gold); }
.tl-block:nth-child(4) { border-color: var(--green); }
.tl-period {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.tl-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.tl-items { list-style: none; }
.tl-items li {
  font-size: 13px;
  color: var(--text-light);
  padding: 3px 0;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.tl-items li::before { content: '›'; color: var(--teal); font-weight: 700; }

/* ─── Priority pyramid ─── */
.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 24px auto;
  max-width: 480px;
}
.pyramid-level {
  border-radius: 8px;
  color: #fff;
  text-align: center;
  padding: 14px 24px;
  font-weight: 700;
}
.pyramid-level:nth-child(1) { width: 44%; background: var(--teal); font-size: 13px; }
.pyramid-level:nth-child(2) { width: 62%; background: var(--teal-dark); font-size: 13px; }
.pyramid-level:nth-child(3) { width: 80%; background: var(--navy-mid); font-size: 14px; }
.pyramid-level:nth-child(4) { width: 100%; background: var(--navy); font-size: 14px; }
.pyramid-level span { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; margin-top: 2px; }

/* ─── CTA cards ─── */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 32px;
  text-align: center;
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 10px; }
.cta-section p { color: rgba(255,255,255,0.75); font-size: 15px; margin-bottom: 28px; }
.cta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cta-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 22px 16px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s;
  display: block;
}
.cta-card:hover { background: rgba(255,255,255,0.16); }
.cta-card-icon { font-size: 28px; margin-bottom: 10px; }
.cta-card-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--teal); margin-bottom: 6px; }
.cta-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.cta-card-url { font-size: 11px; color: rgba(255,255,255,0.45); font-family: monospace; }

/* ─── Sources ─── */
.sources-block {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 28px 32px;
  margin-top: 32px;
  border-top: 4px solid var(--teal);
}
.sources-block h2 { font-size: 18px; margin-bottom: 16px; }
.sources-list { list-style: none; }
.sources-list li {
  font-size: 13px;
  color: var(--text-light);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.sources-list li:last-child { border-bottom: none; }
.src-num { color: var(--teal); font-weight: 800; flex-shrink: 0; }

/* ─── Sidebar ─── */
aside { position: sticky; top: 80px; }
.sidebar-block {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.toc-list { list-style: none; }
.toc-list a {
  display: flex;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
  gap: 6px;
  align-items: baseline;
}
.toc-list a:hover { color: var(--teal); }
.toc-list .toc-num { font-size: 11px; font-weight: 700; color: var(--teal); flex-shrink: 0; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .page-wrap { grid-template-columns: 1fr; }
  aside { position: static; }
}
@media (max-width: 720px) {
  .section-block { padding: 24px 20px; }
  .lifecycle { grid-template-columns: repeat(3, 1fr); }
  .cwv-cards { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .cta-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .timeline { grid-template-columns: 1fr; }
  .lifecycle { grid-template-columns: repeat(2, 1fr); }
}
