/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
:root {
  /* Light default similar to reference */
  --bg: #f5f6f8;
  --surface: rgba(255,255,255,0.7);
  --surface-strong: rgba(255,255,255,0.85);
  --text: #0a0c10;
  --muted: #5a606c;
  --glass: rgba(255,255,255,0.5);
  --blur: 26px;
  --radius: 18px;
  --grid: rgba(0,0,0,0.05);
  --card-dark: #0e0f12;
  --card-dark-border: #1b1d22;
}

/* Optional dark mode */
:root.dark {
  --bg: #0b0d12;
  --surface: rgba(255,255,255,0.06);
  --surface-strong: rgba(255,255,255,0.12);
  --text: #e7ebf2;
  --muted: #bac2cf;
  --glass: rgba(16,16,20,0.45);
  --grid: rgba(255,255,255,0.06);
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: min(1200px, 92vw); margin: 0 auto; }

/* Subtle grid overlay */
.grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  opacity: .8;
}

/* Film grain for texture */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .08; mix-blend-mode: multiply; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity=".2"/></svg>'); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); background: rgba(255,255,255,.55); border-bottom: 1px solid rgba(0,0,0,.06); }
.nav-container { display:flex; align-items:center; justify-content:space-between; padding: 14px 0; }
.logo { text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: .6px; }
.logo-mark { display:inline-grid; place-items:center; width:40px; height:40px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.6)); border: 1px solid rgba(0,0,0,.06); box-shadow: 0 10px 20px rgba(0,0,0,.06); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav { display:flex; gap: 22px; align-items:center; }
.nav a { color: var(--muted); text-decoration:none; font-weight:600; font-size:.95rem; }
.nav a:hover { color: var(--text); }
.pill { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); color: var(--text)!important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.theme-toggle { border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); color: var(--text); border-radius: 999px; padding: 8px 12px; display:flex; gap:6px; align-items:center; cursor:pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.theme-toggle .sun { display:none; }
:root:not(.dark) .theme-toggle .sun { display:inline; }
:root:not(.dark) .theme-toggle .moon { display:none; }

/* Hero */
.hero { position: relative; display:grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 48px; padding: 90px 0 50px; z-index: 1; }
.hero-copy h1 { font-family: 'Manrope', Inter, sans-serif; font-size: clamp(32px, 6vw, 72px); line-height: 1.05; letter-spacing:-0.02em; margin: 0 0 18px; }
.accent { color: inherit; }
.lede { font-size: clamp(16px, 1.7vw, 20px); color: var(--muted); margin: 0 0 28px; }
.actions { display:flex; gap: 12px; flex-wrap: wrap; }
.btn { border-radius: 14px; padding: 12px 16px; font-weight:700; text-decoration:none; display:inline-flex; align-items:center; gap:10px; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn.primary { background: #0f1116; color: #fff; border-color: #0f1116; }
.btn.ghost { background: transparent; border-color: rgba(0,0,0,.12); }
.btn.tiny { padding: 8px 12px; font-size:.9rem; }

/* Hero glass panels */
.hero-glass { position: relative; height: 360px; display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.hero-glass .panel { border-radius: var(--radius); background: var(--glass); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.1); backdrop-filter: blur(var(--blur)) saturate(1.1); border: 1px solid rgba(0,0,0,.08); box-shadow: 0 30px 80px rgba(0,0,0,.08); position: relative; overflow: hidden; }
.hero-glass .panel::before { content:""; position:absolute; inset: -10% -10% auto auto; height: 160%; width: 160%; background: radial-gradient(closest-side, rgba(255,255,255,.7), rgba(255,255,255,0) 70%); filter: blur(30px); opacity:.45; animation: float 16s ease-in-out infinite; }
.hero-glass .panel:nth-child(2)::before { animation-duration: 18s; opacity:.5; }
.hero-glass .panel:nth-child(3)::before { animation-duration: 22s; opacity:.4; }
@keyframes float { 0% { transform: translateY(-10%) scale(1) rotate(0.001deg);} 50% { transform: translateY(6%) scale(1.02) rotate(0.001deg);} 100% { transform: translateY(-10%) scale(1) rotate(0.001deg);} }

/* Canvas arc sits behind content */
.hero-canvas { position: fixed; inset: 0; pointer-events:none; z-index: 0; }

/* Background splash for Safari blur */
.hero-splash { position: fixed; inset: 0; z-index: 0; pointer-events:none; background:
  radial-gradient(900px 500px at 15% 10%, rgba(120,140,255,.25), transparent 60%),
  radial-gradient(900px 500px at 85% 20%, rgba(200,220,255,.22), transparent 60%),
  radial-gradient(700px 500px at 70% 60%, rgba(255,190,165,.18), transparent 60%),
  radial-gradient(600px 400px at 30% 70%, rgba(170,210,255,.18), transparent 60%);
  filter: blur(30px) saturate(110%);
}

/* Ensure glass fills remain translucent for Safari */
.hero-glass .panel,
.point-card,
.about .about-grid,
.contact .contact-card,
.btn,
.pill,
.theme-toggle,
.logo-mark,
.site-header,
.glass {
  background-color: transparent;
}

/* Re-apply intended translucent backgrounds after reset */
.site-header { background-color: rgba(255,255,255,.55); }
.logo-mark { background-color: rgba(255,255,255,.6); }
.pill, .theme-toggle, .btn { background-color: rgba(255,255,255,.6); }
.hero-glass .panel, .point-card, .about .about-grid, .contact .contact-card, .glass { background-color: rgba(255,255,255,.5); }

/* Sections */
.section { padding: 84px 0; position: relative; z-index:1; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap: 20px; margin-bottom: 28px; }
.section h2 { font-family: 'Manrope', Inter, sans-serif; font-size: clamp(24px, 3vw, 40px); margin: 0; }
.muted { color: var(--muted); }

/* Split intro */
.split-intro { display:grid; grid-template-columns: 1.1fr .9fr; gap: 36px; }
.point-card { padding: 20px; border-radius: var(--radius); border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); box-shadow: 0 20px 60px rgba(0,0,0,.06); transform: translateY(14px); opacity: 0; animation: rise .9s ease .15s forwards; }
.point-card + .point-card { animation-delay: .3s; }
.point-card + .point-card + .point-card { animation-delay: .45s; }
@keyframes rise { to { transform: translateY(0); opacity: 1; } }

/* Work grid (light glass cards) */
.work-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work-card { position: relative; padding: 14px 16px 16px; border-radius: 20px; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); color: #0a0c10; box-shadow: 0 24px 80px rgba(0,0,0,.08); transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.work-card:hover { transform: translateY(-2px); box-shadow: 0 30px 100px rgba(0,0,0,.12); }
.work-card::after { content: none; }
.work-image { height: clamp(140px, 18vw, 180px); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.04); border-radius: 18px; overflow: hidden; padding: 8px; }
.work-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center; display: block; border-radius: 12px; background: transparent; box-shadow: none; }
.work-card .work-meta { display:flex; gap: 8px; padding: 4px 0 0 0; }
.work-card h3 { margin: 8px 0 6px; color: #0a0c10; }
.work-card p { color: #5a606c; margin: 0 0 10px; }
.chip { font-size: .82rem; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,.08); background: rgba(0,0,0,.06); color: #0a0c10; }
.work-card .card-actions { padding-top: 4px; }
.work-card .btn.tiny { background: #0f1116; color: #fff; border-color: #0f1116; }

/* About */
.about .about-grid { padding: 28px; border-radius: var(--radius); border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(calc(var(--blur) + 4px)); backdrop-filter: blur(calc(var(--blur) + 4px)); box-shadow: 0 20px 60px rgba(0,0,0,.06); }

/* Contact */
.contact .contact-card { text-align:center; padding: 38px; border-radius: calc(var(--radius) + 4px); border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.65); -webkit-backdrop-filter: blur(calc(var(--blur) + 6px)); backdrop-filter: blur(calc(var(--blur) + 6px)); box-shadow: 0 30px 90px rgba(0,0,0,.08); }

/* Footer */
.site-footer { padding: 40px 0 80px; text-align: center; color: var(--muted); }

/* Utilities */
.glass { background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.08); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); box-shadow: 0 24px 80px rgba(0,0,0,.08); border-radius: var(--radius); }

/* Hero panel content */
.hero-glass .panel .panel-content { position: absolute; inset: auto 14px 14px 14px; color: #0a0c10; font-weight: 600; }
:root.dark .hero-glass .panel .panel-content { color: #e7ebf2; }
.hero-glass .panel .panel-content h4 { margin: 0 0 4px 0; font-size: 0.95rem; letter-spacing: .3px; }
.hero-glass .panel .panel-content p { margin: 0; font-size: 0.9rem; opacity: .7; }

/* Remove tilt interactions */
.tilt { transform: none !important; }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-glass { height: 320px; }
  .split-intro { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .hero-glass .panel .panel-content { inset: auto 12px 12px 12px; }
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; }
} 

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Canvas: lower load on mobile */
@media (max-width: 640px) {
  .hero-canvas { display: none; }
} 

/* Remove unused hero glass when not present */
.hero-glass { display: none; }

/* Horizontal feature chips under split intro */
.features-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.feature-chip { border-radius: 16px; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.07); }
.feature-chip h4 { margin: 0 0 4px; font-size: 0.95rem; }
.feature-chip p { margin: 0; font-size: 0.9rem; color: #5a606c; }

@media (max-width: 980px) {
  .features-row { grid-template-columns: 1fr; }
} 

/* Hero art */
.hero.container { grid-template-columns: 1.3fr .7fr; }
.hero-art { align-self: start; justify-self: end; width: min(300px, 36vw); padding: 0; border-radius: 0; background: none; }
.hero-art .luna { width: 100%; height: auto; display: block; border-radius: 0; filter: drop-shadow(0 10px 30px rgba(0,0,0,.08)); background: transparent; }

@media (max-width: 980px) {
  .hero.container { grid-template-columns: 1fr; }
  .hero-art { width: auto; justify-self: center; margin-top: 12px; }
} 

/* Mobile nav */
.hamburger { display:none; width:32px; height:24px; position:relative; background:none; border:0; cursor:pointer; }
.hamburger span { position:absolute; left:0; right:0; height:2px; background: var(--text); transition: transform .22s ease, opacity .22s ease; }
.hamburger span:nth-child(1){ top:0; }
.hamburger span:nth-child(2){ top:50%; transform: translateY(-50%); }
.hamburger span:nth-child(3){ bottom:0; }
.hamburger.active span:nth-child(1){ transform: translateY(11px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ transform: translateY(-11px) rotate(-45deg); }

.mobile-nav { position: fixed; inset: 0; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 22px; transform: translateX(100%); transition: transform .28s ease; z-index: 4; }
:root.dark .mobile-nav { background: rgba(11,13,18,.96); }
.mobile-nav a { color: var(--text); text-decoration:none; font-weight:700; font-size: 1.2rem; }
.mobile-nav.open { transform: translateX(0); }

/* Mobile nav and hero reordering on mobile */
@media (max-width: 980px){
  .nav { display:none; }
  .hamburger { display:block; }
  /* Put Luna image first on mobile */
  .hero.container { grid-template-columns: 1fr; }
  .hero-copy { order: 2; text-align: center; }
  .hero-art { order: 1; justify-self: center; margin: 8px 0 16px; }
  .hero-art .luna { width: min(320px, 60vw); height: auto; }
} 

/* Performance tweaks */
@media (max-width: 980px) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.92); }
  :root.dark .site-header { background: rgba(11,13,18,.92); }
  .pill, .theme-toggle, .btn { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .about .about-grid, .contact .contact-card, .work-card, .feature-chip { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-splash { display:none; }
}

/* Lower grid overlay intensity and disable on mobile */
.grid-overlay { opacity: .5; }
@media (max-width: 980px) { .grid-overlay { display:none; } }

/* Re-enable visual backgrounds on mobile with lighter settings */
@media (max-width: 980px) {
  .grid-overlay { display:block; opacity:.28; background-size: 90px 90px, 90px 90px; }
  .hero-splash { display:block; filter: blur(18px) saturate(108%); }
} 