/* ===== Theme variables ===== */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --accent: #0071E3;
  --accent-2: #06B6D4;
}

[data-theme="light"] {
  --bg: #F5F5F7;
  --bg-soft: #FFFFFF;
  --line: rgba(0, 0, 0, 0.10);
  --text: #1D1D1F;
  --muted: #6E6E73;
  --nav-bg: rgba(245, 245, 247, 0.8);
  --menu-bg: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] {
  --bg: #0F172A;
  --bg-soft: #1E293B;
  --line: rgba(255, 255, 255, 0.08);
  --text: #F8FAFC;
  --muted: #94A3B8;
  --nav-bg: rgba(15, 23, 42, 0.85);
  --menu-bg: rgba(15, 23, 42, 0.97);
  --accent: #60A5FA;
}

[data-theme="dark"] .hero__lead {
  color: #CBD5E1;
}

[data-theme="dark"] .hero__pill {
  color: #93C5FD;
  background: rgba(96, 165, 250, 0.12);
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, height 0.3s;
}

.nav.scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: 64px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 1px;
  color: var(--text);
}

.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav__links a {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

/* theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 13px 28px;
  cursor: pointer;
  border-radius: 980px;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover { transform: translateY(-2px); opacity: 0.9; }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ===== HERO (Apple-style centered) ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.band {
  position: absolute;
  border-radius: 45%;
  filter: blur(90px);
  opacity: 0.25;
}

.band--1 { width: 55%; height: 70%; top: -15%; left: 5%; background: linear-gradient(120deg, #3B82F6, #1D4ED8); animation: band1 22s ease-in-out infinite; }
.band--2 { width: 50%; height: 65%; top: -10%; right: 0; background: linear-gradient(120deg, #06B6D4, #0EA5E9); animation: band2 26s ease-in-out infinite; }
.band--3 { width: 48%; height: 60%; top: 5%; left: 30%; background: linear-gradient(120deg, #22D3EE, #3B82F6); animation: band3 24s ease-in-out infinite; }

[data-theme="dark"] .band { opacity: 0.22; mix-blend-mode: screen; }

@keyframes band1 { 0%,100% { transform: translate(-10%,-10%) rotate(0deg) scale(1.2);} 50% { transform: translate(10%,5%) rotate(20deg) scale(1.4);} }
@keyframes band2 { 0%,100% { transform: translate(10%,0) rotate(0deg) scale(1.3);} 50% { transform: translate(-8%,10%) rotate(-15deg) scale(1.1);} }
@keyframes band3 { 0%,100% { transform: translate(0,10%) rotate(0deg) scale(1.1);} 50% { transform: translate(12%,-8%) rotate(12deg) scale(1.35);} }

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.rise { animation: riseIn 0.9s cubic-bezier(.16,1,.3,1) both; }

.hero__pill {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 7px 16px;
  border-radius: 30px;
  margin-bottom: 26px;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0;
}

.hero__headline .serif {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
}

.hero__lead {
  color: var(--muted);
  font-size: 1.25rem;
  max-width: 540px;
  margin: 22px auto 0;
  line-height: 1.5;
}

.hero__btns {
  margin-top: 32px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* ===== Code window (stays dark in both themes) ===== */
.code-window {
  margin: 52px auto 0;
  max-width: 640px;
  width: 100%;
  background: #0F1626;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.code-window__bar {
  background: #161f33;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }

.code-window__name {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #64748b;
}

.code-window__body {
  margin: 0;
  padding: 22px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #e2e8f0;
  overflow-x: auto;
}

.c-kw { color: #c084fc; }
.c-fn { color: #60a5fa; }
.c-prop { color: #7dd3fc; }
.c-str { color: #86efac; }
.c-bool { color: #f59e0b; }

/* tech stack badges */
.hero__stack { margin-top: 44px; }
.hero__stack-label { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.hero__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero__tags li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 6px;
}

/* ===== Generic section ===== */
.section {
  padding: 130px 0;
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 36px;
}

.accent { color: var(--accent); }

/* ===== About ===== */
.about__text { max-width: 760px; }
.about__text p { color: var(--muted); font-size: 1.12rem; margin-bottom: 18px; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.about__tags li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 6px;
}

/* ===== Services ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.service {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 30px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.service:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.service--accent { border-color: rgba(0,113,227,0.4); }

.service__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(0,113,227,0.1);
  border: 1px solid rgba(0,113,227,0.25);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--accent);
}
.service__icon svg { width: 24px; height: 24px; }

.service__num { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; margin-bottom: 14px; }
.service__title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 12px; }
.service__desc { color: var(--muted); font-size: 0.98rem; margin-bottom: 20px; }
.service__list { list-style: none; }
.service__list li { color: var(--text); font-size: 0.9rem; padding: 8px 0; border-top: 1px solid var(--line); }
.service__list li::before { content: "→ "; color: var(--accent); }

/* ===== Sectors ===== */
.sectors__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}

.sector {
  padding: 44px 36px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transition: background 0.25s;
}

.sector:nth-child(3n) { border-right: 1px solid var(--line); }
.sector:nth-child(n + 4) { border-bottom: 0; }
.sector:hover { background: var(--bg-soft); }

.sector__num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--accent); opacity: 0.5; margin-bottom: 16px; }
.sector__title { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 12px; }
.sector__desc { color: var(--muted); font-size: 0.96rem; }

/* ===== Work ===== */
.work__intro { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin-bottom: 50px; }
.work__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }

.project {
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.project:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.project__tag { font-family: var(--font-mono); color: var(--accent); font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.project__title { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 12px; }
.project__desc { color: var(--muted); font-size: 0.96rem; margin-bottom: 22px; }
.project__link { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); }
.project:hover .project__link { color: var(--accent); }

/* ===== Contact ===== */
.contact__intro { color: var(--muted); font-size: 1.12rem; max-width: 560px; margin-bottom: 44px; }
.contact__links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.contact__item:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.08); }
.contact__label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.contact__value { font-size: 1.05rem; color: var(--text); }
/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  background: var(--bg-soft);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
}

.footer__tagline {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer__col a {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 0;
  transition: color 0.2s;
}

.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.footer__bottom p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.footer__links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer__links a {
  color: var(--muted);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .container { padding: 0 22px; }
  .nav__links, .nav .btn--primary { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: absolute;
    top: 80px; left: 0; right: 0;
    background: var(--menu-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 28px 22px;
    border-bottom: 1px solid var(--line);
  }
  .sectors__grid { grid-template-columns: 1fr; }
  .sector { border-right: 1px solid var(--line); }
  .section { padding: 90px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .band, .rise { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Section rhythm & depth ===== */

/* alternating shade for rhythm */
.section--alt {
  background: var(--bg-soft);
}

/* ===== Section aurora glow ===== */
.section--glow {
  position: relative;
  overflow: hidden;
}

.section--glow::before,
.section--glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.10;
}

.section--glow::before {
  width: 45%;
  height: 70%;
  top: -10%;
  left: -5%;
  background: linear-gradient(120deg, #3B82F6, #1D4ED8);
  animation: secAur1 24s ease-in-out infinite;
}

.section--glow::after {
  width: 40%;
  height: 60%;
  bottom: -15%;
  right: -5%;
  background: linear-gradient(120deg, #06B6D4, #0EA5E9);
  animation: secAur2 28s ease-in-out infinite;
}

[data-theme="dark"] .section--glow::before,
[data-theme="dark"] .section--glow::after {
  opacity: 0.16;
  mix-blend-mode: screen;
}

@keyframes secAur1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.2); }
}
@keyframes secAur2 {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-30px, -20px) scale(0.95); }
}

.section .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .section--glow::before,
  .section--glow::after { animation: none; }
}

.hero__eyebrow-lg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* make the main word extra large, like the reference */
.hero__headline {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  letter-spacing: -1px;
}