:root {
  --bg: #0b0c0f;
  --card: #12141a;
  --text: #e6e7ea;
  --muted: #a7adbb;
  --accent: #4f8cff;
  --chip: #1b2030;
  --border: #222734;
  --link: #79a6ff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --text: #1d2433;
    --muted: #516079;
    --accent: #2b6bff;
    --chip: #eff3ff;
    --border: #e9edf5;
    --link: #1f5eff;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 15px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 18px 72px;
}

header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.title h1 {
  font-size: 34px;
  margin: 0 0 2px;
  letter-spacing: 0.3px;
}

.subtitle {
  color: var(--muted);
  font-weight: 500;
}

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

button,
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

button:hover,
.btn:hover {
  border-color: var(--accent);
}

#themeBtn {
  font-size: 20px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

#themeBtn:hover {
  border-color: var(--accent);
  background: var(--chip);
}

/* Smooth rotation + fade */
#themeIcon {
  display: inline-block;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.card .item h3 a {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.card .item h3 a:hover {
  color: var(--link);
  text-decoration: none;
}

.timeline {
  position: relative;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-dot {
  position: absolute;
  left: -12px;
  top: 5px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--card);
  box-shadow: 0 0 0 3px var(--chip);
}

.timeline-content {
  background: var(--chip);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.timeline-content .meta {
  color: var(--muted);
  font-weight: 500;
  margin: 4px 0;
}

.timeline-content .date {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (max-width: 860px) {
  header {
    grid-template-columns: 1fr;
  }
}

.section {
  margin-top: 18px;
}

.section h2 {
  font-size: 18px;
  margin: 0 0 12px;
  letter-spacing: 0.4px;
}

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

.contact a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--chip);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
}

.contact a:hover {
  border-color: var(--accent);
  color: var(--link);
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.item h3 {
  margin: 0;
  font-size: 16px;
}

.item .meta {
  color: var(--muted);
  font-weight: 600;
}

.item p {
  margin: 6px 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  padding: 6px 10px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin: 6px 0;
}

.list li a {
  color: var(--text);
  text-decoration: none;
}

.list li a:hover {
  color: var(--link);
  text-decoration: none;
}

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 680px) {
  .cols {
    grid-template-columns: 1fr;
  }
}

footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.print-note {
  font-size: 12px;
}

/* Print */
@media print {
  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
  }

  .actions,
  .print-note {
    display: none;
  }

  a {
    color: inherit;
  }
}
