/* ─── Color tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:         #f4f4f2;
  --sidebar-bg: #e8e8e6;
  --text:       #2c2c2c;
  --muted:      #7a7a7a;
  --accent:     #9b61b6;
  --border:     #d8d8d6;
  --toggle-bg:  #d8d8d6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #1a1a1a;
    --sidebar-bg: #242424;
    --text:       #e2e2e2;
    --muted:      #909090;
  --accent:     #b57fd4;
    --border:     #333333;
    --toggle-bg:  #333333;
  }
}

[data-theme="dark"] {
  --bg:         #1a1a1a;
  --sidebar-bg: #242424;
  --text:       #e2e2e2;
  --muted:      #909090;
  --accent:     #6dd4a0;
  --border:     #333333;
  --toggle-bg:  #333333;
}

[data-theme="light"] {
  --bg:         #f4f4f2;
  --sidebar-bg: #e8e8e6;
  --text:       #2c2c2c;
  --muted:      #7a7a7a;
  --accent:     #9b61b6;
  --border:     #d8d8d6;
  --toggle-bg:  #d8d8d6;
}

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

html {
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 2rem 1rem 4rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.page {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-areas:
    "header  header"
    "main    contact"
    "main    sidebar";
  gap: 0 2.5rem;
  align-items: start;
}

.main    { grid-area: main; min-width: 0; }

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  border-radius: 8px;
  padding: 1.5rem;
  padding-top: 1.25rem;
}

.sidebar-section {
  margin-bottom: 1.75rem;
}

/* ─── Sidebar summary ──────────────────────────────────────────────────────── */
.sidebar-summary {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Fun stuff ────────────────────────────────────────────────────────────── */
.fun-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fun-list li {
  font-size: 0.82rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}

.fun-list li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.fun-list a {
  color: var(--muted);
}

.fun-list a:hover {
  color: var(--accent);
}

/* ─── Sidebar education ────────────────────────────────────────────────────── */
.edu-school {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.edu-degree {
  font-size: 0.82rem;
  color: var(--text);
}

.edu-detail {
  font-size: 0.82rem;
  color: var(--muted);
}

.edu-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bar-meta {
  font-size: 0.8rem;
  color: var(--text);
}

.bar-track {
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--pct);
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.header {
  grid-area: header;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.8rem, 8.5vw, 7rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.name-initial {
  color: var(--accent);
  margin: 0 0.08em;
}

.header .title {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ─── Theme toggle ─────────────────────────────────────────────────────────── */
.theme-toggle {
  background: var(--toggle-bg);
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.theme-toggle:hover {
  background: var(--border);
}

.icon-moon { display: none; }
.icon-sun  { display: inline; }

[data-theme="dark"] .icon-moon { display: inline; }
[data-theme="dark"] .icon-sun  { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: inline; }
  :root:not([data-theme="light"]) .icon-sun  { display: none; }
}

/* ─── Contact ──────────────────────────────────────────────────────────────── */
.contact {
  grid-area: contact;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.contact a {
  color: var(--muted);
}

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

/* ─── Sections ─────────────────────────────────────────────────────────────── */
section {
  margin-bottom: 2.25rem;
}

.section-heading {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ─── Entries ──────────────────────────────────────────────────────────────── */
.entry {
  margin-bottom: 1.5rem;
}

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

.entry-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-bottom: 0.2rem;
}

.entry-company {
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--text);
}

.entry-location {
  font-size: 0.9rem;
  color: var(--muted);
}

.entry-sep {
  color: var(--border);
  font-size: 0.9rem;
}

.entry-date {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.entry-title {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

.entry ul {
  list-style: none;
  padding: 0;
}

.entry ul li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.entry ul li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1em;
  line-height: 1.6;
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.entry-blurb {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.5rem;
}


/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "contact"
      "main"
      "sidebar";
  }

  .contact {
    margin-bottom: 1.5rem;
  }

  .sidebar {
    margin-top: 1.5rem;
  }
}

@media (max-width: 520px) {
  .header h1 { font-size: 1.6rem; }
  .entry-header { flex-direction: column; }
  .entry-date { align-self: flex-start; }
  .sep { display: none; }
  .contact { flex-direction: column; gap: 0.2rem; }
}

/* ─── Print ────────────────────────────────────────────────────────────────── */
@media print {
  body { padding: 0; background: #fff; color: #000; }
  .theme-toggle { display: none; }
  a { color: #000; text-decoration: none; }
  .bar-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
