:root {
  color-scheme: dark;
  --bg: #101010;
  --surface: #1a1a1a;
  --ink: #f4f4f4;
  --muted: #b5b5b5;
  --line: #383838;
  --accent: #ffd43b;
  --accent-strong: #ffe477;
  --accent-soft: #292719;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #101010ef;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--accent);
}

.header-inner {
  max-width: var(--max);
  margin: auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  text-decoration: none;
  font-weight: 750;
  font-size: 1.12rem;
  letter-spacing: -.025em;
}

.brand span,
.hero h1,
.page-hero h1 {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

nav a {
  font-size: .92rem;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
}

nav a.active,
nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  min-height: calc(100vh - 160px);
}

.wrap {
  max-width: var(--max);
  margin: auto;
  padding-inline: 24px;
}

.hero {
  padding-block: 98px 76px;
}

.eyebrow {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: 1.06;
  letter-spacing: -.065em;
  font-weight: 740;
  max-width: 940px;
  margin: 0 0 28px;
}

.lead {
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 650;
  font-size: .94rem;
  cursor: pointer;
}

.btn.secondary {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--accent);
}

.btn:hover {
  filter: brightness(1.1);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 86px;
}

.card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  min-height: 220px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 32px #00000040;
}

.card small {
  display: block;
  color: var(--accent);
  font-size: .78rem;
  letter-spacing: .1em;
  font-weight: 800;
  margin-bottom: 34px;
}

.card h2 {
  font-size: 1.45rem;
  letter-spacing: -.04em;
  margin: 0 0 7px;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card .arrow {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
}

.page-hero {
  padding-block: 70px 38px;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -.055em;
  margin: 0 0 18px;
}

.page-hero .lead {
  margin-bottom: 0;
}

.section {
  padding: 32px 0;
}

.section-title {
  font-size: 1.6rem;
  letter-spacing: -.04em;
  margin: 0 0 22px;
}

.cv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 22px;
  padding-bottom: 75px;
}

.panel {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.panel h2 {
  font-size: 1.38rem;
  line-height: 1.2;
  margin: 0 0 24px;
  letter-spacing: -.035em;
}

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

.cv-profile {
  grid-column: 1/-1;
}

.cv-profile p {
  max-width: 970px;
  margin: 0 0 14px;
}

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

.timeline {
  border-left: 2px solid var(--accent);
  margin-left: 5px;
  padding-left: 23px;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}

.date {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.timeline-item h3 {
  font-size: 1rem;
  line-height: 1.45;
  margin: 5px 0 2px;
}

.timeline-item p {
  margin: 3px 0 0;
  font-size: .92rem;
}

.detail-list {
  display: grid;
  gap: 17px;
}

.detail-list > div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}

.detail-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-list strong {
  display: block;
  color: var(--accent-strong);
}

.detail-list p {
  margin: 3px 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: .84rem;
  color: var(--accent-strong);
}

.accent-panel {
  background: var(--accent);
  color: var(--bg);
}

.accent-panel h2,
.accent-panel p,
.accent-panel a {
  color: var(--bg);
}

.accent-panel a {
  word-break: break-word;
}

.accent-panel a:focus-visible,
.accent-panel button:focus-visible {
  outline-color: var(--bg);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
  font-size: .85rem;
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.gallery-intro {
  padding-bottom: 70px;
}

.gallery-info {
  padding: 35px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
}

.gallery-info h2 {
  color: var(--ink);
  margin: 0 0 9px;
}

.gallery-info p {
  margin: 0 0 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
}

.gallery-grid button {
  background: none;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.gallery-grid:empty {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #000000ed;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  right: 20px;
  top: 15px;
  border: 0;
  background: var(--surface);
  color: var(--accent);
  font-size: 30px;
  border-radius: 8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
}

.template-empty {
  min-height: 360px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  margin: 12px 0 75px;
  text-align: center;
  padding: 28px;
  background: var(--surface);
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent-strong);
}

@media (max-width: 800px) {

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

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

  .card {
    min-height: 160px;
  }

  .card small {
    margin-bottom: 18px;
  }

  .header-inner {
    flex-direction: column;
    justify-content: center;
    padding: 15px 18px;
    gap: 8px;
  }

  nav {
    justify-content: center;
  }

  nav a {
    padding: 7px 9px;
  }

  .hero {
    padding-block: 64px;
  }

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

@media (max-width: 480px) {

  .wrap {
    padding-inline: 18px;
  }

  .panel {
    padding: 23px;
  }

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