:root,
[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-elevated: #111827;
  --bg-subtle: #161f30;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --status: #10b981;
  --status-soft: rgba(16, 185, 129, 0.14);
  --nav-bg: rgba(11, 15, 23, 0.82);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(2, 132, 199, 0.35);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-soft: rgba(2, 132, 199, 0.1);
  --status: #059669;
  --status-soft: rgba(5, 150, 105, 0.12);
  --nav-bg: rgba(248, 250, 252, 0.86);
  --shadow: 0 10px 28px -12px rgba(15, 23, 42, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.menu-toggle {
  display: none;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  margin: 0 0 2.25rem;
  color: var(--text-muted);
  max-width: 66ch;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--status-soft);
  color: var(--status);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.35rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  color: var(--text-muted);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.2rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: #06131f;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}

/* About & Capabilities */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.pillar-icon {
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  margin-bottom: 0.85rem;
  display: grid;
  place-items: center;
}

.pillar-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Projects */
.projects-section {
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-meta {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Architecture Strip */
.arch-section {
  border-top: 1px solid var(--border);
}

.arch-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.arch-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  position: relative;
}

.arch-node strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.arch-node span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cost-callout {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--status);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cost-callout p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 70ch;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

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

.footer-links {
  display: flex;
  gap: 1.25rem;
}

/* Resume Page */
.resume-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1.25rem;
}

.resume-sheet {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.25rem 2.5rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow);
}

.resume-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.resume-header h1 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.resume-role {
  margin: 0.2rem 0 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.98rem;
}

.resume-contact {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.resume-layout {
  display: grid;
  grid-template-columns: 2.15fr 1fr;
  gap: 2rem;
}

.resume-block {
  margin-bottom: 1.15rem;
}

.resume-block:last-child {
  margin-bottom: 0;
}

.resume-block h2 {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.resume-summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.exp-item {
  margin-bottom: 0.85rem;
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.exp-top h3 {
  margin: 0;
  font-size: 0.95rem;
}

.exp-dates {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.exp-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0.1rem 0 0.35rem;
}

.exp-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.exp-list li {
  margin-bottom: 0.25rem;
}

.skill-group {
  margin-bottom: 0.7rem;
}

.skill-group h3 {
  margin: 0 0 0.15rem;
  font-size: 0.84rem;
  color: var(--text);
}

.skill-group p,
.cert-list li,
.edu-item p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.cert-list {
  margin: 0;
  padding-left: 1rem;
}

.cert-list li {
  margin-bottom: 0.3rem;
}

/* Services Page */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
  margin-bottom: 1.75rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.service-card.featured {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-elevated) 28%);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.service-audience {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-tag {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--status-soft);
  color: var(--status);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.service-desc {
  margin-bottom: 1rem !important;
}

.service-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.service-list li {
  margin-bottom: 0.42rem;
}

.service-list li:last-child {
  margin-bottom: 0;
}

.service-footer .btn {
  width: 100%;
  justify-content: center;
}

.retainer-callout {
  margin-top: 0.5rem;
}

.process-flow {
  grid-template-columns: repeat(3, 1fr);
}

/* Contact Form */
.contact-card {
  max-width: 780px;
  padding: 1.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hp-field {
  display: none !important;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-status {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.form-status.success {
  background: var(--status-soft);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--status);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Responsive */
@media (max-width: 860px) {
  .about-grid,
  .projects-grid,
  .services-grid,
  .process-flow,
  .form-row,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .arch-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-contact {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .pillars-grid,
  .arch-flow {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.85rem;
  }

  .nav-links.open {
    display: flex;
  }

  .resume-sheet {
    padding: 1.4rem;
  }
}

/* 1-Page US Letter Print Styles for Resume */
@media print {
  @page {
    size: letter;
    margin: 0.35in 0.45in;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9pt;
    line-height: 1.3;
  }

  .site-header,
  .resume-toolbar,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .container {
    width: 100%;
    margin: 0;
  }

  section,
  .resume-block {
    padding: 0 !important;
  }

  .resume-sheet {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .resume-header {
    flex-wrap: nowrap;
    align-items: flex-start;
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
    border-bottom: 1.5px solid #0284c7;
  }

  .resume-header h1 {
    font-size: 16pt;
    color: #0f172a !important;
  }

  .resume-contact {
    text-align: right !important;
    font-size: 8pt;
    line-height: 1.3;
  }

  .resume-role,
  .resume-block h2 {
    color: #0284c7 !important;
  }

  .resume-contact,
  .resume-summary,
  .exp-sub,
  .exp-list,
  .skill-group p,
  .cert-list li,
  .edu-item p,
  .exp-dates {
    color: #334155 !important;
  }

  .resume-layout {
    grid-template-columns: 2.2fr 1fr;
    gap: 1.15rem;
  }

  .resume-block {
    margin-bottom: 0.55rem;
  }

  .resume-block h2 {
    font-size: 8.5pt;
    margin-bottom: 0.3rem;
    padding-bottom: 0.12rem;
    border-bottom: 1px solid #cbd5e1;
  }

  .exp-item {
    margin-bottom: 0.45rem;
  }

  .exp-top h3 {
    font-size: 9.5pt;
    color: #0f172a !important;
  }

  .exp-list {
    font-size: 8.6pt;
  }

  .exp-list li {
    margin-bottom: 0.14rem;
  }

  .skill-group {
    margin-bottom: 0.38rem;
  }

  .skill-group h3 {
    font-size: 8.5pt;
    color: #0f172a !important;
  }

  .skill-group p,
  .cert-list li,
  .edu-item p {
    font-size: 8.2pt;
  }

  a {
    color: #0284c7 !important;
    text-decoration: none;
  }
}
