/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(139, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(255, 106, 213, 0.12), transparent 60%),
    radial-gradient(1000px 800px at 50% 110%, rgba(90, 200, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #07061a 0%, #050414 55%, #030210 100%);
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
  cursor: none;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: none; color: inherit; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg: #07061a;
  --bg-soft: #0a0c14;
  --surface: rgba(255,255,255,0.04);
  --surface-hi: rgba(255,255,255,0.07);
  --line: rgba(255,255,255,0.08);
  --line-hi: rgba(255,255,255,0.16);
  --text: #eef0f5;
  --muted: #9aa0ae;
  --muted-2: #6b7180;
  --accent: #90f3ff;
  --accent-2: #8b5cff;
  --accent-3: #ff6ad5;
  --grad: linear-gradient(135deg, #90f3ff 0%, #8b5cff 50%, #ff6ad5 100%);
  --maxw: 1200px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.container { width: min(var(--maxw), calc(100% - 48px)); margin-inline: auto; }

/* ---------- Background & noise ---------- */
.bg-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2;
  pointer-events: none;
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
  mix-blend-mode: overlay;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(40px, 8vw, 80px);
  letter-spacing: -0.04em;
  display: flex; gap: 0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.loader__mark span {
  display: inline-block; transform: translateY(120%); opacity: 0;
  animation: letterIn 0.9s var(--ease) forwards;
}
.loader__mark span:nth-child(1) { animation-delay: 0.05s; }
.loader__mark span:nth-child(2) { animation-delay: 0.12s; }
.loader__mark span:nth-child(3) { animation-delay: 0.19s; }
.loader__mark span:nth-child(4) { animation-delay: 0.26s; }
.loader__mark span:nth-child(5) { animation-delay: 0.33s; }
@keyframes letterIn { to { transform: translateY(0); opacity: 1; } }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; transform: translate3d(-100px,-100px,0); }
.cursor {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  transition: transform 0.12s linear, width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 5px; height: 5px; background: #fff; border-radius: 50%;
}
.cursor.is-hover {
  width: 64px; height: 64px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.9);
}
@media (max-width: 900px) { .cursor, .cursor-dot { display: none; } body, button, a { cursor: auto; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5,6,10,0.6);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.nav__brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad); color: #05060a; font-weight: 700;
  font-family: 'Instrument Serif', serif; font-size: 20px;
}
.nav__brand-name { font-family: 'Instrument Serif', serif; font-size: 22px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 14px; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px; border: 1px solid var(--line-hi); border-radius: 999px;
  color: var(--text) !important;
}
.nav__cta:hover { background: var(--surface); }
.nav__toggle { display: none; width: 36px; height: 36px; flex-direction: column; gap: 6px; justify-content: center; align-items: center; }
.nav__toggle span { width: 22px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 64px 0 0 0; z-index: 49;
  background: rgba(5,6,10,0.95); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  font-family: 'Instrument Serif', serif; font-size: 32px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  padding: 140px 24px 80px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero__inner { position: relative; width: min(var(--maxw), 100%); margin-inline: auto; z-index: 2; }

.hero__aurora { position: absolute; inset: -20%; z-index: 1; filter: blur(80px); pointer-events: none; }
.blob { position: absolute; width: 50vw; height: 50vw; border-radius: 50%; opacity: 0.55; mix-blend-mode: screen; }
.blob--a { top: 5%; left: -10%; background: radial-gradient(circle at 30% 30%, #90f3ff, transparent 60%); animation: drift 22s ease-in-out infinite; }
.blob--b { top: 20%; right: -15%; background: radial-gradient(circle at 60% 40%, #8b5cff, transparent 60%); animation: drift 28s ease-in-out infinite reverse; }
.blob--c { bottom: -20%; left: 20%; background: radial-gradient(circle at 50% 50%, #ff6ad5, transparent 60%); animation: drift 34s ease-in-out infinite; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(6%, -4%) scale(1.1); }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 28px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

.hero__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(80px, 16vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 32px;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .char-wrap {
  display: inline-block; position: relative;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(110%);
  animation: heroIn 1.1s var(--ease) 0.8s forwards;
}
@keyframes heroIn { to { transform: translateY(0); } }

.hero__subtitle {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  color: var(--text);
  max-width: 640px;
}
.hero__subtitle em {
  font-style: italic; color: var(--muted);
}
.hero__subtitle span { color: var(--text); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.btn--primary { background: var(--text); color: #05060a; }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line-hi); color: var(--text); }
.btn--ghost:hover { background: var(--surface); border-color: rgba(255,255,255,0.35); }
.btn--full { width: 100%; justify-content: center; padding: 18px; }

.hero__scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(var(--muted), transparent); overflow: hidden; position: relative; }
.hero__scroll-line::after { content: ''; position: absolute; top: -40px; left: 0; width: 1px; height: 40px; background: var(--accent); animation: scrollMove 2.2s var(--ease) infinite; }
@keyframes scrollMove { 0% { top: -40px; } 100% { top: 100%; } }

.hero__meta {
  position: absolute; bottom: 40px; right: 24px;
  display: flex; gap: 28px; font-size: 12px;
}
.meta-item { display: flex; flex-direction: column; line-height: 1.2; }
.meta-item strong { font-family: 'Instrument Serif', serif; font-size: 24px; color: var(--text); }
.meta-item span { color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-size: 10px; margin-top: 2px; }
@media (max-width: 820px) { .hero__meta { display: none; } }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.marquee__track {
  display: inline-flex; gap: 48px;
  font-family: 'Instrument Serif', serif; font-size: 28px; color: var(--muted);
  white-space: nowrap;
  animation: marquee 36s linear infinite;
}
.marquee__track span:nth-child(even) { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section shared ---------- */
section { padding: 120px 24px; position: relative; }
.section-head { max-width: 820px; margin-bottom: 64px; }
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-sub { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 620px; }

/* ---------- Intro cards ---------- */
.intro__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.intro__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.intro__card:hover { transform: translateY(-6px); background: var(--surface-hi); border-color: var(--line-hi); }
.intro__num { font-family: 'Instrument Serif', serif; font-size: 48px; color: var(--accent); margin-bottom: 16px; }
.intro__card h3 { font-size: 22px; margin-bottom: 10px; }
.intro__card p { color: var(--muted); }
@media (max-width: 820px) { .intro__grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.project-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project {
  position: relative;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
  will-change: transform;
}
.project:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.project__media {
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #0e1220, #1a1f38);
  overflow: hidden;
}
.project__media--a { background: radial-gradient(circle at 30% 30%, #8b5cff, #05060a 70%); }
.project__media--b { background: radial-gradient(circle at 70% 40%, #90f3ff, #05060a 70%); }
.project__media--c { background: radial-gradient(circle at 40% 60%, #ff6ad5, #05060a 70%); }
.project__media--d { background: radial-gradient(circle at 50% 50%, #6b7180, #05060a 70%); }
.project__glow {
  position: absolute; inset: -40%;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.25), transparent 40%);
  opacity: 0; transition: opacity 0.5s;
}
.project:hover .project__glow { opacity: 1; }
.project__tag {
  position: absolute; top: 18px; left: 18px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(5,6,10,0.6); border: 1px solid var(--line-hi);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
  backdrop-filter: blur(10px);
}
.project__body { padding: 28px; }
.project__body h3 { font-family: 'Instrument Serif', serif; font-size: 28px; margin-bottom: 10px; font-weight: 400; }
.project__body p { color: var(--muted); margin-bottom: 22px; }
.project__meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted-2); }
.project__link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); transition: gap 0.3s var(--ease); }
.project__link:hover { gap: 10px; }
.project__link--muted { color: var(--muted-2); pointer-events: none; }
@media (max-width: 820px) { .project-list { grid-template-columns: 1fr; } }

/* ---------- Testimonies ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi {
  margin: 0; padding: 32px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  min-height: 220px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.testi:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.testi p { font-family: 'Instrument Serif', serif; font-size: 20px; font-style: italic; color: var(--text); }
.testi footer { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.testi__avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #333, #111); border: 1px solid var(--line-hi); }
.testi footer strong { display: block; color: var(--text); font-weight: 500; }
.testi footer em { color: var(--muted-2); font-style: normal; font-size: 12px; }
@media (max-width: 820px) { .testi-grid { grid-template-columns: 1fr; } }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.member {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.member:hover { transform: translateY(-6px); border-color: var(--line-hi); }
.member__portrait {
  position: relative;
  aspect-ratio: 4/3;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0e1220, #1a1f38);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.member__portrait::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(139,92,255,0.3), transparent 60%);
}
.member__initials {
  position: relative;
  font-family: 'Instrument Serif', serif;
  font-size: 120px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 400;
}
.member__soon {
  position: absolute; bottom: 16px; right: 16px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(5,6,10,0.6); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.member__body { padding: 28px; }
.member__body h3 { font-family: 'Instrument Serif', serif; font-size: 28px; font-weight: 400; margin-bottom: 6px; }
.member__role { color: var(--accent); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.member__body p { color: var(--muted); }
@media (max-width: 820px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Journey ---------- */
.timeline { position: relative; margin-top: 64px; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(var(--line-hi), transparent);
}
.timeline__item {
  position: relative; padding-bottom: 56px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -27px; top: 8px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.timeline__item--future .timeline__dot { border-color: var(--accent-2); box-shadow: 0 0 16px var(--accent-2); }
.timeline__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.timeline__card:hover { transform: translateX(6px); border-color: var(--line-hi); }
.timeline__year {
  display: inline-block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.timeline__item--future .timeline__year { color: var(--accent-2); }
.timeline__card h3 { font-family: 'Instrument Serif', serif; font-size: 26px; font-weight: 400; margin-bottom: 8px; }
.timeline__card p { color: var(--muted); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__list { margin-top: 40px; border-top: 1px solid var(--line); }
.contact__list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.contact__list li span:first-child { color: var(--muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.contact__list a { color: var(--text); transition: color 0.3s; }
.contact__list a:hover { color: var(--accent); }

.contact__form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 36px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.field--full { grid-column: 1 / -1; }
.field > span {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-hi);
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 10px 0; outline: none;
  transition: border-color 0.3s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.btn--full { grid-column: 1 / -1; margin-top: 12px; }
.form__status { grid-column: 1 / -1; font-size: 13px; color: var(--muted); min-height: 20px; }
.form__status.is-ok { color: var(--accent); }
.form__status.is-err { color: #ff6a7d; }

@media (max-width: 820px) {
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact__form { grid-template-columns: 1fr; padding: 24px; }
}

/* ---------- Footer ---------- */
.footer { padding: 48px 24px 32px; border-top: 1px solid var(--line); }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { font-family: 'Instrument Serif', serif; font-size: 22px; display: block; }
.footer__brand small { color: var(--muted); font-size: 12px; }
.footer__links { display: flex; gap: 24px; font-size: 13px; }
.footer__links a { color: var(--muted); transition: color 0.3s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { font-size: 12px; color: var(--muted-2); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .char-wrap { transform: none; }
  .loader { display: none; }
}
