/* =========================================================
   SALMAN HAIDER — GIS PORTFOLIO
   Warm Cartographic Theme | Soft & Professional
   ========================================================= */

:root {
  /* Paper & Ink */
  --paper: #f7f4ec;
  --paper-warm: #f0ebe0;
  --paper-card: #fffdf7;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #78716c;
  --line: #d6d3cd;
  --line-soft: #e7e5e4;

  /* Cartographic Accents */
  --forest: #2d5a3d;
  --forest-light: #3d7a52;
  --forest-dark: #1e3d29;
  --ochre: #b45309;
  --ochre-light: #d97706;
  --ochre-soft: rgba(180, 83, 9, 0.08);
  --sky: #0ea5e9;
  --sky-soft: rgba(14, 165, 233, 0.08);

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 12px 40px rgba(28, 25, 23, 0.10);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  /* Typography */
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --container: 1140px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle topographic dot grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(45, 90, 61, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid; place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.25);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-menu a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.2s ease;
  position: relative;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--forest);
  background: rgba(45, 90, 61, 0.06);
}
.nav-menu a.nav-cta {
  background: var(--forest);
  color: #fff;
  padding: 9px 18px;
  margin-left: 4px;
  box-shadow: 0 2px 12px rgba(45, 90, 61, 0.25);
}
.nav-menu a.nav-cta:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--ink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: 10px 0 60px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -10%; right: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  content: "";
  position: absolute;
  bottom: -10%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(45, 90, 61, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(45, 90, 61, 0.08);
  border: 1px solid rgba(45, 90, 61, 0.12);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.hero-eyebrow svg { width: 14px; height: 14px; }

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 800;
  margin-bottom: 16px;
}
.hero h1 span {
  display: block;
  background: linear-gradient(135deg, var(--forest) 0%, var(--ochre) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--forest);
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-text {
  max-width: 540px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.25);
}
.btn-primary:hover {
  background: var(--forest-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 90, 61, 0.35);
}
.btn-secondary {
  background: var(--paper-card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: var(--forest);
  color: var(--forest);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--forest);
  font-weight: 700;
  padding: 8px 0;
}
.btn-ghost:hover { gap: 12px; }

/* Hero Profile Card */
.hero-profile {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  justify-self: end;
}
.hero-profile::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(45, 90, 61, 0.15);
  border-radius: 22px;
  pointer-events: none;
}
.profile-img-wrap {
  border-radius: 20px;
  overflow: hidden;
  height: 280px;
  background: linear-gradient(135deg, #e7e5e4, #d6d3cd);
}
.profile-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.profile-body {
  padding: 16px 10px 8px;
}
.profile-body .loc {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ochre);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.profile-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.profile-body p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Stats Strip */
.stats-strip {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-item {
  padding: 22px 20px;
  border-right: 1px solid var(--line-soft);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 90px 0; position: relative; }
.section-alt { background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-header {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-header.center { text-align: center; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  background: var(--ochre-soft);
  border: 1px solid rgba(180, 83, 9, 0.12);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ochre);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 14px;
}
.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* =========================================================
   PROJECTS
   ========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 90, 61, 0.25);
  box-shadow: 0 20px 50px rgba(28, 25, 23, 0.12);
}
.project-card.featured { grid-column: span 1; }

.project-media {
  height: 160px;
  background: linear-gradient(135deg, #e7e5e4, #d6d3cd);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.project-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-media img { transform: scale(1.05); }
.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
}

.project-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.project-tag {
  width: fit-content;
  padding: 5px 10px;
  background: rgba(45, 90, 61, 0.07);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.project-body h3 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.project-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.project-tools span {
  padding: 4px 10px;
  background: var(--paper-warm);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.project-link {
  color: var(--forest);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-link:hover { gap: 10px; }

.project-card.compact .project-media { 
  display: none; 
}

.project-card.hidden { 
  display: none; 
}

.project-grid.expanded .project-card.hidden {
  display: flex;
}


.toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* =========================================================
   MAP SHOWCASE
   ========================================================= */
.map-showcase {
  background: linear-gradient(180deg, #1c2420 0%, #141a17 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.map-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.map-showcase .section-header h2,
.map-showcase .section-header p { color: #e7e5e4; }
.map-showcase .eyebrow { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: #a8a29e; }

.map-stage {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: stretch;
  margin-top: 32px;
}
.map-preview {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  position: relative;
}
.map-preview img {
  max-height: 360px;
  width: auto;
  max-width: 100%;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  background: #fff;
}
.map-panel {
  background: var(--paper-card);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.map-panel .map-cat {
  width: fit-content;
  padding: 5px 12px;
  background: var(--sky-soft);
  border: 1px solid rgba(14,165,233,0.12);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--sky);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.map-panel h3 {
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}
.map-panel > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.map-meta-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.map-meta-item {
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.map-meta-item strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  margin-bottom: 4px;
}
.map-meta-item span {
  font-size: 0.85rem;
  color: var(--muted);
}
.map-panel .btn { margin-top: auto; }

.map-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.2rem;
  display: grid; place-items: center;
  transition: 0.2s ease;
  z-index: 5;
}
.map-nav:hover { background: var(--forest); border-color: var(--forest); }
.map-nav.prev { left: 16px; }
.map-nav.next { right: 16px; }

.map-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.map-thumbs::-webkit-scrollbar { height: 6px; }
.map-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 999px; }
.map-thumb {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #a8a29e;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.map-thumb .num { display: block; font-size: 0.68rem; color: var(--ochre-light); margin-bottom: 3px; }
.map-thumb:hover, .map-thumb.active {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
  position: relative;
  overflow: hidden;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 90, 61, 0.2);
  box-shadow: var(--shadow-lg);
}
.skill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forest), var(--ochre));
  opacity: 0;
  transition: 0.3s ease;
}
.skill-card:hover::before { opacity: 1; }

.skill-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(45, 90, 61, 0.08);
  color: var(--forest);
  display: grid; place-items: center;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 14px;
}
.skill-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.skill-card > p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.55;
}
.skill-group h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ochre);
  margin-bottom: 10px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-chips span {
  padding: 5px 10px;
  background: rgba(45, 90, 61, 0.06);
  border: 1px solid rgba(45, 90, 61, 0.08);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--forest);
}

.tools-panel {
  margin-top: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--forest-dark), #1a2e22);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.tools-panel .eyebrow { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: #a8a29e; }
.tools-panel h3 { color: #fff; font-size: 1.2rem; letter-spacing: -0.02em; }
.tools-panel .skill-chips span { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: #e7e5e4; }

/* =========================================================
   EXPERIENCE
   ========================================================= */
.exp-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  align-items: start;
}
.exp-intro { position: sticky; top: 100px; }
.exp-intro h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 14px;
}
.exp-intro p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--forest), transparent);
}

.exp-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
}
.exp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 90, 61, 0.25);
}

.exp-logo {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
}
.exp-logo img { width: 70%; height: 70%; object-fit: contain; }
.exp-logo .fallback {
  display: none;
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--forest);
  letter-spacing: 0.05em;
}
.exp-logo.missing { background: linear-gradient(135deg, rgba(45,90,61,0.08), rgba(14,165,233,0.06)); }
.exp-logo.missing .fallback { display: block; }
.exp-logo.missing img { display: none; }

.exp-body { min-width: 0; }
.exp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.exp-date { font-size: 0.85rem; font-weight: 800; color: var(--forest); }
.exp-loc { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.exp-body h3 { font-size: 1.15rem; line-height: 1.2; margin-bottom: 3px; letter-spacing: -0.02em; }
.exp-body h4 { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 10px; font-weight: 700; }
.exp-body p { font-size: 0.92rem; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-tags span {
  padding: 4px 10px;
  background: var(--ochre-soft);
  border: 1px solid rgba(180,83,9,0.1);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ochre);
}

/* =========================================================
   CERTIFICATES
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 50px;
  align-items: start;
}
.cert-intro { position: sticky; top: 100px; }
.cert-intro h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 14px;
}
.cert-intro > p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; margin-bottom: 24px; }

.cert-badge {
  padding: 24px;
  background: linear-gradient(135deg, var(--forest-dark), #1a2e22);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cert-badge .num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cert-badge p { color: rgba(255,255,255,0.75); font-size: 0.92rem; margin-top: 8px; }
.cert-providers { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cert-providers span {
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e7e5e4;
}

.cert-list { display: grid; gap: 12px; }
.cert-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: 0.2s ease;
}
.cert-item:hover {
  transform: translateX(4px);
  border-color: rgba(45, 90, 61, 0.2);
}
.cert-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cert-icon img { width: 70%; height: 70%; object-fit: contain; }
.cert-icon .fb { display: none; font-weight: 900; font-size: 0.8rem; color: var(--forest); }
.cert-icon.missing { background: linear-gradient(135deg, rgba(45,90,61,0.06), rgba(14,165,233,0.05)); }
.cert-icon.missing .fb { display: block; }
.cert-icon.missing img { display: none; }

.cert-content { min-width: 0; }
.cert-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}
.cert-meta .year { color: var(--forest); }
.cert-meta .org { color: var(--muted); }
.cert-content h3 {
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.cert-content a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
}
.cert-content a:hover { color: var(--forest-dark); }

.cert-item.hidden { display: none; }

.cert-extra {
  display: none;
}

.cert-list.show-all .cert-extra {
  display: grid;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 48px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.contact-wrap::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(45,90,61,0.04), transparent 60%);
  pointer-events: none;
}
.contact-wrap h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 14px;
}
.contact-wrap > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 28px; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* =========================================================
   MAP STORY PAGES (Shared)
   ========================================================= */
.map-hero {
  padding: 60px 0 40px;
  background:
    radial-gradient(circle at 15% 20%, rgba(45,90,61,0.06), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(14,165,233,0.05), transparent 30%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.map-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr;
  gap: 40px;
  align-items: center;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--forest);
  font-weight: 700;
  font-size: 0.92rem;
}
.back-link:hover { gap: 10px; }
.map-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 16px;
}
.map-hero > .container > p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.map-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.map-summary {
  display: grid;
  gap: 10px;
}
.map-summary-item {
  padding: 16px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.map-summary-item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  margin-bottom: 5px;
}
.map-summary-item span { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

.map-preview-sec { padding: 40px 0; }
.map-preview-card {
  padding: 16px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.map-preview-card img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #fff;
}
.map-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 14px;
}
.map-preview-head h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.map-story-body {
  padding: 60px 0;
  background: var(--paper-card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.map-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
.map-story-main { display: grid; gap: 36px; }
.story-section h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.story-section p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.story-section p:last-child { margin-bottom: 0; }

.map-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}
.side-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.side-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  margin-bottom: 12px;
}
.side-card ul { padding-left: 18px; color: var(--muted); font-size: 0.92rem; }
.side-card li { margin-bottom: 7px; }
.side-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

.map-nav-bottom {
  padding: 32px 0 60px;
}
.map-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1020px) {
  .hero-grid, .map-stage, .exp-grid, .cert-grid, .map-hero-grid, .map-story-grid {
    grid-template-columns: 1fr;
  }
  .hero-profile { justify-self: center; max-width: 400px; }
  .project-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(1), .stat-item:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .exp-intro, .cert-intro { position: static; }
  .tools-panel { grid-template-columns: 1fr; }
  .map-sidebar { position: static; }
  .map-nav { display: none; }
  .contact-wrap { padding: 40px 24px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 72px; left: 16px; right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active { display: flex; }
  .nav-menu a { padding: 12px; display: block; }
  .nav-menu a.nav-cta { margin: 8px 0 0; text-align: center; }

  .project-grid, .skills-grid, .stats-strip { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid var(--line-soft) !important; }
  .stat-item:last-child { border-bottom: none !important; }

  .section { padding: 60px 0; }
  .hero { padding: 48px 0 40px; }
  .map-showcase { padding: 32px 20px; }
  .map-preview { min-height: 280px; }
  .map-thumbs { gap: 8px; }
  .map-thumb { min-width: 110px; padding: 10px; font-size: 0.78rem; }

  .map-hero { padding: 44px 0 32px; }
  .map-actions .btn, .map-nav-row .btn { width: 100%; }
  .map-preview-head { flex-direction: column; align-items: flex-start; }
  .map-nav-row { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 2.4rem; }
  .map-showcase { padding: 24px 16px; }
  .contact-wrap { padding: 32px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   OFF THE MAP PAGE
   ========================================================= */

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 26px;
  color: var(--green-dark);
  font-weight: 900;
}

.life-hero {
  padding: 82px 0 38px;
}

.life-hero-content {
  max-width: 820px;
}

.life-hero-content h1 {
  max-width: 920px;
  font-size: clamp(2.7rem, 6vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  font-weight: 900;
  margin-bottom: 22px;
}

.life-hero-content p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.life-gallery-section {
  padding: 34px 0 88px;
}

.life-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  align-items: start;
}

.life-card {
  grid-column: span 4;
  padding: 12px;
  border-radius: 26px;
  background: rgba(255, 253, 247, 0.90);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.life-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 104, 70, 0.30);
  box-shadow: var(--shadow);
}

.life-card.wide {
  grid-column: span 6;
}

.life-card.tall {
  grid-column: span 4;
}

.life-photo-frame {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(47, 104, 70, 0.08) 1px, transparent 1px),
    #f0ebe1;
  background-size: 18px 18px;
  border: 1px solid var(--line-soft);
}

.life-card.wide .life-photo-frame {
  height: 300px;
}

.life-card.tall .life-photo-frame {
  height: 390px;
}

.life-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.life-card p {
  padding: 12px 6px 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.life-closing {
  padding: 78px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}

.life-note {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding: 44px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.90);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.life-note h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 900;
  margin-bottom: 16px;
}

.life-note p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 26px;
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .life-card,
  .life-card.wide,
  .life-card.tall {
    grid-column: span 6;
  }

  .life-photo-frame,
  .life-card.wide .life-photo-frame,
  .life-card.tall .life-photo-frame {
    height: 330px;
  }
}

@media (max-width: 640px) {
  .life-hero {
    padding: 54px 0 28px;
  }

  .life-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .life-card,
  .life-card.wide,
  .life-card.tall {
    grid-column: span 1;
  }

  .life-photo-frame,
  .life-card.wide .life-photo-frame,
  .life-card.tall .life-photo-frame {
    height: 300px;
  }

  .life-note {
    padding: 30px 22px;
  }
}