:root {
  --purple: #7b15e8;
  --magenta: #fc38db;
  --blue: #2146db;
  --cyan: #4cc5f2;
  --bg: #0b0a14;
  --card: #15112a;
  --glass: rgba(21, 17, 42, .78);
  --line: #2a2350;
  --text: #e9e6ff;
  --muted: #9b93c7;
  --footer-bg: rgba(17, 13, 34, .72);
  --band-strength: 18%;
  --grad: linear-gradient(90deg, var(--cyan), var(--blue) 30%, var(--purple) 62%, var(--magenta));
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-label: "Rajdhani", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root { color-scheme: dark; }
:root[data-theme="light"] {
  --purple: #6a12cc;
  --magenta: #b0148e;
  --blue: #1f43c9;
  --cyan: #0a6890;
  --bg: #f7f5fc;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, .84);
  --line: #dcd5ef;
  --text: #17132b;
  --muted: #554e78;
  --footer-bg: rgba(255, 255, 255, .72);
  --band-strength: 12%;
  color-scheme: light;
}

.theme-toggle {
  flex: none; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent;
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .08em;
  color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--magenta); border-color: var(--purple); }
.theme-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }


* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(123, 21, 232, .22), transparent 60%),
    radial-gradient(800px 460px at 92% 4%, rgba(252, 56, 219, .16), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(76, 197, 242, .14), transparent 60%);
}

.service, .project a, .resource { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.neural-bg {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%;
  pointer-events: none;
}
:root[data-theme="light"] .neural-bg { opacity: .55; }
.subpage .neural-bg { opacity: .4; }
:root[data-theme="light"] .subpage .neural-bg { opacity: .25; }

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(24px, env(safe-area-inset-right, 0px)) 14px max(24px, env(safe-area-inset-left, 0px));
  background: var(--glass); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand-logo { width: 44px; height: auto; display: block; filter: drop-shadow(0 2px 8px rgba(123, 21, 232, .45)); }
.brand-word {
  font-family: var(--font-body); font-weight: 800; font-size: 22px; letter-spacing: .08em;
  white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-dot { -webkit-text-fill-color: var(--magenta); color: var(--magenta); }

.site-nav { display: flex; align-items: center; gap: 32px; }

.nav-toggle {
  display: none; flex: none; width: 44px; height: 44px; padding: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text);
}
.nav-toggle-bar { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.topbar.menu-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.menu-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.topbar.menu-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.hero {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 4vw, 56px);
  padding: clamp(40px, 8vw, 96px) 16px clamp(24px, 5vw, 56px);
  flex-wrap: wrap;
}
.brand-mark {
  width: clamp(150px, 22vw, 280px);
  filter: drop-shadow(0 8px 30px rgba(123, 21, 232, .5));
}
.brand-mark img, .brand-mark svg { width: 100%; height: auto; display: block; }
.hero-text { min-width: 0; text-align: center; }
.hero-text h1 {
  margin: 0; font-family: var(--font-display); font-weight: 300; letter-spacing: .01em; line-height: 1.05;
  font-size: clamp(44px, 7vw, 88px); color: var(--text); text-wrap: balance;
}
.hero-text h1 em {
  font-style: italic;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline {
  font-family: var(--font-label); font-weight: 500;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .2em .9em;
  margin: 18px 0 0; color: var(--muted);
  font-size: clamp(12px, 1.8vw, 20px); letter-spacing: .3em; text-transform: uppercase;
}
.tagline span + span::before { content: "\00b7"; margin-right: .9em; color: var(--magenta); }

.site-nav a, .footer-links a {
  color: var(--muted); text-decoration: none; font-family: var(--font-label); font-weight: 600; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase;
}
.site-nav a { position: relative; padding: 8px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: .2em; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="true"], .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="true"]::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.footer-links a:hover { color: var(--magenta); }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }

main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.section { position: relative; isolation: isolate; padding: 72px 0 64px; scroll-margin-top: 88px; }
.section::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -80px; bottom: -80px; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(180deg,
    transparent,
    color-mix(in srgb, var(--band) var(--band-strength), transparent) 160px,
    color-mix(in srgb, var(--band) var(--band-strength), transparent) calc(100% - 160px),
    transparent);
}
.section + .section::after {
  content: ""; position: absolute; top: 0; left: 50%; width: min(760px, 86%); height: 1px;
  transform: translateX(-50%); background: var(--grad); opacity: .6; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
#about { --band: var(--purple); }
#services { --band: var(--blue); }
#ai { --band: var(--magenta); }
#work { --band: var(--cyan); }
#insights { --band: var(--purple); }
#resources { --band: var(--blue); }
#contact { --band: var(--magenta); }
.label {
  margin: 0; font-family: var(--font-label); font-weight: 600; font-size: 13px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--magenta);
}
.section h2, .service h3 {
  font-family: var(--font-display); font-weight: 300; letter-spacing: .02em; line-height: 1.12;
  color: var(--text); text-wrap: balance;
}
.section h2 { margin: 12px 0 28px; font-size: clamp(36px, 5vw, 56px); }
.section h2 em {
  font-style: italic;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-header { margin-bottom: 8px; }

.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.about-photo {
  max-width: 380px; border: 1px solid var(--line);
  box-shadow: 6px 6px 0 rgba(123, 21, 232, .28), 0 0 40px rgba(123, 21, 232, .18);
}
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 380 / 500; object-fit: cover; object-position: top center; }
.about-text { min-width: 0; }
.about-text > p:not(.label), .bio-more p { margin: 0 0 18px; font-size: 17px; line-height: 1.85; color: var(--muted); max-width: 65ch; }
.about-text strong { color: var(--text); font-weight: 500; }
.about-quote {
  margin: 32px 0; padding-left: 24px; border-left: 2px solid var(--magenta);
}
.about-quote p {
  margin: 0; font-family: var(--font-display); font-style: italic; font-size: 24px; line-height: 1.5; color: var(--text);
}
.about-quote cite {
  display: block; margin-top: 12px; font-style: normal; font-family: var(--font-label);
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--magenta);
}
.expertise-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.expertise-list li {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-label); font-weight: 500; font-size: 16px; letter-spacing: .06em; color: var(--text);
}
.expertise-list li::before { content: ""; width: 22px; height: 1px; flex: none; background: var(--magenta); }
.bio-more { border-top: 1px solid var(--line); padding-top: 18px; }
.bio-more summary {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--cyan);
}
.bio-more summary::-webkit-details-marker { display: none; }
.bio-more summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.bio-more[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.bio-more summary:hover { color: var(--magenta); }
.bio-more summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }
.bio-more .when-open, .bio-more[open] .when-closed { display: none; }
.bio-more[open] .when-open { display: inline; }
.bio-more[open] summary { margin-bottom: 18px; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.service {
  padding: 24px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
}
.service h3 { margin: 0 0 10px; font-size: 28px; }
.service p { margin: 0; color: var(--muted); line-height: 1.6; }

.group-title {
  margin: 32px 0 14px; font-family: var(--font-label); font-size: 14px; font-weight: 600; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted);
}
.section-header + .group-title { margin-top: 0; }
.projects {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.project a {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 20px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s;
}
.project a:hover { border-color: var(--purple); transform: translateY(-2px); }
.project-name { font-size: 18px; font-weight: 700; }
.project-desc { color: var(--muted); line-height: 1.55; flex: 1; }
.project-tags { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }

.section-intro { margin: 0 0 32px; max-width: 65ch; font-size: 17px; line-height: 1.8; color: var(--muted); }
.resource-group {
  margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 400; font-size: 30px; color: var(--text);
}
.resources + .resource-group { margin-top: 44px; }
.resources {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px;
}
.resource {
  display: flex; flex-direction: column; gap: 18px; padding: 28px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 6px;
}
.resource-head { display: flex; gap: 18px; align-items: flex-start; }
.resource-tile {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px;
  border: 1px solid var(--line); border-radius: 6px; background: rgba(123, 21, 232, .12);
  font-family: var(--font-display); font-size: 26px; color: var(--magenta);
}
.resource-eyebrow {
  margin: 4px 0 6px; font-family: var(--font-label); font-weight: 600; font-size: 12px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.resource-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--text); }
.resource-desc { margin: 0; flex: 1; color: var(--muted); line-height: 1.7; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.resource-button {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border: 1px solid var(--purple); border-radius: 4px;
  font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--magenta); text-decoration: none;
  transition: background .2s, color .2s;
}
.resource-button:hover { background: rgba(252, 56, 219, .1); color: var(--text); }
.resource-button svg { width: 16px; height: 16px; }

.section-header-split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.section-header-split .section-intro { margin: 0 0 28px; max-width: 46ch; text-align: right; }
.insights {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px;
}
.insight {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 32px 28px 28px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 6px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.insight::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px;
  border-radius: 6px 6px 0 0; background: var(--grad);
}
.insight-meta {
  margin: 0; font-family: var(--font-label); font-weight: 600; font-size: 13px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--magenta);
}
.insight-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.25; text-wrap: balance; }
.insight-title a { color: var(--text); text-decoration: none; }
.insight-title a:hover { color: var(--magenta); }
.insight-summary { margin: 0; flex: 1; color: var(--muted); line-height: 1.7; }
.insight-link, .insights-all a, .article-back a {
  font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: .08em;
  color: var(--cyan); text-decoration: none;
}
.insight-link:hover, .insights-all a:hover, .article-back a:hover { color: var(--magenta); }
.insights-all { margin: 32px 0 0; text-align: center; }
.page-title {
  margin: 12px 0 20px; font-family: var(--font-display); font-weight: 300; line-height: 1.1;
  font-size: clamp(40px, 6vw, 64px); text-wrap: balance;
}
.page-title em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.article { max-width: 760px; margin: 0 auto; padding: 48px 16px 24px; }
.article h1 {
  margin: 14px 0 18px; font-family: var(--font-display); font-weight: 300; line-height: 1.12;
  font-size: clamp(36px, 5.5vw, 56px); text-wrap: balance;
}
.article-lead { margin: 0 0 32px; font-size: 19px; line-height: 1.7; color: var(--text); }
.article-body h2 {
  margin: 40px 0 14px; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.2;
}
.article-body p, .article-body li { font-size: 17px; line-height: 1.85; color: var(--muted); }
.article-body p { margin: 0 0 18px; }
.article-body ul { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 8px; }
.article-body strong { color: var(--text); font-weight: 500; }
.article-back { margin: 0 0 8px; }
.article > .article-back:last-child { margin-top: 40px; }

@media (max-width: 760px) {
  .section-header-split .section-intro { text-align: left; }
}

.contact-card {
  max-width: 640px; display: flex; flex-direction: column; gap: 18px; padding: 32px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 6px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.contact-lead { margin: 0; font-size: 17px; line-height: 1.8; color: var(--muted); }
.contact-address {
  margin: 0; font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); color: var(--text);
  user-select: all; overflow-wrap: anywhere;
}

.site-footer {
  margin-top: 72px;
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(123, 21, 232, .18);
}
.footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 40px 16px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 32px;
}
.footer-icons { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.footer-icons a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--muted);
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.footer-icons a:hover {
  color: var(--magenta); border-color: var(--purple);
  box-shadow: 0 0 14px rgba(252, 56, 219, .25);
}
.footer-icon-soon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--muted);
  opacity: .4; cursor: default;
}
.footer-icons svg { width: 18px; height: 18px; }
.footer-copy {
  margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-align: center;
}
.footer-links { display: flex; justify-content: flex-end; gap: 32px; }

@media (max-width: 1000px) {
  .topbar { gap: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px max(16px, env(safe-area-inset-left, 0px)) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .35);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    max-height: calc(100vh - 72px); overflow-y: auto; overscroll-behavior: contain;
  }
  .topbar.menu-open .site-nav { display: flex; }
  .site-nav a { padding: 14px 0; }
  .site-nav a::after { bottom: 8px; right: auto; width: 48px; transform-origin: left; }
}

@media (max-width: 560px) {
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-word { font-size: 18px; }
  .brand-logo { width: 36px; }
  .theme-toggle { padding: 8px 12px; }
  .hero { flex-direction: column; text-align: center; gap: 12px; }
  .tagline { justify-content: center; margin-left: 0; letter-spacing: .18em; gap: .2em .6em; }
  .tagline span + span::before { margin-right: .6em; }
}

@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand-word { font-size: 15px; letter-spacing: .04em; }
}

@media (max-width: 350px) {
  .brand-word { display: none; }
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-photo { max-width: 320px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-icons { justify-content: center; gap: 10px; }
  .footer-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .project a, .footer-icons a, .bio-more summary::after, .resource-button, .site-nav a::after, .theme-toggle, .nav-toggle-bar { transition: none; }
  .project a:hover { transform: none; }
}
