@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --bg-primary: #f8f9fc;
  --bg-secondary: #f1f3f8;
  --bg-card: rgba(255,255,255,0.75);
  --bg-card-hover: rgba(255,255,255,0.9);
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.14);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --accent: #4f46e5;
  --accent-soft: rgba(79,70,229,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-glow: 0 0 30px -10px rgba(79,70,229,0.10);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.18);
}
/* ========================================
   BACKGROUND
   ======================================== */
.grid-bg {
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79,70,229,0.04), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(6,182,212,0.03), transparent),
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}
/* Noise overlay for premium feel */
.grid-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}
/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.max-container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.relative { position: relative; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }

.gap-1 { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-2\.5 { gap: 10px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-1\.5 { margin-top: 6px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-2\.5 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.ml-1 { margin-left: 4px; }
.ml-auto { margin-left: auto; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.pt-1 { padding-top: 4px; }
.pt-4 { padding-top: 16px; }
.pb-0 { padding-bottom: 0; }
.pb-2 { padding-bottom: 8px; }

.space-y-1 > * + * { margin-top: 4px; }
.space-y-1\.5 > * + * { margin-top: 6px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-6 > * + * { margin-top: 24px; }

.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
.text-white { color: var(--text-primary); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.7; }
.tracking-tight { letter-spacing: -0.02em; }
.whitespace-nowrap { white-space: nowrap; }
.uppercase { text-transform: uppercase; }

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: rgba(248,249,252,0.82);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  transition: background var(--transition-slow), border-color var(--transition-slow);
  border-bottom-color: rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79,70,229,0.2);
  position: relative;
}
.logo-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(59,130,246,0.3));
  z-index: -1;
  filter: blur(8px);
  display: none;
}
.logo-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-subtitle {
  font-size: 0.63rem;
  color: var(--text-dim);
  margin-top: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-tab {
  position: relative;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-block;
}
.nav-tab:hover {
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04);
}
.nav-tab.active {
  color: #4f46e5;
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
  border-radius: 2px 2px 0 0;
  animation: tabSlide 0.3s ease;
}
@keyframes tabSlide {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kbd-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.rfc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16,185,129,0.08);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.15);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rfc-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,0.4);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ========================================
   STEP SIDEBAR
   ======================================== */
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  position: relative;
}
.step-item:hover {
  background: rgba(79,70,229,0.04);
  transform: translateX(2px);
}
.step-item.active {
  background: rgba(79,70,229,0.06);
  border-color: rgba(79,70,229,0.18);
  box-shadow: var(--shadow-glow);
}
.step-item .step-num {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition-base);
}
.step-item.completed .step-num {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
}

.timeline-line {
  width: 2px;
  height: 14px;
  margin-left: 27px;
  background: linear-gradient(to bottom, rgba(99,102,241,0.15), rgba(99,102,241,0.03));
  border-radius: 1px;
}

/* ========================================
   PANELS / CARDS
   ======================================== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-slow);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}
.panel:hover {
  border-color: var(--border-hover);
}
/* ========================================
   CODE BLOCKS
   ======================================== */
.code-block {
  background: #f0f2f8;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.85;
  overflow-x: auto;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
  border-color: rgba(0,0,0,0.06);
  color: #1e293b;
}
.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #6366f1, #3b82f6, transparent);
  border-radius: 2px 0 0 2px;
  opacity: 0.5;
}
.code-block .line-num {
  user-select: none;
  color: rgba(0,0,0,0.15);
  text-align: right;
  min-width: 32px;
  display: inline-block;
  margin-right: 16px;
}
.code-block .kw {
  color: #4338ca;
}
.code-block .fn {
  color: #2563eb;
}
.code-block .str {
  color: #16a34a;
}
.code-block .cmt {
  color: #94a3b8;
  font-style: italic;
}
.code-block .num {
  color: #ea580c;
}
.code-block .const {
  color: #db2777;
}
.code-block .type {
  color: #0891b2;
}
.code-block .op {
  color: #475569;
}
/* ========================================
   TABS
   ======================================== */
.tab-group {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.03);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.04);
  border-color: rgba(0,0,0,0.06);
}
.tab-btn {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: 'Inter', sans-serif;
}
.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04);
}
.tab-btn.active {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.2);
}
/* ========================================
   STATE BADGE / PILL
   ======================================== */
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform var(--transition-fast);
}
.state-pill:hover {
  transform: scale(1.02);
}

/* ========================================
   DIAGRAM
   ======================================== */
.diagram-box {
  background: rgba(79,70,229,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), background var(--transition-slow);
  border-color: rgba(0,0,0,0.06);
}
.diagram-box:hover {
  border-color: rgba(99,102,241,0.1);
}
.diagram-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}
/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}
@keyframes flow-right {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes draw-line {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px -4px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 30px -4px rgba(99,102,241,0.35); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }
.animate-flow { animation: flow-right 2.5s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.fade-in { animation: fadeIn 0.3s ease; }
.fade-in-up { animation: fadeInUp 0.5s ease; }

/* ========================================
   OVERVIEW FLOW
   ======================================== */
.overview-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--transition-base);
  position: relative;
  flex: 0 0 110px;
  padding: 4px 4px 0;
}
.overview-step:hover { transform: translateY(-2px); }
.overview-step:hover .icon-circle {
  border-color: currentColor;
}
.overview-step .icon-circle {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid;
  transition: all var(--transition-base);
  position: relative;
}
/* Active step: subtle ring + slight scale, uses its own color */
.overview-step.active .icon-circle {
  transform: scale(1.12);
  border-width: 2px;
  background: color-mix(in srgb, currentColor 14%, transparent) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, currentColor 14%, transparent),
    0 6px 16px -6px color-mix(in srgb, currentColor 45%, transparent);
}
.overview-step.active .step-label {
  font-weight: 700;
}
.overview-step .step-label {
  display: block;
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  transition: color var(--transition-base);
}
.overview-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--from), var(--to));
  position: relative;
  min-width: 16px;
  opacity: 0.6;
  margin-top: 27px;
}
.overview-connector::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--to);
  border-top: 2px solid var(--to);
  transform: rotate(45deg);
  opacity: 0.6;
}

/* ========================================
   INFO CARDS
   ======================================== */
.info-card {
  border: 1px solid rgba(255,255,255,0.045);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255,255,255,0.7);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border-color: rgba(0,0,0,0.06);
}
.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.info-card:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.10);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.info-card:hover::before {
  opacity: 1;
}

/* ========================================
   PROTOCOL STACK
   ======================================== */
.stack-layer {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-base);
  cursor: default;
  position: relative;
}
.stack-layer:hover {
  transform: scale(1.015);
  filter: brightness(1.1);
}

/* ========================================
   PROTOCOL STACK (yeni)
   ======================================== */
.proto-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proto-row {
  display: flex;
  gap: 8px;
}
.proto-layer {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: center;
  border: 1.5px solid;
  transition: all var(--transition-base);
  cursor: default;
}
.proto-layer:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.proto-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.proto-title-sm { font-size: 0.78rem; }
.proto-sub {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.78;
}
.proto-sub-sm { font-size: 0.62rem; margin-top: 3px; }

/* Color variants — DARK */
.proto-application {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.45);
  color: #6d28d9;
}
.proto-srtp {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.45);
  color: #1d4ed8;
}
.proto-sctp {
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.45);
  color: #0e7490;
}
.proto-dtls {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.45);
  color: #4338ca;
}
.proto-ice {
  background: rgba(249,115,22,0.13);
  border-color: rgba(249,115,22,0.5);
  color: #c2410c;
}
.proto-udp {
  background: rgba(100,116,139,0.12);
  border-color: rgba(100,116,139,0.45);
  color: #334155;
}
.proto-ip {
  background: rgba(30,41,59,0.08);
  border-color: rgba(51,65,85,0.35);
  color: #475569;
}

/* Color variants — LIGHT (koyu varyantlar, beyaz arka planda kontrastlı) */
/* ========================================
   SIGNALING vs MEDIA PATH CARDS
   ======================================== */
.path-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1.5px solid;
  transition: all var(--transition-fast);
}
.path-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.path-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.path-card-title {
  font-size: 0.86rem;
  font-weight: 700;
}
.path-card-tag {
  margin-left: auto;
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}
.path-card-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 12px;
}
.path-card-desc em {
  color: #0f172a;
  font-style: italic;
  font-weight: 600;
}
.path-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.path-tag {
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  color: #475569;
}
/* Signaling = sarı/amber */
.path-signaling {
  background: rgba(234,179,8,0.08);
  border-color: rgba(180,83,9,0.35);
}
.path-signaling .path-dot { background: #facc15; box-shadow: 0 0 8px rgba(250,204,21,0.6); }
.path-signaling .path-card-title {
  color: #b45309;
}
.path-signaling .path-card-tag {
  color: #b45309;
}
/* Media = yeşil */
.path-media {
  background: rgba(34,197,94,0.07);
  border-color: rgba(21,128,61,0.35);
}
.path-media .path-dot { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.6); }
.path-media .path-card-title {
  color: #15803d;
}
.path-media .path-card-tag {
  color: #15803d;
}
/* ========================================
   RFC LIST (linkler)
   ======================================== */
.rfc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rfc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.rfc-row:hover {
  background: rgba(79,70,229,0.06);
  border-color: rgba(79,70,229,0.22);
  transform: translateX(2px);
}
.rfc-row-num {
  width: 80px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: #4338ca;
  flex-shrink: 0;
}
.rfc-row-desc {
  font-size: 0.78rem;
  color: #475569;
  flex: 1;
  line-height: 1.4;
}
.rfc-row-ext {
  color: var(--text-dim);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.rfc-row:hover .rfc-row-ext {
  opacity: 1;
  color: #4338ca;
}
/* ========================================
   KEYBOARD SHORTCUT HINT
   ======================================== */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.10);
}
/* ========================================
   VIEWS
   ======================================== */
.view-section { display: none; }
.view-section.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

/* ========================================
   STATE MACHINE
   ======================================== */
.sm-node {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sm-node:hover {
  transform: scale(1.06);
  filter: brightness(1.15);
}

/* Color variants for state nodes */
.sm-node.sm-slate {
  background: rgba(148,163,184,0.10);
  border-color: rgba(71,85,105,0.45);
  color: #475569;
}
.sm-node.sm-slate-soft {
  background: rgba(148,163,184,0.05);
  border-color: rgba(100,116,139,0.35);
  color: #64748b;
}
.sm-node.sm-indigo {
  background: rgba(99,102,241,0.10);
  border-color: rgba(67,56,202,0.5);
  color: #4338ca;
}
.sm-node.sm-cyan {
  background: rgba(6,182,212,0.10);
  border-color: rgba(8,145,178,0.5);
  color: #0891b2;
}
.sm-node.sm-yellow {
  background: rgba(234,179,8,0.10);
  border-color: rgba(180,83,9,0.5);
  color: #b45309;
}
.sm-node.sm-orange {
  background: rgba(249,115,22,0.10);
  border-color: rgba(194,65,12,0.5);
  color: #c2410c;
}
.sm-node.sm-green {
  background: rgba(34,197,94,0.10);
  border-color: rgba(21,128,61,0.5);
  color: #15803d;
}
.sm-node.sm-green-soft {
  background: rgba(34,197,94,0.05);
  border-color: rgba(22,163,74,0.4);
  color: #16a34a;
  border-style: dashed;
}
.sm-node.sm-red {
  background: rgba(239,68,68,0.10);
  border-color: rgba(185,28,28,0.5);
  color: #b91c1c;
}

/* ========================================
   STATE MACHINE FLOWS (vertical/branching)
   ======================================== */
.sm-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 8px 4px 4px;
}
.sm-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: 28px;
}
.sm-row-center { justify-content: center; }
.sm-row-split { justify-content: space-around; }
.sm-row-tight { min-height: 22px; gap: 16px; }
.sm-row-split.sm-row-tight {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: center;
  padding: 0 8%;
}
.sm-row-split.sm-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: center;
  padding: 0 8%;
}

.sm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sm-edge-label {
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  color: #475569;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* Vertical arrow (down) */
.sm-arrow-down {
  width: 2px;
  height: 22px;
  background: currentColor;
  color: rgba(67,56,202,0.55);
  position: relative;
  flex-shrink: 0;
}
.sm-arrow-down::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid currentColor;
}
.sm-arrow-down.sm-arrow-success {
  color: rgba(21,128,61,0.65);
}
.sm-arrow-down.sm-arrow-warn {
  color: rgba(194,65,12,0.65);
}
.sm-arrow-down.sm-arrow-fail {
  color: rgba(185,28,28,0.65);
}
/* Horizontal arrow (right) */
.sm-arrow-right {
  width: 28px;
  height: 2px;
  background: currentColor;
  color: rgba(67,56,202,0.55);
  position: relative;
  flex-shrink: 0;
}
.sm-arrow-right::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
}
.sm-arrow-right.sm-arrow-success {
  color: rgba(21,128,61,0.65);
}
.sm-arrow-right.sm-arrow-warn {
  color: rgba(194,65,12,0.65);
}
.sm-arrow-right.sm-arrow-fail {
  color: rgba(185,28,28,0.65);
}
/* Linear horizontal flow (Connection State) */
.sm-linear {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 16px;
}

.sm-footnote {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.6;
  margin-top: 18px;
  padding: 10px 12px;
  background: rgba(99,102,241,0.04);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.sm-footnote code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92em;
  background: rgba(79,70,229,0.08);
  color: #4338ca;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(99,102,241,0.18);
  border-color: rgba(79,70,229,0.18);
}
/* Connection State info box */
.sm-info-box {
  margin-top: 18px;
  padding: 14px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  line-height: 1.65;
}
.sm-info-box strong { color: var(--text-primary); font-weight: 700; }
.sm-info-box em {
  font-style: italic;
  color: #4338ca;
}
.sm-info-box ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.sm-info-box li { padding-left: 14px; position: relative; }
.sm-info-box li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}
.sm-info-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid;
}
.sm-code-indigo {
  background: rgba(99,102,241,0.10);
  color: #4338ca;
  border-color: rgba(99,102,241,0.20);
}
.sm-code-green {
  background: rgba(34,197,94,0.10);
  color: #15803d;
  border-color: rgba(34,197,94,0.20);
}
.sm-code-orange {
  background: rgba(249,115,22,0.10);
  color: #c2410c;
  border-color: rgba(249,115,22,0.20);
}
.sm-code-red {
  background: rgba(239,68,68,0.10);
  color: #b91c1c;
  border-color: rgba(239,68,68,0.20);
}
/* ICE Gathering circles flow */
.sm-gather-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}
.sm-gather-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sm-gather-circle {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  position: relative;
  transition: all var(--transition-base);
}
.sm-gather-circle:hover { transform: scale(1.05); }
.sm-gather-slate {
  background: rgba(148,163,184,0.10);
  border-color: rgba(71,85,105,0.45);
  color: #475569;
}
.sm-gather-orange {
  background: rgba(249,115,22,0.10);
  border-color: rgba(194,65,12,0.55);
  color: #c2410c;
}
.sm-gather-green {
  background: rgba(34,197,94,0.12);
  border-color: rgba(21,128,61,0.55);
  color: #15803d;
}
.sm-gather-pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c2410c;
  box-shadow: 0 0 12px rgba(194,65,12,0.5);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.sm-gather-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.sm-gather-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sm-gather-edge {
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  white-space: nowrap;
}
/* ========================================
   NAV BUTTONS
   ======================================== */
.nav-arrow {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-color: rgba(0,0,0,0.10);
}
.nav-arrow:hover {
  color: var(--text-primary);
  border-color: rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.05);
  transform: scale(1.05);
}
/* ========================================
   COPY BUTTON
   ======================================== */
.copy-btn {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
  font-family: 'Inter', sans-serif;
}
.copy-btn:hover {
  color: var(--text-secondary);
}

/* ========================================
   SECTION LABELS
   ======================================== */
.section-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.section-divider {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========================================
   STEP COUNTER
   ======================================== */
.step-counter {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ========================================
   INFO ICON BOX
   ======================================== */
#detailDesc {
  font-size: 0.92rem;
  line-height: 1.78;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  color: var(--text-secondary);
}
#detailDesc strong {
  color: #0f172a;
  font-weight: 650;
}
#detailDesc em {
  color: #4338ca;
  font-style: italic;
  font-weight: 500;
}
#detailDesc code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: rgba(79,70,229,0.08);
  color: #4338ca;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99,102,241,0.18);
  white-space: nowrap;
  border-color: rgba(79,70,229,0.20);
}
.info-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================================
   DETAIL LABEL
   ======================================== */
.detail-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 24px 0;
  margin-top: 48px;
  border-top-color: rgba(0,0,0,0.06);
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: #4f46e5;
}

/* ========================================
   ICON SPRITE HELPERS
   ======================================== */
.icon {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-11 { width: 11px; height: 11px; }
.icon-13 { width: 13px; height: 13px; }
.icon-14 { width: 14px; height: 14px; }
.icon-15 { width: 15px; height: 15px; }
.icon-16 { width: 16px; height: 16px; }

/* ========================================
   COLOR UTILITIES (for JS dynamic use)
   ======================================== */
/* Blue */
.bg-blue-500\/10 { background: rgba(59,130,246,0.1); }
.bg-blue-500\/8 { background: rgba(59,130,246,0.08); }
.bg-blue-500\/5 { background: rgba(59,130,246,0.05); }
.border-blue-500\/25 { border-color: rgba(59,130,246,0.25); }
.border-blue-500\/20 { border-color: rgba(59,130,246,0.2); }
.border-blue-500\/15 { border-color: rgba(59,130,246,0.15); }
.border-blue-500\/30 { border-color: rgba(59,130,246,0.3); }
.text-blue-400 {
  color: #2563eb;
}
.text-blue-300 {
  color: #3b82f6;
}
.text-blue-500\/50 {
  color: rgba(37,99,235,0.85);
}
.bg-blue-400 { background: #60a5fa; }

/* Cyan (also used by legacy 'purple' key) */
.bg-cyan-500\/15 { background: rgba(6,182,212,0.15); }
.border-cyan-500\/30 { border-color: rgba(6,182,212,0.3); }

/* Cyan */
.bg-cyan-500\/10 { background: rgba(6,182,212,0.1); }
.bg-cyan-500\/5 { background: rgba(6,182,212,0.05); }
.border-cyan-500\/25 { border-color: rgba(6,182,212,0.25); }
.border-cyan-500\/20 { border-color: rgba(6,182,212,0.2); }
.border-cyan-500\/10 { border-color: rgba(6,182,212,0.1); }
.text-cyan-400 {
  color: #0891b2;
}
.text-cyan-300 {
  color: #0e7490;
}
.text-cyan-500 { color: #06b6d4; }
.text-cyan-600 { color: #0891b2; }
.bg-cyan-400 { background: #22d3ee; }

/* Yellow */
.bg-yellow-500\/10 { background: rgba(234,179,8,0.1); }
.bg-yellow-500\/8 { background: rgba(234,179,8,0.08); }
.bg-yellow-500\/5 { background: rgba(234,179,8,0.05); }
.border-yellow-500\/25 { border-color: rgba(234,179,8,0.25); }
.border-yellow-500\/20 { border-color: rgba(234,179,8,0.2); }
.border-yellow-500\/15 { border-color: rgba(234,179,8,0.15); }
.text-yellow-400 {
  color: #b45309;
}
.text-yellow-300 {
  color: #a16207;
}
.text-yellow-500 { color: #eab308; }
.text-yellow-500\/50 {
  color: rgba(180,83,9,0.85);
}
.bg-yellow-400 { background: #facc15; }

/* Orange */
.bg-orange-500\/10 { background: rgba(249,115,22,0.1); }
.bg-orange-500\/8 { background: rgba(249,115,22,0.08); }
.bg-orange-500\/5 { background: rgba(249,115,22,0.05); }
.border-orange-500\/25 { border-color: rgba(249,115,22,0.25); }
.border-orange-500\/20 { border-color: rgba(249,115,22,0.2); }
.border-orange-500\/15 { border-color: rgba(249,115,22,0.15); }
.border-orange-500\/30 { border-color: rgba(249,115,22,0.3); }
.text-orange-400 {
  color: #c2410c;
}
.text-orange-300 {
  color: #9a3412;
}
.bg-orange-400 { background: #fb923c; }

/* Indigo */
.bg-indigo-500\/10 { background: rgba(99,102,241,0.1); }
.bg-indigo-500\/8 { background: rgba(99,102,241,0.08); }
.bg-indigo-500\/5 { background: rgba(99,102,241,0.05); }
.bg-indigo-500\/12 { background: rgba(99,102,241,0.12); }
.border-indigo-500\/25 { border-color: rgba(99,102,241,0.25); }
.border-indigo-500\/20 { border-color: rgba(99,102,241,0.2); }
.border-indigo-500\/15 { border-color: rgba(99,102,241,0.15); }
.text-indigo-400 {
  color: #4338ca;
}
.text-indigo-300 {
  color: #4f46e5;
}
.text-indigo-500\/50 {
  color: rgba(67,56,202,0.85);
}
.bg-indigo-400 { background: #818cf8; }

/* ========================================
   LIGHT MODE: ACCENT TEXT OVERRIDES
   400 tonları beyaz arka planda fazla soluk kalıyor — koyu varyantlara çek
   ======================================== */
/* Green */
.bg-green-500\/10 { background: rgba(34,197,94,0.1); }
.bg-green-500\/8 { background: rgba(34,197,94,0.08); }
.bg-green-500\/5 { background: rgba(34,197,94,0.05); }
.border-green-500\/25 { border-color: rgba(34,197,94,0.25); }
.border-green-500\/20 { border-color: rgba(34,197,94,0.2); }
.border-green-500\/15 { border-color: rgba(34,197,94,0.15); }
.border-green-500\/30 { border-color: rgba(34,197,94,0.3); }
.text-green-400 {
  color: #15803d;
}
.text-green-300 {
  color: #166534;
}
.text-green-500\/50 {
  color: rgba(21,128,61,0.85);
}
.text-green-600 { color: #16a34a; }
.bg-green-400 { background: #4ade80; }

/* Red */
.bg-red-500\/10 { background: rgba(239,68,68,0.1); }
.bg-red-500\/8 { background: rgba(239,68,68,0.08); }
.border-red-500\/25 { border-color: rgba(239,68,68,0.25); }
.border-red-500\/20 { border-color: rgba(239,68,68,0.2); }
.text-red-400 {
  color: #b91c1c;
}
.text-red-500 { color: #ef4444; }
.bg-red-400 { background: #f87171; }

/* Emerald */
.bg-emerald-500\/10 { background: rgba(16,185,129,0.1); }
.border-emerald-500\/20 { border-color: rgba(16,185,129,0.2); }
.text-emerald-400 { color: #34d399; }
.bg-emerald-400 { background: #34d399; }

/* Slate */
.bg-slate-500\/10 { background: rgba(100,116,139,0.1); }
.bg-slate-500\/8 { background: rgba(100,116,139,0.08); }
.bg-slate-500\/5 { background: rgba(100,116,139,0.05); }
.bg-slate-800\/50 {
  background: rgba(241,245,249,0.8);
}
.border-slate-500\/25 { border-color: rgba(100,116,139,0.25); }
.border-slate-500\/20 { border-color: rgba(100,116,139,0.2); }
.border-slate-500\/15 { border-color: rgba(100,116,139,0.15); }
.border-slate-500\/30 { border-color: rgba(100,116,139,0.3); }
.border-slate-700\/30 { border-color: rgba(51,65,85,0.3); }

.text-slate-400 {
  color: #64748b;
}
.text-slate-500 {
  color: #475569;
}
.text-slate-600 {
  color: #334155;
}
.text-slate-700 {
  color: #1e293b;
}
.bg-slate-400 { background: #94a3b8; }

/* Misc color helpers */
.bg-black\/20 {
  background: rgba(0,0,0,0.04);
}
.bg-black\/30 {
  background: rgba(0,0,0,0.06);
}
.bg-white\/02 {
  background: rgba(255,255,255,0.8);
}
.bg-white\/03 {
  background: rgba(255,255,255,0.9);
}
.bg-white\/015 {
  background: rgba(255,255,255,0.6);
}
.border-white\/03 {
  border-color: rgba(0,0,0,0.06);
}
.border-white\/04 {
  border-color: rgba(0,0,0,0.08);
}
.border-white\/06 {
  border-color: rgba(0,0,0,0.12);
}
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }

/* Rounded */
.rounded { border-radius: 4px; }
.rounded-lg { border-radius: var(--radius-sm); }
.rounded-xl { border-radius: var(--radius-md); }
.rounded-2xl { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* Width/Height */
.w-2 { width: 8px; }
.w-2\.5 { width: 10px; }
.w-3 { width: 12px; }
.w-8 { width: 32px; }
.w-14 { width: 56px; }
.w-16 { width: 64px; }
.w-20 { width: 80px; }
.w-24 { width: 96px; }
.h-0\.5 { height: 2px; }
.h-2 { height: 8px; }
.h-2\.5 { height: 10px; }
.h-3 { height: 12px; }
.h-8 { height: 32px; }
.h-14 { height: 56px; }
.h-16 { height: 64px; }
.h-20 { height: 80px; }
.h-px { height: 1px; }

/* Border */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }

/* Absolute positioning */
.absolute { position: absolute; }
.-top-1 { top: -4px; }
.-right-1 { right: -4px; }

/* ========================================
   GRADIENT HELPERS
   ======================================== */
.bg-gradient-r-blue-green { background: linear-gradient(to right, #3b82f6, #22c55e); }
.bg-gradient-r-blue-cyan-green { background: linear-gradient(to right, #3b82f6, #22d3ee, #22c55e); }

/* Special font-size helpers */
.text-\[0\.5rem\] { font-size: 0.5rem; }
.text-\[0\.55rem\] { font-size: 0.55rem; }
.text-\[0\.6rem\] { font-size: 0.6rem; }
.text-\[0\.65rem\] { font-size: 0.65rem; }
.text-\[0\.68rem\] { font-size: 0.68rem; }
.text-\[0\.7rem\] { font-size: 0.7rem; }
.text-\[0\.8rem\] { font-size: 0.8rem; }

.tracking-wider { letter-spacing: 0.05em; }
.tracking-\[0\.15em\] { letter-spacing: 0.15em; }

/* Strong */
strong { font-weight: 600; }

/* Inline code */
code { font-family: 'JetBrains Mono', monospace; }

/* ========================================
   RFC 8825 READER VIEW
   ======================================== */
.rfc-doc-header {
  text-align: center;
  padding: 32px 24px 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at top, rgba(99,102,241,0.10), transparent 60%),
    linear-gradient(180deg, rgba(99,102,241,0.04), transparent);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.rfc-doc-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.rfc-doc-header > * { position: relative; }

.rfc-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.rfc-doc-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99,102,241,0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}

.rfc-doc-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.rfc-doc-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 720px;
  margin: 0 auto 22px;
  line-height: 1.5;
}

.rfc-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.rfc-doc-meta strong { color: var(--text-secondary); font-weight: 600; }
.rfc-meta-sep { opacity: 0.5; }

.rfc-doc-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.rfc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.rfc-link-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(99,102,241,0.35);
  color: #a5b4fc;
  transform: translateY(-1px);
}

/* Two-column layout */
.rfc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.rfc-toc-wrap { position: sticky; top: 80px; }
.rfc-toc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  backdrop-filter: blur(10px);
}
.rfc-toc-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 6px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.rfc-toc { display: flex; flex-direction: column; gap: 1px; }
.rfc-toc-item {
  display: block;
  padding: 7px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}
.rfc-toc-item:hover {
  background: rgba(255,255,255,0.025);
  color: var(--text-secondary);
}
.rfc-toc-item.active {
  background: var(--accent-soft);
  color: #a5b4fc;
  border-left-color: var(--accent);
}
.rfc-toc-l3 {
  padding-left: 22px;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Content article */
.rfc-content-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  min-width: 0;
  backdrop-filter: blur(10px);
}
.rfc-content {
  max-width: 760px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.rfc-content > *:first-child { margin-top: 0; }
.rfc-content p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.rfc-content li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.rfc-content .rfc-h1 {
  display: none; /* hide markdown's H1 since doc-header replaces it */
}
.rfc-content .rfc-h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
  position: relative;
}
.rfc-content .rfc-h-anchor {
  color: var(--accent);
  opacity: 0.5;
  margin-right: 10px;
  font-weight: 400;
}
.rfc-content .rfc-h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 36px 0 14px;
  scroll-margin-top: 80px;
}
.rfc-content .rfc-h4,
.rfc-content .rfc-h5,
.rfc-content .rfc-h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 26px 0 12px;
}
.rfc-content .rfc-ul,
.rfc-content .rfc-ol {
  margin: 0 0 20px 22px;
  padding: 0;
}
.rfc-content li {
  margin-bottom: 8px;
  padding-left: 6px;
}
.rfc-content .rfc-ul li::marker { color: var(--accent); }
.rfc-content .rfc-ol li::marker { color: var(--accent); font-weight: 600; }

.rfc-content a {
  color: #a5b4fc;
  text-decoration: none;
  border-bottom: 1px solid rgba(165,180,252,0.3);
  transition: all var(--transition-fast);
}
.rfc-content a:hover {
  color: #c7d2fe;
  border-bottom-color: rgba(199,210,254,0.7);
}

.rfc-content code {
  background: rgba(79,70,229,0.08);
  color: #4338ca;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid rgba(99,102,241,0.18);
  border-color: rgba(79,70,229,0.18);
}

.rfc-content .rfc-pre {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 22px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
}
.rfc-content .rfc-pre code {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.55;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  white-space: pre;
  display: block;
}
.rfc-content .rfc-quote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 18px;
  margin: 18px 0;
  color: var(--text-muted);
  font-style: italic;
}

.rfc-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   RFC HUB PAGE (rfcs.html)
   ======================================== */
.rfcs-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 24px 0 8px;
}
.rfcs-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.rfcs-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.65;
}

.rfcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.rfc-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.rfc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.6;
  transition: opacity var(--transition-base), height var(--transition-base);
}
.rfc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,0.32);
  box-shadow: 0 12px 32px -12px rgba(99,102,241,0.18);
}
.rfc-card:hover::before {
  opacity: 1;
  height: 4px;
}
.rfc-card:hover .rfc-card-arrow {
  transform: translateX(4px);
}

/* Per-RFC accent colors */
.rfc-card-overview::before { background: linear-gradient(90deg, #6366f1, #a5b4fc); }
.rfc-card-rtp::before      { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.rfc-card-data::before     { background: linear-gradient(90deg, #22c55e, #4ade80); }
.rfc-card-sdp::before      { background: linear-gradient(90deg, #eab308, #facc15); }
.rfc-card-ice::before      { background: linear-gradient(90deg, #f97316, #fb923c); }
.rfc-card-dtls::before     { background: linear-gradient(90deg, #ec4899, #f472b6); }
.rfc-card-sec::before      { background: linear-gradient(90deg, #ef4444, #f87171); }
.rfc-card-arch::before     { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.rfc-card-rtpuse::before   { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.rfc-card-jsep::before     { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.rfc-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.rfc-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
}
.rfc-card-tag {
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(99,102,241,0.18);
}
.rfc-card-year {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}
.rfc-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.rfc-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}
.rfc-card-desc strong {
  color: var(--text-primary);
  font-weight: 650;
}
.rfc-card-desc em {
  color: #4338ca;
  font-style: italic;
  font-weight: 500;
}
.rfc-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.rfc-card-author {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}
.rfc-card-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 300;
  transition: transform var(--transition-base);
}

/* External RFC list section */
.rfcs-external {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 16px;
}
.rfcs-external-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.rfcs-external-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .rfcs-grid { grid-template-columns: 1fr; }
  .rfcs-title { font-size: 1.8rem; }
  .rfcs-external { padding: 20px; }
}

/* Field label (for RFC field definitions like "field name: 8 bit") */
.rfc-content .rfc-field-label {
  margin: 22px 0 4px;
  padding: 8px 14px;
  background: rgba(99,102,241,0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  text-align: left;
  hyphens: none;
}
.rfc-content .rfc-field-label strong {
  color: #4338ca;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92em;
  font-weight: 700;
}
.rfc-content .rfc-field-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}
.rfc-content .rfc-field-desc {
  margin: 0 0 16px 14px;
  color: var(--text-secondary);
  text-align: justify;
  hyphens: auto;
}

/* Horizontal rule inside RFC content */
.rfc-content .rfc-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Callout boxes (info / tip / warning / quote) */
.rfc-callout {
  margin: 22px 0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 3px solid;
  background: rgba(15,23,42,0.02);
  font-size: 0.92rem;
  line-height: 1.7;
}
.rfc-callout p { margin: 0 0 10px; text-align: justify; }
.rfc-callout p:last-child { margin-bottom: 0; }
.rfc-callout-info {
  border-left-color: #4f46e5;
  background: rgba(79,70,229,0.06);
}
.rfc-callout-tip {
  border-left-color: #15803d;
  background: rgba(21,128,61,0.06);
}
.rfc-callout-warning {
  border-left-color: #c2410c;
  background: rgba(194,65,12,0.06);
}
.rfc-callout-quote {
  border-left-color: #4338ca;
  background: rgba(67,56,202,0.04);
  font-style: italic;
}
.rfc-callout-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}
/* Glossary grid (terim kartları) */
.rfc-glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0 26px;
}
.rfc-term {
  background: rgba(99,102,241,0.04);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(99,102,241,0.4);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.rfc-term:hover {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--text-secondary);
}
.rfc-term strong {
  display: block;
  color: #a5b4fc;
  font-size: 0.8rem;
  margin-bottom: 4px;
  font-weight: 600;
}

/* Reference lists */
.rfc-ref-list {
  list-style: none;
  margin: 14px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rfc-ref-list li {
  padding: 10px 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
}
.rfc-ref-list li:hover {
  background: rgba(255,255,255,0.02);
  border-left-color: var(--accent);
  color: var(--text-secondary);
}
.rfc-ref-list strong {
  color: #a5b4fc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 8px;
}

/* Author card */
.rfc-author-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(99,102,241,0.02));
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-top: 16px;
  font-size: 0.85rem;
  line-height: 1.7;
}
.rfc-author-name {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.rfc-author-org {
  color: #a5b4fc;
  font-weight: 500;
  margin-bottom: 12px;
}
.rfc-author-addr {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.rfc-author-email {
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.rfc-author-email a { color: #a5b4fc; }

/* Light mode adjustments */
@media (max-width: 1024px) {
  .rfc-layout { grid-template-columns: 1fr; }
  .rfc-toc-wrap { position: static; }
  .rfc-toc-panel { max-height: none; }
  .rfc-content-wrap { padding: 32px 24px; }
  .rfc-doc-title { font-size: 2.2rem; }
  .rfc-glossary-grid { grid-template-columns: 1fr; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .main-layout { flex-direction: column !important; }
  .sidebar { width: 100% !important; }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .header-meta { display: none; }
}

@media (max-width: 640px) {
  .grid-cols-4 { grid-template-columns: repeat(1, 1fr); }
  .header-inner { padding: 0 16px; }
  .max-container { padding: 0 16px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
