*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --surface2: #f1f4f8;
  --border: #e2e6ed;
  --accent: #1d4ed8;
  --accent-dim: #1e40af;
  --gold: #b45309;
  --text: #0f172a;
  --muted: #475569;
  --faint: #94a3b8;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 249, 251, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
}

nav .nav-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); text-decoration: none; }

/* ── LAYOUT ── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-child { border-bottom: none; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

/* ── HERO ── */
#hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 24px rgba(29, 78, 216, 0.12);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-photo .placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--faint);
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.hero-text .hero-title {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.hero-text .hero-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-meta span::before { margin-right: 0.35rem; }

.hero-summary {
  max-width: 600px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dim); text-decoration: none; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--muted);
  margin-left: 0.75rem;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.clearance-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-left: 1rem;
  vertical-align: middle;
}

/* ── COMPETENCIES ── */
.competency-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.competency-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
}

/* ── EXPERIENCE ── */
.exp-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.exp-item {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 2.5rem;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.exp-item.military::before { background: var(--gold); }

.exp-item[style*="none"] { display: none; }

.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.co-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
  font-family: var(--font);
}

.exp-company {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.exp-item.military .exp-company { color: var(--gold); }

.exp-period {
  font-size: 0.8rem;
  color: var(--faint);
  white-space: nowrap;
  font-family: var(--mono);
}

.exp-location {
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 0.75rem;
}

.exp-bullets {
  list-style: none;
  padding: 0;
}

.exp-bullets li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}

/* ── EDU & CERTS ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.edu-item {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.edu-school {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.edu-degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.edu-note {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
}

.edu-years {
  font-size: 0.78rem;
  color: var(--faint);
  font-family: var(--mono);
  margin-top: 0.2rem;
}

.cert-list { list-style: none; }

.cert-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.cert-list li:last-child { border-bottom: none; }

.cert-name { color: var(--text); font-weight: 500; }
.cert-auth { color: var(--faint); font-size: 0.78rem; }

.cert-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--accent);
}

/* ── PROJECTS ── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
}

.project-period {
  font-size: 0.75rem;
  color: var(--faint);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── HONORS ── */
.honors-list { list-style: none; }

.honors-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.honors-list li:last-child { border-bottom: none; }

.honor-title { color: var(--text); font-weight: 500; }
.honor-title::before {
  content: '★';
  color: var(--gold);
  margin-right: 0.6rem;
  font-size: 0.75rem;
}

.honor-date {
  font-size: 0.78rem;
  color: var(--faint);
  font-family: var(--mono);
  white-space: nowrap;
}

/* ── BOURBON CHARITY ── */
.bourbon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.bourbon-stats {
  display: flex;
  gap: 2.5rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.bourbon-stat .stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.bourbon-stat .stat-label {
  font-size: 0.78rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

.bourbon-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ── SPEAKING ── */
.speaking-list { list-style: none; }

.speaking-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

.speaking-list li:last-child { border-bottom: none; }

.speaking-title { color: var(--text); font-weight: 500; }
.speaking-event { font-size: 0.8rem; color: var(--muted); }
.speaking-date { font-size: 0.78rem; color: var(--faint); font-family: var(--mono); white-space: nowrap; }

/* ── AFFILIATIONS ── */
.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.affiliation-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
}

/* ── FOOTER ── */
footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--faint);
  font-size: 0.82rem;
}

footer .footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-meta { justify-content: center; }
  .hero-summary { margin: 0 auto 1.5rem; }
  .two-col { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  nav ul { display: none; }
  .bourbon-stats { gap: 1.5rem; }
}

/* ── ASK BRIAN CHAT WIDGET ── */
.ab-root { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200; font-family: var(--font); }
.ab-toggle {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--accent); color: #fff; border: none;
  padding: 0.7rem 1rem; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 0.9rem; font-family: var(--font);
  box-shadow: 0 6px 20px rgba(15,23,42,0.18);
  transition: transform 0.15s, background 0.15s;
}
.ab-toggle:hover { background: var(--accent-dim); transform: translateY(-1px); }
.ab-toggle-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
  animation: ab-pulse 2s infinite;
}
@keyframes ab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.ab-panel {
  position: absolute; right: 0; bottom: 60px;
  width: 360px; max-width: calc(100vw - 2rem); height: 480px; max-height: calc(100vh - 6rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15,23,42,0.18);
  display: flex; flex-direction: column; overflow: hidden;
}
.ab-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.ab-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.ab-sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }
.ab-close {
  background: transparent; border: none; font-size: 1.4rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 0.25rem;
}
.ab-close:hover { color: var(--text); }
.ab-log {
  flex: 1; overflow-y: auto; padding: 0.85rem; display: flex;
  flex-direction: column; gap: 0.55rem; background: var(--bg);
}
.ab-msg { display: flex; }
.ab-msg-user { justify-content: flex-end; }
.ab-msg-assistant { justify-content: flex-start; }
.ab-bubble {
  max-width: 82%; padding: 0.55rem 0.8rem; border-radius: 12px;
  font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.ab-msg-user .ab-bubble {
  background: var(--accent); color: #fff; border-bottom-right-radius: 4px;
}
.ab-msg-assistant .ab-bubble {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.ab-form {
  display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid var(--border);
  background: var(--surface);
}
.ab-input {
  flex: 1; padding: 0.55rem 0.75rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.9rem; font-family: var(--font);
  background: var(--surface); color: var(--text);
}
.ab-input:focus { outline: none; border-color: var(--accent); }
.ab-send {
  background: var(--accent); color: #fff; border: none; padding: 0.55rem 0.9rem;
  border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
  font-family: var(--font);
}
.ab-send:hover:not(:disabled) { background: var(--accent-dim); }
.ab-send:disabled, .ab-input:disabled { opacity: 0.6; cursor: not-allowed; }
.ab-foot {
  padding: 0.5rem 0.85rem; font-size: 0.72rem; color: var(--faint);
  background: var(--surface); border-top: 1px solid var(--border); text-align: center;
}
.ab-foot a { color: var(--accent); }
@media (max-width: 480px) {
  .ab-panel { width: calc(100vw - 1rem); height: calc(100vh - 5rem); right: -0.5rem; }
  .ab-toggle-text { display: none; }
  .ab-toggle { padding: 0.7rem; }
}
