/* ─── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* "Sophisticated Builder" — Nordic Studio / Sand Tech palette.
     60% dominant background (Stone), 30% structure (White/Ink), ≤10% accent (Amber). */
  --bg:        #F2EFE9;   /* Stone Gray — dominant background */
  --surface:   #FFFFFF;   /* Pure White — cards/components */
  --surface2:  #FAF8F3;   /* slightly warm white — nested surfaces */
  --border:    #E2DCCB;   /* soft warm border separating cards from the stone bg */
  --accent:    #D97706;   /* Amber/Muted Ochre — vibrant accent, used sparingly */
  --accent2:   #B45309;   /* deeper amber — hover states */
  --gold:      #D97706;   /* alias — "highlight" tag variant uses the same accent */
  --text:      #1E1E1E;   /* Ink Black — primary text & structural color */
  --muted:     #5C5650;   /* warm muted brown-gray — secondary text, AA-contrast on Stone/White */
  --nav-h:     64px;
  --radius:    12px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ─── Nav ──────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(242,239,233,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
  padding-bottom: .35rem;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -8px; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Page wrapper ─────────────────────────────── */
.page { padding-top: var(--nav-h); }

/* ─── Section helpers ──────────────────────────── */
section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
}

/* ─── Hero (index only) ────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 75% 30%, rgba(217,118,6,.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 700px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(217,118,6,.08);
  border: 1px solid rgba(217,118,6,.25);
  border-radius: 99px;
  padding: .3rem .9rem;
  font-size: .8rem;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero h1 .name { color: var(--accent); }
.hero h1 .role {
  display: block;
  color: var(--text);
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--text);
}
.btn-primary:hover {
  background: #F59E0B;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,118,6,.35);
}
.btn-ghost {
  background: rgba(217,118,6,.08);
  color: var(--text);
  border: 1px solid rgba(217,118,6,.25);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Inline SVG icon inside buttons — inherits the button's text color
   (so it turns amber on .btn-ghost hover). */
.icon-mail {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

/* ─── Quick-links grid (index) ─────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.portal-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.portal-card:hover { border-color: var(--card-accent, var(--accent)); transform: translateY(-4px); }
.portal-card:hover::before { transform: scaleX(1); }

.portal-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.portal-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.portal-card p { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
.portal-card a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
  display: inline-flex; align-items: center; gap: .3rem;
}
.portal-card a:hover { gap: .6rem; }

/* ─── Gateway split (index hero gateway) ───────── */
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.gateway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.gateway-card:focus-visible {
  outline: 2px solid var(--card-accent, var(--accent));
  outline-offset: 2px;
}
.gateway-card::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--card-accent, var(--accent));
}
.gateway-card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30,30,30,.12);
}

.gateway-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.gateway-card .kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--card-accent, var(--accent));
  margin-bottom: .5rem;
}
.gateway-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: .75rem; }
.gateway-card p { font-size: .92rem; color: var(--muted); margin-bottom: 1.75rem; line-height: 1.6; }
.gateway-card .gateway-secondary {
  display: block;
  margin-top: .9rem;
  font-size: .82rem;
  color: var(--muted);
}
.gateway-card .gateway-secondary a {
  color: var(--card-accent, var(--accent));
  font-weight: 600;
}
.gateway-card .gateway-secondary a:hover { text-decoration: underline; }

/* ─── Stats row ────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4rem 0;
}
.stat { flex: 1; min-width: 120px; }
.stat .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
}
.stat .label { font-size: .85rem; color: var(--muted); }

/* ─── Executive Scale Blueprint (expertise page) ── */
.blueprint-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.blueprint-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.blueprint-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.blueprint-label {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.blueprint-detail {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ─── Skills (expertise page) ─────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.skill-card h3 .icon { font-size: 1.2rem; }

.tech-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: rgba(30,30,30,.05);
  border: 1px solid rgba(30,30,30,.12);
  color: var(--text);
  border-radius: 6px;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-weight: 600;
}
.tag.purple {
  background: rgba(92,86,80,.1);
  border-color: rgba(92,86,80,.22);
  color: var(--muted);
}
.tag.gold {
  background: rgba(217,118,6,.12);
  border-color: rgba(217,118,6,.3);
  color: var(--accent2);
}
.tag.green {
  background: rgba(30,30,30,.04);
  border-color: rgba(30,30,30,.18);
  color: var(--text);
}

/* ─── Timeline ─────────────────────────────────── */
.timeline { margin-top: 3rem; position: relative; }
.timeline::before {
  content: '';
  position: absolute; left: 1.25rem; top: 0; bottom: 0; width: 2px;
  background: var(--border);
}
.tl-item {
  padding-left: 4rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.tl-dot {
  position: absolute; left: .5rem; top: .3rem;
  width: 1.5rem; height: 1.5rem;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.tl-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.tl-company { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.tl-body { font-size: .9rem; color: var(--muted); }

/* ─── Project cards (web/mobile pages) ────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.project-thumb {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}
.project-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--thumb-gradient, linear-gradient(135deg, rgba(217,118,6,.12), rgba(30,30,30,.06)));
}

.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.project-body p { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; flex: 1; }

.project-meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.25rem;
}

.project-links { display: flex; gap: .75rem; }
.project-links a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent2);
  border: 1px solid rgba(217,118,6,.3);
  border-radius: 6px;
  padding: .35rem .75rem;
  transition: all var(--transition);
}
.project-links a:hover { background: rgba(217,118,6,.12); }
.project-links a.disabled { opacity: .35; pointer-events: none; }

/* ─── Coming-soon banner ───────────────────────── */
.coming-soon {
  text-align: center;
  padding: 5rem 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 3rem;
}
.coming-soon .icon { font-size: 3rem; margin-bottom: 1rem; }
.coming-soon h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.coming-soon p { color: var(--muted); }

/* ─── Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
footer a { color: var(--accent); }
footer a:hover { text-decoration: underline; }

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; gap: 1rem; }
  .nav-links.open {
    display: flex;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
  }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .stats-row { gap: 1.5rem; }
  .timeline::before { display: none; }
  .tl-item { padding-left: 0; }
  .tl-dot { display: none; }
}

/* ─── Anti-spam: honeypot ──────────────────────── */
/* Off-screen rather than display:none — some bots skip display:none
   fields, but still scrape anything physically present in the DOM. */
.honeypot-field, .honeypot-link {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ─── Contact modal (CAPTCHA gate) ─────────────── */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30, 30, 30, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.contact-modal-overlay[hidden] {
  display: none;
}

.contact-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  position: relative;
}

.contact-modal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.contact-modal p.hint {
  font-size: .85rem;
  color: var(--muted);
}

.contact-modal-close {
  position: absolute;
  top: .65rem;
  right: .85rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.contact-modal-close:hover { color: var(--text); }

.captcha-question {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin: 1.25rem 0 .75rem;
  color: var(--accent);
}

.captcha-input {
  width: 100%;
  padding: .65rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
}
.captcha-input:focus {
  outline: none;
  border-color: var(--accent);
}

.captcha-error {
  color: #DC2626;
  font-size: .82rem;
  margin-top: .6rem;
}
