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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #1a1a1e;
  color: #d4d4d4;
  line-height: 1.6;
  padding: 0;
}

/* ── top bar ── */
.top-bar {
  background: #111113;
  border-bottom: 1px solid #2e2e35;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #efcf6c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  border: 1px solid #efcf6c55;
  border-radius: 8px;
  transition: background .2s, border-color .2s;
}

.back-btn:hover {
  background: #efcf6c18;
  border-color: #efcf6c;
}

.top-bar-title {
  font-size: 15px;
  color: #aaa;
  margin-left: auto;
  font-weight: 400;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #efcf6c 0%, #c9a84c 100%);
  color: #111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}

.download-btn:hover {
  opacity: .85;
}

/* ── page wrapper ── */
.cv-wrapper {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

/* ── profile photo ── */
.cv-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #efcf6c55;
  flex-shrink: 0;
  align-self: center;
}

/* ── header card ── */
.cv-header {
  background: linear-gradient(135deg, #26262e 0%, #1e1e24 100%);
  border: 1px solid #3a3a44;
  border-radius: 16px;
  padding: 36px 40px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.cv-header-text h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}

.cv-header-text .tagline {
  font-size: 13px;
  color: #efcf6c;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
  margin-bottom: 16px;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #bbb;
}

.contact-item i {
  color: #efcf6c;
  font-size: 18px;
}

.contact-item a {
  color: #bbb;
  text-decoration: none;
}

.contact-item a:hover {
  color: #efcf6c;
}

/* ── section ── */
.cv-section {
  background: #22222a;
  border: 1px solid #2e2e38;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #efcf6c;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a3a44;
}

.section-title i {
  font-size: 20px;
}

/* ── about ── */
.about-text {
  font-size: 14px;
  color: #ccc;
  line-height: 1.75;
}

/* ── timeline item ── */
.timeline-item {
  position: relative;
  padding-left: 18px;
  margin-bottom: 22px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: #efcf6c;
  border-radius: 50%;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

.item-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

a.item-title,
.item-title a {
  color: #fff;
  text-decoration: none;
}

a.item-title:hover,
.item-title a:hover { color: #efcf6c; }

.item-org {
  font-size: 13px;
  color: #efcf6c;
  font-weight: 500;
}

.item-date {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.item-body {
  font-size: 13px;
  color: #bbb;
  margin-top: 6px;
  line-height: 1.7;
}

.item-list {
  list-style: none;
  margin-top: 8px;
}

.item-list li {
  font-size: 13px;
  color: #bbb;
  padding-left: 14px;
  position: relative;
  margin-bottom: 4px;
  line-height: 1.65;
}

.item-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #efcf6c;
  font-size: 10px;
  top: 3px;
}

/* ── tech tags ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 11px;
  color: #efcf6c;
  background: #efcf6c14;
  border: 1px solid #efcf6c33;
  border-radius: 5px;
  padding: 2px 9px;
  font-weight: 500;
}

/* ── skills grid ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 5px;
}

.skill-label span:last-child {
  color: #efcf6c;
  font-weight: 600;
}

.skill-bar {
  height: 5px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, #efcf6c, #c9a84c);
  border-radius: 3px;
}

/* ── two-col layout for courses ── */
.two-col {
  columns: 2;
  column-gap: 30px;
}

.two-col li {
  font-size: 13px;
  color: #bbb;
  padding-left: 14px;
  position: relative;
  margin-bottom: 4px;
  break-inside: avoid;
}

.two-col li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #efcf6c;
  font-size: 10px;
  top: 3px;
}

.col-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #efcf6c;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 12px 0 6px;
}

/* ── languages ── */
.lang-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-badge {
  background: #efcf6c18;
  border: 1px solid #efcf6c44;
  color: #efcf6c;
  border-radius: 8px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ── games table ── */
.games-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.games-table thead tr {
  border-bottom: 1px solid #3a3a44;
}

.games-table th {
  text-align: left;
  color: #efcf6c;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 6px 10px 8px 0;
}

.games-table th:not(:first-child),
.games-table td:not(:first-child) {
  text-align: center;
}

.games-table td {
  color: #bbb;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid #2a2a32;
}

.games-table tbody tr:last-child td {
  border-bottom: none;
}

.games-table tbody tr:hover td {
  color: #ddd;
  background: #ffffff06;
}

.games-table tbody td:nth-child(even) {
  background: #2e2e38;
}

.games-table th:first-child,
.games-table td:first-child {
  min-width: 200px;
}

.games-legend {
  margin-top: 10px;
  font-size: 11px;
  color: #777;
  letter-spacing: .4px;
}

.games-legend abbr {
  color: #efcf6c;
  font-weight: 600;
  text-decoration: none;
  cursor: default;
}

/* ── responsive ── */
@media (max-width: 620px) {
  .cv-header {
    flex-direction: column;
  }

  .cv-section {
    padding: 20px 18px;
  }

  .two-col {
    columns: 1;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ── lang switcher ── */
.cv-lang-wrapper {
  position: relative;
  flex-shrink: 0;
}

.cv-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1c1c22;
  border: 1px solid #3a3a44;
  border-radius: 8px;
  overflow: hidden;
  z-index: 200;
  min-width: 64px;
}

.cv-lang-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, color .15s;
}

.cv-lang-option:hover,
.cv-lang-option.active {
  background: #efcf6c18;
  color: #efcf6c;
}

/* ── theme toggle button ── */
.cv-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid #efcf6c55;
  border-radius: 8px;
  color: #efcf6c;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}

.cv-theme-btn:hover {
  background: #efcf6c18;
  border-color: #efcf6c;
}

/* ── light mode ── */
/* amber accent matches main page: hsl(38,90%,42%) ≈ #c47a0d */
[data-theme="light"] body {
  background: hsl(210, 20%, 94%);
  color: #222;
}

[data-theme="light"] .top-bar {
  background: hsl(0, 0%, 93%);
  border-color: hsl(0, 0%, 78%);
}

[data-theme="light"] .top-bar-title {
  color: #555;
}

[data-theme="light"] .back-btn {
  color: hsl(38, 90%, 42%);
  border-color: hsl(38, 90%, 42%, .4);
}

[data-theme="light"] .back-btn:hover {
  background: hsl(38, 90%, 42%, .1);
  border-color: hsl(38, 90%, 42%);
}

[data-theme="light"] .download-btn {
  background: linear-gradient(135deg, hsl(38, 90%, 48%) 0%, hsl(32, 85%, 38%) 100%);
}

[data-theme="light"] .cv-header {
  background: linear-gradient(135deg, #e8e8f0 0%, #d8d8e8 100%);
  border-color: #c0c0cc;
}

[data-theme="light"] .cv-header-text h1 {
  color: #111;
}

[data-theme="light"] .cv-header-text .tagline {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .contact-item {
  color: #444;
}

[data-theme="light"] .contact-item i {
  color: hsl(38, 90%, 42%);
}

[data-theme="light"] .contact-item a {
  color: #444;
}

[data-theme="light"] .contact-item a:hover {
  color: hsl(38, 90%, 42%);
}

[data-theme="light"] .cv-section {
  background: #fff;
  border-color: #ddd;
}

[data-theme="light"] .section-title {
  color: hsl(38, 90%, 38%);
  border-color: #ddd;
}

[data-theme="light"] .about-text,
[data-theme="light"] .item-body,
[data-theme="light"] .item-list li,
[data-theme="light"] .two-col li {
  color: #444;
}

[data-theme="light"] .item-title,
[data-theme="light"] a.item-title,
[data-theme="light"] .item-title a {
  color: #111;
}

[data-theme="light"] a.item-title:hover,
[data-theme="light"] .item-title a:hover { color: var(--orange-yellow-crayola, #d6a22a); }

[data-theme="light"] .item-org {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .item-date {
  color: #666;
}

[data-theme="light"] .timeline-item::before {
  background: hsl(38, 90%, 42%);
}

[data-theme="light"] .item-list li::before,
[data-theme="light"] .two-col li::before {
  color: hsl(38, 90%, 42%);
}

[data-theme="light"] .col-subtitle {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .skill-label {
  color: #333;
}

[data-theme="light"] .skill-label span:last-child {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .skill-bar {
  background: #ddd;
}

[data-theme="light"] .skill-fill {
  background: linear-gradient(90deg, hsl(38, 90%, 48%), hsl(32, 85%, 38%));
}

[data-theme="light"] .tag {
  color: hsl(38, 90%, 35%);
  background: hsl(38, 90%, 42%, .1);
  border-color: hsl(38, 90%, 42%, .3);
}

[data-theme="light"] .games-table th {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .games-table td {
  color: #444;
  border-color: #e0e0e0;
}

[data-theme="light"] .games-table thead tr {
  border-color: #ccc;
}

[data-theme="light"] .games-table tbody td:nth-child(even) {
  background: #f0f0f5;
}

[data-theme="light"] .games-table tbody tr:hover td {
  background: #e8e8f0;
  color: #111;
}

[data-theme="light"] .games-legend {
  color: #888;
}

[data-theme="light"] .games-legend abbr {
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .lang-badge {
  color: hsl(38, 90%, 35%);
  background: hsl(38, 90%, 42%, .1);
  border-color: hsl(38, 90%, 42%, .35);
}

[data-theme="light"] .cv-theme-btn {
  border-color: hsl(38, 90%, 42%, .5);
  color: hsl(38, 90%, 38%);
}

[data-theme="light"] .cv-theme-btn:hover {
  background: hsl(38, 90%, 42%, .1);
  border-color: hsl(38, 90%, 42%);
}

[data-theme="light"] .cv-lang-dropdown {
  background: hsl(0, 0%, 96%);
  border-color: hsl(0, 0%, 78%);
}

[data-theme="light"] .cv-lang-option {
  color: #444;
}

[data-theme="light"] .cv-lang-option:hover,
[data-theme="light"] .cv-lang-option.active {
  background: hsl(38, 90%, 42%, .1);
  color: hsl(38, 90%, 38%);
}

/* ── print / save as PDF ── */
@media print {
  @page {
    margin: 0;
  }

  .top-bar { display: none !important; }

  body {
    background: #fff !important;
    color: #222 !important;
  }

  .cv-wrapper {
    margin: 0 auto;
    padding: 12mm 14mm 14mm;
  }

  .cv-header {
    background: #f0f0f5 !important;
    border-color: #ccc !important;
  }

  .cv-header-text h1 { color: #111 !important; }
  .cv-header-text .tagline { color: hsl(38, 90%, 38%) !important; }
  .contact-item { color: #444 !important; }
  .contact-item i { color: hsl(38, 90%, 38%) !important; }
  .contact-item a { color: #444 !important; }

  .cv-section {
    background: #fff !important;
    border-color: #ddd !important;
    break-inside: avoid;
  }

  .section-title {
    color: hsl(38, 90%, 38%) !important;
    border-color: #ddd !important;
  }

  .about-text,
  .item-body,
  .item-list li,
  .two-col li { color: #444 !important; }

  .item-title { color: #111 !important; }
  .item-org { color: hsl(38, 90%, 38%) !important; }
  .item-date { color: #666 !important; }
  .timeline-item::before { background: hsl(38, 90%, 42%) !important; }
  .item-list li::before,
  .two-col li::before { color: hsl(38, 90%, 42%) !important; }
  .col-subtitle { color: hsl(38, 90%, 38%) !important; }

  .skill-label { color: #333 !important; }
  .skill-label span:last-child { color: hsl(38, 90%, 38%) !important; }
  .skill-bar { background: #ddd !important; }
  .skill-fill { background: hsl(38, 90%, 44%) !important; }

  .tag {
    color: hsl(38, 90%, 35%) !important;
    background: transparent !important;
    border-color: hsl(38, 90%, 42%) !important;
  }

  .games-table th { color: hsl(38, 90%, 38%) !important; }
  .games-table td { color: #444 !important; border-color: #e0e0e0 !important; }
  .games-table thead tr { border-color: #ccc !important; }
  .games-table tbody td:nth-child(even) { background: #f0f0f5 !important; }
  .games-legend { color: #888 !important; }
  .games-legend abbr { color: hsl(38, 90%, 38%) !important; }

  .lang-badge {
    color: hsl(38, 90%, 35%) !important;
    background: transparent !important;
    border-color: hsl(38, 90%, 42%) !important;
  }
}
