/* ---------------------------------------------------------------------
   Julia Kharitonova — portfolio
   ------------------------------------------------------------------- */

:root {
  --bg: #0b0b0b;
  --bg-soft: #131313;
  --fg: #f4f3ef;
  --muted: #9b9a94;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #d9b26a;
  --radius: 14px;
  --header-h: 76px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .logo, .nav-desktop a, .nav-mobile a, .btn, .icon-text {
  font-weight: 600;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 96px 0; }
@media (max-width: 700px) {
  .section { padding: 64px 0; }
}

/* ---------- Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  padding: 0 28px;
  background: rgba(11, 11, 11, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .burger,
.site-header .nav-desktop { grid-column: 1; justify-self: start; }
.site-header .logo { grid-column: 2; justify-self: center; }
.site-header .social { grid-column: 3; justify-self: end; }

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  gap: 32px;
}
.nav-desktop a {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--fg);
}

.social { display: flex; align-items: center; gap: 10px; }
.icon-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 243, 251, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, color 0.25s ease;
}
.icon-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand, #fff);
  transform: translateY(-2px);
}
.icon-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #12111a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lang-switch:hover { background: #fff; transform: translateY(-2px); }

.burger {
  display: none;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
  z-index: 60;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.25s, opacity 0.25s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(84vw, 360px);
  background: #111;
  border-left: 1px solid var(--border);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 100px 32px 40px;
  transform: translateX(100%);
  transition: transform 0.32s ease;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a { font-size: 20px; color: var(--fg); }
.nav-mobile .social { margin-top: auto; }
.nav-mobile .lang-switch { font-size: 12px; color: #12111a; }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .nav-desktop, .social-desktop { display: none; }
  .burger { display: flex; }
}

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg-wrap { position: absolute; inset: 0; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero-bg.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.7) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 24px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 20px);
  color: rgba(244,243,239,0.85);
  margin: 0;
}
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 20px;
  color: var(--muted);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Section titles ---------------------------------------------- */
.section-title, .page-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  margin: 0 0 48px;
}

/* ---------- Projects grid ------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.25); }
.project-card-media { aspect-ratio: 4/3; overflow: hidden; background: #1a1a1a; }
.project-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-media img { transform: scale(1.05); }
.card-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2a2a2a, #101010);
}
.card-fallback span { font-size: 26px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.project-card-text { padding: 18px 20px 22px; }
.project-card-text h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.project-card-text p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Digital products ----------------------------------------------- */
.digital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 24px;
  max-width: 760px;
}
.digital-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.digital-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.25); }
.digital-card-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #211a35, #0c0a13);
}
.digital-card-media img { width: 100%; height: 100%; object-fit: cover; }
.digital-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.digital-card-body { padding: 30px 32px 8px; flex: 1; }
.digital-card-body h3 { margin: 0 0 10px; font-size: 24px; font-weight: 600; line-height: 1.3; }
.digital-card-desc { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.digital-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 32px 32px;
}
.digital-price { font-size: 20px; font-weight: 600; }
.digital-card-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.digital-buy { padding: 12px 30px; font-size: 15px; background: var(--fg); color: var(--bg); }
.digital-buy:hover { opacity: 0.85; background: var(--fg); color: var(--bg); }
.btn-outline.digital-preview-open {
  padding: 12px 24px;
  font-size: 15px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Digital preview modal ------------------------------------------ */
.digital-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.digital-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
}
.digital-preview-dialog {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.digital-preview-video { display: block; width: 100%; max-height: 80vh; }
.digital-preview-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.digital-preview-close:hover { background: rgba(0,0,0,0.85); }
.digital-preview-modal[hidden] { display: none; }

@media (max-width: 640px) {
  .digital-grid { grid-template-columns: 1fr; max-width: none; }
  .digital-card-body { padding: 22px 20px 6px; }
  .digital-card-footer { padding: 18px 20px 24px; }
}

/* ---------- CTA ----------------------------------------------------------- */
.cta-inner { text-align: center; }
.cta-text { font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 28px; }
.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  font-size: 15px;
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- About --------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo img { border-radius: var(--radius); }
.about-text h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 8px; font-weight: 600; }
.about-text .lead { color: #9b7bff; font-size: 17px; font-weight: 600; margin: 0 0 20px; }
.about-text p { color: rgba(244,243,239,0.88); margin: 0 0 16px; }
.about-h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 36px 0 10px; }
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 280px; }
}

/* Full-width section below the photo+intro block */
.about-full { margin-top: 72px; }
.about-full > .about-h2:first-child { margin-top: 0; }

.exp-bullets { max-width: 760px; margin: 8px 0 0; padding-left: 18px; }
.exp-bullets li {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 243, 239, 0.82);
  margin-bottom: 4px;
}

.exp-fl-list { max-width: 760px; display: flex; flex-direction: column; gap: 14px; margin: 10px 0 0; }
.exp-fl-title { margin: 0; font-size: 14px; font-weight: 600; color: rgba(244, 243, 239, 0.92); line-height: 1.55; }
.exp-fl-for { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Tools, shown as tag chips instead of plain text ---------------- */
.tools-block { display: flex; flex-direction: column; gap: 20px; margin: 8px 0 0; }
.tools-label { margin: 0 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.tools-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-tag {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  color: rgba(244, 243, 239, 0.88);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tool-tag:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }

/* ---------- About: experience list (resume-style) -------------------------- */
.exp-list { display: flex; flex-direction: column; gap: 14px; margin: 0 0 8px; }
.exp-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
}
.exp-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 6px;
}
.exp-company { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.exp-period { color: var(--muted); font-size: 13px; white-space: nowrap; }
.exp-role { color: var(--muted); font-size: 14px; margin: 0; }
.exp-item p.exp-desc { max-width: 760px; margin: 0; font-size: 14px; line-height: 1.6; color: rgba(244,243,239,0.82); }

/* ---------- Contact --------------------------------------------------------- */
.contact-section { min-height: calc(100dvh - var(--header-h)); display: flex; align-items: center; }
.contact-inner { text-align: center; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; margin: 0 0 18px; }
.contact-inner h1 { font-size: clamp(26px, 5vw, 44px); font-weight: 600; margin: 0 0 32px; word-break: break-word; }
.contact-social { justify-content: center; gap: 16px; }
.contact-social .icon-link { width: 44px; height: 44px; }
.contact-social .icon-link svg { width: 20px; height: 20px; }
.contact-social .icon-text { font-size: 15px; }
.contact-social .lang-switch { height: 44px; font-size: 14px; padding: 0 16px; }

/* ---------- Case pages --------------------------------------------------------- */
.case-header { padding-top: 48px; }
.case-header .eyebrow a { color: var(--muted); }
.case-header .eyebrow a:hover { color: var(--fg); }
.case-header h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 600; margin: 12px 0 10px; }
.case-meta { color: var(--muted); font-size: 14px; margin: 0 0 40px; }

.case-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: start;
  padding-bottom: 40px;
}
.case-text p { color: rgba(244,243,239,0.88); margin: 0 0 16px; }
.case-text .credits { color: var(--muted); font-size: 14px; }
.case-media { display: flex; flex-direction: column; gap: 24px; }
.video-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #111; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case-image img { border-radius: var(--radius); width: 100%; }

@media (max-width: 900px) {
  .case-body { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Footer --------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner a:hover { color: var(--fg); }
