:root {
  --bg: #17110c;
  --bg-alt: #1f1710;
  --surface: #271d15;
  --surface-hover: #33261a;
  --text: #f7ede1;
  --text-muted: #c4a98d;
  --accent: #e8873b;
  --accent-2: #f2b544;
  --accent-soft: #f6c98a;
  --accent-glow: rgba(232, 135, 59, 0.28);
  --border: rgba(226, 176, 122, 0.18);
  --radius: 14px;
  --shadow: 0 24px 60px rgba(30, 12, 0, 0.45);
  --sidebar-w: 300px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-soft); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--accent);
  color: #2a1607;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #2a1607; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #2a1607;
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-primary:hover { color: #2a1607; box-shadow: 0 12px 40px var(--accent-glow); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 233, 209, 0.04);
}
.btn-ghost:hover { background: rgba(255, 233, 209, 0.09); color: var(--text); }

.btn-full { width: 100%; }

/* Logo */
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

/* Mobile bar */
.mobile-bar {
  display: none;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 300;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0 1.25rem;
  background: rgba(23, 17, 12, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 200;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at 10% 0%, rgba(232, 135, 59, 0.16), transparent 55%),
    var(--bg-alt);
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.25rem 1.75rem;
  gap: 2rem;
  overflow-y: auto;
}

.sidebar-role {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-nav { flex: 1; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nav-links a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 500;
  border-left: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 233, 209, 0.05);
  border-left-color: var(--accent);
}
.nav-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0.85;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sidebar-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.sidebar-link:hover { color: var(--accent-2); }
.sidebar-copy {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(196, 169, 141, 0.7);
}

/* Main column */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* Hero panel */
.hero-panel {
  position: relative;
  padding: clamp(4rem, 10vw, 7.5rem) var(--gutter) 0;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) saturate(1.2) hue-rotate(-12deg) brightness(0.42);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(23, 17, 12, 0.96) 30%, rgba(23, 17, 12, 0.6) 100%);
}
.hero-panel-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 1.25rem;
}

.hero-panel h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}
.hero-panel h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  background: rgba(23, 17, 12, 0.72);
}
.hero-metrics li {
  padding: 1.4rem var(--gutter);
  border-right: 1px solid var(--border);
}
.hero-metrics li:last-child { border-right: none; }
.hero-metrics strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent-soft);
}
.hero-metrics span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
.sec {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(3.5rem, 7vw, 6rem) var(--gutter);
  border-bottom: 1px solid var(--border);
}
.sec-tinted { background: var(--bg-alt); }

.sec-head {
  position: sticky;
  top: 2.5rem;
  align-self: start;
}
.sec-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.sec-body { max-width: 780px; }
.sec-body p { color: var(--text-muted); }
.lead-text {
  font-size: 1.15rem;
  color: var(--text) !important;
  margin-top: 0;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
}
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}
.check-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Service rows */
.service-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.service-rows li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.service-rows li:last-child { border-bottom: 1px solid var(--border); }
.service-rows li:hover { background: rgba(255, 233, 209, 0.03); }
.row-index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.3rem;
}
.row-main h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
}
.row-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Full-bleed band */
.band {
  position: relative;
  height: clamp(220px, 32vw, 340px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) saturate(1.2) hue-rotate(-12deg) brightness(0.55);
}
.band-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  background: linear-gradient(90deg, rgba(23, 17, 12, 0.85), rgba(23, 17, 12, 0.35));
}
.band-quote {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--accent-soft);
  line-height: 1.25;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.stack-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}
.stack-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}
.stack-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stack-col li {
  padding: 0.3rem 0;
  font-size: 0.94rem;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(226, 176, 122, 0.12);
}
.stack-col li:last-child { border-bottom: none; }

/* Experience */
.xp-list { display: flex; flex-direction: column; }
.xp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--border);
}
.xp-row:last-child { border-bottom: 1px solid var(--border); }
.xp-when time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}
.xp-what h3 { margin: 0 0 0.25rem; font-size: 1.08rem; }
.xp-what p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* Certifications */
.cert-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}
.cert-pills li {
  font-size: 0.85rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(232, 135, 59, 0.1);
  border: 1px solid rgba(232, 135, 59, 0.26);
  color: var(--accent-soft);
}
.cert-note {
  margin-top: 1.5rem;
  font-size: 0.92rem;
}

/* Testimonials */
.quotes-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
blockquote {
  margin: 0;
  padding: 1.6rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
blockquote p { margin: 0 0 0.9rem; font-style: italic; color: var(--text-muted); }
blockquote footer { font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* Contact */
.sec-contact { border-bottom: none; }
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-aside p { margin-top: 0; }

.contact-info {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.contact-info li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.contact-info li:last-child { border-bottom: 1px solid var(--border); }
.contact-info strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.contact-info span { color: var(--text-muted); font-size: 0.94rem; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(196, 169, 141, 0.55); }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 140px; }

.form-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2rem;
}
.form-note.success { color: #9ed49a; }
.form-note.error { color: #f0836a; }

/* Footer */
.site-footer {
  padding: 2rem var(--gutter);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-inner p { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); }

/* Cookie banner & modal */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  background: rgba(31, 23, 16, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -12px 40px rgba(20, 8, 0, 0.45);
  padding: 1.25rem 0;
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
}
.cookie-banner-text h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.cookie-banner-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 70ch;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(20, 10, 2, 0.7);
  cursor: pointer;
}
.cookie-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.cookie-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 233, 209, 0.08);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-modal-close:hover { background: rgba(255, 233, 209, 0.16); }
.cookie-modal-panel h2 { margin: 0 0 0.75rem; font-size: 1.3rem; }
.cookie-modal-intro {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.cookie-pref-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  background: rgba(255, 233, 209, 0.03);
}
.cookie-pref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.cookie-pref-head h3 { margin: 0; font-size: 1rem; }
.cookie-pref-item p { margin: 0; color: var(--text-muted); font-size: 0.87rem; }
.cookie-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  white-space: nowrap;
}
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #4a3a2a;
  border-radius: 999px;
  transition: background 0.2s;
}
.cookie-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff6ea;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-switch input:checked + .cookie-slider {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(20px); }
.cookie-modal-actions { margin-top: 1rem; }

.cookie-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 1200;
  background: #5c3a12;
  color: #ffeed8;
  border: 1px solid rgba(242, 181, 68, 0.35);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cookie-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.cookie-toast.error {
  background: #6b2318;
  color: #ffe7e0;
  border-color: rgba(240, 131, 106, 0.4);
}

body.cookie-modal-open { overflow: hidden; }

/* Legal pages */
.legal-page {
  margin-left: var(--sidebar-w);
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
}
body.legal-body .legal-page { margin-left: 0; }
.legal-content { max-width: 820px; margin-inline: auto; }
.legal-content h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 0.5rem;
}
.legal-meta { color: var(--text-muted); margin-bottom: 2.5rem; }
.legal-content section { margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
.legal-content h3 { font-size: 1.02rem; margin: 1.25rem 0 0.5rem; }
.legal-content p,
.legal-content li { color: var(--text-muted); }
.legal-content ul { padding-left: 1.25rem; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}
.legal-table th { background: var(--surface); color: var(--text); }
.legal-note { font-size: 0.86rem; font-style: italic; }
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Simple top bar for standalone pages */
.simple-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--gutter);
  background: rgba(23, 17, 12, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.simple-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}
.simple-header nav a { color: var(--text-muted); }
.simple-header nav a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 1080px) {
  .sec { grid-template-columns: 1fr; }
  .sec-head { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .mobile-bar { display: flex; }

  .sidebar {
    inset: 64px 0 auto 0;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 64px);
    border-right: none;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform 0.3s ease;
  }
  .sidebar.is-open { transform: translateY(0); }
  .sidebar-inner { padding: 1.5rem var(--gutter); gap: 1.25rem; }
  .sidebar-brand { display: none; }

  .main { margin-left: 0; padding-top: 64px; }
  .legal-page { margin-left: 0; }

  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-metrics li:nth-child(2) { border-right: none; }
  .hero-metrics li:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 620px) {
  .stack-grid { grid-template-columns: 1fr; }
  .xp-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics li { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-metrics li:last-child { border-bottom: none; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; min-width: 140px; }
}
