/* ============================
   Blue Logic — Design Tokens
   ============================ */
:root {
  --bg: #0B1220;
  --bg-raised: #101a2c;
  --navy: #1a3a5c;
  --accent: #5FD4FF;
  --accent-dim: rgba(95, 212, 255, 0.15);
  --text: #F0F4F8;
  --text-muted: #9aabc0;
  --chrome: #C8D0DA;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

/* ============================
   Header
   ============================ */
.site-header {
  border-bottom: 1px solid rgba(200, 208, 218, 0.12);
  position: sticky;
  top: 0;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 55px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================
   Mobile nav toggle + panel
   ============================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 30;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 24;
}

.nav-overlay[hidden] { display: none; }

body.nav-open-lock { overflow: hidden; }

/* ============================
   Hero
   ============================ */
.hero {
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  max-width: 12ch;
  color: var(--text);
}

.hero-sub {
  color: var(--text-muted);
  max-width: 46ch;
  font-size: 1.05rem;
}

/* Conversation thread */
.zander-conversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 4px;
}

.zander-conversation[hidden] {
  display: none;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--navy);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.chat-bubble.zander {
  align-self: flex-start;
  background: var(--bg-raised);
  border: 1px solid rgba(95, 212, 255, 0.25);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-bubble.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 14px 16px;
}

.chat-bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: typing-dot 1.1s ease-in-out infinite;
}

.chat-bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Zander prompt bar — styled as if it's the real chat input */
.zander-prompt {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  background: var(--bg-raised);
  border: 1px solid rgba(95, 212, 255, 0.25);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(95,212,255,0.04), 0 12px 40px rgba(0,0,0,0.35);
}

.zander-prompt input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
}

.zander-prompt input::placeholder {
  color: var(--text-muted);
}

.zander-prompt button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: #04202e;
  border: none;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.zander-prompt button:hover { filter: brightness(1.1); }

.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zander-img {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5));
}

.glow-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  filter: blur(10px);
  animation: pulse 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.glow-ring.thinking {
  animation: pulse 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .glow-ring { animation: none; }
}

/* ============================
   Section shared
   ============================ */
.section {
  padding: 72px 0;
  border-top: 1px solid rgba(200, 208, 218, 0.08);
}

.section-label h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-label.center {
  text-align: center;
  margin-bottom: 40px;
}

.section-label.center .eyebrow { display: block; }

/* ============================
   About teaser
   ============================ */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-block;
  margin-top: 8px;
}

/* ============================
   Projects
   ============================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.project-card {
  background: var(--bg-raised);
  border: 1px solid rgba(200, 208, 218, 0.1);
  border-radius: 14px;
  padding: 26px;
}

.project-card.highlight {
  border-color: rgba(95, 212, 255, 0.35);
  background: linear-gradient(160deg, var(--bg-raised) 60%, rgba(95,212,255,0.06));
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-card p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.project-card strong { color: var(--text); }

/* ============================
   Contact teaser
   ============================ */
.contact-teaser {
  text-align: center;
}

.contact-inner h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.contact-inner p {
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 28px;
  border-radius: 10px;
  background: var(--accent);
  color: #04202e;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: filter 0.2s ease;
}

.btn:hover { filter: brightness(1.1); }

/* ============================
   Footer
   ============================ */
.site-footer {
  border-top: 1px solid rgba(200, 208, 218, 0.12);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

/* ============================
   Page hero (interior pages)
   ============================ */
.page-hero {
  padding: 88px 0 56px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 16ch;
}

.page-hero .hero-sub {
  color: var(--text-muted);
  max-width: 56ch;
}

/* ============================
   About grid
   ============================ */
.about-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.about-block h2 {
  font-size: 1.15rem;
  color: var(--accent);
}

.about-block p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ============================
   Project showcase cards
   ============================ */
.project-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-showcase-card {
  background: var(--bg-raised);
  border: 1px solid rgba(200, 208, 218, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-showcase-card.highlight {
  border-color: rgba(95, 212, 255, 0.35);
  grid-column: 1 / -1;
}

.project-showcase-card.highlight .project-showcase-image {
  aspect-ratio: 21 / 9;
}

.project-showcase-image {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  overflow: hidden;
}

.project-showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-showcase-body {
  padding: 22px 26px 26px;
}

.project-showcase-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-showcase-body p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.project-showcase-body strong { color: var(--text); }

/* ============================
   Contact form
   ============================ */
.contact-form-wrap {
  max-width: 640px;
}

.form-row {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  background: var(--bg-raised);
  border: 1px solid rgba(200, 208, 218, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form button {
  border: none;
  cursor: pointer;
}

.form-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.form-alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.form-alert.success {
  background: rgba(95, 212, 255, 0.1);
  border: 1px solid rgba(95, 212, 255, 0.35);
  color: var(--text);
}

.form-alert.error {
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--text);
}

.form-alert a {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================
   Consent banner
   ============================ */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: var(--bg-raised);
  border-top: 1px solid rgba(95, 212, 255, 0.25);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.consent-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.consent-btn.primary {
  background: var(--accent);
  color: #04202e;
}

.consent-btn.secondary {
  background: transparent;
  border-color: rgba(200, 208, 218, 0.25);
  color: var(--text-muted);
}

/* ============================
   In-chat contact card
   ============================ */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #04202e;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-radius: 8px;
}

.contact-btn-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(300px, 80%);
    background: var(--bg-raised);
    border-left: 1px solid rgba(200, 208, 218, 0.12);
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
    padding: 100px 32px 32px;
    transition: right 0.3s ease;
    z-index: 25;
  }

  .main-nav.open { right: 0; }

  .main-nav a {
    font-size: 1rem;
    width: 100%;
  }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; margin-bottom: 20px; }
  .zander-img { max-width: 280px; }
  .about-inner { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .about-grid-inner { grid-template-columns: 1fr; }
  .project-showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
  .zander-prompt { flex-direction: column; }
  .zander-prompt button { padding: 12px; }
  .consent-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-actions { justify-content: center; }
}
