@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #666666;
  --line: #dedede;
  --accent: #cf1b1b;
  --accent-dark: #971414;
  --panel: #181818;
  --panel-muted: #d4d4d4;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.cv-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.profile-panel {
  align-self: start;
  position: sticky;
  top: 2rem;
}

.profile-card {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--panel);
  color: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

.avatar {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.16);
}

.eyebrow,
.section-kicker,
.project-role {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-card h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.summary {
  margin: 0;
  color: var(--panel-muted);
}

.contact-list,
.cv-nav,
.panel-actions {
  display: grid;
  gap: 0.75rem;
}

.contact-list {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-list a,
.contact-list span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--panel-muted);
  font-size: 0.92rem;
}

.contact-list i {
  width: 18px;
  color: var(--accent);
}

.cv-nav {
  margin-top: auto;
}

.cv-nav a {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  background: var(--accent);
  color: #ffffff;
}

.secondary-action {
  background: #ffffff;
  color: var(--panel);
}

.cv-content {
  display: grid;
  gap: 1rem;
}

.cv-section {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.hero-section {
  padding-top: 2.4rem;
}

.cv-section h2,
.cv-section h3,
.cv-section p {
  margin: 0;
}

.cv-section h2 {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.12;
}

.cv-section h3 {
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
}

.cv-section p + p {
  margin-top: 0.75rem;
}

.section-heading {
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.highlight-grid,
.skill-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.highlight-grid div,
.skill-matrix div,
.project-item,
.education-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.highlight-grid strong {
  display: block;
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1.1;
}

.highlight-grid span,
.timeline-meta,
.project-role {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.timeline-meta {
  display: grid;
  align-content: start;
  gap: 0.25rem;
}

.timeline-meta strong {
  color: var(--accent-dark);
}

.timeline-body ul {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
}

.project-list {
  display: grid;
  gap: 0.9rem;
}

.project-item {
  display: grid;
  gap: 0.4rem;
}

.skill-matrix {
  grid-template-columns: repeat(2, 1fr);
}

.skill-matrix h3 {
  color: var(--accent-dark);
}

.closing-section {
  background: var(--panel);
  color: #ffffff;
}

.closing-section p {
  color: var(--panel-muted);
}

@media screen and (max-width: 900px) {
  .cv-shell {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    position: static;
  }

  .profile-card {
    min-height: auto;
  }

  .cv-nav {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
  }

  .timeline-item,
  .highlight-grid,
  .skill-matrix {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 560px) {
  .cv-shell {
    width: 100%;
    padding: 0;
  }

  .profile-card,
  .cv-section {
    border-radius: 0;
  }

  .cv-section {
    padding: 1.25rem;
  }

  .cv-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .cv-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .profile-panel {
    position: static;
  }

  .profile-card,
  .cv-section {
    min-height: auto;
    box-shadow: none;
    border-radius: 0;
  }

  .profile-card {
    color: var(--ink);
    background: #ffffff;
    border-bottom: 2px solid var(--line);
  }

  .summary,
  .contact-list a,
  .contact-list span,
  .closing-section p {
    color: var(--muted);
  }

  .cv-nav,
  .panel-actions,
  .avatar {
    display: none;
  }

  .cv-section {
    padding: 1.1rem 0;
    page-break-inside: avoid;
  }

  .closing-section {
    color: var(--ink);
    background: #ffffff;
  }
}
