:root {
  --bg: #050505;
  --surface: #0a0a0a;
  --border: #181818;
  --border-b: #222222;
  --text: #F0F0F0;
  --muted: #666;
  --muted-b: #999;
  --accent: #C1FF47;
  --fd: 'Syne', sans-serif;
  --fb: 'Inter', sans-serif;
  --fm: 'JetBrains Mono', monospace;
  --nav-bg: rgba(5, 5, 5, 0.88);
  --section-bg: var(--bg);
  --font-scale: 1;
  --nav-h: 80px;
}

.theme-light {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --border: #E5E5E5;
  --border-b: #D4D4D4;
  --text: #111111;
  --muted: #888888;
  --muted-b: #555555;
  --accent: #E63946; 
  --nav-bg: rgba(250, 250, 250, 0.88);
}

.high-contrast {
  --bg: #000000;
  --surface: #000000;
  --text: #ffffff;
  --accent: #ffff00;
  --muted: #cccccc;
  --muted-b: #eeeeee;
}

.theme-light.high-contrast {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --accent: #0000ff;
  --muted: #333333;
  --muted-b: #111111;
}

::selection { background: var(--accent); color: var(--bg); }
::-moz-selection { background: var(--accent); color: var(--bg); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-b); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

* { box-sizing: border-box; margin: 0; padding: 0; outline-color: var(--accent); }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; font-size: calc(16px * var(--font-scale)); scrollbar-width: thin; scrollbar-color: var(--border-b) var(--bg); }
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--border-b); border-radius: 4px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}

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

/* ── Selection ── */
::selection { background: var(--accent); color: var(--bg); }
::-moz-selection { background: var(--accent); color: var(--bg); }

/* ── Accessibility: Focus States ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ── Accessibility Settings Classes ── */
body.a11y-reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-reduce-motion { scroll-behavior: auto !important; }

body.a11y-highlight-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
  color: var(--accent) !important;
}

body.a11y-dyslexia-font {
  --fb: 'Comic Sans MS', 'OpenDyslexic', 'Arial', sans-serif !important;
  --fd: 'Comic Sans MS', 'OpenDyslexic', 'Arial', sans-serif !important;
}

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 3rem;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid transparent;
  height: var(--nav-h);
}
nav.scrolled {
  background: var(--nav-bg);
  border-color: var(--border);
  backdrop-filter: blur(14px);
  padding: 1rem 3rem;
}
.nav-logo { font-family: var(--fd); font-weight: 800; font-size: 1.2rem; letter-spacing: -.04em; transition: opacity 0.3s; flex-shrink: 0; }
.nav-logo:hover { opacity: 0.8; }
.nav-logo span { color: var(--muted-b); font-weight: 500; }

.nav-links { 
  display: flex; 
  gap: 2.5rem; 
  list-style: none; 
  margin: 0; 
  padding: 0;
  transition: opacity 0.4s, transform 0.4s;
}
.nav-links a { color: var(--muted-b); font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.nav-cta {
  background: var(--accent); color: var(--bg);
  font-family: var(--fd); font-weight: 700; font-size: .8rem;
  padding: .6rem 1.4rem; border-radius: 4px; letter-spacing: .02em;
  transition: all 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); opacity: 0.9; }

#mobile-toggle { 
  display: none; 
  background: none; 
  border: none; 
  color: var(--text); 
  cursor: pointer; 
  z-index: 2000; 
  padding: 0;
}
#mobile-toggle svg { width: 28px; height: 28px; transition: 0.3s; }
#mobile-toggle[aria-expanded="true"] .line-1 { transform: translateY(6px) rotate(45deg); transform-origin: center; }
#mobile-toggle[aria-expanded="true"] .line-2 { opacity: 0; }
#mobile-toggle[aria-expanded="true"] .line-3 { transform: translateY(-6px) rotate(-45deg); transform-origin: center; }

#theme-toggle, #a11y-trigger { background: none; border: none; cursor: pointer; color: var(--text); display: flex; align-items: center; transition: transform 0.3s; }
#theme-toggle:hover, #a11y-trigger:hover { transform: scale(1.1); }
#theme-toggle svg, #a11y-trigger svg { width: 22px; height: 22px; }
.theme-dark .sun, .theme-light .moon { display: none; }

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 3rem 8rem;
  position: relative; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px; opacity: .4;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 20%, transparent 80%);
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow { font-family: var(--fm); font-size: .75rem; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero-title { font-family: var(--fd); font-size: clamp(3.5rem, 8vw, 8rem); font-weight: 800; line-height: 0.9; letter-spacing: -.04em; margin-bottom: 2.5rem; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { max-width: 800px; color: var(--muted-b); font-size: 1.1rem; line-height: 1.6; margin-bottom: 3rem; }
.hero-actions { display: flex; gap: 1.5rem; }

.btn-p { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; background: var(--accent); color: var(--bg); font-family: var(--fd); font-weight: 700; font-size: .9rem; padding: 1rem 2rem; border-radius: 4px; border: none; cursor: pointer; transition: all 0.3s; }
.btn-p:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn-g { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; color: var(--text); font-family: var(--fd); font-weight: 600; font-size: .9rem; padding: 1rem 2rem; border: 1px solid var(--border-b); border-radius: 4px; background: transparent; cursor: pointer; transition: all 0.3s; }
.btn-g:hover { border-color: var(--text); background: rgba(255,255,255,0.05); }

.hero-hint { position: absolute; bottom: 3rem; right: 3rem; font-family: var(--fm); font-size: .7rem; color: var(--muted); letter-spacing: .1em; writing-mode: vertical-rl; display: flex; align-items: center; gap: .5rem; }
.hero-hint::before { content: ''; width: 1px; height: 50px; background: var(--border-b); }

/* ── Services ── */
.services { padding: 8rem 3rem; border-top: 1px solid var(--border); }
.services-hd { margin-bottom: 5rem; }
.label { font-family: var(--fm); font-size: .7rem; color: var(--accent); letter-spacing: .15em; text-transform: uppercase; margin-bottom: .8rem; }
.sec-title { font-family: var(--fd); font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4rem; }
.svc-card { background: var(--surface); padding: 3rem; border-radius: 12px; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); position: relative; border: 1px solid var(--border); overflow: hidden; }
.svc-icon { width: 48px; height: 48px; color: var(--muted-b); margin-bottom: 2rem; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.svc-icon svg { width: 100%; height: 100%; }
.svc-card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.theme-light .svc-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.svc-card:hover .svc-icon { color: var(--accent); transform: scale(1.1) translateY(-5px); }
.svc-name { font-family: var(--fd); font-weight: 700; font-size: 2rem; margin-bottom: 1.2rem; transition: color 0.4s; }
.svc-card:hover .svc-name { color: var(--accent); }
.svc-desc { font-size: 1.05rem; color: var(--muted-b); line-height: 1.6; transition: color 0.4s; }
.svc-card:hover .svc-desc { color: var(--text); }

/* ── Work ── */
.work { background: var(--bg); position: relative; transition: background-color 0.8s ease; z-index: 10; }
.work-hd { padding: 10rem 3rem 5rem; }

.project-section { position: relative; border-top: 1px solid var(--border); scroll-snap-align: start; background: var(--bg); }
.project-container { display: flex; align-items: flex-start; }
.project-info {
  /* Modify existing .project-info */
  width: 40%;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto; /* Required if content > viewport */
  scrollbar-width: thin; scrollbar-color: var(--border-b) transparent; /* Style scrollbar */
  z-index: 2;
}
.project-info::-webkit-scrollbar { width: 6px; }
.project-info::-webkit-scrollbar-thumb { background: var(--border-b); border-radius: 10px; }

.pi-content { max-width: 450px; opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.project-section.visible .pi-content { opacity: 1; transform: translateY(0); }

.p-num { font-family: var(--fm); font-size: .8rem; color: var(--accent); margin-bottom: 1.5rem; display: block; letter-spacing: 0.15em; font-weight: 500; }
.p-name { font-family: var(--fd); font-size: 3.5rem; font-weight: 800; line-height: 1; margin-bottom: 1.5rem; letter-spacing: -0.03em; }
.p-type { font-size: .9rem; color: var(--accent); margin-bottom: 2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.p-desc { font-size: 1.15rem; color: var(--muted-b); margin-bottom: 2.5rem; line-height: 1.7; }
.p-stack { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 3.5rem; }
.tag { font-family: var(--fm); font-size: .65rem; color: var(--muted-b); border: 1px solid var(--border-b); padding: .35rem 1rem; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.08em; transition: 0.3s; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.p-link { display: inline-flex; align-items: center; gap: 0.8rem; font-family: var(--fd); font-weight: 800; font-size: 1.1rem; color: var(--text); position: relative; padding-bottom: 6px; transition: gap 0.3s; }
.p-link:hover { gap: 1.2rem; }
.p-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0.2); transform-origin: left; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.p-link:hover::after { transform: scaleX(1); }

.project-visual { width: 60%; padding: 10rem 5vw; }
.project-section.visible .project-visual { opacity: 1; }
.browser-frame {
  background: var(--surface); border: 1px solid var(--border-b); border-radius: 8px;
  overflow: hidden; box-shadow: none;
}
.browser-top { padding: 0.5rem 1rem; background: var(--border); display: flex; align-items: center; gap: 2rem; }
.dots { display: flex; gap: .5rem; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.url-bar { flex: 1; background: var(--bg); font-family: var(--fm); font-size: .75rem; padding: .3rem 1rem; border-radius: 6px; color: var(--muted-b); text-align: center; }
.image-wrapper { 
  width: 100%; 
  overflow: hidden; 
  background: var(--surface); 
  position: relative;
}
.progressive-img { 
  position: relative; 
  width: 100%; 
  background: var(--surface);
  /* aspect-ratio is set inline by PHP */
}
.work-img { 
  width: 100%; 
  height: auto; 
  display: block; 
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease; 
}
.work-img.low-res { filter: blur(10px); }
.work-img.high-res { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 2; }
.work-img.high-res.loaded { opacity: 1; }
.work-img.high-res.loaded + .low-res { opacity: 0; }

.theme-dark .light-only, .theme-light .dark-only { display: none; }

/* ── FAQ ── */
.faq { padding: 10rem 3rem; border-top: 1px solid var(--border); position: relative; z-index: 20; background: var(--bg); }
.faq-hd { margin-bottom: 5rem; }
.faq-grid { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { 
  border: 1px solid var(--border); 
  border-radius: 12px;
  background: var(--surface);
  transition: all 0.3s ease;
  overflow: hidden;
}
.faq-item:hover {
  border-color: var(--border-b);
  background: rgba(255, 255, 255, 0.02);
}
.theme-light .faq-item:hover {
  background: rgba(0, 0, 0, 0.01);
}
.faq-item.active {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.8rem 2.5rem;
  font-family: var(--fd);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  padding: 0 2.5rem;
}
.faq-item.active .faq-answer {
  max-height: 500px; 
  padding-bottom: 2.2rem;
  opacity: 1;
}
.faq-answer p {
  font-size: 1rem;
  color: var(--muted-b);
  line-height: 1.7;
  max-width: 100%;
}

/* ── About & Contact ── */
.about { padding: 12rem 3rem; border-top: 1px solid var(--border); position: relative; z-index: 20; background: var(--bg); }
.about-content { max-width: 900px; }
.about-p { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 300; line-height: 1.6; color: var(--muted-b); margin: 3rem 0; font-family: var(--fb); }
.stats { display: flex; gap: 6rem; }
.stat-n { font-family: var(--fd); font-size: 3rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-l { font-size: .9rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); margin-top: 0.5rem; font-weight: 600; }

.contact { padding: 150px 3rem; text-align: left; border-top: 1px solid var(--border); position: relative; z-index: 20; background: var(--bg); }
.contact-title { font-family: var(--fd); font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 800; margin-bottom: 4rem; letter-spacing: -0.04em; line-height: 0.9; }
.contact-title em { font-style: normal; color: var(--accent); }
.contact-mail { font-family: var(--fd); font-size: clamp(1.5rem, 4vw, 3rem); font-weight: 700; color: var(--text); border-bottom: 3px solid var(--accent); padding-bottom: 0.5rem; transition: all 0.3s; }
.contact-mail:hover { color: var(--accent); padding-bottom: 1rem; }

/* --- Modal Layout Shift Fix --- */
body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0);
}

@media (max-width: 768px) {
  body.menu-open {
    overflow: hidden;
  }
}

/* ── Global Progress Bar ── */
#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Modals UI ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px); z-index: 3000;
  display: none; align-items: center; justify-content: center; padding: 2rem;
  opacity: 0; transition: opacity 0.4s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content {
  background: var(--surface); border: 1px solid var(--border);
  width: 100%; max-width: 650px; max-height: 85vh;
  border-radius: 12px; position: relative; display: none;
  flex-direction: column; overflow: hidden;
  transform: translateY(30px) scale(0.95); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 50px 100px rgba(0,0,0,0.6);
}
.modal-content.active { display: flex; transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; font-size: 2rem; background: none; border: none; color: var(--text); cursor: pointer; z-index: 10; opacity: 0.5; transition: opacity 0.3s; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 4rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-b) transparent; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-b); border-radius: 10px; }
.modal-body h2 { font-family: var(--fd); font-size: 2.5rem; font-weight: 800; margin-bottom: 2rem; letter-spacing: -0.03em; }
.modal-section { margin-bottom: 2.5rem; }
.modal-section h3 { font-family: var(--fd); font-size: 1.2rem; margin-bottom: 1rem; color: var(--accent); }
.modal-section p { color: var(--muted-b); font-size: 1rem; line-height: 1.7; }

.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.setting-item:last-child { border-bottom: none; }
.setting-info h4 { font-family: var(--fd); font-size: 1.1rem; margin-bottom: 0.3rem; }
.setting-info p { font-size: 0.85rem; color: var(--muted-b); max-width: 80%; }
.switch-ui { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch-ui input { opacity: 0; width: 0; height: 0; }
.switch-ui span { position: absolute; cursor: pointer; inset: 0; background-color: var(--border-b); transition: .4s; border-radius: 34px; }
.switch-ui span:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
.switch-ui input:checked + span { background-color: var(--accent); }
.switch-ui input:checked + span:before { transform: translateX(24px); }
.modal-actions { margin-top: 2rem; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed; bottom: 2rem; right: 2rem; left: auto; width: 320px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 1.5rem; border-radius: 8px; z-index: 2000;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transform: translateY(150%); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.show { transform: translateY(0); }
.cb-title { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.cb-text { font-size: 0.85rem; color: var(--muted-b); margin-bottom: 1.5rem; line-height: 1.4; }
.cb-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.cb-actions button { flex: 1; padding: 0.6rem; font-size: 0.8rem; }

/* ── Footer V2 ── */
.site-footer-v2 {
  background: var(--surface);
  color: var(--text);
  padding: 8rem 0 0;
  border-top: 1px solid var(--border);
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.footer-v2-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.footer-top-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8rem;
  flex: 1;
}

.footer-message h2 {
  font-family: var(--fd);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 3rem;
}

.footer-message h2 span {
  color: var(--accent);
}

.footer-mail-v2 {
  font-family: var(--fd);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  display: inline-block;
  position: relative;
}

.footer-mail-v2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-mail-v2:hover::after {
  transform: scaleX(1);
}

.footer-mascot {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.mascot-eye {
  width: 60px;
  height: 60px;
  background: var(--text);
  border-radius: 50%;
  position: relative;
  animation: blink 4s infinite;
}

.mascot-eye::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  background: var(--bg);
  border-radius: 50%;
  transform: translate(calc(-50% + var(--eye-x, 0px)), calc(-50% + var(--eye-y, 0px)));
}

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.footer-middle-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4rem;
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.col-label {
  font-family: var(--fm);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-list a {
  font-family: var(--fd);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted-b);
  transition: all 0.3s;
}

.footer-list a:hover {
  color: var(--text);
  transform: translateX(5px);
}

.footer-bottom-v2 {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--fm);
  font-size: 0.8rem;
  color: var(--muted);
  gap: 2rem;
}

.footer-legal-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-legal-v2 a {
  color: var(--muted-b);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal-v2 a:hover {
  color: var(--accent);
}

.footer-list a.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.footer-list a.disabled small {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .footer-bottom-v2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* ── Error Page V2 ── */
.error-page-v2 {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3rem;
  gap: 8vw;
  position: relative;
  overflow: hidden;
}

.error-container {
  max-width: 500px;
  position: relative;
  z-index: 10;
}

.error-label {
  font-family: var(--fm);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.error-big {
  font-family: var(--fd);
  font-size: clamp(5rem, 15vw, 10rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  margin-bottom: 2.5rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.error-text {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted-b);
  margin-bottom: 4rem;
}

.error-visual {
  flex-shrink: 0;
  position: relative;
}

.mascot-v2 {
  width: 280px;
  height: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: float-slow 6s ease-in-out infinite;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}

.mascot-face {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.m-eye {
  width: 25px;
  height: 25px;
  background: var(--text);
  border-radius: 50%;
  animation: blink 4s infinite;
}

.m-mouth {
  width: 60px;
  height: 20px;
  border: 4px solid var(--accent);
  border-top: none;
  border-radius: 0 0 40px 40px;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-30px) rotate(3deg); }
}

@media (max-width: 1024px) {
  .error-page-v2 { flex-direction: column; text-align: center; padding: 10rem 2rem 5rem; gap: 4rem; }
  .error-big { margin-bottom: 1.5rem; }
  .error-text { margin-bottom: 3rem; }
}
.error-title {
  font-family: var(--fd);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -0.04em;
}

.error-title span {
  color: var(--accent);
}

.error-msg {
  font-size: 1.2rem;
  color: var(--muted-b);
  margin-bottom: 4rem;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-footer {
  position: absolute;
  bottom: 3rem;
  left: 0;
  right: 0;
}

/* ── Utils ── */
.reveal { opacity: 0; transform: translateY(40px); transition: 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
#mobile-toggle[aria-expanded="true"] .line-1 { transform: translateY(6px) rotate(45deg); transform-origin: center; }
#mobile-toggle[aria-expanded="true"] .line-2 { opacity: 0; }
#mobile-toggle[aria-expanded="true"] .line-3 { transform: translateY(-6px) rotate(-45deg); transform-origin: center; }

@media (max-width: 1024px) {
  .project-container { flex-direction: column; }
  .project-info { width: 100%; height: auto; position: relative; border-right: none; padding: 4rem 2rem; border-bottom: 1px solid var(--border); }
  .project-visual { width: 100%; padding: 4rem 2rem; }
  .footer-links-grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* --- Responsive Breakpoints Override --- */
@media (max-width: 768px) {
  nav { padding: 1rem 2rem; }

  #mobile-toggle { display: block; }

  /* Mobile Menu Overlay */
  .nav-links {
      position: fixed;
      top: 0; left: 0; right: 0; height: 100vh;
      background: var(--bg);
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 3rem;
      z-index: 1500;
      opacity: 0;
      pointer-events: none;
      transform: translateY(-20px);
      transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links.active {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
  }
  .nav-links a { font-size: 1.5rem; }

  .nav-cta { display: none; }
  .hero { padding: 0 2rem 5rem; }
  .hero-title { font-size: clamp(3rem, 12vw, 5rem); } /* Fix hero text wrapping */
  .cookie-banner { width: calc(100% - 4rem); left: 2rem; right: 2rem; }
  .stats { flex-direction: column; gap: 3rem; }
  .about-p { font-size: 1.1rem; }
}


.back-to-top { 
  position: fixed; 
  bottom: 2rem; 
  right: 2rem; 
  width: 3.5rem; 
  height: 3.5rem; 
  background: var(--accent); 
  color: var(--bg); 
  border: none; 
  border-radius: 50%; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 1500; 
  opacity: 0; 
  pointer-events: none; 
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.back-to-top:hover { 
  transform: translateY(-5px); 
  background-color: var(--text); 
  color: var(--bg); 
  box-shadow: 0 15px 40px rgba(0,0,0,0.2); 
}

.back-to-top svg { 
  width: 24px; 
  height: 24px; 
}

.back-to-top.show { 
  opacity: 1; 
  pointer-events: auto; 
}

@media (max-width: 768px) {
  .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 3rem; height: 3rem; }
}

@media (min-width: 769px) {
  .mobile-break { display: none; }
}
