/* ==========================================================================
   Dax Gulje — dax.io
   Dark, premium, single-page.
   ========================================================================== */

:root {
  /* Palette — The Outbound Machine: petrol ground, brass accent */
  --bg:            #0C1416;
  --bg-2:          #101A1D;
  --surface:       #132025;
  --surface-2:     #17242A;
  --border:        #26363B;
  --border-strong: #33474D;

  --text:          #ECE7DA;
  --text-muted:    #A2AFB0;
  --text-dim:      #71807F;

  /* Accent — brass, with petrol as the quiet second voice */
  --accent:        #CB9B4E;
  --accent-2:      #E0B368;
  --accent-3:      #E0B368;
  --petrol:        #66A3AB;
  --accent-grad:   linear-gradient(120deg, #CB9B4E 0%, #E0B368 100%);
  --accent-glow:   rgba(203, 155, 78, 0.30);

  /* Type */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --maxw: 1160px;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% -5%, rgba(102, 163, 171, 0.10), transparent 60%),
    radial-gradient(50% 45% at 12% 8%, rgba(203, 155, 78, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
/* Faint dotted grid */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(236,231,218,0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.15) 60%, transparent);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(203, 155, 78, 0.32); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }
section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent);
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: 0.002em;
  margin-bottom: 18px;
}
.section-intro { color: var(--text-muted); max-width: 62ch; font-size: 1.05rem; }

.grad-text { color: var(--accent-2); font-style: italic; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 20, 22, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.98rem; letter-spacing: 0.18em; display: flex; align-items: center; gap: 2px;
}
.brand .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.92rem; color: var(--text-muted); font-weight: 500;
  position: relative; transition: color 0.25s;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0;
  background: var(--accent); transition: width 0.3s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-links a.btn-primary { color: #101A1D; }
.nav-links a.btn-primary:hover { color: #101A1D; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: var(--radius); cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent); color: #101A1D; font-weight: 600;
  box-shadow: 0 8px 30px -10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px var(--accent-glow); }
.btn-ghost {
  background: rgba(236,231,218,0.03); color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(203,155,78,0.06); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 90px; }
.hero-inner { width: min(var(--maxw), 92vw); margin-inline: auto; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: rgba(236,231,218,0.03);
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 30px;
}
.hero .badge .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--petrol);
  box-shadow: 0 0 0 0 rgba(102,163,171,0.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(102,163,171,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(102,163,171,0); }
  100% { box-shadow: 0 0 0 0 rgba(102,163,171,0); }
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 8.6vw, 6.8rem);
  line-height: 0.98; letter-spacing: 0.002em; margin-bottom: 8px;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero .role {
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 1.7vw, 1rem); font-weight: 500;
  color: var(--text); margin-top: 24px; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero .role .sep { color: var(--accent); margin: 0 8px; }
.hero .lede {
  color: var(--text-muted); max-width: 60ch; margin-top: 22px;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-scroll {
  margin-top: 60px; display: inline-flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-scroll .mouse {
  width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  position: relative;
}
.hero-scroll .mouse::before {
  content: ""; position: absolute; top: 6px; left: 50%; translate: -50% 0;
  width: 3px; height: 6px; border-radius: 2px; background: var(--petrol);
  animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,10px)} }

/* ---------- Stats bar ---------- */
.stats {
  padding: 0 0 clamp(60px, 8vw, 100px);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--surface); padding: 32px 28px; }
.stat .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3.1rem); line-height: 1; letter-spacing: 0;
  color: var(--text);
}
.stat .num span { color: inherit; }
.stat .label { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 12px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.about-body p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.06rem; }
.about-body strong { color: var(--text); font-weight: 600; }
.about-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  position: sticky; top: 96px;
}
.about-card h3 { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; font-weight: 500; }
.about-card .chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: 0.84rem; color: var(--text); padding: 7px 13px; border-radius: var(--radius);
  background: rgba(102,163,171,0.08); border: 1px solid rgba(102,163,171,0.25);
}
.about-card .divide { height: 1px; background: var(--border); margin: 24px 0; }
.about-card .now { color: var(--text-muted); font-size: 0.95rem; }
.about-card .now b { color: var(--text); font-weight: 600; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; margin-top: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.45;
}
.xp {
  position: relative; padding: 0 0 12px 56px; margin-bottom: 34px;
}
.xp::before {
  content: ""; position: absolute; left: 8px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(203,155,78,0.12);
}
.xp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.xp-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 20px 50px -30px rgba(0,0,0,0.9); }
.xp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.xp-company { font-family: var(--font-display); font-size: 1.45rem; font-weight: 400; letter-spacing: 0.002em; }
.xp-dates {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); font-weight: 500; letter-spacing: 0.08em;
  padding: 4px 11px; border-radius: var(--radius); background: rgba(203,155,78,0.08); white-space: nowrap;
}
.xp-role { color: var(--text-muted); font-weight: 500; margin-bottom: 14px; font-size: 0.98rem; }
.xp-desc { color: var(--text-dim); font-size: 0.98rem; margin-bottom: 14px; }
.xp-list { list-style: none; display: grid; gap: 9px; }
.xp-list li { position: relative; padding-left: 22px; color: var(--text-muted); font-size: 0.97rem; }
.xp-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 1px;
  background: var(--accent);
}
.xp-list li b { color: var(--text); font-weight: 600; }
.logos-note { color: var(--text-dim); font-size: 0.9rem; margin-top: 12px; font-style: italic; }

/* ---------- Skills / certs ---------- */
.skills-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 48px); }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
}
.panel h3 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 20px; font-weight: 400; display: flex; align-items: center; gap: 10px; }
.panel h3 .ic { color: var(--accent); display: inline-flex; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags span {
  font-size: 0.9rem; padding: 9px 15px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); transition: border-color 0.25s, transform 0.25s, color 0.25s;
}
.skill-tags span:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.certs { display: grid; gap: 14px; }
.cert {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.cert .badge-ic {
  width: 40px; height: 40px; flex: none; border-radius: var(--radius);
  background: var(--accent); display: grid; place-items: center; color: #101A1D;
}
.cert .badge-ic svg { width: 22px; height: 22px; }
.cert .c-name { font-weight: 600; font-size: 0.98rem; }
.cert .c-sub { color: var(--text-dim); font-size: 0.84rem; }

/* ---------- Testimonials ---------- */
.tst-grid {
  columns: 2; column-gap: 22px;
}
.tst {
  break-inside: avoid; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; position: relative; transition: border-color 0.3s, transform 0.3s var(--ease);
}
.tst:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.tst .quote-mark {
  font-family: var(--font-display); font-size: 3.6rem; line-height: 0.5; color: var(--accent);
  opacity: 0.35; display: block; height: 26px;
}
.tst-text { color: var(--text-muted); font-size: 0.98rem; }
.tst-text p { margin-bottom: 12px; }
.tst-text p:last-child { margin-bottom: 0; }
.tst.clamp .tst-text {
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical;
  overflow: hidden; position: relative;
}
.tst.clamp .tst-text::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 70px;
  background: linear-gradient(180deg, transparent, var(--surface));
}
.tst-more {
  background: none; border: 0; color: var(--accent); font-family: var(--font-body);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; margin-top: 14px; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.tst-more:hover { text-decoration: underline; }
.tst-more svg { width: 15px; height: 15px; transition: transform 0.3s; }
.tst:not(.clamp) .tst-more svg { transform: rotate(180deg); }
.tst-author {
  display: flex; align-items: center; gap: 14px; margin-top: 22px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.tst-avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--surface-2); color: var(--accent-2); border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.92rem; letter-spacing: 0.04em;
}
.tst-name { font-weight: 600; font-size: 0.98rem; }
.tst-title { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-card {
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(203,155,78,0.10), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-strong); border-radius: 4px;
  padding: clamp(44px, 7vw, 80px) clamp(24px, 5vw, 60px);
}
.contact-card h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: 0.002em; line-height: 1.05; margin-bottom: 18px;
}
.contact-card p { color: var(--text-muted); max-width: 48ch; margin: 0 auto 34px; font-size: 1.08rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 34px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.footer .f-brand { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.18em; font-size: 0.9rem; }
.footer .f-brand .dot { color: var(--accent); }
.footer .f-meta { color: var(--text-dim); font-size: 0.88rem; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-muted); transition: all 0.25s var(--ease);
}
.socials a:hover { color: var(--accent-2); border-color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 19px; height: 19px; }

/* ---------- Reveal animation ---------- */
/* Only hide when JS is present, so no-JS visitors still see everything. */
.reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .skills-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tst-grid { columns: 1; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    gap: 4px; padding: 18px 6vw 26px; background: rgba(12,20,22,0.97);
    backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
  }
  .nav-links.open a { padding: 12px 0; width: 100%; }
  .nav-links.open .btn { justify-content: center; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .xp { padding-left: 40px; }
  .timeline::before { left: 11px; }
  .xp::before { left: 4px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- The practice (Outbound Machine) ---------- */
.pr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.pr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 26px 24px; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.pr-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.pr-num {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 12px;
}
.pr-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin-bottom: 10px; letter-spacing: 0.002em; }
.pr-card p { color: var(--text-muted); font-size: 0.97rem; }
.pr-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border);
}
.pr-terms { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.pr-terms b { color: var(--accent); font-weight: 500; }
.pr-links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .pr-grid { grid-template-columns: 1fr; } }

/* ---------- Stats: acquisitions tile + at-a-glance icons ---------- */
.stats-grid { grid-template-columns: 1fr 1fr 1.9fr; }
.stat-acq { display: flex; flex-direction: column; justify-content: center; padding-top: 22px; padding-bottom: 22px; }
.acq-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.acq-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6.5px 0; border-top: 1px solid var(--border); }
.acq-co { font-family: var(--font-display); font-size: 1.22rem; color: var(--text); white-space: nowrap; }
.acq-role { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); text-align: right; }
.about-card .now > div { display: flex; align-items: flex-start; gap: 11px; }
.nic { color: var(--accent); flex: none; display: inline-flex; margin-top: 2px; }
.nic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-acq { grid-column: 1 / -1; }
}
