:root {
  --bg: #faf6ee;
  --bg-alt: #f1ead9;
  --ink: #1c1b17;
  --ink-soft: #57544a;
  --accent: #5e7948;
  --accent-dark: #425532;
  --accent-soft: #e3ead6;
  --cream: #fffdf8;
  --border: rgba(28, 27, 23, 0.14);
  --border-strong: rgba(28, 27, 23, 0.5);
  --shadow: 0 20px 45px rgba(28, 27, 23, 0.12);
  --shadow-sm: 0 8px 20px rgba(28, 27, 23, 0.08);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-round: 'Baloo 2', sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- layout helpers ---------- */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }
.section { padding: 5.5rem 0; }
.section--alt { background: var(--bg-alt); }
.section--accent { background: var(--accent); color: var(--cream); }
.section--accent .title-lg { color: var(--cream); }
.section--tight-top { padding-top: 3.5rem; }
.section--tight-bottom { padding-bottom: 2rem; }
.section-cta-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 2rem;
}
.title-xl--sub { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.title-xl--spaced { margin-bottom: 2.6rem; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 0.9rem;
}
.section--accent .eyebrow { color: var(--accent-soft); }
.title-xl {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
}
.title-lg {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.9rem);
}
.lede {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}
.section--accent .lede { color: #eef2e6; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px) rotate(-0.6deg); box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-outline { background: transparent; color: var(--ink); }
.section--accent .btn-outline { color: var(--cream); border-color: var(--cream); }
.btn-ghost {
  background: var(--cream);
  border-color: var(--border);
  color: var(--ink);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 246, 238, 0.82);
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 6px 24px rgba(28,27,23,0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--ink);
}
.brand .name {
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-links a:hover { background: var(--accent-soft); }
.nav-links a.active { background: var(--ink); color: var(--cream); }
.nav-cta { margin-left: 6px; padding: 10px 20px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cream);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.site-header.nav-open .nav-toggle span { background: transparent; }
.site-header.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  padding: 4.5rem 0 5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero .signature {
  font-family: var(--font-hand);
  font-size: 2.1rem;
  color: var(--accent-dark);
  display: block;
  margin-top: 0.4rem;
}
.hero .lede { margin-top: 1.4rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 2rem; flex-wrap: wrap; }
.hero-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art img { width: 72%; height: auto; }
.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.hero-tags span {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
}

/* ---------- cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }

.tile {
  display: block;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0.2rem 0 0.5rem; color: var(--ink); }
.tile p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55; }
.tile .icon-badge {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 0.6rem;
}

/* reveal on scroll */
/* Content stays visible even if JS never runs; only the offset animates in. */
.reveal { transform: translateY(18px); transition: transform 0.6s ease; }
.reveal.is-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: none; }
}

/* ---------- about page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.2rem;
  align-items: start;
}
.about-grid .lede { margin-top: 1rem; }
.about-photo > img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.tool-row { display: flex; gap: 10px; margin-top: 1.2rem; flex-wrap: wrap; }
.tool-row img {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover;
}
.quote-hand {
  font-family: var(--font-hand);
  font-size: 2.4rem;
  color: var(--accent-dark);
  margin: 0 0 0.4rem;
}
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1.6rem; }
.tag-list span {
  font-size: 0.82rem; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); padding: 6px 14px; border-radius: 999px;
}

/* ---------- work page ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2.6rem;
  margin-bottom: 3rem;
}
.filter-bar button {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.filter-bar button:hover { transform: translateY(-2px); }
.filter-bar button.active { background: var(--ink); color: var(--cream); }

.work-category { margin-bottom: 4.5rem; }
.work-category .title-lg { display: flex; align-items: baseline; gap: 0.6rem; }
.work-category .title-lg small {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.project-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.4rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.project-card.no-media { grid-template-columns: 1fr; }
.project-card .media { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #111; }
.project-card .media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; }
.project-card .media button.zoomable {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
}
.project-card .media button.zoomable img { transition: transform 0.3s ease; }
.project-card .media button.zoomable:hover img { transform: scale(1.06); }

.project-card.video-project { grid-template-columns: 220px 1fr; }
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed.landscape { aspect-ratio: 16 / 9; max-width: 560px; margin-bottom: 1.5rem; }
.video-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.video-pair .video-embed.landscape { max-width: none; margin-bottom: 0; }

.site-embed {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #fff;
  margin-bottom: 1.5rem;
}
.site-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.embed-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; border: 0; padding: 1rem; margin: 0; cursor: pointer;
  background: linear-gradient(rgba(17,16,12,0.35), rgba(17,16,12,0.6));
  color: var(--cream); text-align: center; font-family: var(--font-body);
}
.embed-facade-play {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--cream); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.embed-facade-label { font-weight: 700; font-size: 0.88rem; }

.project-card .showcase {
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--ink);
  margin-bottom: 1.5rem;
  background: var(--cream);
}
.project-card .showcase button.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.project-card .showcase img { width: 100%; height: auto; display: block; }

.project-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 0.7rem; }
.project-card p { margin: 0 0 1rem; color: var(--ink-soft); line-height: 1.6; }
.project-links { display: flex; gap: 18px; flex-wrap: wrap; }
.project-links a {
  font-weight: 700; font-size: 0.88rem; text-decoration: none;
  color: var(--accent-dark); border-bottom: 2px solid var(--accent-dark);
  padding-bottom: 2px;
}

.creation-block { margin-bottom: 2.4rem; }
.creation-block .eyebrow { margin-bottom: 1.2rem; }
.creation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.creation-grid button {
  padding: 0; border: 2px solid var(--ink); border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; background: var(--cream);
  aspect-ratio: 1;
}
.creation-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.creation-grid button:hover img { transform: scale(1.08); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(17, 16, 12, 0.9);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 900px); max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--cream); border: none; font-size: 1.3rem; cursor: pointer;
}

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contact-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.contact-media img { width: 100%; height: auto; opacity: 0.9; }
.contact-media::after {
  content: '▶ ma tortue dit bonjour';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; color: #fff; font-weight: 700; font-family: var(--font-body);
  background: linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.35));
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-links a {
  display: flex; align-items: center;
  padding: 1.1rem 1.5rem;
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.18s ease, background 0.18s ease;
}
.contact-links a:hover { transform: translateX(4px); background: var(--cream); }
.contact-direct {
  margin-top: 2rem;
  display: flex; gap: 24px; flex-wrap: wrap;
  font-weight: 600;
}
.contact-direct a { text-decoration: none; border-bottom: 2px solid var(--accent-dark); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 0 1.6rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  gap: 2.5rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand .signature {
  font-family: var(--font-hand);
  font-size: 2rem;
}
.footer-brand p { color: rgba(255,253,248,0.7); max-width: 32ch; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255,253,248,0.55); margin: 0 0 1rem;
}
.footer-col a {
  display: block; text-decoration: none; color: var(--cream);
  padding: 6px 0; font-weight: 500; opacity: 0.9;
}
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.6rem; font-size: 0.82rem; color: rgba(255,253,248,0.55);
  flex-wrap: wrap; gap: 10px;
}
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
/* ---------- legal pages ---------- */
.legal-content { max-width: 68ch; margin-top: 0.6rem; }
.legal-content section {
  margin-bottom: 1.8rem; padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}
.legal-content section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.legal-content h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.25rem; margin: 0 0 0.6rem; color: var(--ink);
}
.legal-content p { color: var(--ink-soft); line-height: 1.65; margin: 0; }
.legal-content a { color: var(--accent-dark); font-weight: 600; }
.legal-content code {
  background: var(--bg-alt); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em;
}

/* ---------- 404 page ---------- */
.error-page { min-height: 50vh; text-align: center; }
.error-page .lede { margin: 1.2rem auto 2.2rem; }
.error-page .hero-actions { justify-content: center; }

/* ---------- CV page ---------- */
.cv-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem 24px 1.5rem; flex-wrap: wrap; gap: 12px;
}
.cv-sheet {
  position: relative;
  max-width: 980px;
  margin: 0 auto 4rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 3rem;
  overflow: hidden;
}
.cv-decor { position: absolute; pointer-events: none; }
.cv-decor-dots {
  top: 24px; right: 60px; width: 120px; height: 90px;
  background-image: radial-gradient(var(--accent) 3px, transparent 3.5px);
  background-size: 18px 18px;
  opacity: 0.45;
}
.cv-decor-stroke-tl {
  top: -30px; left: 40px; width: 90px; height: 90px;
  border: 10px solid var(--accent);
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  opacity: 0.5;
  transform: rotate(-12deg);
}
.cv-decor-stroke-br {
  bottom: -40px; right: -30px; width: 140px; height: 140px;
  border: 12px solid var(--accent);
  border-radius: 55% 45% 40% 60% / 50% 55% 45% 50%;
  opacity: 0.35;
  transform: rotate(8deg);
}
.cv-name {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin: 0 0 1.4rem;
}
.cv-body { position: relative; z-index: 1; }
.cv-top {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.8rem;
  align-items: center;
  margin-bottom: 2.2rem;
}
.cv-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid var(--cream);
  outline: 3px solid var(--accent);
  border-radius: 58% 42% 46% 54% / 50% 46% 54% 50%;
  box-shadow: var(--shadow-sm);
}
.cv-intro h2 {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.cv-intro p { margin: 0 0 0.7rem; color: var(--ink-soft); line-height: 1.6; font-size: 0.95rem; }
.cv-intro p.cv-objective { font-weight: 700; color: var(--ink); }

.cv-columns { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
.cv-col h2 {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  border-bottom: 3px solid var(--accent-soft);
  padding-bottom: 4px;
  margin: 2rem 0 1rem;
}
.cv-col h2:first-child { margin-top: 0; }
.cv-subhead {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.2rem 0 0.6rem;
}
.cv-entry { margin-bottom: 1.1rem; }
.cv-entry-title { font-weight: 700; font-size: 0.94rem; margin: 0; }
.cv-entry-date {
  font-size: 0.78rem; font-weight: 600; color: var(--accent-dark);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cv-entry ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.cv-entry li { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }

.cv-line { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.5rem; }
.cv-line strong { color: var(--ink); }

.cv-hobbies { display: flex; gap: 18px; margin-top: 0.6rem; }
.cv-hobbies span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ink-soft); }
.cv-hobbies .emoji { font-size: 1.4rem; }

.cv-skills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 0.6rem; }
.cv-skills img { width: 34px; height: 34px; border-radius: 9px; }

.cv-footer-bar {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1.5px solid var(--border);
  display: flex; gap: 28px; flex-wrap: wrap; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo > img { max-width: 280px; }
  .project-card { grid-template-columns: 1fr; }
  .project-card .media { max-width: 280px; }
  .project-card.video-project { grid-template-columns: 1fr; }
  .project-card.video-project .video-embed { max-width: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cv-columns { grid-template-columns: 1fr; }
  .cv-top { grid-template-columns: 140px 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 2px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 20px 18px;
    display: none;
  }
  .site-header.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; }
  .creation-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .section { padding: 3.4rem 0; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .creation-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-tags, .hero-actions { justify-content: center; }
  .hero-art { padding-bottom: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cv-sheet { padding: 2.4rem 1.2rem 1.8rem; }
  .cv-name { font-size: 1.6rem; text-align: center; }
  .cv-top { grid-template-columns: 1fr; text-align: center; }
  .cv-photo img { max-width: 160px; margin: 0 auto; }
  .cv-toolbar { justify-content: center; text-align: center; }
}

/* Placed last so print always wins regardless of the emulated print viewport width. */
@media print {
  .site-header, .site-footer, .cv-toolbar, .notice { display: none !important; }
  body { background: #fff; }
  .cv-sheet {
    box-shadow: none !important; border: none !important; margin: 0 !important; max-width: none !important;
    padding: 0.2cm 0.6cm !important;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  @page { size: A4; margin: 0.9cm; }

  .cv-name { font-size: 1.5rem !important; margin-bottom: 0.6rem !important; }
  .cv-decor-dots { top: 0; right: 20px; width: 90px; height: 60px; background-size: 14px 14px; }
  .cv-decor-stroke-tl { display: none; }
  .cv-decor-stroke-br { width: 90px; height: 90px; bottom: -20px; right: -20px; }

  .cv-top { grid-template-columns: 110px 1fr !important; gap: 1rem !important; margin-bottom: 1rem !important; }
  .cv-photo img { aspect-ratio: 1; }
  .cv-intro h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
  .cv-intro p { font-size: 0.78rem; line-height: 1.35; margin-bottom: 0.4rem; }

  .cv-columns { grid-template-columns: 1.15fr 0.85fr !important; gap: 1.6rem !important; }
  .cv-col h2 { font-size: 0.98rem; margin: 0.7rem 0 0.4rem; padding-bottom: 2px; }
  .cv-col h2:first-child { margin-top: 0; }
  .cv-subhead { margin: 0.4rem 0 0.2rem; font-size: 0.68rem; }
  .cv-entry { margin-bottom: 0.4rem; break-inside: avoid; }
  .cv-entry-title { font-size: 0.8rem; }
  .cv-entry-date { font-size: 0.65rem; }
  .cv-entry ul { margin-top: 0.15rem; padding-left: 0.9rem; }
  .cv-entry li { font-size: 0.72rem; line-height: 1.3; }
  .cv-line { font-size: 0.74rem; margin-bottom: 0.25rem; line-height: 1.3; }

  .cv-skills { margin-top: 0.3rem; gap: 6px; }
  .cv-skills img { width: 26px; height: 26px; }
  .cv-hobbies { margin-top: 0.3rem; gap: 12px; }
  .cv-hobbies .emoji { font-size: 1.1rem; }
  .cv-hobbies span { font-size: 0.68rem; }

  .cv-footer-bar { margin-top: 0.8rem; padding-top: 0.5rem; font-size: 0.74rem; gap: 20px; }
}
