:root {
  --ink: #1a1d24;
  --ink-muted: #5b616e;
  --rule: #e4e7ed;
  --accent: #3a5fc4;
  --accent-light: #7d9dfa;
  --paper: #ffffff;
  --side-bg: #1a1d24;
  --side-text: #eaecef;
  --side-muted: #9aa0aa;
  --side-rule: #333846;
  --page-w: 860px;
  --side-w: 240px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef0f4;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #1a1d24;
}

.toolbar a,
.toolbar button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

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

.toolbar .btn-secondary {
  background: transparent;
  border-color: #454a56;
  color: #eaecef;
}

.page {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  max-width: var(--page-w);
  margin: 2rem auto 3rem;
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  min-height: 1050px;
}

/* --- Sidebar --- */
.sidebar {
  position: relative;
  background: var(--side-bg);
  color: var(--side-text);
  padding: 2.2rem 1.6rem;
  overflow: hidden;
}

/* A quiet echo of the hero circuit animation on the main site, so the CV
   doesn't read as a generic template disconnected from the rest of the site. */
.side-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.side-circuit path {
  fill: none;
  stroke: var(--side-rule);
  stroke-width: 1.5;
}

.side-circuit circle {
  fill: var(--side-rule);
}

.sidebar-content {
  position: relative;
  z-index: 1;
}

.photo-wrap {
  position: relative;
  display: inline-block;
  margin: 0 0 1.1rem;
}

.sidebar-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--accent);
}

.photo-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--side-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-badge svg {
  width: 17px;
  height: 17px;
  color: #fff;
}

.sidebar h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
}

.sidebar .role {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--accent-light);
  font-weight: 600;
}

.side-block {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--side-rule);
}

.side-block h2 {
  margin: 0 0 0.65rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--side-muted);
}

.side-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.side-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.side-contact svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent-light, #7d9dfa);
}

.side-contact a {
  color: var(--side-text);
  text-decoration: none;
  word-break: break-word;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--side-rule);
  color: var(--side-text);
  white-space: nowrap;
}

.skill-cluster {
  margin-bottom: 0.85rem;
}

.skill-cluster:last-child {
  margin-bottom: 0;
}

.skill-cluster-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.skill-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--cluster-color-soft, rgba(125, 157, 250, 0.18));
  flex-shrink: 0;
}

.skill-icon {
  width: 0.8rem;
  height: 0.8rem;
  color: var(--cluster-color, var(--accent-light));
}

.skill-cluster h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--side-text);
}

.lang-row {
  margin-bottom: 0.65rem;
}

.lang-row:last-child {
  margin-bottom: 0;
}

.lang-row .lang-name {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.28rem;
}

.lang-row .lang-level {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--side-muted);
}

.lang-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--side-rule);
  overflow: hidden;
}

.lang-bar-fill {
  height: 100%;
  background: var(--accent-light, #7d9dfa);
  border-radius: 999px;
}

/* --- Main column --- */
.main-col {
  padding: 2.2rem 2.4rem;
}

.summary {
  margin: 0 0 1.6rem;
  color: var(--ink-muted);
}

.cv-section {
  margin-bottom: 1.5rem;
}

.cv-section:last-child {
  margin-bottom: 0;
}

.cv-section h2 {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.entry {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.9rem;
  border-left: 2px solid var(--rule);
}

.entry:last-child {
  margin-bottom: 0;
}

.entry::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.3rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.entry-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.entry-date {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
}

.entry-place {
  margin: 0.05rem 0 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
}

.entry p.entry-desc {
  margin: 0.25rem 0 0;
}

.entry-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 700px) {
  .page {
    grid-template-columns: 1fr;
    margin: 0;
  }

  .main-col {
    padding: 1.75rem;
  }

  .sidebar {
    padding: 1.75rem;
  }
}

@media print {
  body {
    background: var(--paper);
  }

  .toolbar {
    display: none;
  }

  .page {
    margin: 0;
    box-shadow: none;
    max-width: none;
    min-height: 0;
  }

  .sidebar,
  .sidebar * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
