/* ============================================================
   JOSEPILES.ES — Trust & Industrial Design System
   Fonts: JetBrains Mono (headings) + IBM Plex Sans (body)
   Colors: #F8FAFC bg · #334155 text · #F97316 accent
   ============================================================ */

/* Fonts loaded dynamically by js/config.js based on active theme */

/* ---- CUSTOM PROPERTIES ---- */
:root {
  --bg:           #F8FAFC;
  --surface:      #F1F5F9;
  --surface-2:    #E9EEF4;
  --border:       #E2E8F0;
  --border-dark:  #CBD5E1;
  --text:         #334155;
  --text-muted:   #64748B;
  --heading:      #1E293B;
  --accent:       #F97316;
  --accent-dark:  #EA580C;
  --accent-bg:    rgba(249,115,22,0.07);
  --accent-border:rgba(249,115,22,0.2);
  --white:        #FFFFFF;

  --font-heading: 'JetBrains Mono', 'Courier New', monospace;
  --font-body:    'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;

  --radius:    4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.07), 0 4px 8px rgba(0,0,0,0.04);

  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
  --nav-h:    64px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---- LANGUAGE TOGGLE VISIBILITY ---- */
html.lang-es .t-en { display: none !important; }
html.lang-en .t-es { display: none !important; }

/* ---- LAYOUT ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-wrapper {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.section       { padding: 5rem 0; }
.section-sm    { padding: 3rem 0; }
.section-xs    { padding: 2rem 0; }
hr.divider     { border: none; border-top: 1px solid var(--border); }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow var(--duration) var(--ease);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--heading);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  letter-spacing: -0.03em;
  position: relative;
  user-select: none;
}
.nav-logo-mark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

/* Logo image — navbar (light background) */
.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
  mix-blend-mode: multiply; /* fuses white bg with the light navbar */
}

/* Logo image — footer (dark background) */
.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: invert(1);        /* black logo → white */
  mix-blend-mode: screen;   /* black bg of inverted image disappears */
  opacity: 0.85;
}
.nav-logo-name {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.02em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.875rem 0.25rem;
  border-radius: var(--radius);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover  { color: var(--heading); background: var(--surface); }
.nav-links a.active { color: var(--accent); background: var(--accent-bg); border-bottom-color: var(--accent); }

/* Right controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.lang-btn {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.625rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
  user-select: none;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn .lbl-active { color: var(--accent); font-weight: 700; }
.lang-btn .lbl-sep    { opacity: 0.3; margin: 0 2px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  width: 32px;
  height: 32px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem 1rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.125rem;
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  cursor: pointer;
}
.mobile-menu a:hover,
.mobile-menu a.active { background: var(--surface); color: var(--accent); }

/* ---- HERO ---- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 1.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
/* Grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
  pointer-events: none;
}
/* Gradient overlay */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 0% 50%, rgba(248,250,252,0) 0%, var(--bg) 65%),
              radial-gradient(ellipse 50% 80% at 100% 20%, rgba(249,115,22,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

/* Tag chip */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 0.2rem 0.625rem;
  border-radius: 2px;
  margin-bottom: 1.375rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.hero-tag::before { content: '>'; font-weight: 700; }

/* Name */
.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.875rem;
}

/* Typewriter roles */
.hero-roles {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2.2vw, 1.125rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  min-height: 1.8em;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.typewriter-text { color: var(--accent); }
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 1px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Main quote */
.hero-quote {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  color: var(--heading);
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 0.875rem;
  padding-left: 1.125rem;
  border-left: 3px solid var(--accent);
  font-weight: 400;
}
.hero-subtext {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 2.5rem;
  padding-left: 1.125rem;
  border-left: 3px solid transparent;
}

/* CTA buttons row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--heading);
  color: var(--white);
  border-color: var(--heading);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--heading);
  border-color: var(--border-dark);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.btn-ghost:hover { color: var(--heading); background: var(--surface); }

/* ---- SECTION LABELS ---- */
.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.875rem;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
}
.section-head { margin-bottom: 2.5rem; }

/* ---- BIO PROFILE ---- */
.bio-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}
.bio-copy {
  max-width: 100%;
}
.bio-photo-card {
  position: static;
  justify-self: start;
  width: 100%;
  max-width: 280px;
  margin: 0;
}
.bio-photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 4;
}
.bio-photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}
.bio-photo-frame::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 34%;
  background: linear-gradient(180deg, transparent 0%, rgba(30,41,59,0.32) 100%);
  pointer-events: none;
}
.bio-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.bio-photo-caption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.25rem 0;
}
.bio-photo-name {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.bio-photo-role {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- CARDS ---- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.35s var(--ease);
  border-radius: 0 0 2px 0;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-dark);
}
.card:hover::before { height: 100%; }

.card-icon {
  width: 40px; height: 40px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.card-icon svg { width: 18px; height: 18px; }

.card-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- GRIDS ---- */
.grid-2    { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }

/* ---- TECH TAGS ---- */
.tags-group { margin-bottom: 1.75rem; }
.tags-group-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.625rem;
}
.tags-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
  cursor: default;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.tag-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  opacity: 0.7;
  flex-shrink: 0;
}
.tag:hover {
  background: var(--accent-bg);
  border-color: var(--accent-border);
  color: var(--accent);
}
.tag:hover .tag-icon {
  opacity: 1;
}

/* ---- HOW I WORK LIST ---- */
.principles-list { border-top: 1px solid var(--border); }
.principle {
  display: flex;
  gap: 1.25rem;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--duration) var(--ease);
}
.principle:hover { background: var(--surface); margin: 0 -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
.principle-num {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 2.5rem;
  padding-top: 0.2rem;
  flex-shrink: 0;
}
.principle-body {}
.principle-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}
.principle-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- PROJECT CARDS ---- */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.project-card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-num {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.625rem;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}
.project-value {
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--accent-bg);
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.project-value strong { color: var(--accent); font-weight: 600; }

/* ---- CONTACT FORM ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--heading);
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
}

/* Form feedback */
.form-msg {
  display: none;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-top: 1rem;
}
.form-msg.success {
  display: block;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: #15803D;
}
.form-msg.error {
  display: block;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #DC2626;
}

/* ---- PAGE HEADER (inner pages) ---- */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
}
.page-header.with-bg {
  background-image: linear-gradient(135deg, rgba(30,41,59,0.5) 0%, rgba(30,41,59,0.45) 100%), url('../assets/photo-hero.png');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  border-bottom: none;
}
.page-header-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-header-eyebrow::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--accent);
}
.page-header.with-bg .page-header-eyebrow {
  color: #F97316;
}
.page-header.with-bg .page-header-eyebrow::before {
  background: #F97316;
}
.page-header-title {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.page-header.with-bg .page-header-title {
  color: #FFFFFF;
}
.page-header-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 560px;
  line-height: 1.7;
}
.page-header.with-bg .page-header-desc {
  color: rgba(255, 255, 255, 0.85);
}

/* ---- QUOTE / CALLOUT BLOCKS ---- */
.callout {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 1.625rem 1.5rem;
  position: relative;
}
.callout-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}
.callout-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.75;
}
.callout-accent {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.875rem;
}

/* ---- FOOTER ---- */
footer {
  background: var(--heading);
  color: rgba(248,250,252,0.6);
  padding: 2.25rem 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo-mark {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.03em;
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  display: block;
  letter-spacing: -0.02em;
}
.footer-sub {
  font-size: 0.75rem;
  color: rgba(248,250,252,0.4);
  margin-top: 0.125rem;
}
.footer-links {
  display: flex;
  gap: 1.375rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.8125rem;
  color: rgba(248,250,252,0.4);
  transition: color var(--duration) var(--ease);
  cursor: pointer;
}
.footer-links a:hover { color: var(--accent); }

/* ---- HERO 2-COLUMN LAYOUT WITH ILLUSTRATION ---- */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4.5rem;
  align-items: center;
  width: 100%;
}
.hero-inner > .hero-content { max-width: none; }

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: hero-float 8s ease-in-out infinite;
  will-change: transform;
}
.hero-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  overflow: visible;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

/* Page header: position relative so accent SVGs can be absolute */
.page-header { position: relative; overflow: hidden; }
.page-header-accent {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.18;
  pointer-events: none;
  width: 220px;
  height: auto;
}

@media (max-width: 1024px) {
  .hero-inner               { grid-template-columns: 1fr; }
  .hero-illustration        { display: none; }
  .page-header-accent       { display: none; }
  .bio-layout               { grid-template-columns: 1fr; gap: 2rem; }
  .bio-photo-card           { position: static; justify-self: center; max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-illustration { animation: none; }
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* ---- SCROLL TO TOP ---- */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px; height: 40px;
  background: var(--heading);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--duration) var(--ease);
  z-index: 40;
  pointer-events: none;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover { background: var(--accent); }
.scroll-top svg { width: 16px; height: 16px; }

/* ---- HOME: QUICK NAV CARDS ---- */
.qnav-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.qnav-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.qnav-num {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.qnav-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.qnav-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.qnav-arrow {
  margin-top: auto;
  padding-top: 0.875rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: gap var(--duration) var(--ease);
}
.qnav-card:hover .qnav-arrow { gap: 0.625rem; }
.qnav-arrow svg { width: 14px; height: 14px; }

/* ---- CLOSING TAGLINE ---- */
.tagline-section {
  background: var(--heading);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Constellation background layer (sits behind text) */
.tagline-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ---- SECTION ILLUSTRATION WRAPPERS ---- */
.section-svg-wrap {
  margin: 0 0 2.5rem;
  overflow: visible;
}
.section-svg-wrap.narrow { max-width: 720px; }
.section-svg-full { width: 100%; height: auto; display: block; overflow: visible; }

/* ---- TECH DATA-BUS SVG ---- */
.tech-bus-wrap {
  margin-bottom: 2.25rem;
  overflow: visible;
}
.tech-bus-svg {
  width: 100%;
  max-width: 680px;
  height: 28px;
  overflow: visible;
  display: block;
}

/* ---- AI SECTION DECORATION ---- */
.ai-deco-wrap {
  position: relative;
}
.ai-deco-svg {
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  opacity: 0.12;
  pointer-events: none;
}
.tagline-text {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  font-weight: 500;
  color: rgba(248,250,252,0.75);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}
.tagline-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---- EXPERIENCE SECTION ---- */
.exp-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.exp-block p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.exp-block p:last-child { margin-bottom: 0; }

/* ---- CONTACT PAGE ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: start;
}
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.contact-info-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  margin-bottom: 0.625rem;
}
.contact-link-item:last-child { margin-bottom: 0; }
.contact-link-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.contact-link-icon {
  width: 36px; height: 36px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-link-icon svg { width: 16px; height: 16px; }
.contact-link-label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--heading);
  display: block;
}
.contact-link-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- LINKEDIN CTA BUTTON ---- */
.linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #0A66C2;
  color: white;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.linkedin-btn:hover {
  background: #004182;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10,102,194,0.3);
}
.linkedin-btn svg { width: 16px; height: 16px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .bio-layout { grid-template-columns: 1fr; gap: 2rem; }
  .bio-photo-card { max-width: 280px; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav-links         { display: none; }
  .hamburger         { display: flex; }
  .grid-2, .grid-3   { grid-template-columns: 1fr; }
  .grid-auto         { grid-template-columns: 1fr; }
  .section           { padding: 3.5rem 0; }
  .hero              { padding: 1.5rem 0 2rem; min-height: 60vh; }
  .bio-photo-card    { max-width: 320px; }
  .footer-inner      { flex-direction: column; align-items: flex-start; }
  .contact-grid      { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .tagline-section { padding: 3rem 0; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal          { opacity: 1; transform: none; }
  .scroll-top      { opacity: 1; transform: none; }
  .hero-illustration { animation: none; }
}

/* ---- FOCUS VISIBLE ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- COOKIES BANNER ---- */
.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  z-index: 99;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  animation: slideUp 0.3s var(--ease);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cookies-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.cookies-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}
.cookies-text + .cookies-text {
  margin-top: 0.5rem;
}
.cookies-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.cookies-actions .btn {
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}
@media (max-width: 768px) {
  .cookies-content { flex-direction: column; align-items: flex-start; }
  .cookies-actions { width: 100%; }
  .cookies-actions .btn { flex: 1; }
}
