/* ==========================================================================
   Rakeshdatta Adapa — Portfolio
   Single-page site stylesheet.
   Design system: void/purple/orange/cyan palette, Space Grotesk / JetBrains
   Mono / Sora type system. See design-brief.md for rationale.
   ========================================================================== */

:root {
  --void: #050814;
  --void-2: #080d1c;
  --panel: rgba(15, 23, 41, 0.55);
  --panel-solid: #0d1428;
  --border: rgba(140, 160, 200, 0.12);
  --border-bright: rgba(184, 124, 255, 0.4);
  --fg: #e8edf7;
  --fg-2: #c4cce0;
  --fg-dim: #7f8bab;
  --fg-mute: #7c88ab;
  --orange: #ff7a1a;
  --orange-bright: #ff9244;
  --orange-deep: #e85d04;
  --orange-glow: rgba(255, 122, 26, 0.4);
  --purple: #b87cff;
  --purple-neon: #d4b3ff;
  --purple-deep: #8b3fe0;
  --purple-glow: rgba(184, 124, 255, 0.35);
  --cyan: #00d4ff;
  --green: #2dd4a7;
  --red: #ff4757;
  --yellow: #ffc857;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Sora', sans-serif;
}

/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
section { position: relative; z-index: 2; padding: 110px 0; }
.section-alt { background: var(--void-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--orange); color: var(--void); font-family: var(--font-mono);
  font-size: 12px; padding: 10px 16px; border-radius: 6px; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ===== Ambient background layers (decorative; safe if inert) ===== */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(184, 124, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(255, 122, 26, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0, 212, 255, 0.03), transparent 70%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(140, 160, 200, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 200, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
/* #nodeNetwork is populated by an optional motion pass; empty SVG renders nothing */
#nodeNetwork { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .8; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(5, 8, 20, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1320px; margin: 0 auto; padding: 0 32px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.04em; font-size: 14px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border: 1px solid var(--purple); border-radius: 6px; display: grid; place-items: center; position: relative; background: rgba(184, 124, 255, 0.08); flex-shrink: 0; }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; background: var(--orange); border-radius: 50%; box-shadow: 0 0 8px var(--orange-glow); }
.brand-mark::before { width: 5px; height: 5px; top: 6px; right: 6px; }
.brand-mark::after { width: 4px; height: 4px; bottom: 6px; left: 6px; background: var(--purple); box-shadow: 0 0 8px var(--purple-glow); }
.brand-text span { color: var(--orange); }

.nav-links-wrap { position: relative; }
.nav-links { position: relative; z-index: 1; display: flex; gap: 2px; font-family: var(--font-mono); font-size: 12px; }
.nav-links a { color: var(--fg-dim); text-decoration: none; padding: 8px 12px; border-radius: 6px; transition: color 0.2s ease, background 0.2s ease; letter-spacing: 0.03em; white-space: nowrap; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--fg); background: rgba(184, 124, 255, 0.08); }
.nav-links a[data-num]::before { content: attr(data-num); color: var(--purple); margin-right: 6px; opacity: 0.6; transition: opacity .2s ease; }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::before { opacity: 1; }

/* Sliding scroll-spy indicator: tracks whichever section is currently
   in view, animating left/width so it slides smoothly between links
   in either scroll direction (see initNavScrollSpy in animations.js). */
.nav-indicator {
  position: absolute; top: 2px; bottom: 2px; left: 0; width: 0;
  background: rgba(184, 124, 255, 0.1); border: 1px solid var(--border-bright);
  border-radius: 6px; opacity: 0; pointer-events: none; z-index: 0;
  transition: left .35s cubic-bezier(.16,.84,.44,1), width .35s cubic-bezier(.16,.84,.44,1), opacity .2s ease;
}
.nav-indicator.active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .nav-indicator { transition: opacity .2s ease; }
}

.nav-status { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-dim); padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; background: rgba(15, 23, 41, 0.4); white-space: nowrap; flex-shrink: 0; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.85); } }

/* Mobile nav — pure CSS checkbox toggle, no JS required */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label {
  display: none; width: 38px; height: 34px; border: 1px solid var(--border); border-radius: 6px;
  background: rgba(15, 23, 41, 0.5); cursor: pointer; position: relative; flex-shrink: 0;
}
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  content: ''; position: absolute; left: 9px; right: 9px; height: 2px; background: var(--fg-2); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-label span { top: 16px; }
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-radius: 6px; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; }
.btn-primary { background: var(--orange); color: var(--void); font-weight: 600; box-shadow: 0 0 24px rgba(255, 122, 26, 0.3); }
.btn-primary:hover { background: var(--orange-bright); box-shadow: 0 0 32px rgba(255, 122, 26, 0.5); transform: translateY(-1px); }
.btn-ghost { background: rgba(184, 124, 255, 0.06); color: var(--fg); border-color: var(--border-bright); }
.btn-ghost:hover { background: rgba(184, 124, 255, 0.12); border-color: var(--purple); color: var(--purple-neon); }

/* ===== Hero ===== */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.hero-meta { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 28px; display: flex; align-items: center; gap: 8px; }
.hero-meta .fa-location-dot { color: var(--orange); font-size: 11px; }
.hero-meta::before { content: ''; width: 32px; height: 1px; background: var(--orange); }

.hero-title { font-family: var(--font-display); font-size: clamp(40px, 6.5vw, 88px); font-weight: 600; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 22px; }
.hero-title .line-1 { display: block; color: var(--fg); }
.hero-title .line-2 { display: block; color: var(--orange-bright); font-weight: 300; font-style: italic; font-size: clamp(20px, 2.6vw, 32px); margin-top: 10px; }

.hero-desc { max-width: 600px; font-size: 16px; color: var(--fg-2); line-height: 1.75; margin-bottom: 36px; font-weight: 300; }
.hero-desc strong { color: var(--fg); font-weight: 500; }

.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.hero-links { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.hero-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .2s ease; }
.hero-links a:hover { color: var(--orange-bright); }

.hero-panels { display: flex; flex-direction: column; gap: 12px; }
.glass-panel { background: var(--panel); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid var(--border); border-radius: 12px; padding: 24px; position: relative; overflow: hidden; }
.glass-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--purple), transparent); opacity: 0.5; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-dim); }
.panel-value { font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--fg); line-height: 1; margin-bottom: 8px; }
.panel-value .unit { font-size: 13px; color: var(--fg-dim); margin-left: 6px; font-weight: 400; }
.panel-desc { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); line-height: 1.5; }

/* ===== Ticker ===== */
.telemetry-bar {
  position: relative; z-index: 2; background: rgba(8, 13, 28, 0.8); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; overflow: hidden;
}
.tm-track {
  display: flex; gap: 60px; white-space: nowrap; font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-dim); width: max-content; animation: scroll-tm 40s linear infinite;
}
.tm-item { display: inline-flex; align-items: center; gap: 12px; }
.tm-item .label { color: var(--fg-mute); letter-spacing: 0.1em; }
.tm-item .val { color: var(--fg-2); }
@keyframes scroll-tm { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Bento (By the Numbers) ===== */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(160px, auto); grid-auto-flow: dense; gap: 16px; }
.bento-cell { background: var(--panel); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 12px; padding: 24px; position: relative; overflow: hidden; transition: border-color .3s ease, transform .3s ease; }
.bento-cell:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.bento-cell.large { grid-column: span 2; grid-row: span 2; }
.bento-cell.wide { grid-column: span 2; }
.bento-cell .cell-label { font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bento-cell .cell-num { font-family: var(--font-display); font-size: 52px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; background: linear-gradient(180deg, var(--fg) 0%, var(--fg-dim) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-cell.large .cell-num { font-size: 64px; }
.bento-cell .cell-num .small { font-size: 22px; color: var(--orange); -webkit-text-fill-color: var(--orange); margin-left: 4px; }
.bento-cell .cell-desc { margin-top: 14px; font-size: 13px; color: var(--fg-2); line-height: 1.55; font-weight: 300; }
.bento-cell .cell-icon { position: absolute; top: 22px; right: 22px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(184, 124, 255, 0.08); border: 1px solid var(--border-bright); border-radius: 6px; color: var(--purple); font-size: 13px; }

/* ===== Section heads ===== */
.section-head { margin-bottom: 60px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: end; }
.section-tag { font-family: var(--font-mono); font-size: 11px; color: var(--orange); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.section-tag.tag-purple { color: var(--purple); }
.section-tag::before { content: ''; width: 24px; height: 1px; background: currentColor; }
.section-title { font-family: var(--font-display); font-size: clamp(32px, 4.2vw, 56px); font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
.section-title em { font-style: italic; font-weight: 300; color: var(--purple); }
.section-desc { font-size: 15px; color: var(--fg-2); line-height: 1.7; max-width: 560px; font-weight: 300; }

/* ===== Experience ===== */
.sec-ops-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; margin-bottom: 48px; }

.timeline { display: flex; flex-direction: column; gap: 16px; }
.role-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; transition: border-color .25s ease; }
.role-card:hover { border-color: var(--border-bright); }
.role-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.role-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--fg); }
.role-company { color: var(--orange-bright); }
.role-period { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.05em; white-space: nowrap; }
.role-location { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); margin-bottom: 14px; }
.role-bullets { display: flex; flex-direction: column; gap: 8px; }
.role-bullets li { font-size: 13.5px; color: var(--fg-2); line-height: 1.6; padding-left: 18px; position: relative; font-weight: 300; }
.role-bullets li::before { content: '→'; position: absolute; left: 0; color: var(--purple); }

.education-card { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 12px; padding: 22px 26px; margin-top: 4px; }
.education-card .role-title { font-size: 17px; }

/* SIEM-style illustrative panel */
.siem { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.siem-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: rgba(15, 23, 41, 0.8); gap: 12px; flex-wrap: wrap; }
.siem-header .title { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-2); letter-spacing: 0.06em; display: flex; align-items: center; gap: 10px; }
.siem-header .title i { color: var(--orange); }
.illustrative-tag { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: var(--yellow); border: 1px solid rgba(255, 200, 87, 0.35); background: rgba(255, 200, 87, 0.08); padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.siem-body { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.siem-card { background: rgba(8, 13, 28, 0.6); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.siem-card .label { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-dim); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.siem-card .value { font-family: var(--font-mono); font-size: 13px; font-weight: 500; margin-bottom: 6px; display: inline-block; padding: 2px 7px; border-radius: 3px; }
.siem-card .value.orange { color: var(--orange-bright); background: rgba(255, 122, 26, 0.1); }
.siem-card .value.purple { color: var(--purple-neon); background: rgba(184, 124, 255, 0.1); }
.siem-card .value.cyan { color: var(--cyan); background: rgba(0, 212, 255, 0.1); }
.siem-card .value.green { color: var(--green); background: rgba(45, 212, 167, 0.1); }
.siem-card .sub { font-size: 12px; color: var(--fg-2); line-height: 1.5; font-weight: 300; }
.siem-card.full { grid-column: span 2; }
.siem-events { grid-column: span 2; font-family: var(--font-mono); font-size: 11px; }
.event-row { display: grid; grid-template-columns: 70px 56px 1fr 90px; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(140, 160, 200, 0.06); align-items: center; }
.event-row:last-child { border-bottom: none; }
.event-row .time { color: var(--fg-mute); }
.event-row .sev { font-size: 9px; padding: 2px 6px; border-radius: 3px; text-align: center; letter-spacing: 0.06em; }
.event-row .sev.high { background: rgba(255, 71, 87, 0.15); color: var(--red); }
.event-row .sev.med { background: rgba(255, 200, 87, 0.12); color: var(--yellow); }
.event-row .sev.low { background: rgba(45, 212, 167, 0.12); color: var(--green); }
.event-row .msg { color: var(--fg-2); }
.event-row .src { color: var(--purple-neon); text-align: right; }

/* Terminal */
.terminal { background: rgba(5, 8, 20, 0.85); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-family: var(--font-mono); font-size: 12.5px; position: relative; display: flex; flex-direction: column; }
.terminal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--purple), transparent); }
.terminal-head { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--fg-dim); letter-spacing: 0.06em; background: rgba(8, 13, 28, 0.5); gap: 10px; flex-wrap: wrap; }
.terminal-head .dots { display: flex; gap: 6px; }
.terminal-head .dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.terminal-head .dots span:nth-child(1) { background: #ff5f57; }
.terminal-head .dots span:nth-child(2) { background: #febc2e; }
.terminal-head .dots span:nth-child(3) { background: #28c840; }
.terminal-body { padding: 20px; line-height: 1.75; color: var(--fg-2); overflow-x: auto; flex-grow: 1; }
.terminal-body .ln { display: block; white-space: pre; }
.terminal-body .c { color: var(--fg-mute); }
.terminal-body .k { color: var(--purple-neon); }
.terminal-body .s { color: var(--orange-bright); }
.terminal-body .f { color: var(--cyan); }
.terminal-body .n { color: var(--green); }
.terminal-body .o { color: var(--fg-dim); }
.terminal-body .v { color: var(--fg); }
.run-btn { background: rgba(184, 124, 255, 0.1); border: 1px solid var(--purple); color: var(--purple-neon); padding: 6px 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; transition: all 0.2s; letter-spacing: 0.05em; }
.run-btn:hover { background: var(--purple); color: var(--void); box-shadow: 0 0 10px var(--purple-glow); }
.terminal-output { padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.3); max-height: 220px; overflow-y: auto; font-size: 11.5px; color: var(--green); line-height: 1.6; white-space: pre-wrap; }

/* Use-case cards */
.use-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.use-case { background: var(--panel); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 12px; padding: 24px; position: relative; overflow: hidden; transition: all 0.3s ease; }
.use-case:hover { border-color: var(--purple); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(184, 124, 255, 0.12); }
.uc-id { font-family: var(--font-mono); font-size: 10px; color: var(--orange); letter-spacing: 0.1em; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-id .mitre { padding: 2px 6px; background: rgba(255, 122, 26, 0.1); border: 1px solid rgba(255, 122, 26, 0.3); border-radius: 3px; font-size: 9px; }
.uc-title { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-bottom: 12px; line-height: 1.3; }
.uc-desc { font-size: 13px; color: var(--fg-2); line-height: 1.6; margin-bottom: 20px; font-weight: 300; }
.uc-meta { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); padding-top: 16px; border-top: 1px solid var(--border); letter-spacing: 0.05em; flex-wrap: wrap; }
.uc-meta span { display: flex; align-items: center; gap: 5px; }
.uc-meta i { color: var(--purple); }

/* ===== Projects ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; }
.project-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; transition: all .3s ease; }
.project-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.project-name { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.project-tags .tag { font-family: var(--font-mono); font-size: 9.5px; padding: 3px 8px; background: rgba(184, 124, 255, 0.08); border: 1px solid var(--border-bright); border-radius: 3px; color: var(--purple-neon); letter-spacing: 0.05em; }
.project-summary { font-size: 13.5px; color: var(--fg-2); line-height: 1.65; margin-bottom: 16px; font-weight: 300; }
.project-achieve { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex-grow: 1; }
.project-achieve li { font-size: 12.5px; color: var(--fg-2); line-height: 1.55; padding-left: 16px; position: relative; font-weight: 300; }
.project-achieve li::before { content: '·'; position: absolute; left: 2px; color: var(--orange); font-weight: 700; }
.project-link { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; letter-spacing: 0.04em; margin-top: auto; }
.project-link:hover { color: var(--purple-neon); }
.project-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; }
.project-links .project-link { margin-top: 0; }

/* Architecture diagram */
.arch-wrap { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin-bottom: 44px; position: relative; overflow: hidden; }
.arch-wrap::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.arch-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.08em; gap: 14px; flex-wrap: wrap; }
.arch-head .title { color: var(--fg-2); display: flex; align-items: center; gap: 10px; }
.arch-head .title i { color: var(--orange); }
.arch-head .meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.arch-head .meta span b { color: var(--green); font-weight: 500; }
.arch-head .tag { font-family: var(--font-mono); font-size: 9.5px; padding: 3px 8px; background: rgba(184, 124, 255, 0.08); border: 1px solid var(--border-bright); border-radius: 3px; color: var(--purple-neon); letter-spacing: 0.05em; text-transform: none; }
.arch-svg { width: 100%; height: auto; display: block; }
.arch-svg text { font-family: var(--font-mono); font-size: 10px; fill: var(--fg-2); }
.arch-svg .node-label { font-family: var(--font-display); font-size: 12px; font-weight: 500; fill: var(--fg); }
.arch-svg .node-sub { font-size: 9px; fill: var(--fg-dim); letter-spacing: 0.06em; }
.arch-svg .flow-line { fill: none; stroke: var(--border); stroke-width: 1.5; }
.arch-svg .flow-line.active { stroke: var(--orange); stroke-width: 1.5; }
.arch-svg .node-rect { fill: rgba(15, 23, 41, 0.9); stroke: var(--border); stroke-width: 1; rx: 8; }
.arch-svg .node-rect.source { stroke: rgba(0, 212, 255, 0.5); }
.arch-svg .node-rect.stream { stroke: rgba(255, 122, 26, 0.5); }
.arch-svg .node-rect.process { stroke: rgba(184, 124, 255, 0.5); }
.arch-svg .node-rect.store { stroke: rgba(45, 212, 167, 0.5); }

/* ===== Architecture diagram carousel ===== */
.arch-carousel { position: relative; margin-bottom: 44px; }
.arch-carousel .arch-wrap { margin-bottom: 0; }
.arch-slide { display: none; }
.arch-slide.active { display: block; animation: archSlideIn .35s ease; }
@keyframes archSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.arch-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.arch-nav-btn, .arch-play-toggle {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel); color: var(--fg-dim); display: grid; place-items: center;
  cursor: pointer; transition: color .2s ease, border-color .2s ease; flex-shrink: 0;
}
.arch-nav-btn:hover, .arch-play-toggle:hover { color: var(--orange); border-color: var(--border-bright); }
.arch-dots { display: flex; }
.arch-dot {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent;
  cursor: pointer; display: grid; place-items: center; position: relative;
}
.arch-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-mute); transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.arch-dot.active::before { background: var(--orange); box-shadow: 0 0 8px var(--orange-glow); transform: scale(1.35); }
.arch-dot:focus-visible, .arch-nav-btn:focus-visible, .arch-play-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .arch-slide.active { animation: none; }
}

/* Tech stack */
.tech-stack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 48px; }
.tech-item { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 18px 14px; text-align: center; transition: all 0.3s ease; }
.tech-item:hover { border-color: var(--orange); background: rgba(255, 122, 26, 0.06); transform: translateY(-2px); }
.tech-item .icon { font-size: 20px; margin-bottom: 10px; color: var(--purple); }
.tech-item .name { font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); letter-spacing: 0.04em; }

/* Lab grid */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lab-cell { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; position: relative; transition: border-color .25s ease; }
.lab-cell:hover { border-color: var(--border-bright); }
.lab-cell .lab-num { font-family: var(--font-mono); font-size: 10px; color: var(--orange); letter-spacing: 0.12em; margin-bottom: 14px; }
.lab-cell .lab-name { font-family: var(--font-display); font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.lab-cell .lab-spec { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); line-height: 1.7; margin-bottom: 12px; }
.lab-cell .lab-spec b { color: var(--fg-2); font-weight: 500; }
.lab-cell .lab-why { font-size: 12.5px; color: var(--fg-2); line-height: 1.6; font-weight: 300; margin-bottom: 14px; }
.lab-cell .lab-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lab-cell .tag { font-family: var(--font-mono); font-size: 9px; padding: 3px 8px; background: rgba(184, 124, 255, 0.08); border: 1px solid var(--border-bright); border-radius: 3px; color: var(--purple-neon); letter-spacing: 0.05em; }

/* ===== Skills ===== */
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; transition: border-color .25s ease; }
.skill-card:hover { border-color: var(--border-bright); }
.skill-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.skill-card-head i { font-size: 16px; color: var(--purple); width: 30px; height: 30px; display: grid; place-items: center; background: rgba(184, 124, 255, 0.08); border: 1px solid var(--border-bright); border-radius: 6px; flex-shrink: 0; }
.skill-card-head h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 500; }
.skill-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.skill-list li { font-size: 12.5px; color: var(--fg-2); line-height: 1.55; padding-left: 14px; position: relative; font-weight: 300; }
.skill-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.skill-chips .chip { font-family: var(--font-mono); font-size: 9.5px; padding: 3px 8px; background: rgba(0, 212, 255, 0.06); border: 1px solid rgba(0, 212, 255, 0.25); border-radius: 3px; color: var(--cyan); letter-spacing: 0.04em; }

/* ===== Certifications ===== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cert-card { background: var(--panel); border: 1px solid var(--accent, var(--purple)); border-radius: 12px; padding: 24px; transition: all .3s ease; }
.cert-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.cert-card.ms { --accent: var(--cyan); }
.cert-card.comptia { --accent: var(--orange); }
.cert-card.google { --accent: var(--green); }
.cert-level { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent, var(--purple)); margin-bottom: 12px; }
.cert-title { font-family: var(--font-display); font-size: 17px; font-weight: 500; margin-bottom: 4px; line-height: 1.3; }
.cert-issuer { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-bottom: 14px; }
.cert-bullets { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.cert-bullets li { font-size: 12px; color: var(--fg-2); line-height: 1.55; padding-left: 14px; position: relative; font-weight: 300; }
.cert-bullets li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent, var(--purple)); }
.cert-verify { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent, var(--purple)); text-decoration: none; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 6px; }
.cert-verify:hover { color: var(--fg); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-intro-text { font-size: 15.5px; color: var(--fg-2); line-height: 1.75; margin-bottom: 32px; max-width: 480px; font-weight: 300; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; transition: all .2s ease; }
.contact-link:hover { border-color: var(--border-bright); background: rgba(184,124,255,0.05); }
.contact-link i { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(255, 122, 26, 0.08); border: 1px solid rgba(255, 122, 26, 0.3); border-radius: 8px; color: var(--orange-bright); font-size: 15px; flex-shrink: 0; }
.contact-link .lbl { font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.contact-link .val { font-size: 14px; color: var(--fg); font-weight: 400; word-break: break-word; }

.contact-form { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 14px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.form-group input, .form-group textarea {
  background: rgba(5, 8, 20, 0.6); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; color: var(--fg); font-family: var(--font-body); font-size: 14px; transition: border-color .2s ease;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--purple); }
.form-submit { margin-top: 4px; align-self: flex-start; }
.form-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-mute); min-height: 1.4em; transition: color 0.2s; }
.form-note--ok  { color: var(--green); }
.form-note--err { color: var(--red); }

/* ===== Contact form success panel ===== */
.cf-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 32px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.cf-success--visible { opacity: 1; transform: translateY(0); }

.cf-success__ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(61, 220, 132, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cf-pulse 2.4s ease-in-out infinite;
}
@keyframes cf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.25); }
  50%       { box-shadow: 0 0 0 14px rgba(61, 220, 132, 0); }
}

.cf-success__check {
  width: 52px;
  height: 52px;
  color: #3ddc84;
}
.cf-success__circle {
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: cf-draw-circle 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}
.cf-success__tick {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: cf-draw-tick 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.65s forwards;
}
@keyframes cf-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes cf-draw-tick   { to { stroke-dashoffset: 0; } }

.cf-success__heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
}
.cf-success__sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg-mute);
  text-align: center;
}

.cf-success__dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.cf-success__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc84;
  opacity: 0;
  animation: cf-dot-pop 0.4s ease forwards;
}
.cf-success__dots span:nth-child(1) { animation-delay: 1.05s; }
.cf-success__dots span:nth-child(2) { animation-delay: 1.2s; }
.cf-success__dots span:nth-child(3) { animation-delay: 1.35s; }
@keyframes cf-dot-pop {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0.6; transform: scale(1); }
}

/* ===== Footer ===== */
footer { position: relative; z-index: 2; padding: 90px 0 40px; border-top: 1px solid var(--border); background: rgba(5, 8, 20, 0.5); backdrop-filter: blur(10px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer-brand h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-bottom: 14px; letter-spacing: -0.01em; }
.footer-brand p { color: var(--fg-2); font-size: 13.5px; line-height: 1.7; font-weight: 300; max-width: 380px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--fg-2); text-decoration: none; font-size: 13px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--orange); }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.05em; gap: 16px; flex-wrap: wrap; }
.social { display: flex; gap: 10px; }
.social a { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; color: var(--fg-dim); text-decoration: none; transition: all 0.25s ease; }
.social a:hover { border-color: var(--purple); color: var(--purple-neon); background: rgba(184, 124, 255, 0.06); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== Session HUD (real, visitor-scoped data) ===== */
.session-hud {
  position: fixed; bottom: 20px; left: 20px; z-index: 900;
  background: rgba(8, 13, 28, 0.9); backdrop-filter: blur(15px);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
  transition: border-color .3s ease; max-width: 250px;
}
.session-hud:hover { border-color: var(--purple); }
.hud-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--purple-neon); margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; font-size: 10px; letter-spacing: 0.08em; }
.hud-title { display: flex; align-items: center; gap: 8px; }
.hud-toggle {
  width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--border); background: transparent;
  color: var(--fg-dim); display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease;
}
.hud-toggle i { font-size: 9px; transition: transform .2s ease; }
.hud-toggle:hover { color: var(--orange); border-color: var(--border-bright); }
.hud-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.session-hud.minimized .hud-header { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.session-hud.minimized .hud-toggle i { transform: rotate(180deg); }
.hud-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.hud-row:last-child { margin-bottom: 0; }
.hud-row .k { color: var(--fg-mute); flex-shrink: 0; }
.hud-row .v { color: var(--fg); text-align: right; word-break: break-word; }
.hud-row .v.secure { color: var(--green); }

.hud-mini { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--fg-2); font-size: 12px; white-space: nowrap; }
.hud-mini[hidden] { display: none; }
.hud-mini-div { width: 1px; height: 12px; background: var(--border); flex-shrink: 0; }
.hud-mini-item { display: flex; align-items: center; }
.hud-mini-item .fa-lock, .hud-mini-item .fa-lock-open { font-size: 11px; }
.hud-mini-item .secure { color: var(--green); }
.hud-mini-item .insecure { color: var(--red); }

/* Motion hook: fully visible without JS. `animations.js` adds `.js` on
   <html> as soon as it runs; only then do `.reveal` elements hide/animate.
   If the script never loads, this base rule keeps everything visible. */
.reveal, .bento-cell { opacity: 1; transform: none; }

/* ===== Scroll reveal (animations.js) ===== */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .7s cubic-bezier(.16,.84,.44,1);
}
html.js .reveal.visible { opacity: 1; transform: none; }

/* Hero panels: fade in on a JS-driven cue (name decrypt completing),
   not the generic scroll-observer — see animations.js. */
html.js .hero-panel-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.16,.84,.44,1), transform .6s cubic-bezier(.16,.84,.44,1);
}
html.js .hero-panel-reveal.visible { opacity: 1; transform: none; }

/* Ticker: pause the marquee on hover/focus so it's readable on demand */
.telemetry-bar:hover .tm-track,
.telemetry-bar:focus-within .tm-track { animation-play-state: paused; }

/* Terminal run button — busy state while the typewriter reveal plays */
.run-btn:disabled { opacity: .55; cursor: progress; }

/* Architecture diagram: slow, one-directional decorative pulse along the
   flow lines. Static content, no implied "live" throughput — see
   design-brief.md §3/§8. */
.arch-svg .flow-line.active {
  stroke-dasharray: 6 5;
  animation: arch-flow-pulse 3.2s linear infinite;
}
@keyframes arch-flow-pulse { to { stroke-dashoffset: -110; } }

/* ===== Responsive ===== */
@media (max-width: 1150px) {
  .hero-grid, .section-head, .sec-ops-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell.large, .bento-cell.wide { grid-column: span 2; }
  .use-cases, .lab-grid, .project-grid, .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-stack { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .session-hud { display: none; }
}
@media (max-width: 860px) {
  .nav-mobile-panel { display: contents; }
  .nav-links, .nav-status { display: none; }
  .nav-indicator { display: none; }
  .nav-toggle-label { display: block; }
  .nav-toggle-input:checked ~ .nav-inner .nav-mobile-panel {
    display: flex; flex-direction: column; gap: 12px;
    position: absolute; top: 62px; left: 16px; right: 16px;
    background: rgba(8,13,28,0.97); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px;
  }
  .nav-toggle-input:checked ~ .nav-inner .nav-mobile-panel .nav-links,
  .nav-toggle-input:checked ~ .nav-inner .nav-mobile-panel .nav-status {
    display: flex; flex-direction: column; align-items: flex-start;
    position: static; background: none; border: none; padding: 0; max-width: none;
  }
  .nav-toggle-input:checked ~ .nav-inner .nav-mobile-panel .nav-status { flex-direction: row; align-items: center; }
}
@media (max-width: 700px) {
  .container { padding: 0 20px; }
  section { padding: 72px 0; }
  .hero { padding-top: 120px; }
  .bento, .use-cases, .lab-grid, .tech-stack, .project-grid, .skill-grid { grid-template-columns: 1fr; }
  .bento-cell.large, .bento-cell.wide { grid-column: span 1; }
  .siem-body, .form-row { grid-template-columns: 1fr; }
  .siem-card.full, .siem-events { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-head { gap: 20px; }
  .event-row { grid-template-columns: 56px 46px 1fr; }
  .event-row .src { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
::selection { background: rgba(184, 124, 255, 0.3); color: var(--fg); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: rgba(184, 124, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(184, 124, 255, 0.4); }

/* ==========================================================================
   Chat Widget — restyled to match the void/purple/orange system
   ========================================================================== */
#ai-chat-widget { position: fixed; bottom: 26px; right: 26px; z-index: 950; font-family: var(--font-body); }

.chat-toggle-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--purple-deep));
  border: none; color: var(--void); cursor: pointer;
  box-shadow: 0 6px 24px rgba(255, 122, 26, 0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease;
}
.chat-toggle-btn:hover { transform: scale(1.06); box-shadow: 0 8px 30px rgba(184, 124, 255, 0.4); }
.chat-toggle-btn i { font-size: 28px; }
.chat-toggle-btn.hidden { transform: scale(0); opacity: 0; pointer-events: none; }

.chat-window {
  position: absolute; bottom: 76px; right: 0; width: 340px; height: 480px;
  background-color: rgba(13, 20, 40, 0.97); backdrop-filter: blur(14px);
  border: 1px solid var(--border-bright); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right; transform: scale(0); opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
.chat-window.active { transform: scale(1); opacity: 1; }

.chat-header {
  padding: 14px 18px; background: linear-gradient(90deg, var(--purple-deep), var(--orange-deep));
  color: var(--fg); display: flex; justify-content: space-between; align-items: center;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; font-family: var(--font-display); }
.chat-header-text { display: flex; flex-direction: column; line-height: 1.3; }
.chat-disclaimer { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: 0.03em; color: rgba(232, 237, 247, 0.7); text-transform: uppercase; }

.icon-btn { background: none; border: none; color: rgba(232, 237, 247, 0.85); cursor: pointer; transition: color 0.2s; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.icon-btn:hover { color: #fff; }

.chat-messages { flex: 1; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.chat-message { max-width: 82%; padding: 11px 15px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.chat-message.agent { align-self: flex-start; background-color: rgba(184, 124, 255, 0.12); color: var(--fg-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-message.user { align-self: flex-end; background-color: var(--orange); color: var(--void); border-bottom-right-radius: 4px; font-weight: 500; }

.chat-input-area { padding: 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; background-color: rgba(5, 8, 20, 0.5); }
#chat-input { flex: 1; background-color: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); border-radius: 20px; padding: 10px 15px; color: var(--fg); outline: none; transition: border-color 0.3s; font-family: var(--font-body); }
#chat-input:focus { border-color: var(--purple); }

.send-btn { background-color: var(--orange); color: var(--void); width: 38px; height: 38px; border-radius: 50%; transition: background-color 0.3s; border: none; }
.send-btn:hover { background-color: var(--orange-bright); }

.typing-indicator .message-content { display: flex; gap: 4px; padding: 5px 0; }
.dot { width: 7px; height: 7px; background-color: var(--purple-neon); border-radius: 50%; animation: pulse-dot 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes pulse-dot { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }

@media (max-width: 480px) {
  .chat-window { bottom: 0; right: 0; width: 100%; height: 100%; border-radius: 0; position: fixed; }
  #ai-chat-widget { bottom: 16px; right: 16px; }
}
