/* ============================================================
   MGX — Where Creativity Meets Technology
   Monochrome Editorial · Exaggerated Minimalism
   Black & white only. Depth from borders, inversion & type.
   ============================================================ */

:root {
  /* dark scope (default) */
  --bg: #0a0a0a;
  --bg-elevated: #131313;
  --text: #f2f2ed;
  --text-muted: rgba(242, 242, 237, 0.55);
  --surface: rgba(242, 242, 237, 0.04);
  --surface-hover: rgba(242, 242, 237, 0.08);
  --border: rgba(242, 242, 237, 0.16);
  --border-strong: rgba(242, 242, 237, 0.9);
  --btn-fg: #0a0a0a;

  /* legacy names kept for admin.html inline styles */
  --accent: #f2f2ed;
  --accent-2: #f2f2ed;
  --accent-glow: rgba(242, 242, 237, 0.12);
  --gradient: linear-gradient(120deg, #ffffff, #d9d9d2);

  --radius: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  color-scheme: dark;
}

.section-light {
  --bg: #f2f2ed;
  --bg-elevated: #ffffff;
  --text: #0a0a0a;
  --text-muted: rgba(10, 10, 10, 0.55);
  --surface: rgba(10, 10, 10, 0.03);
  --surface-hover: rgba(10, 10, 10, 0.06);
  --border: rgba(10, 10, 10, 0.16);
  --border-strong: rgba(10, 10, 10, 0.9);
  --btn-fg: #f2f2ed;
  --accent: #0a0a0a;
  --accent-2: #0a0a0a;
  --accent-glow: rgba(10, 10, 10, 0.08);
  --gradient: linear-gradient(120deg, #0a0a0a, #333330);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: #0a0a0a;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film-grain texture over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.08; }

section { scroll-margin-top: 84px; }

/* outlined display words (was gradient text) */
.gradient-text {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  background: none;
}

/* ---------- Card base (was "glass") ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
  min-height: 46px;
}
.btn-lg { padding: 16px 34px; font-size: 0.98rem; }
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--text);
  color: var(--btn-fg);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(128, 128, 128, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--btn-fg);
  transform: translateY(-2px);
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- Navbar (always dark) ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
  /* pin dark tokens so the bar reads the same over light sections */
  --text: #f2f2ed;
  --text-muted: rgba(242, 242, 237, 0.55);
  --surface: rgba(242, 242, 237, 0.05);
  --border: rgba(242, 242, 237, 0.16);
  --btn-fg: #0a0a0a;
  color: var(--text);
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
  padding: 11px 0;
}
.nav-inner { display: flex; align-items: center; gap: 28px; }
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 38px; width: auto; transition: opacity 0.3s; }
.nav-logo:hover img { opacity: 0.75; }
.nav-logo-fallback {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f2f2ed;
}
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.nav-cta { padding: 10px 20px; font-size: 0.82rem; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #f2f2ed;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Ambient blobs (soft white light) ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.05;
  background: #ffffff;
  pointer-events: none;
  animation: drift 20s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; top: -140px; left: -160px; }
.blob-2 { width: 460px; height: 460px; bottom: -100px; right: -140px; animation-delay: -7s; }
.blob-3 { width: 280px; height: 280px; top: 42%; left: 58%; animation-delay: -13s; opacity: 0.035; }
.blob-4 { width: 420px; height: 420px; bottom: 0; left: -160px; opacity: 0.04; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, -40px) scale(1.12); }
}

/* aurora replaced by grain + blobs in the monochrome design */
.aurora { display: none; }

/* ---------- Particle canvas ---------- */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 130px 0 90px;
}
.hero-inner { position: relative; z-index: 1; width: 100%; min-width: 0; }
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 242, 237, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 242, 237, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 25%, transparent 75%);
  animation: gridPan 26s linear infinite;
  pointer-events: none;
}
@keyframes gridPan {
  to { background-position: 64px 64px; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 999px;
  margin-bottom: 34px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #f2f2ed;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 242, 237, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(242, 242, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 242, 237, 0); }
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 30px;
}
.hw {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotate(1.5deg);
  animation: heroWord 0.9s var(--ease) forwards;
  animation-delay: calc(var(--d) * 0.14s + 0.15s);
  margin: 0 0.12em;
}
@keyframes heroWord {
  to { opacity: 1; transform: none; }
}
/* outlined words in the title */
.shimmer {
  color: transparent;
  -webkit-text-stroke: 2px #f2f2ed;
  background: none;
  animation: heroWord 0.9s var(--ease) forwards;
  animation-delay: calc(var(--d) * 0.14s + 0.15s);
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto 42px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }
.hero-stats {
  display: inline-flex;
  justify-content: center;
  align-items: stretch;
  border-top: 1px solid var(--border);
  padding-top: 30px;
  gap: clamp(24px, 6vw, 72px);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num, .stat-plus {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-divider { width: 1px; background: var(--border); }
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bob 2.2s ease-in-out infinite;
  padding: 10px;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Marquee (giant outlined ticker) ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 26px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 242, 237, 0.65);
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--text); -webkit-text-stroke: 1px transparent; }
.marquee-track i {
  font-style: normal;
  color: var(--text);
  font-size: 1rem;
  animation: sparkleSpin 7s linear infinite;
}
@keyframes marqueeScroll {
  to { transform: translateX(-50%); }
}
@keyframes sparkleSpin {
  to { transform: rotate(360deg); }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 110px 0;
  background: transparent;
  color: var(--text);
}
.section-light { background: var(--bg); }
.section-alt { background: transparent; }
main { counter-reset: sec; }
main .section { counter-increment: sec; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-tag::before {
  content: '0' counter(sec);
  font-size: 0.72rem;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}
.section-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 56px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo { position: relative; }
.photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  aspect-ratio: 3 / 4;
  background: var(--bg-elevated);
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
/* offset double-frame */
.about-photo::before {
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: -1;
}
.photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 6rem;
  font-weight: 800;
  color: var(--text);
}
.photo-frame.photo-missing img { display: none; }
.photo-frame.photo-missing .photo-fallback { display: flex; }
.photo-card {
  position: absolute;
  left: 18px; right: 18px; bottom: -26px;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}
.photo-card strong { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; }
.photo-card span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.about-text p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.02rem; }
.about-text strong { color: var(--text); }
.about-points { list-style: none; margin-top: 28px; display: grid; gap: 0; }
.about-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.about-points li:last-child { border-bottom: 1px solid var(--border); }
.about-points svg { color: var(--text); flex-shrink: 0; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  padding: 32px 28px;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.service-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: var(--text);
  margin-bottom: 22px;
  transition: background 0.3s, color 0.3s;
}
.service-card:hover .service-icon {
  background: var(--text);
  color: var(--btn-fg);
}
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.service-card p { font-size: 0.93rem; color: var(--text-muted); }
.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.55;
  transition: opacity 0.25s, gap 0.25s var(--ease);
}
.service-card:hover .learn-more { opacity: 1; gap: 13px; }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12);
}
.project-shot {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: #101010;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1);
  transition: transform 0.6s var(--ease), filter 0.45s;
}
.project-card:hover .project-shot img {
  transform: scale(1.05);
  filter: grayscale(0);
}
.shot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f2f2ed;
  background: rgba(10, 10, 10, 0.62);
  opacity: 0;
  transition: opacity 0.25s;
}
.project-shot:hover .shot-overlay, .project-shot:focus-visible .shot-overlay { opacity: 1; }
.project-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.project-body h3 { font-size: 1.25rem; font-weight: 700; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge-own {
  background: var(--text);
  color: var(--btn-fg);
  border-color: transparent;
}
.project-body p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 18px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.project-cta-card {
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
}
.project-cta-inner {
  padding: 44px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  height: 100%;
}
.project-cta-inner h3 {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.project-cta-inner p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding-left: 38px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border-strong);
  transform-origin: top;
}
.timeline.drawn::before { animation: lineDraw 1.4s var(--ease) forwards; }
@keyframes lineDraw {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -36px; top: 30px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text);
  transform: scale(0);
  transition: transform 0.5s var(--ease) 0.3s;
}
.timeline-item.visible .timeline-dot { transform: scale(1); }
.timeline-card { padding: 26px 30px; transition: border-color 0.3s, background 0.3s; }
.timeline-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.timeline-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.timeline-card h3 { font-size: 1.2rem; font-weight: 700; margin: 8px 0 8px; }
.timeline-card p { font-size: 0.93rem; color: var(--text-muted); }

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.testimonial-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-elevated);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.testimonial-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.testimonial-quote { color: var(--text); opacity: 0.9; flex-shrink: 0; }
.testimonial-stars { color: var(--text); letter-spacing: 4px; font-size: 0.9rem; }
.testimonial-msg { color: var(--text); font-size: 0.97rem; flex: 1; }
.testimonial-who { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 16px; }
.testimonial-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--btn-fg);
  background: var(--text);
  flex-shrink: 0;
}
.testimonial-who strong { display: block; font-size: 0.95rem; }
.testimonial-who span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.testimonials-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.testimonial-form-wrap { padding: 38px; max-width: 740px; margin: 34px auto 0; background: var(--bg-elevated); }
.testimonial-form-wrap h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label, .rating-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.req { color: var(--text); }
.opt { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-field input, .form-field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  transition: border-color 0.2s;
  min-height: 46px;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--border-strong);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.star-picker { display: flex; gap: 4px; }
.star-picker button {
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--text);
  opacity: 0.18;
  padding: 6px;
  transition: opacity 0.15s, transform 0.15s;
}
.star-picker button.on { opacity: 1; }
.star-picker button:hover { transform: scale(1.15); }
.form-msg { margin-top: 12px; font-size: 0.9rem; min-height: 1.2em; }
.form-msg.ok { color: #4ade80; }
.form-msg.err { color: #f87171; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.blog-cat {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 5px 13px;
  border-radius: 999px;
}
.blog-card h3 { font-size: 1.15rem; font-weight: 700; }
.blog-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; }
.blog-soon, .blog-card .blog-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 15px;
}
.blog-card .blog-date { display: flex; align-items: center; justify-content: space-between; }
.blog-card .blog-read { color: var(--text); font-weight: 500; }
.blog-article { line-height: 1.85; color: var(--text); }
.blog-article p { margin-bottom: 14px; color: var(--text); }
.modal-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 22px;
}
.modal-meta .blog-cat { margin: 0; }

/* ---------- Contact ---------- */
#contact { overflow: hidden; }
.contact-lead { color: var(--text-muted); max-width: 560px; margin: -32px 0 48px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}
.contact-card { padding: 30px 28px; transition: border-color 0.3s; }
.contact-card:hover { border-color: var(--border-strong); }
.contact-card-head { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.contact-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  filter: grayscale(1);
}
.contact-avatar-logo { object-fit: contain; padding: 8px; filter: none; }
.contact-avatar-txt {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--btn-fg);
  background: var(--text);
  border: 0;
}
.contact-card-head h3 { font-size: 1.2rem; font-weight: 700; }
.contact-card-head span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-list { list-style: none; display: grid; gap: 2px; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 10px 10px;
  margin: 0 -10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s, padding-left 0.25s var(--ease);
  min-height: 44px;
  word-break: break-all;
}
.contact-list a:hover { color: var(--text); background: var(--surface); padding-left: 16px; }
.contact-list svg { flex-shrink: 0; color: var(--text); }
.contact-form-note { font-size: 0.85rem; color: var(--text-muted); margin: 6px 0 18px; }
.contact-form-card h3 { font-size: 1.2rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 52px 0 44px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-brand img { height: 32px; }
.footer-brand p {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 2px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-badge { display: inline-block; }
.footer-badge img {
  height: 46px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.footer-badge:hover img { opacity: 1; transform: translateY(-2px); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: #f2f2ed;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
}

/* ---------- Custom cursor (inverts over anything) ---------- */
.cursor-glow {
  display: none;
  position: fixed;
  width: 30px; height: 30px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 998;
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.3s;
}
.cursor-glow::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
}
.cursor-glow.big { width: 62px; height: 62px; }
@media (pointer: fine) {
  .cursor-glow { display: block; }
}

/* ---------- Modal ---------- */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlayIn 0.25s var(--ease);
}
@keyframes overlayIn {
  from { opacity: 0; }
}
.modal {
  position: relative;
  width: min(880px, 100%);
  max-height: min(88dvh, 920px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0e0e0e;
  border: 1px solid var(--border-strong);
  padding: 38px;
  animation: modalIn 0.35s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 242, 237, 0.3) transparent;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
}
.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -12px -12px 0 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #0e0e0e;
  color: var(--text);
  z-index: 2;
  transition: background 0.2s, color 0.2s, transform 0.25s;
}
.modal-close:hover { background: #f2f2ed; color: #0a0a0a; transform: rotate(90deg); }
.modal-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  padding-right: 44px;
}
.modal-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}
.modal-content > p { color: var(--text-muted); margin-bottom: 18px; }
.modal-list { list-style: none; display: grid; gap: 0; margin: 8px 0 24px; }
.modal-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.modal-list li:last-child { border-bottom: 1px solid var(--border); }
.modal-list svg { color: var(--text); flex-shrink: 0; margin-top: 3px; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.modal-related {
  margin: 0 0 22px;
  padding: 15px 19px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.modal-related a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Live embed preview ---------- */
.embed-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #0a0a0a;
  aspect-ratio: 16 / 10;
  margin-bottom: 20px;
}
.embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #101010;
}
.embed-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.4s;
}
.embed-loading.done { opacity: 0; }
.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(242, 242, 237, 0.2);
  border-top-color: #f2f2ed;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.embed-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: -12px 0 18px;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(242, 242, 237, 0.4);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  color: #f2f2ed;
  z-index: 90;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease), background 0.25s, color 0.25s;
}
.back-to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.back-to-top:hover { background: #f2f2ed; color: #0a0a0a; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }
.reveal-left.visible, .reveal-right.visible { transform: none; }

/* ---------- Cards: interactive affordance ---------- */
.clickable { cursor: pointer; }
/* subtle top-line accent on hover (replaces old gradient border) */
.service-card, .project-card, .blog-card, .testimonial-card { position: relative; }
.service-card::before, .project-card::before, .blog-card::before, .testimonial-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
  pointer-events: none;
}
.service-card:hover::before, .project-card:hover::before, .blog-card:hover::before, .testimonial-card:hover::before {
  transform: scaleX(1);
}

/* ---------- 3D tilt helper ---------- */
.project-card, .service-card { transform-style: preserve-3d; will-change: transform; }
.project-card.tilting, .service-card.tilting { transition: border-color 0.3s, background 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid, .projects-grid, .blog-grid, .testimonials-grid, .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid { grid-template-columns: 320px 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(80vw, 330px);
    flex-direction: column;
    gap: 4px;
    background: rgba(10, 10, 10, 0.98);
    border-left: 1px solid var(--border);
    padding: 96px 28px 28px;
    margin-left: 0;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 0.95rem; padding: 14px 14px; }
  .nav-toggle { position: relative; z-index: 100; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin: 0 auto 44px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .stat-divider { display: none; }
  .modal { padding: 26px 20px; }
  .cursor-glow { display: none; }
}

@media (max-width: 560px) {
  .services-grid, .projects-grid, .blog-grid, .testimonials-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .testimonial-form-wrap { padding: 26px 20px; }
  .hero-title { font-size: clamp(1.4rem, 6.9vw, 2.2rem); }
  .shimmer { -webkit-text-stroke-width: 1.2px; }
  .section-title { font-size: clamp(1.7rem, 8vw, 2.4rem); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
