/* ---------- THEME VARIABLES ---------- */

:root {
  --bg: #f7f7f8;
  --bg-alt: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;

  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Helvetica Neue", Arial, sans-serif;

  --radius: 8px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg: #020617;
  --bg-alt: #0b1120;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --accent: #60a5fa;
  --accent-soft: #1d4ed8;
}

/* ---------- GLOBAL ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 900px;
  margin: 32px auto;
  padding: 24px 32px;
  background-color: var(--bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- HEADER ---------- */

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.name-block {
  flex: 1;
  text-align: center;
}

.name {
  font-size: 28px;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
}

.meta {
  margin: 2px 0;
  font-size: 13px;
  color: var(--muted);
}

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

.meta.links a:hover,
.meta.links a:focus-visible {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- BUTTONS ---------- */

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  background-color: var(--accent);     /* darker, always readable */
  color: #ffffff;                      /* text always white */
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: #1e4fc9;          /* slightly darker hover */
}

.btn-ghost {
  appearance: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--muted);
  cursor: pointer;
}

/* ---------- SECTIONS ---------- */

.section {
  margin-bottom: 14px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.section-body {
  margin: 0;
  font-size: 13px;
}

/* ---------- ITEMS (EDUCATION, EXPERIENCE, PROJECTS) ---------- */

.item {
  margin-bottom: 8px;
}

.item-header {
  margin-bottom: 2px;
}

.item-title {
  font-size: 14px;
  margin: 0;
}

.item-subtitle {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.item-location {
  flex: 1;
}

.item-dates {
  white-space: nowrap;
  font-weight: 500;
}

.item-list {
  margin: 2px 0 2px 16px;
  padding: 0;
  font-size: 13px;
}

.item-list li {
  margin-bottom: 3px;
}

.tech-stack {
  margin: 1px 0 0;
  font-size: 12px;
}

.tech-stack .label {
  font-weight: 600;
}

/* ---------- SKILLS ---------- */

.skills-block {
  margin-top: 2px;
}

.skill-line {
  font-size: 12px;
  margin: 2px 0;
}

.skills-title {
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}

/* ---------- FOOTER ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: flex-end;
}

.visitor-counter {
  font-style: italic;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 720px) {
  .page {
    margin: 16px auto;
    padding: 18px 14px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: row;
  }

  .item-subtitle {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-dates {
    margin-top: 1px;
  }
}

/* ---------- PRINT (for PDF download) ---------- */

@media print {
  body {
    background-color: #ffffff;
    font-size: 11px;
  }

  .page {
    box-shadow: none;
    margin: 0;
    border-radius: 0;
    padding: 16px 24px;
  }

  .name {
    font-size: 22px;
  }

  .header-actions,
  .footer {
    display: none;
  }

  a {
    color: #000000;
    text-decoration: none;
  }
}