:root {
  --bg: #F3EBDD;
  --bg-alt: #E8DEC9;
  --surface: #DDD1B7;

  --ink: #2F3026;
  --ink-muted: #6F705C;

  --accent: #7A8152;
  --accent-dark: #5E653D;

  --border: #CFC3A5;
  --cream: #F8F3E8;

  --olive-light: #A8AD7A;
  --olive-soft: #C5C9A2;
  --beige-dark: #B8A989;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.15;
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}


.zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 19, 13, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--cream);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}


nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  padding: 22px 0;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition:
    background 0.3s ease,
    padding 0.3s ease,
    border-color 0.3s ease;
}

nav.scrolled {
  background: rgba(243, 235, 221, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  padding: 15px 0;

  border-bottom: 1px solid var(--border);
}

nav.on-hero:not(.scrolled) {
  color: var(--cream);
}

nav.on-hero:not(.scrolled) .nav-links a {
  color: rgba(248, 243, 232, 0.9);
}

nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

nav.on-hero:not(.scrolled) .nav-links a.active,
nav.on-hero:not(.scrolled) .nav-links a:hover {
  color: var(--cream);
  border-bottom-color: var(--cream);
}


.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  animation: heroReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroReveal {
  to { opacity: 1; transform: scale(1); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(30, 29, 20, 0.88) 0%,
      rgba(30, 29, 20, 0.55) 55%,
      rgba(30, 29, 20, 0.30) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--cream);
  padding-bottom: 96px;
  width: 100%;
}

.hero-content::before {
  content: "";
  position: absolute;
  z-index: -1;

  left: -80px;
  bottom: 50px;

  width: 620px;
  height: 430px;

  background: rgba(20, 22, 15, 0.28);
  filter: blur(80px);

  border-radius: 50%;
}

.hero-content h1 {
  font-size: clamp(34px, 5vw, 58px);
  max-width: 18ch;
  margin-bottom: 28px;
}

.hero-content p {
  font-size: 17px;
  max-width: 46ch;
  color: rgba(248, 243, 232, 0.85);
  margin-bottom: 32px;
}

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  border: 1px solid rgba(247,242,230,0.6);
  color: var(--cream);
}
.btn-outline:hover { border-color: var(--cream); background: rgba(247,242,230,0.1); }


.placeholder-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--ink-muted);
  font-size: 12.5px;
  padding: 16px;
  border: 1px dashed var(--border);
  background: var(--surface);
}

.placeholder-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.placeholder-img:has(img) {
  border: none;
  background: var(--surface);
}


section { padding: 120px 0; }
section.alt { background: var(--bg-alt); }

.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 38px); }
.section-sub { color: var(--ink-muted); max-width: 52ch; margin-top: 14px; font-size: 16px; }


.about-lede {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  max-width: 28ch;
  line-height: 1.35;
  margin-bottom: 32px;
}

.about-body { max-width: 62ch; font-size: 16.5px; }
.about-body p + p { margin-top: 18px; }


.project { padding: 64px 0; border-bottom: 1px solid var(--border); }
.project:first-of-type { padding-top: 40px; }
.project:last-of-type { border-bottom: none; }

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  aspect-ratio: 16 / 9;
  margin-bottom: 32px;
  border-radius: 4px;
  overflow: hidden;
}

.project-body h3 { font-size: 27px; margin-bottom: 12px; }
.project-body p { color: var(--ink-muted); font-size: 15.5px; max-width: 60ch; margin-bottom: 16px; }

.tech-list { font-size: 13px; color: var(--accent-dark); font-weight: 500; margin-bottom: 16px; }

.project-link {
  font-size: 14px;
  border-bottom: 1px solid var(--ink-muted);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.project-link:hover { border-color: var(--accent); color: var(--accent-dark); }


.project-one {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.project-one-grid {
  display: grid;
  gap: 12px;
  aspect-ratio: 16 / 9;
  margin-bottom: 32px;
  border-radius: 4px;
  overflow: hidden;
}

.single-image-grid {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.project-one-body h3 { font-size: 27px; margin-bottom: 12px; }
.project-one-body p { color: var(--ink-muted); font-size: 15.5px; max-width: 60ch; margin-bottom: 16px; }

.project-one-link {
  font-size: 14px;
  border-bottom: 1px solid var(--ink-muted);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.project-one-link:hover { border-color: var(--accent); color: var(--accent-dark); }


.figma-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 90px;
  max-width: 900px;
  margin: 0 auto;
}

.figma-item {
  width: 100%;
}

.figma-item .placeholder-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  margin-bottom: 12px;
}

.figma-item h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.figma-item p {
  font-size: 13px;
  color: var(--ink-muted);
}


.photo-category { margin-bottom: 64px; }
.photo-category:last-child { margin-bottom: 0; }

.photo-category h3 {
  font-size: 22px;
  margin-bottom: 20px;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photo-row .placeholder-img { aspect-ratio: 3/4; border-radius: 3px; }

.photo-item {
  position: relative;
}

.photo-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(30,29,20,0.6), transparent);
  color: var(--cream);
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.photo-item:hover .photo-caption { opacity: 1; transform: translateY(0); }


.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.skills-group h3 { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px; margin-bottom: 18px; }
.skills-group ul { list-style: none; }
.skills-group li { font-size: 15.5px; color: var(--ink-muted); padding: 9px 0; border-bottom: 1px solid var(--border); }


.contact-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-inner h2 { margin-bottom: 18px; }
.contact-inner p { color: var(--ink-muted); margin-bottom: 36px; font-size: 16.5px; }

.contact-email {
  font-family: 'Fraunces', serif;
  font-size: clamp(15px, 5.6vw, 32px);
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-email:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

.contact-links { display: flex; justify-content: center; gap: 28px; font-size: 14px; }
.contact-links a { color: var(--ink-muted); transition: color 0.2s ease; }
.contact-links a:hover { color: var(--ink); }

footer { padding: 32px 0; text-align: center; font-size: 13px; color: var(--ink-muted); }


@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .wordmark {
    font-size: 16px;
  }

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

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

  .project-grid,
  .project-one-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .project-grid .placeholder-img,
  .project-one-grid .placeholder-img {
    aspect-ratio: 4 / 3;
  }

  .figma-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    gap: 48px;
  }

  .hero-content h1 {
    font-size: clamp(26px, 7vw, 36px);
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero {
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 90px 0 40px;
  }

  .hero-content {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; opacity: 1; transform: none; }
  * { transition: none !important; }
}

:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }


.carousel-block { margin-top: 40px; }

.carousel { position: relative; }

.car-stage {
  position: relative;
  min-height: 200px;
  overflow-x: clip;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide {
  position: absolute;
  top: 50%; left: 50%;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(47, 48, 38, 0.25);
  transform: translate(-50%, -50%) translateX(var(--x, 0px)) scale(var(--sc, 1));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.slide:not(.active) img { filter: brightness(0.82); }
.slide.active { cursor: zoom-in; }

.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 20;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--cream); color: var(--ink);
  font-size: 20px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.car-arrow:hover { background: var(--accent); color: var(--cream); }
.car-arrow.prev { left: 0; }
.car-arrow.next { right: 0; }

.car-thumbs { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.thumb {
  width: 76px; height: 52px; padding: 0;
  border: 2px solid transparent; border-radius: 3px;
  background: var(--surface); cursor: pointer; overflow: hidden;
  opacity: 0.6; transition: opacity 0.2s ease, border-color 0.2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; }
.thumb.on { opacity: 1; border-color: var(--accent); }

.car-dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: var(--beige-dark); cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dot.on { background: var(--accent-dark); transform: scale(1.3); }

.car-detail { max-width: 680px; margin: 36px auto 0; text-align: center; }
.car-detail h3 { font-size: 26px; margin-bottom: 12px; }
.car-detail p { color: var(--ink-muted); font-size: 15.5px; margin-bottom: 16px; }
.cd-cat { font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark); font-weight: 500; margin-bottom: 10px; }
.photos .car-detail h3 { font-size: 22px; font-style: italic; font-weight: 400; }

@media (max-width: 900px) {
  .car-arrow { width: 38px; height: 38px; font-size: 17px; }
  .car-thumbs { flex-wrap: wrap; }
}


:root {
  --hero-blur: 4px;        /* <<< AJUSTEAZA AICI blur-ul pozei din hero (0px = fara blur) */
  --hero-fill-blur: 40px;  /* blur-ul zonelor din jurul pozei (cand poza nu acopera tot ecranul) */
  --radius: 16px;
  --shadow-soft: 0 10px 30px rgba(47, 48, 38, 0.10);
  --shadow-lift: 0 24px 60px rgba(47, 48, 38, 0.22);
}


.hero-bg { background: #1e1d14; }

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.4s ease-out;
}

.hero-bg .hero-fill {
  object-fit: cover;
  filter: blur(var(--hero-fill-blur)) brightness(0.75) saturate(1.1);
  transform: translate(var(--px, 0), var(--py, 0)) scale(1.15);
}

.hero-bg .hero-main {
  object-fit: cover;              
  object-position: center;        
  filter: blur(var(--hero-blur));
  transform: translate(var(--mx, 0), var(--my, 0)) scale(1.06); 
}

.hero-scrim {
  background: linear-gradient(
    to top,
    rgba(30, 29, 20, 0.80) 0%,
    rgba(30, 29, 20, 0.38) 50%,
    rgba(30, 29, 20, 0.12) 100%
  );
}


nav, nav.scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-bottom: none;
  padding: 16px 0;
}

nav .wrap {
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease,
              max-width 0.4s ease, border-color 0.3s ease;
  border: 1px solid transparent;
  border-radius: 999px;
}

nav.scrolled .wrap {
  max-width: 880px;
  padding: 10px 28px;
  background: rgba(243, 235, 221, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-color: rgba(207, 195, 165, 0.8);
  box-shadow: var(--shadow-soft);
}


.btn {
  border-radius: 999px;
  padding: 14px 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.2s ease, border-color 0.2s ease;
}

.btn-primary { box-shadow: 0 10px 24px rgba(94, 101, 61, 0.45); }

.btn:hover { transform: translateY(-3px); }
.btn-primary:hover { box-shadow: 0 16px 32px rgba(94, 101, 61, 0.55); }
.btn:active { transform: translateY(0); }

.btn-outline {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(248, 243, 232, 0.08);
}


h1, h2, h3, .display { letter-spacing: -0.015em; }

.section-head h2 {
  position: relative;
  padding-bottom: 14px;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

section { padding: 130px 0; }

section.alt {
  border-radius: 40px;
  margin: 0 16px;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.4) inset;
}


.car-stage { perspective: 1600px; }

.slide {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) translateX(var(--x, 0px)) translateZ(var(--z, 0px))
             scale(var(--sc, 1)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease,
              box-shadow 0.4s ease;
}

.slide.active:hover { box-shadow: 0 30px 80px rgba(47, 48, 38, 0.32); }

.car-arrow {
  background: rgba(248, 243, 232, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.car-arrow:hover { transform: translateY(-50%) scale(1.08); }

.thumb { border-radius: 10px; }
.cd-cat { letter-spacing: 0.16em; }

.project-link {
  border-bottom: none;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  display: inline-block;
  transition: transform 0.25s ease, background 0.2s ease;
}
.project-link:hover { background: var(--accent-dark); transform: translateY(-2px); color: var(--cream); }


.skills-grid { perspective: 1200px; }

.skills-group {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 36px 28px;
  box-shadow: var(--shadow-soft);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.skills-group:hover { box-shadow: var(--shadow-lift); }
.skills-group li:last-child { border-bottom: none; }


.contact-links a {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.25s ease;
}
.contact-links a:hover { background: var(--cream); transform: translateY(-2px); }


.lightbox {
  background: rgba(20, 19, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.lightbox img { border-radius: 14px; }


.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  section { padding: 90px 0; }
  section.alt { border-radius: 28px; margin: 0 8px; }
  nav.scrolled .wrap { padding: 10px 20px; margin: 0 12px; }
  .skills-group { padding: 28px 24px 20px; }
  .hero-bg .hero-fill { filter: blur(30px) brightness(0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .slide, .skills-group, .btn { transform-style: flat; }
}



.hero-content h1 {
  max-width: none;
  margin-bottom: 36px;
  font-size: inherit;
  line-height: 0.95;
}

.hero-content h1 span {
  display: block;
  opacity: 0;
  transform: translateY(26px);
  animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.h1-sans {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 6.4vw, 84px);
  letter-spacing: -0.04em;
  animation-delay: 0.25s;
}

.h1-serif {
  font-family: 'Instrument Serif', 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(46px, 7.8vw, 104px);
  letter-spacing: -0.02em;
  color: var(--olive-soft);
  margin-top: 0.06em;
  animation-delay: 0.45s;
}

@keyframes riseIn { to { opacity: 1; transform: none; } }


.nav-item { position: relative; }

.has-menu > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  padding-top: 18px;            
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.25s ease, visibility 0.2s;
}

.has-menu:hover .submenu,
.has-menu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.submenu-panel {
  min-width: 250px;
  padding: 8px;
  background: rgba(248, 243, 232, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
}

.nav-links .submenu-panel a,
nav.on-hero:not(.scrolled) .nav-links .submenu a {
  display: block;
  padding: 11px 16px;
  border-radius: 12px;
  border-bottom: none;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

.nav-links .submenu-panel a:hover,
.nav-links .submenu-panel a.active,
nav.on-hero:not(.scrolled) .nav-links .submenu a:hover,
nav.on-hero:not(.scrolled) .nav-links .submenu a.active {
  background: var(--bg-alt);
  color: var(--accent-dark);
  border-bottom: none;
}


.work-intro { margin-bottom: 8px; }
.work-intro h2 { font-size: clamp(34px, 4.6vw, 54px); }

.work-part { scroll-margin-top: 90px; padding-top: 72px; }
.work-part + .work-part {
  margin-top: 96px;
  border-top: 1px solid var(--border);
}

.part-head { margin-bottom: 0; }
.part-head h3 { font-size: clamp(26px, 3.2vw, 36px); }

.part-num {
  display: block;
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

section.alt + section.alt { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .hero-content h1 span { animation: none; opacity: 1; transform: none; }
}



.car-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-chip {
  padding: 9px 20px;
  font: 500 14px 'Inter', sans-serif;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.filter-chip:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); }
.filter-chip.on { background: var(--accent-dark); color: var(--cream); border-color: var(--accent-dark); }


.skills-grid { align-items: start; }

.skill-sub + .skill-sub { margin-top: 26px; }
.skill-sub h4 {
  font: 600 12px 'Inter', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip:hover { background: var(--accent); color: var(--cream); border-color: var(--accent); }


.nav-toggle {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
nav.menu-open .nav-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.menu-open .nav-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }


@media (max-width: 900px) {
  .nav-toggle { display: block; margin-right: -8px; }
  nav .wrap { position: relative; }

  #nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: calc(100% + 12px);
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 12px;
    background: rgba(248, 243, 232, 0.98);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-lift);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.3s ease, visibility 0.25s;
  }
  #nav.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }

  #nav .nav-links a {
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--ink);
    border-bottom: none;
    border-radius: 12px;
  }
  #nav .nav-links a:hover,
  #nav .nav-links a.active { background: var(--bg-alt); color: var(--accent-dark); border-bottom: none; }

  .has-menu > a::after { display: none; }

  #nav .submenu {
    position: static;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  #nav .submenu-panel {
    min-width: 0;
    padding: 0 0 6px 14px;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #nav .submenu-panel a { padding: 11px 16px; font-size: 14.5px; color: var(--ink-muted); }

  .carousel-block .car-stage { min-height: 0; }
  .carousel-block .car-thumbs { margin-top: 16px; }
  .carousel-block .car-dots { margin-top: 14px; }
  .carousel-block .car-detail { margin-top: 18px; }
}


.hero-content {
  transform-origin: left bottom;
  transform: translateY(calc(var(--hp, 0) * -28px)) scale(calc(1 - var(--hp, 0) * 0.05));
  opacity: calc(1 - var(--hp, 0) * 1.1);
}

/* --- reveal: panourile "se ridica" din perspectiva --- */
.reveal {
  transform: perspective(1100px) translateY(36px) rotateX(10deg);
  transform-origin: 50% 0;
}

.skills-group.reveal.in {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s ease-out, box-shadow 0.3s ease, opacity 0.8s ease;
}
.skills-group { position: relative; transform-style: preserve-3d; }
.skills-group::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.55), transparent 55%);
}
.skills-group:hover::after { opacity: 1; }
.skills-group h3,
.skills-group .skill-sub { transform: translateZ(22px); }

@media (prefers-reduced-motion: reduce) {
  .hero-content { transform: none; opacity: 1; }
  .reveal { transform: none; }
}


.skill-toggle {
  display: block;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: left;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 900px) {
  .skills-group h3,
  .skills-group .skill-sub { transform: none; }

  .skill-sub + .skill-sub { margin-top: 0; }
  .skill-sub h4 { margin-bottom: 0; }

  .skill-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    pointer-events: auto;
    cursor: pointer;
  }
  .skill-toggle::after {
    content: "";
    width: 7px; height: 7px;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }
  .skill-sub.open .skill-toggle::after { transform: rotate(-135deg); }

  .skill-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
  }
  .skill-sub.open .skill-body { grid-template-rows: 1fr; }
  .skill-inner { overflow: hidden; min-height: 0; }
  .skill-inner .chips { padding: 14px 0 8px; }
}


.contact-links { flex-wrap: wrap; gap: 12px; }

.contact-links a.cv-link {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.contact-links a.cv-link:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--cream);
}


.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
}

.trio-scene {
  --u: 1px;                                   
  display: flex;
  justify-content: center;
  padding: 30px 0;
  perspective: 1000px;
}

.trio {
  position: relative;
  width: calc(360 * var(--u));
  height: calc(380 * var(--u));
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 8deg)) rotateY(var(--ty, -18deg));
  transition: transform 0.4s ease-out;
}

.tcard {
  position: absolute;
  overflow: hidden;
  border-radius: calc(16 * var(--u));
  box-shadow: 0 calc(24 * var(--u)) calc(50 * var(--u)) rgba(47, 48, 38, 0.25);
  animation: cardFloat 7s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* poza (in spate) */
.card-photo {
  left: 0; top: 0;
  width: calc(250 * var(--u));
  height: calc(320 * var(--u));
  transform: translateZ(0) rotate(-5deg);
  background: var(--surface);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo::after {                           
  content: "";
  position: absolute;
  inset: calc(10 * var(--u));
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: calc(8 * var(--u));
}

/* codul (la mijloc) */
.card-code {
  right: 0; top: calc(140 * var(--u));
  width: calc(172 * var(--u));
  padding: calc(11 * var(--u)) calc(14 * var(--u)) calc(14 * var(--u));
  background: var(--ink);
  color: var(--cream);
  transform: translateZ(calc(70 * var(--u))) rotate(3deg);
  animation-delay: -4s;
}
.win-dots { display: flex; gap: calc(5 * var(--u)); margin-bottom: calc(10 * var(--u)); }
.win-dots i {
  width: calc(7 * var(--u)); height: calc(7 * var(--u));
  border-radius: 50%;
  background: var(--beige-dark);
  opacity: 0.7;
}
.card-code pre { margin: 0; }
.card-code code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: max(8px, calc(10 * var(--u))); line-height: 1.65;
  line-height: 1.7;
  color: var(--olive-soft);
}
.card-code code b { font-weight: 500; color: var(--olive-light); }
.card-code code em { font-style: normal; color: var(--cream); }

.card-music {
  left: calc(30 * var(--u)); bottom: calc(26 * var(--u));
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  display: grid;
  place-items: center;
  color: var(--cream);
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  transform: translateZ(calc(130 * var(--u))) rotate(-3deg);
  animation-delay: -4s;
}
.card-music svg { width: 52%; height: auto; display: block; }

.fnote {
  position: absolute;
  display: block;
  animation: noteFloat 5s ease-in-out infinite;
}
.fnote svg { width: 100%; height: auto; display: block; }
.n1 { right: 0; top: calc(-8 * var(--u)); width: calc(30 * var(--u)); color: var(--accent); transform: translateZ(calc(170 * var(--u))); }
.n2 { left: calc(-14 * var(--u)); top: 52%; width: calc(24 * var(--u)); color: var(--beige-dark); transform: translateZ(calc(110 * var(--u))); animation-delay: -1.5s; }
.n3 { right: calc(36 * var(--u)); bottom: calc(6 * var(--u)); width: calc(34 * var(--u)); color: var(--olive-light); transform: translateZ(calc(160 * var(--u))); animation-delay: -3s; }
@keyframes noteFloat {
  0%, 100% { translate: 0 0;     rotate: -8deg; }
  50%      { translate: 0 -14px; rotate: 8deg; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .trio-scene { order: -1; --u: 0.64px; }
}

@media (prefers-reduced-motion: reduce) {
  .tcard, .fnote { animation: none; }
}


:root { --site-zoom: 0.9; }

section,
footer {
  zoom: var(--site-zoom);
}

@media (max-width: 1024px) {
  :root { --site-zoom: 0.9; }
}

@media (max-width: 600px) {
  :root { --site-zoom: 0.88; }
}


.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 14px 28px;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease, border-color 0.25s ease, background 0.25s ease;
}

.stat strong {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  color: var(--accent-dark);
}

.stat span {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.stat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 600px) {
  .stat { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 12px 16px; }
  .stat:last-child { flex-basis: 100%; }
}


@supports (animation-timeline: scroll()) {
  body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 200;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: progressGrow linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progressGrow { to { transform: scaleX(1); } }
}

.hero-bg .hero-main { animation: heroDrift 24s ease-in-out infinite alternate; }
@keyframes heroDrift {
  from { scale: 1; }
  to   { scale: 1.05; }
}

.btn-primary::after {
  content: "→";
  display: inline-block;
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  vertical-align: bottom;
  opacity: 0;
  transition: max-width 0.3s ease, margin-left 0.3s ease, opacity 0.3s ease;
}
.btn-primary:hover::after { max-width: 1.4em; margin-left: 8px; opacity: 1; }

.nav-links > a,
.nav-links > .nav-item > a { border-bottom: none; position: relative; }
.nav-links > a::before,
.nav-links > .nav-item > a::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links > a:hover::before, .nav-links > a.active::before,
.nav-links > .nav-item > a:hover::before, .nav-links > .nav-item > a.active::before { transform: scaleX(1); }

.section-head h2::after { transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s; width: 0; }
.section-head.in h2::after { width: 36px; }
.section-head:hover h2::after { width: 72px; }

.about-body.in p { animation: softRise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.about-body.in p:nth-child(2) { animation-delay: 0.12s; }
.about-body.in p:nth-child(3) { animation-delay: 0.24s; }
.about-stats.in .stat { animation: softRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.about-stats.in .stat:nth-child(1) { animation-delay: 0.1s; }
.about-stats.in .stat:nth-child(2) { animation-delay: 0.2s; }
.about-stats.in .stat:nth-child(3) { animation-delay: 0.3s; }
@keyframes softRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.slide.active:hover { filter: saturate(1.06); }
.dot { transition: width 0.3s ease, background 0.2s ease, border-radius 0.3s ease; }
.dot.on { width: 26px; border-radius: 6px; transform: none; }
.car-arrow.prev:hover { transform: translateY(-50%) translateX(-3px); }
.car-arrow.next:hover { transform: translateY(-50%) translateX(3px); }
.car-detail h3, .car-detail p, .cd-cat { animation: softRise 0.6s ease both; }

.chip { transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.chip:hover { transform: translateY(-2px); }
.contact-email { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.4s ease, color 0.2s ease, border-color 0.2s ease; }
.contact-email:hover { background-size: 100% 2px; }

.tcard { animation-duration: 8s; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg .hero-main, .about-body p, .about-stats .stat,
  .car-detail h3, .car-detail p, .cd-cat { animation: none !important; }
  body::before { display: none; }
}
