/* ─── Fonts ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Custom properties ──────────────────────────────────── */
:root {
  --bg:             #1C2333;
  --surface:        #222A3C;
  --surface-2:      #273045;
  --border:         #2E3850;
  --border-light:   #394663;

  --text-primary:   #E8E4DC;
  --text-secondary: #A8A49C;
  --text-muted:     #8E8B84;

  --accent:         #C4552A;
  --accent-dim:     rgba(196, 85, 42, 0.10);
  --accent-glow:    rgba(196, 85, 42, 0.22);
  --accent-light:   rgba(196, 85, 42, 0.10);

  --tag-color:      #9E9B94;

  --sidebar-bg:     #181F2E;
  --sidebar-border: #232B3E;

  --sidebar-width:  220px;

  --font-display:   'DM Serif Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── Page shell ─────────────────────────────────────────── */
.page {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  background-image:
    radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  border-right: 1px solid var(--sidebar-border);
  padding: 40px 24px 32px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border) url('/assets/my-photo.jfif') center/cover no-repeat;
  margin-bottom: 16px;
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 18px var(--accent-glow);
}

.sidebar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.sidebar-role {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* ─── Sidebar nav ────────────────────────────────────────── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
}

.sidebar-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0 8px 14px;
  display: block;
  letter-spacing: 0.08em;
  border-left: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
}

.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  padding: 8px 0 4px 14px;
  display: block;
}

.nav-group-label.active {
  color: var(--accent);
}

.sidebar-subnav {
  list-style: none;
  padding: 0 0 4px 0;
}

.sidebar-subnav a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 0 4px 26px;
  display: block;
  letter-spacing: 0.06em;
  border-left: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.sidebar-subnav a:hover {
  color: var(--text-primary);
}

.sidebar-subnav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ─── Social links ───────────────────────────────────────── */
.sidebar-social {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
}

.sidebar-social a {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.sidebar-social a:hover {
  color: var(--accent);
}

/* ─── Main content area ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main {
  flex: 1;
  padding: 52px 56px;
  max-width: 740px;
  animation: fadeUp 0.5s ease both;
}

/* ─── Page heading components ────────────────────────────── */
.page-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

h1.page-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.page-rule {
  width: 32px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 40px;
  opacity: 0.65;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 10px 22px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  letter-spacing: 0.08em;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #B04A22;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ─── Tech tag pills ─────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  background: var(--surface-2);
  color: var(--tag-color);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  letter-spacing: 0.06em;
}

/* ─── Mobile top bar (hidden on desktop) ─────────────────── */
.mobile-topbar {
  display: none;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  padding: 12px 16px;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-topbar-info .mobile-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.mobile-topbar-info .mobile-role {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.hamburger {
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}

/* ─── Mobile drawer overlay ──────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.drawer-overlay.open {
  display: block;
}

/* ─── Responsive breakpoint ──────────────────────────────── */
@media (max-width: 767px) {
  .sidebar.drawer {
    position: fixed;
    left: calc(-1 * var(--sidebar-width) - 1px);
    top: 0;
    height: 100vh;
    z-index: 300;
    transition: left 0.25s ease;
  }

  .sidebar.drawer.open { left: 0; }

  .mobile-topbar { display: flex; }

  .page { flex-direction: column; }

  .main { padding: 28px 20px; }

  .stat-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

/* ─── Timeline (experience.html) ─────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-dim), 0 0 8px var(--accent-glow); }
  50%       { box-shadow: 0 0 0 5px var(--accent-dim), 0 0 18px var(--accent-glow); }
}

.timeline {
  position: relative;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 44px;
  animation: fadeUp 0.45s ease both;
}

.timeline-item:nth-child(1) { animation-delay: 0.06s; }
.timeline-item:nth-child(2) { animation-delay: 0.12s; }
.timeline-item:nth-child(3) { animation-delay: 0.18s; }
.timeline-item:nth-child(4) { animation-delay: 0.24s; }

.timeline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: absolute;
  left: -26px;
  top: 7px;
}

.timeline-dot.current {
  background: var(--accent);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

.timeline-dot.past-1 { background: #394663; border: 1px solid var(--border-light); }
.timeline-dot.past-2 { background: #2E3850; border: 1px solid var(--border); }
.timeline-dot.past-3 { background: #273045; border: 1px solid var(--sidebar-border); }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.timeline-bullets {
  padding-left: 16px;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.82;
  list-style: disc;
}

.timeline-bullets li {
  margin-bottom: 5px;
}

.timeline-bullets li::marker {
  color: var(--accent);
  font-size: 10px;
  opacity: 0.7;
}

.timeline-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── Project grid (projects.html) ──────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 22px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.project-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 28px rgba(0,0,0,0.4);
}

.project-card.featured {
  grid-column: 1 / -1;
  background: var(--surface-2);
  padding: 24px;
  border-color: var(--border-light);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.project-card.featured .project-title {
  font-size: 21px;
}

.project-description {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

.project-links {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.project-link-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  margin-top: 12px;
  display: inline-block;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.project-link-text:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 767px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: 1; }
  .project-card-header { flex-direction: column; }
}

/* ─── Article list (writing.html) ───────────────────────── */
.article-list {
  display: flex;
  flex-direction: column;
}

.article-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.article-item:last-child { border-bottom: none; }

.article-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.article-title:hover { color: var(--accent); }

.article-item.minor .article-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.article-date {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.08em;
}

.article-excerpt {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0 0 10px;
}

/* ─── Article body (writing/<slug>.html) ────────────────── */
.article-main {
  max-width: calc(65ch + 112px);
}

.article-back {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 32px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.article-back:hover { color: var(--accent); }

h1.article-heading {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.article-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  font-style: italic;
}

.article-subtitle-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 3px;
}

.article-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-body p { margin-bottom: 20px; }

.article-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 12px;
  letter-spacing: 0.01em;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 8px;
  letter-spacing: 0.01em;
}

.article-body ul,
.article-body ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.article-body li { margin-bottom: 6px; }

.article-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--accent);
  border: 1px solid var(--border);
}

.article-body pre {
  background: var(--surface);
  padding: 20px;
  border-radius: 2px;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
}

.article-body blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--text-secondary);
  font-style: italic;
  font-size: 14px;
  line-height: 1.75;
}

.article-body blockquote strong {
  font-style: normal;
  color: var(--text-primary);
}

.article-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* ─── Home page hero (index.html) ───────────────────────── */
.hero-heading {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.06;
  margin-bottom: 16px;
  letter-spacing: 0.005em;
}

.hero-bio {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
  max-width: 50ch;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 32px;
  max-width: 440px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: 2px;
}

.stat-card-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.stat-card-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.stat-card-text {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── QR code section ────────────────────────────────────── */
.qr-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qr-section img {
  display: block;
  border-radius: 2px;
}

.qr-section #qr-code img,
.qr-section #qr-code canvas {
  border: 1px solid var(--border);
  border-radius: 2px;
  display: block;
}

/* ─── Button size modifier ───────────────────────────────── */
.btn-sm {
  font-size: 10px;
  padding: 6px 12px;
}

/* ─── QR Generator tool (tools/qr-generator.html) ───────── */
.qr-tool-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.qr-tool-controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.qr-tool-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qr-tool-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.qr-tool-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 9px 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.qr-tool-input:focus {
  border-color: var(--accent);
}

.qr-tool-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.qr-tool-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.qr-tool-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.qr-tool-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.qr-tool-opt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.qr-tool-opt:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.qr-tool-opt.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.qr-tool-file-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.qr-tool-file-label:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.qr-tool-clear {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.12s;
  align-self: flex-start;
}

.qr-tool-clear:hover { color: var(--accent); }

.qr-tool-color-row {
  display: flex;
  gap: 20px;
}

.qr-tool-color-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-tool-color-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.qr-tool-color {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  border-radius: 2px;
}

.qr-tool-color::-webkit-color-swatch-wrapper { padding: 0; }
.qr-tool-color::-webkit-color-swatch         { border: none; border-radius: 1px; }

/* ── Preview column ── */
.qr-tool-preview-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.qr-frame-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.qr-frame-wrap svg,
.qr-frame-wrap canvas {
  display: block;
}

.qr-scan-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent);
  padding: 7px 0 5px;
}

.qr-frame-border {
  border: 2px solid var(--accent);
  padding: 12px;
}

.qr-frame-scan {
  border: 2px solid var(--accent);
  padding: 12px 12px 0;
}

.qr-frame-rounded {
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 12px 12px 0;
}

.qr-tool-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 767px) {
  .qr-tool-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .qr-tool-preview-col {
    align-items: center;
  }
}

/* ── World Cup 2026 ────────────────────────────────────── */

.wc-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.wc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.wc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.wc-status-dot.pulse {
  animation: wc-pulse 1.5s ease-in-out infinite;
}

@keyframes wc-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.wc-last-updated {
  font-size: 11px;
  color: var(--text-muted);
}

.wc-section-heading {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wc-section-heading::after {
  content: '▾';
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  letter-spacing: 0;
}

.wc-section-heading.wc-collapsed::after {
  transform: rotate(-90deg);
}

.wc-section-heading--live {
  color: var(--text-primary);
}

.wc-section-heading--live::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  margin-right: 8px;
  animation: wc-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.wc-match-row--live {
  border-color: rgba(192, 57, 43, 0.4);
  background: rgba(192, 57, 43, 0.06);
}

.wc-groups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.wc-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
}

.wc-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wc-group-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0;
}

.wc-group-meta {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
}

.wc-group-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.wc-group-table th:not(:first-child) { width: 20px; }
.wc-group-table th:nth-child(6)      { width: 26px; }
.wc-group-table th:last-child        { width: 26px; }

.wc-group-table th {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0 6px;
  text-align: right;
}

.wc-group-table th:first-child { text-align: left; }

.wc-group-table td {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 0;
  text-align: right;
  border-top: 1px solid var(--border);
}

.wc-group-table td:first-child {
  text-align: left;
  color: var(--text-primary);
}

.wc-pts {
  color: var(--accent) !important;
  font-weight: 600;
}

.wc-adv-marker {
  display: inline-block;
  width: 3px;
  height: 11px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.wc-match-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.wc-match-date-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wc-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 2px;
}

.wc-match-team {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.wc-match-team.home { text-align: right; }
.wc-match-team.away { text-align: left; }

.wc-match-center { text-align: center; }

.wc-match-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.wc-match-pens {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

.wc-match-round {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.wc-live-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #E8E4DC;
  background: #c0392b;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 3px;
}

.wc-match-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.wc-error {
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 767px) {
  .wc-groups-grid {
    grid-template-columns: 1fr;
  }
  .wc-match-team {
    font-size: 12px;
  }
}

.wc-fixture-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wc-fixture-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.wc-fixture-teams {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-fixture-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.wc-bracket-container {
  margin-bottom: 40px;
}

.wc-bracket-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.wc-notice {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0 32px;
}
