/* Portfolio — Apple-inspired dark */
:root {
  --bg: #0a0a0a;
  --bg-2: #0d0d0d;
  --surface: #121214;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --fg: #f5f5f7;
  --muted: rgba(245,245,247,0.62);
  --dim: rgba(245,245,247,0.42);
  --font-stack: 'Geist','Inter',system-ui,-apple-system,sans-serif;

  /* density */
  --section-py: 160px;
  --container: 1240px;
  --gap-card: 28px;
}
:root[data-density="compact"]  { --section-py: 110px; --gap-card: 20px; }
:root[data-density="regular"]  { --section-py: 140px; --gap-card: 24px; }
:root[data-density="spacious"] { --section-py: 180px; --gap-card: 28px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--font-stack);
  font-feature-settings: "ss01","ss02","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(249,115,22,0.35); }

.page { position: relative; overflow: hidden; }

/* film grain */
:root[data-grain="on"] .page::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 60ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 28px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13px; color: var(--muted); transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  font-size: 13px; padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.04);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-cta:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.22); }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 28px 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -10% -5%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-portrait {
  position: relative;
  align-self: stretch;
  justify-self: center;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
}
.hero-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, rgba(0,0,0,0.6) 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, rgba(0,0,0,0.6) 78%, transparent 100%);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  animation: portraitFloat 8s ease-in-out infinite;
}
.portrait-glow {
  position: absolute;
  inset: -10% -10% 0 -10%;
  z-index: 0;
  filter: blur(40px);
  animation: portraitFloat 8s ease-in-out infinite reverse;
}
@keyframes portraitFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { max-width: 320px; order: -1; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 24px;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.hero-title {
  font-size: clamp(40px, 5.6vw, 86px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero-title .line { display: block; }
.hero-title .gradient {
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shift 9s ease-in-out infinite alternate;
}
@keyframes shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero-sub {
  max-width: 540px;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 32px;
  text-wrap: pretty;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #0a0a0a; font-weight: 600; box-shadow: 0 10px 40px -10px rgba(249,115,22,0.5); }
.btn-ghost { background: rgba(255,255,255,0.05); border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }

.hero-meta {
  display: flex; align-items: center; gap: 28px;
  flex-wrap: wrap;
}
.hero-meta > div:not(.sep) { display: flex; flex-direction: column; gap: 4px; }
.hero-meta b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.hero-meta span { font-size: 12.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-meta .sep { width: 1px; height: 28px; background: var(--line); }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; color: var(--dim); letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-scroll i {
  width: 1px; height: 26px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0.2); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0.2); transform-origin: bottom; }
}

/* Hero visuals */
.hero-aurora { position: absolute; inset: 0; }
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(60px);
  mix-blend-mode: screen; opacity: 0.85;
  animation: float 18s ease-in-out infinite;
}
.aurora-blob.ab1 { width: 700px; height: 700px; top: -20%; left: -10%; animation-delay: -2s; }
.aurora-blob.ab2 { width: 600px; height: 600px; top: 10%; right: -10%; animation-delay: -8s; }
.aurora-blob.ab3 { width: 520px; height: 520px; bottom: -20%; left: 30%; animation-delay: -14s; }
.aurora-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, var(--bg) 80%);
}
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.05); }
  66% { transform: translate(-30px,40px) scale(0.95); }
}

.hero-grid {
  position: absolute; inset: 0;
  perspective: 1200px;
  overflow: hidden;
}
.grid-floor {
  position: absolute;
  bottom: -10%; left: -50%;
  width: 200%; height: 110%;
  background-image:
    linear-gradient(to right, var(--accent) 1px, transparent 1px),
    linear-gradient(to bottom, var(--accent) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: rotateX(70deg);
  transform-origin: top center;
  opacity: 0.18;
  animation: gridScroll 14s linear infinite;
  mask-image: linear-gradient(to top, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, black, transparent 80%);
}
@keyframes gridScroll {
  from { background-position: 0 0; }
  to { background-position: 0 60px; }
}
.grid-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 30%, var(--bg) 80%);
}

.hero-particles { position: absolute; inset: 0; }
.hero-particles .dot {
  position: absolute; border-radius: 50%;
  filter: blur(0.5px);
  animation: drift linear infinite;
}
@keyframes drift {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-80vh); opacity: 0; }
}
.part-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, var(--bg) 90%);
}

.hero-halo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.halo-core, .halo-ring {
  position: absolute; border-radius: 50%;
  filter: blur(20px);
}
.halo-core { width: 800px; height: 800px; opacity: 0.7; animation: pulseHalo 6s ease-in-out infinite; }
.halo-ring { width: 1200px; height: 1200px; opacity: 0.5; animation: pulseHalo 8s ease-in-out infinite reverse; filter: blur(2px); }
@keyframes pulseHalo {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── Sections ────────────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: var(--section-py) 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.section-head { max-width: 900px; margin-bottom: 80px; }
.section-kicker {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 24px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.section-title {
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.section-title .dim { color: var(--dim); }
.section-lede {
  margin-top: 24px;
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--muted);
  max-width: 620px;
  line-height: 1.5;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-card);
}
@media (max-width: 800px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.35s, background 0.35s;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
}
.service-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
}
.service-card:hover .service-glow { opacity: 1; }
.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.service-kicker { font-size: 12px; color: var(--dim); letter-spacing: 0.16em; margin-bottom: 8px; }
.service-title {
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 16px;
}
.service-desc { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 0 0 28px; max-width: 460px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: 0.01em;
}
.service-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: gap 0.2s ease, border-color 0.2s ease;
}
.service-link:hover { gap: 10px; border-color: var(--line-2); }

/* Work */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}
@media (max-width: 1080px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .work-grid { grid-template-columns: 1fr; } }

.proj-card {
  display: flex; flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), border-color 0.35s;
}
.proj-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.proj-mock {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.proj-mock-shine {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
}
.proj-card:hover .proj-mock-shine { opacity: 1; }
.proj-browser {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.proj-browser .dots { display: flex; gap: 5px; }
.proj-browser .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.proj-browser .addr {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.55);
  margin: 0 auto;
  padding: 4px 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
}
.proj-mock-shapes { position: absolute; inset: 50px 28px 28px 28px; }
.proj-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #0a0a0a;
}
.proj-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(1.04);
  transform-origin: center center;
  border: 0;
  pointer-events: none;
}
.proj-video-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.shape {
  position: absolute;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(6px);
}
.shape.s1 { left: 0; top: 0; width: 60%; height: 60%; }
.shape.s2 { right: 0; top: 10%; width: 35%; height: 28%; }
.shape.s3 { right: 0; bottom: 0; width: 45%; height: 28%; background: rgba(255,255,255,0.12); }
.proj-label {
  position: absolute; bottom: 14px; left: 16px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
}
.proj-body { padding: 22px 24px 26px; }
.proj-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.proj-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.proj-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}
.proj-card:hover .proj-arrow { background: rgba(255,255,255,0.12); color: var(--fg); transform: rotate(-12deg) scale(1.05); }
.proj-desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card);
}
@media (max-width: 1080px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.why-num {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: 0.16em;
  margin-bottom: 32px;
}
.why-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 12px; }
.why-desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0; }

/* Contact */
.contact { padding-bottom: 80px; }
.contact-card {
  position: relative;
  text-align: center;
  padding: 96px 28px 88px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
  border: 1px solid var(--line);
  overflow: hidden;
}
.contact-glow { position: absolute; inset: 0; pointer-events: none; }
.contact-card .section-kicker { margin-bottom: 28px; }
.contact-title {
  font-size: clamp(40px, 6vw, 86px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
.contact-title .gradient {
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.contact-sub { color: var(--muted); margin: 0 0 48px; font-size: 17px; }
.contact-mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(20px, 2.2vw, 28px); font-weight: 500;
  padding: 18px 28px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}
.contact-mail:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); gap: 16px; }
.contact-socials {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  color: var(--muted); font-size: 14px;
}
.contact-socials a { display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s ease; }
.contact-socials a:hover { color: var(--fg); }
.contact-socials .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted);
  gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--fg); }

/* Responsive tightening */
@media (max-width: 760px) {
  .hero { padding: 110px 22px 60px; }
  .section { padding: calc(var(--section-py) * 0.7) 22px; }
  .section-head { margin-bottom: 56px; }
  .service-card { padding: 28px; }
}
