:root {
  --asset-cv: "../assets/cv/Andrii_Vynohradov_CV_EN.pdf";

  --bg: #fff8ef;
  --bg-soft: #fff1df;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-strong: #ffffff;
  --text: #1f2933;
  --heading: #111827;
  --muted: #687385;
  --muted-strong: #3d4756;
  --line: rgba(31, 41, 51, 0.11);
  --line-strong: rgba(31, 41, 51, 0.18);
  --accent: #f97316;
  --accent-dark: #c2410c;
  --accent-soft: #fff0df;
  --accent-soft-2: #ffe3c4;
  --cream: #fffaf3;
  --shadow: 0 22px 70px rgba(76, 51, 28, 0.1);
  --shadow-soft: 0 12px 36px rgba(76, 51, 28, 0.08);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

code {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 8px;
  padding: 0.1em 0.35em;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 4%, rgba(249, 115, 22, 0.13), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(251, 191, 36, 0.12), transparent 34%),
    linear-gradient(180deg, #fffaf3 0%, #fff6ec 46%, #ffffff 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 41, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 41, 51, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 78%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--container));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(76, 51, 28, 0.07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fffaf3;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  font-size: 13px;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.brand__text {
  color: var(--heading);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 9px 14px;
  color: var(--muted-strong);
  border-radius: 999px;
  font-size: 14px;
  transition: 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--heading);
  border-radius: 999px;
}

.section {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 410px;
  gap: 28px;
  padding: 92px 0 46px;
}

.hero__content {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--heading);
}

h1 {
  max-width: 830px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6.6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.064em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.045em;
}

h3 {
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: 19px;
}

.hero__actions,
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: #fffaf3;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
}

.button--primary:hover {
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.3);
}

.button--ghost {
  color: var(--heading);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.button--ghost:hover {
  border-color: rgba(249, 115, 22, 0.45);
  background: #ffffff;
}

.hero-card {
  align-self: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-card__person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff4e8);
}

.hero-card__photo {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(76, 51, 28, 0.14);
}

.hero-card__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: inherit;
  pointer-events: none;
}

.hero-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__person strong {
  display: block;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero-card__person span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.hero-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-weight: 750;
  margin-bottom: 18px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.13);
}

.hero-card__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hero-card__grid div,
.strip-card,
.skill-block,
.timeline-card,
.contact {
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

.hero-card__grid div {
  padding: 18px;
  border-radius: 18px;
  background: #fffdf9;
}

.hero-card__grid strong {
  display: block;
  color: var(--heading);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.hero-card__grid span {
  color: var(--muted);
  font-size: 14px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 12px 0 58px;
}

.strip-card {
  padding: 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.strip-card span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent-dark);
  font-weight: 900;
}

.strip-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
  font-size: 20px;
}

.strip-card p,
.section-heading p,
.skill-block p,
.timeline-card p,
.contact p {
  color: var(--muted);
}

.projects,
.split-section,
.experience,
.contact {
  padding: 74px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading--small {
  max-width: 560px;
}

.project-list {
  display: grid;
  gap: 22px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card-strong);
  box-shadow: var(--shadow);
}

.project-card__hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  padding: 24px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-type,
.project-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted-strong);
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.16);
  font-size: 12px;
  font-weight: 850;
}

.project-status {
  color: var(--accent-dark);
  border-color: rgba(249, 115, 22, 0.26);
  background: var(--accent-soft);
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.project-card__description {
  color: var(--muted-strong);
  font-size: 17px;
}

.project-card__details {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.project-card__details h4 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card__details p,
.project-card__details li {
  color: var(--muted);
}

.project-card__details ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.project-card__details li::marker {
  color: var(--accent);
}

.project-card__visual {
  position: relative;
  min-width: 0;
  padding: 12px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.13), transparent 30%),
    linear-gradient(145deg, #fff7ed, #ffffff);
  border: 1px solid rgba(249, 115, 22, 0.18);
}

.project-gallery__main {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(76, 51, 28, 0.1);
  background: #ffffff;
}

.project-main-shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  cursor: zoom-in;
}

.project-gallery__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--heading);
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(76, 51, 28, 0.14);
  line-height: 0;
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.project-gallery__arrow svg {
  display: block;
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.project-gallery__arrow:hover {
  color: #fffaf3;
  border-color: rgba(249, 115, 22, 0.55);
  background: var(--accent);
}

.project-gallery__arrow--prev {
  left: 12px;
}

.project-gallery__arrow--next {
  right: 12px;
}

.project-gallery__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.project-gallery__info strong {
  color: var(--heading);
  font-size: 16px;
}

.project-gallery__info span {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
}

.project-gallery__caption {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.project-shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.project-thumb {
  display: grid;
  gap: 6px;
  padding: 6px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  cursor: zoom-in;
  text-align: left;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-thumb:hover,
.project-thumb.is-active {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 8px 18px rgba(76, 51, 28, 0.08);
}

.project-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(31, 41, 51, 0.08);
}

.project-thumb span {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 24px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  color: var(--muted-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf3;
  font-size: 13px;
  font-weight: 750;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.skill-block {
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.skill-block h3 {
  margin-bottom: 14px;
}

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

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted-strong);
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.12);
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.timeline-card h3,
.timeline-card p {
  margin-bottom: 4px;
}

.timeline-card > span {
  color: var(--accent-dark);
  font-weight: 850;
}

.timeline-card > p {
  grid-column: 1 / -1;
  max-width: 850px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 52px;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact h2 {
  max-width: 780px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 0 0 36px;
  color: var(--muted);
  font-size: 14px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 18px;
  padding: 26px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox.is-open {
  display: grid;
}

.lightbox__content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  max-width: 1280px;
  max-height: calc(100vh - 52px);
  margin: 0 auto;
}

.lightbox__image-wrap {
  display: grid;
  place-items: center;
  min-height: 0;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 240px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  background: #ffffff;
}

.lightbox__caption {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.lightbox__caption span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox__caption strong {
  display: block;
  margin-bottom: 8px;
  color: var(--heading);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.lightbox__caption p {
  margin-bottom: 8px;
  color: var(--muted-strong);
}

.lightbox__caption small {
  color: var(--muted);
  font-weight: 750;
}

.lightbox__close,
.lightbox__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  line-height: 0;
  transition: 0.2s ease;
}

.lightbox__close svg,
.lightbox__arrow svg {
  display: block;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.lightbox__close svg {
  width: 21px;
  height: 21px;
}

.lightbox__arrow svg {
  width: 30px;
  height: 30px;
}

.lightbox__close:hover,
.lightbox__arrow:hover {
  color: #fffaf3;
  border-color: rgba(249, 115, 22, 0.48);
  background: var(--accent);
}

.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
}

.lightbox__arrow {
  width: 58px;
  height: 58px;
}

.lightbox__arrow--prev {
  justify-self: end;
}

.lightbox__arrow--next {
  justify-self: start;
}

@media (max-width: 980px) {
  .hero,
  .project-card__hero,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-card {
    align-self: auto;
  }

  .intro-strip {
    grid-template-columns: 1fr;
  }

  .contact__actions {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .brand__text {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 250, 243, 0.98);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .section {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero {
    padding-top: 56px;
  }

  h1 {
    font-size: clamp(40px, 15vw, 60px);
  }

  .hero__text,
  .project-card__description {
    font-size: 16px;
  }

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

  .project-card__hero,
  .project-card__footer {
    padding: 16px;
  }

  .project-card__footer {
    padding-top: 0;
  }

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

  .project-gallery__arrow {
    width: 36px;
    height: 36px;
  }

  .project-gallery__arrow svg {
    width: 18px;
    height: 18px;
  }

  .project-gallery__info {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .lightbox {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 12px;
  }

  .lightbox__content {
    max-height: calc(100vh - 36px);
    padding-top: 48px;
  }

  .lightbox img {
    max-height: calc(100vh - 320px);
    border-radius: 16px;
  }

  .lightbox__arrow {
    position: fixed;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
  }

  .lightbox__arrow svg {
    width: 25px;
    height: 25px;
  }

  .lightbox__arrow--prev {
    left: 10px;
    justify-self: auto;
  }

  .lightbox__arrow--next {
    right: 10px;
    justify-self: auto;
  }

  .lightbox__caption {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 22px;
  }

  .site-footer {
    flex-direction: column;
  }
}
