/* ==========================================================================
   Aaron Fernandes — Portfolio design system
   Edit the CSS variables below to change the whole site's look.
   ========================================================================== */

:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F2F1EE;
  --text: #14161A;
  --text-muted: #5B6270;
  --border: rgba(20, 22, 26, 0.10);
  --accent: #E4572E;
  --accent-ink: #14161A;
  --accent-soft: rgba(228, 87, 46, 0.12);
  --success: #2E7D5B;
  --warn: #B7791F;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 22, 26, 0.08);
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0C10;
    --surface: #14161C;
    --surface-2: #1B1E26;
    --text: #ECEDEF;
    --text-muted: #9AA1AE;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #FF7A52;
    --accent-ink: #14161A;
    --accent-soft: rgba(255, 122, 82, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  }
}

/* Manual theme override (if a toggle is ever added) */
:root[data-theme="light"] {
  --bg: #FAFAF9; --surface: #FFFFFF; --surface-2: #F2F1EE; --text: #14161A;
  --text-muted: #5B6270; --border: rgba(20,22,26,0.10); --accent: #E4572E; --accent-soft: rgba(228,87,46,0.12);
}
:root[data-theme="dark"] {
  --bg: #0B0C10; --surface: #14161C; --surface-2: #1B1E26; --text: #ECEDEF;
  --text-muted: #9AA1AE; --border: rgba(255,255,255,0.09); --accent: #FF7A52; --accent-soft: rgba(255,122,82,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text); }
.lede { font-size: 1.15rem; color: var(--text-muted); }

.muted { color: var(--text-muted); }

/* ---------- Eyebrow / section header ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-head-row .section-head { margin-bottom: 0; }

section.block { padding-top: 88px; padding-bottom: 88px; }
section.block.tight { padding-top: 56px; padding-bottom: 56px; }
section.block.alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Header / nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  font-family: var(--font-body);
}
nav.main-nav { display: flex; align-items: center; gap: 4px; }
nav.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-cta .btn-outline { display: none; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); cursor: pointer;
  }
  header.site-header.menu-open nav.main-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  header.site-header.menu-open nav.main-nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 96px; padding-bottom: 72px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { max-width: 780px; }
.hero .lede { max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 28px 24px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--accent);
}
.stat .label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card-visual {
  height: 150px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  position: relative;
}
.card-visual span.tag-corner {
  position: absolute; top: 12px; right: 12px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; color: var(--text-muted);
  font-family: var(--font-body); font-weight: 600;
}
.card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p.desc { color: var(--text-muted); font-size: 0.94rem; margin-bottom: 16px; flex: 1; }
.card-impact { font-size: 0.85rem; color: var(--success); font-weight: 600; margin-bottom: 14px; }
.card-link { font-size: 0.88rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Placeholder callouts ---------- */
.placeholder-note {
  background: var(--accent-soft);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 20px;
}
.placeholder-note strong { color: var(--accent); }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.footer-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 32px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem; color: var(--text-muted);
}

/* ---------- Detail page layout (case studies / teardowns) ---------- */
.detail-hero { padding-top: 64px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.detail-meta {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border);
}
.detail-meta .item .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.detail-meta .item .v { font-weight: 600; }

.prose { max-width: 720px; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { color: var(--text); padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

.stepper { display: flex; gap: 0; flex-wrap: wrap; margin: 32px 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.stepper .step { flex: 1; min-width: 140px; padding: 18px 20px; border-right: 1px solid var(--border); background: var(--surface); }
.stepper .step:last-child { border-right: none; }
.stepper .step .n { color: var(--accent); font-weight: 700; font-size: 0.8rem; margin-bottom: 6px; }
.stepper .step h4 { margin: 0 0 4px; font-size: 0.95rem; }
.stepper .step p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ---------- Toggle / before-after component ---------- */
.toggle-demo { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin: 28px 0; background: var(--surface); }
.toggle-tabs { display: flex; border-bottom: 1px solid var(--border); }
.toggle-tabs button {
  flex: 1; padding: 14px; font-weight: 600; font-size: 0.9rem;
  background: var(--surface-2); border: none; cursor: pointer; color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.toggle-tabs button.active { color: var(--accent); background: var(--surface); border-bottom-color: var(--accent); }
.toggle-panel { display: none; padding: 32px 24px; }
.toggle-panel.active { display: block; }
.mock-screen { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 24px; background: var(--bg); }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mock-row:last-child { border-bottom: none; }
.mock-bar { height: 10px; border-radius: 4px; background: var(--surface-2); }

/* ---------- Impact/Effort matrix ---------- */
.matrix { position: relative; border: 1px solid var(--border); border-radius: var(--radius-md); aspect-ratio: 4/3; background: var(--surface); margin: 28px 0 48px; }
.matrix .axis-label { position: absolute; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.matrix .axis-label.x-left { bottom: -28px; left: 12px; }
.matrix .axis-label.x-right { bottom: -28px; right: 12px; }
.matrix .axis-label.y-top { top: 12px; left: -8px; writing-mode: vertical-rl; transform: rotate(180deg); }
.matrix .axis-label.y-bottom { bottom: 12px; left: -8px; writing-mode: vertical-rl; transform: rotate(180deg); }
.matrix::before, .matrix::after { content: ""; position: absolute; background: var(--border); }
.matrix::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.matrix::after { top: 50%; left: 0; right: 0; height: 1px; }
.matrix .dot {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); box-shadow: var(--shadow-sm);
  transform: translate(-50%, 50%); cursor: default;
}
.matrix .dot .dot-label {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; font-weight: 600; white-space: nowrap; background: var(--surface);
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); opacity: 0; transition: opacity 0.15s;
}
.matrix .dot:hover .dot-label { opacity: 1; }

/* ---------- RICE / interactive artifact ---------- */
.rice-tool { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.rice-item { padding: 22px; border-bottom: 1px solid var(--border); }
.rice-item:last-child { border-bottom: none; }
.rice-item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.rice-item-head input[type="text"] {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  border: none; background: transparent; color: var(--text); width: 100%; padding: 4px 0;
}
.rice-score {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--accent);
  min-width: 64px; text-align: right;
}
.rice-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.rice-slider label { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.rice-slider input[type="range"] { width: 100%; accent-color: var(--accent); }
.rice-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; }
.rice-remove:hover { color: var(--accent); }
.rice-rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; font-weight: 700; margin-right: 8px; }

/* ---------- Contact form ---------- */
form.contact-form { display: grid; gap: 16px; max-width: 520px; }
form.contact-form label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; display: block; }
form.contact-form input, form.contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
}
form.contact-form textarea { min-height: 120px; resize: vertical; }
form.contact-form input:focus, form.contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 48px 0; }
