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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: #ffffff;
  color: oklch(0.24 0.015 255);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: oklch(0.44 0.13 250);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: oklch(0.30 0.10 250);
}

a:focus-visible {
  outline: 2px solid oklch(0.30 0.10 250);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: oklch(0.30 0.10 250);
  color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== Navigation ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(0.90 0.006 255);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px clamp(20px, 4vw, 32px);
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: oklch(0.30 0.10 250);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav-logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}

.nav-links a {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: oklch(0.52 0.012 255);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
  color: oklch(0.30 0.10 250);
  border-bottom: 1px solid oklch(0.80 0.008 255);
}

.nav-links a[aria-current="page"] {
  color: oklch(0.30 0.10 250);
  border-bottom-color: oklch(0.30 0.10 250);
}

.nav-download {
  border: none !important;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid oklch(0.90 0.006 255);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p,
.site-footer a {
  margin: 0;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: oklch(0.53 0.012 255);
}

.site-footer a {
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer a:hover {
  color: oklch(0.30 0.10 250);
}

/* ===== Section Header (numbered) ===== */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-top: 1px solid oklch(0.80 0.008 255);
  padding-top: 14px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-header .section-num {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: oklch(0.53 0.012 255);
}

.section-header h2 {
  margin: 0;
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 600;
  letter-spacing: -0.022em;
}

/* ===== Home Page: Hero ===== */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 68px) clamp(20px, 4vw, 32px) clamp(36px, 5vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 32px);
}

.hero-label {
  margin: 4px 0 0;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(0.52 0.012 255);
}

.hero h1 {
  margin: 0 0 max(-5px, -0.37vw);
  font-size: clamp(46px, 8.4vw, 104px);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 0.94;
  color: inherit;
}

.hero-summary {
  margin: 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: oklch(0.32 0.012 255);
  max-width: 40ch;
  text-wrap: pretty;
}

/* ===== Metrics ===== */
.metrics {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px) clamp(56px, 8vw, 104px);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: oklch(0.90 0.006 255);
  border-top: 1px solid oklch(0.80 0.008 255);
}

.metric-item {
  background: #ffffff;
  padding: 22px 20px 4px;
}

.metric-value {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: oklch(0.30 0.10 250);
}

.metric-superscript {
  font-size: 0.5em;
  letter-spacing: 0;
  vertical-align: super;
}

.metric-label {
  margin-top: 12px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: oklch(0.52 0.012 255);
  max-width: 26ch;
}

/* ===== Results / Current Focus ===== */
.results,
.current-focus {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px) clamp(56px, 8vw, 104px);
}

.current-focus .section-header {
  margin-bottom: clamp(24px, 3.4vw, 40px);
}

.current-focus > p {
  margin: 0;
  max-width: 74ch;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.6;
  letter-spacing: -0.008em;
  color: oklch(0.30 0.012 255);
  text-wrap: pretty;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3.4vw, 48px);
}

.result-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: oklch(0.30 0.10 250);
}

.result-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.62;
  color: oklch(0.36 0.012 255);
  text-wrap: pretty;
}

/* ===== CTA Section ===== */
.cta-links {
  background: oklch(0.975 0.004 255);
  border-top: 1px solid oklch(0.90 0.006 255);
}

.cta-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 4vw, 32px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.cta-links h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: inherit;
}

.cta-links > .cta-inner > div:first-child p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: oklch(0.45 0.012 255);
  max-width: 44ch;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: oklch(0.30 0.10 250);
  color: #ffffff;
  text-decoration: none;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: oklch(0.24 0.10 250);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: oklch(0.30 0.10 250);
  border: 1px solid oklch(0.30 0.10 250);
}

.btn-secondary:hover {
  background: oklch(0.30 0.10 250);
  color: #ffffff;
}

/* ===== CV Page ===== */
.cv-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 32px) clamp(28px, 4vw, 44px);
  width: 100%;
}

.cv-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}

.cv-header-left p:first-child {
  margin: 0 0 clamp(16px, 2.4vw, 26px);
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(0.52 0.012 255);
}

.cv-header h1 {
  margin: 0 0 10px;
  font-size: clamp(40px, 6.6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.036em;
  line-height: 0.96;
  color: inherit;
}

.cv-title {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: oklch(0.45 0.012 255);
}

.cv-header-right {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  text-align: right;
}

.cv-location {
  margin: 0;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: oklch(0.53 0.012 255);
}

.header-token-form {
  text-align: right;
  transform: translateY(-9px);
}

.header-token-form label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.53 0.012 255);
}

.header-token-form input {
  padding: 10px 14px;
  border: 1px solid oklch(0.80 0.008 255);
  font-size: 14px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  min-width: 320px;
}

.header-token-form input:focus {
  outline: 2px solid oklch(0.30 0.10 250);
  outline-offset: 1px;
  border-color: oklch(0.30 0.10 250);
}

.cv-contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-contact-links a {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: oklch(0.45 0.08 250);
  text-decoration: none;
}

.cv-contact-links a:hover {
  color: oklch(0.30 0.10 250);
  text-decoration: underline;
}

.cv-download {
  transform: translateY(-9px);
}

.cv-download .btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
}

/* ===== CV Index Nav ===== */
.cv-index {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
  width: 100%;
}

.cv-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 0;
  border-top: 1px solid oklch(0.80 0.008 255);
  border-bottom: 1px solid oklch(0.90 0.006 255);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.cv-index-links a {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: oklch(0.52 0.012 255);
}

.cv-index-links a:hover {
  color: oklch(0.30 0.10 250);
}

/* ===== CV Sections ===== */
.cv-summary,
.cv-experience,
.cv-education,
.cv-skills,
.cv-projects,
.cv-languages,
.cv-interests {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
  width: 100%;
  scroll-margin-top: 88px;
}

.cv-summary,
.cv-education,
.cv-skills,
.cv-projects,
.cv-languages,
.cv-interests {
  padding-bottom: clamp(48px, 7vw, 88px);
}

.cv-experience {
  padding-bottom: clamp(48px, 7vw, 88px);
}

.cv-summary .section-header,
.cv-education .section-header,
.cv-skills .section-header,
.cv-projects .section-header,
.cv-languages .section-header,
.cv-interests .section-header {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.cv-experience .section-header {
  margin-bottom: clamp(24px, 3.4vw, 40px);
}

.cv-summary > p {
  margin: 0;
  max-width: 78ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.62;
  color: oklch(0.30 0.012 255);
  text-wrap: pretty;
}

/* ===== Work Entries ===== */
.work-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid oklch(0.90 0.006 255);
}

.work-entry:last-of-type {
  border-bottom: 1px solid oklch(0.90 0.006 255);
}

.work-date-col {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-dates {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(0.30 0.10 250);
}

.work-location {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: oklch(0.53 0.012 255);
}

.work-content {
  flex: 1 1 480px;
  min-width: 0;
}

.work-header h3 {
  margin: 0 0 4px;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.work-position {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: oklch(0.30 0.10 250);
}

.work-description {
  margin: 0 0 18px;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.6;
  color: oklch(0.36 0.012 255);
  text-wrap: pretty;
}

.work-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 74ch;
}

.work-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: oklch(0.30 0.012 255);
}

.work-highlights li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: oklch(0.74 0.02 255);
}

/* ===== Work Projects (nested) ===== */
.work-projects {
  margin-top: 26px;
  padding-left: clamp(16px, 2vw, 26px);
  border-left: 1px solid oklch(0.88 0.006 255);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.work-projects-label {
  margin: 0;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(0.70 0.01 255);
}

.project-entry {
  /* No additional styling needed; items are structured inside */
}

.project-entry h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-link {
  font-size: 12px;
  text-decoration: none;
  color: oklch(0.53 0.012 255);
}

.project-link:hover {
  color: oklch(0.30 0.10 250);
}

.project-description {
  margin: 0 0 10px;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.55;
  color: oklch(0.50 0.012 255);
  text-wrap: pretty;
}

.project-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 72ch;
}

.project-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: oklch(0.34 0.012 255);
}

.project-highlights li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: oklch(0.78 0.02 255);
}

/* ===== Education Entries ===== */
.education-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding: 22px 0;
  border-top: 1px solid oklch(0.90 0.006 255);
}

.education-entry:last-of-type {
  border-bottom: 1px solid oklch(0.90 0.006 255);
}

.edu-date-col {
  flex: 0 0 150px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: oklch(0.30 0.10 250);
  padding-top: 4px;
}

.edu-content {
  flex: 1 1 480px;
  min-width: 0;
}

.edu-header h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.edu-degree {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: oklch(0.30 0.10 250);
}

.edu-description {
  margin: 0;
  max-width: 70ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: oklch(0.42 0.012 255);
  text-wrap: pretty;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: oklch(0.90 0.006 255);
  border-top: 1px solid oklch(0.90 0.006 255);
  border-bottom: 1px solid oklch(0.90 0.006 255);
}

.skill-group {
  background: #ffffff;
  padding: 22px 20px 24px;
}

.skill-group h3 {
  margin: 0 0 14px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.30 0.10 250);
}

.skill-keywords {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-keywords li {
  font-size: 15px;
  color: oklch(0.32 0.012 255);
}

/* ===== Projects Section (CV) ===== */
.cv-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.cv-projects-grid .project-entry h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: oklch(0.30 0.10 250);
}

.cv-projects-grid .project-entry p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: oklch(0.36 0.012 255);
  text-wrap: pretty;
}

/* ===== Languages ===== */
.language-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 56px;
}

.language-list li {
  font-size: 16px;
  color: oklch(0.32 0.012 255);
}

.language-list li strong {
  font-weight: 600;
}

/* ===== Interests ===== */
.interests-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interests-list li {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: oklch(0.42 0.012 255);
  border: 1px solid oklch(0.88 0.006 255);
  padding: 7px 13px;
}

/* ===== Contact Access ===== */
.cv-contact-access {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px) clamp(56px, 8vw, 104px);
  text-align: center;
}

.cv-contact-access h2 {
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}

.cv-contact-access > p {
  color: oklch(0.53 0.012 255);
  font-size: 15px;
  margin-bottom: 16px;
}

.contact-token-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-token-form label {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.53 0.012 255);
}

.contact-token-form input {
  padding: 10px 14px;
  border: 1px solid oklch(0.80 0.008 255);
  font-size: 14px;
  font-family: 'Azeret Mono', ui-monospace, monospace;
  min-width: 260px;
}

.contact-token-form input:focus {
  outline: 2px solid oklch(0.30 0.10 250);
  outline-offset: 1px;
  border-color: oklch(0.30 0.10 250);
}

/* ===== 404 Page ===== */
.error-page {
  text-align: center;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 4vw, 32px);
}

.error-page h1 {
  font-size: 4rem;
  margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  html { font-size: 15px; }

  .nav-inner {
    flex-direction: column;
    min-height: auto;
    padding: 10px clamp(16px, 4vw, 24px);
    gap: 8px;
  }

  .nav-links {
    gap: 8px 18px;
    justify-content: center;
  }

  .hero h1 { font-size: 2.5rem; }

  .cta-inner {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    text-align: center;
    justify-content: center;
  }

  .cv-header-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cv-header-right {
    align-items: flex-start;
    text-align: left;
  }

  .header-token-form {
    text-align: left;
  }

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

  .work-entry,
  .education-entry {
    flex-direction: column;
    gap: 8px 0;
  }

  .work-date-col,
  .edu-date-col {
    flex: 0 0 auto;
  }

  .cv-index-links {
    gap: 8px 18px;
  }
}
