/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img, svg { display: block; }

/* ─── CSS VARIABLES ─────────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg-base:     #0a0d14;
  --bg-surface:  #10141f;
  --bg-elevated: #161c2d;
  --bg-hover:    #1c2438;

  /* Borders */
  --border:      #232b3e;
  --border-subtle: #1a2030;

  /* Text */
  --text-primary:   #e2e8f7;
  --text-secondary: #8a97b8;
  --text-muted:     #546080;

  /* Geology accent — warm amber / gold */
  --accent-geo:         #d4922a;
  --accent-geo-light:   #e8ad56;
  --accent-geo-dim:     rgba(212, 146, 42, 0.12);
  --accent-geo-border:  rgba(212, 146, 42, 0.3);
  --accent-geo-glow:    rgba(212, 146, 42, 0.18);

  /* GIS accent — electric cyan-blue */
  --accent-gis:         #3d9cf5;
  --accent-gis-light:   #6eb8ff;
  --accent-gis-dim:     rgba(61, 156, 245, 0.12);
  --accent-gis-border:  rgba(61, 156, 245, 0.3);
  --accent-gis-glow:    rgba(61, 156, 245, 0.18);

  /* Active accent (auto-switched) */
  --accent:        var(--accent-geo);
  --accent-light:  var(--accent-geo-light);
  --accent-dim:    var(--accent-geo-dim);
  --accent-border: var(--accent-geo-border);
  --accent-glow:   var(--accent-geo-glow);

  /* Layout */
  --max-w:         1140px;
  --header-h:      64px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  /* Transitions */
  --t-fast:  0.15s ease;
  --t-med:   0.25s ease;
  --t-slow:  0.4s ease;
}

/* Switch accent when in GIS mode */
[data-mode="gis"] {
  --accent:        var(--accent-gis);
  --accent-light:  var(--accent-gis-light);
  --accent-dim:    var(--accent-gis-dim);
  --accent-border: var(--accent-gis-border);
  --accent-glow:   var(--accent-gis-glow);
}

/* ─── LAYOUT ────────────────────────────────────────────────────────────────── */

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

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-surface);
  position: relative;
}
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    var(--border-subtle) 40px
  ),
  repeating-linear-gradient(
    90deg,
    transparent,
    transparent 39px,
    var(--border-subtle) 40px
  );
  opacity: 0.35;
  pointer-events: none;
}

/* ─── SECTION HEADER ─────────────────────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 48px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: background var(--t-slow);
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

/* ─── HEADER ────────────────────────────────────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-first { color: var(--accent); transition: color var(--t-slow); }

/* Mode toggle */
.mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-med);
  white-space: nowrap;
}
.mode-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.mode-btn.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 12px var(--accent-glow);
}
.mode-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  position: relative;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent-light); }
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  margin-left: auto;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-med);
  transform-origin: center;
}
.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 nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 16px 16px;
  background: rgba(10, 13, 20, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-med), opacity var(--t-med);
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-link {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.mobile-nav-link:hover,
.mobile-nav-link.active { color: var(--accent-light); background: var(--accent-dim); }

/* ─── HERO ───────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

/* Dot-grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Glow orb */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
  transition: background var(--t-slow);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 50px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: background var(--t-slow), border-color var(--t-slow), color var(--t-slow);
}
.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 20px;
  transition: color var(--t-slow);
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 36px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--t-med);
}
.btn-primary {
  background: var(--accent);
  color: #0a0d14;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Hero chips */
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chip {
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  color: var(--text-muted);
  animation: bounce-y 2.5s ease-in-out infinite;
}
@keyframes bounce-y {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─── ABOUT ──────────────────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.about-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--t-med), background var(--t-med);
}
.stat-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.03em;
  line-height: 1;
  transition: color var(--t-slow);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Education block */
.about-edu-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.edu-item {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.edu-item:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.edu-degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.edu-years {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.edu-institution {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.edu-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── EXPERIENCE / TIMELINE ──────────────────────────────────────────────────── */

/* Experience group (Mine / Exploration subsections) */
.exp-root { display: flex; flex-direction: column; gap: 56px; }

.exp-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.exp-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  flex-shrink: 0;
  transition: background var(--t-slow), border-color var(--t-slow), color var(--t-slow);
}
.exp-group-icon svg { width: 17px; height: 17px; }

.exp-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.exp-group-count {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 3px var(--accent-border);
  transition: background var(--t-slow), box-shadow var(--t-slow);
}
.timeline-item:hover .timeline-marker {
  box-shadow: 0 0 0 5px var(--accent-dim);
}

.timeline-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.timeline-card:hover {
  border-color: var(--accent-border);
  transform: translateX(4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Company header (always shown at top of card) */
.tl-company-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.tl-company-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tl-company-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-light);
  transition: color var(--t-slow);
}
.tl-tenure-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--bg-hover);
  padding: 3px 10px;
  border-radius: 50px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.tl-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.tl-loc-icon { width: 12px; height: 12px; flex-shrink: 0; }

/* Positions list inside each card */
.tl-positions { display: flex; flex-direction: column; gap: 0; }

.tl-positions--multi {
  padding-left: 16px;
  border-left: 2px solid var(--border);
  transition: border-color var(--t-slow);
}
.timeline-card:hover .tl-positions--multi {
  border-left-color: var(--accent-border);
}

.tl-position { padding-bottom: 18px; }
.tl-position:last-child { padding-bottom: 0; }
.tl-position--prev {
  padding-top: 18px;
  border-top: 1px dashed var(--border-subtle);
}

/* Position header row: dot + role on left, period on right */
.tl-pos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tl-pos-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tl-pos-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: background var(--t-slow);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.tl-role {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text-primary);
}
.tl-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--bg-hover);
  padding: 3px 10px;
  border-radius: 50px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tl-bullets { padding-left: 0; }
.tl-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.tl-bullets li:last-child { margin-bottom: 0; }
.tl-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  transition: background var(--t-slow);
}

/* ─── SKILLS ────────────────────────────────────────────────────────────────── */

#skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--t-med), transform var(--t-med);
}
.skill-group:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}

.skill-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-slow);
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-tag {
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.skill-tag:hover {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent-light);
  transform: scale(1.05);
}

/* ─── CONTACT ────────────────────────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--t-med);
}
a.contact-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  transition: background var(--t-slow), border-color var(--t-slow), color var(--t-slow);
}
.contact-icon svg { width: 20px; height: 20px; }

.contact-info { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── REFERENCES ────────────────────────────────────────────────────────────── */

.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.ref-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.ref-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.ref-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: background var(--t-slow);
}

.ref-quote { position: relative; }
.quote-mark {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 36px;
  color: var(--accent);
}
.ref-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-style: italic;
  padding-top: 8px;
}

.ref-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.ref-person { display: flex; align-items: center; gap: 12px; }
.ref-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-light);
  flex-shrink: 0;
  letter-spacing: 0.04em;
  transition: background var(--t-slow), border-color var(--t-slow), color var(--t-slow);
}
.ref-details { display: flex; flex-direction: column; gap: 2px; }
.ref-name { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); }
.ref-role { font-size: 0.78rem; color: var(--text-muted); }

.ref-contact { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.ref-link {
  font-size: 0.78rem;
  color: var(--accent-light);
  transition: opacity var(--t-fast);
}
.ref-link:hover { opacity: 0.75; text-decoration: underline; }
.ref-phone { font-size: 0.78rem; color: var(--text-muted); }

.ref-relation-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.footer-sep { color: var(--border); }

/* ─── ANIMATIONS ────────────────────────────────────────────────────────────── */

.fade-in-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mode transition */
.mode-exit {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.mode-enter {
  animation: mode-in 0.35s ease forwards;
}
@keyframes mode-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SCROLLBAR ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── SELECTION ─────────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent-dim);
  color: var(--accent-light);
}

/* ─── MODE VISIBILITY ───────────────────────────────────────────────────────── */

.geo-only { display: block; }
.gis-only { display: none;  }

[data-mode="gis"] .geo-only { display: none;  }
[data-mode="gis"] .gis-only { display: block; }

/* ─── GEOLOGY — REMOTE SENSING BACKGROUND ───────────────────────────────────── */
/*
 * TO REPLACE the background image:
 *   1. Drop your file into  images/remote-sensing/
 *   2. Change the filename in the url() below
 *   Supported: .jpg  .png  .webp  .svg
 *   The dark gradient overlay is applied automatically — any image works.
 */
[data-mode="geology"] #experience {
  background:
    linear-gradient(rgba(10, 13, 20, 0.84), rgba(10, 13, 20, 0.84)),
    url('../images/remote-sensing/background.svg') center / cover no-repeat,
    var(--bg-surface);
}

/* ─── GEOLOGY — AUSTRALIA MAP (self-hosted SVG) ─────────────────────────────── */

#field-map {
  padding-bottom: 80px;
}

.field-map-title {
  padding-bottom: 14px;
}

#australia-map {
  position: relative;
  width: 100%;
  aspect-ratio: 900 / 780;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
}

/* SVG fills the container */
#aus-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Map layers ── */
.map-ocean {
  fill: #0b0e18;
}

.map-land {
  fill: #1c2235;
}

.map-coast {
  fill: none;
  stroke: #2e3a52;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

/* Graticule grid */
.map-grid-line {
  stroke: #1a2236;
  stroke-width: 0.7;
  stroke-dasharray: 3 5;
}

.map-grid-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  fill: #2e3a52;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── Pin dots ── */
.map-pin-group {
  cursor: pointer;
}

/* Outer pulse ring */
.map-pin-pulse {
  fill: none;
  stroke: var(--accent-geo);
  stroke-width: 1.5;
  opacity: 0;
  animation: pin-pulse 2.4s ease-out infinite;
}

.map-pin-group:nth-child(1) .map-pin-pulse { animation-delay: 0.0s; }
.map-pin-group:nth-child(2) .map-pin-pulse { animation-delay: 0.5s; }
.map-pin-group:nth-child(3) .map-pin-pulse { animation-delay: 1.0s; }
.map-pin-group:nth-child(4) .map-pin-pulse { animation-delay: 1.5s; }
.map-pin-group:nth-child(5) .map-pin-pulse { animation-delay: 2.0s; }

@keyframes pin-pulse {
  0%   { r: 8;  opacity: 0.8; }
  100% { r: 22; opacity: 0;   }
}

/* Main dot */
.map-pin-dot {
  fill: var(--accent-geo);
  opacity: 0.25;
  transition: opacity 0.2s ease, r 0.2s ease;
}

/* Inner bright centre */
.map-pin-center {
  fill: var(--accent-geo-light);
  transition: r 0.2s ease;
}

.map-pin-group:hover .map-pin-dot    { opacity: 0.5; }
.map-pin-group:hover .map-pin-center { r: 4; }

/* ── Floating popup ── */
.geo-popup {
  position: absolute;
  width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-geo-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-110%) translateX(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}
.geo-popup.visible {
  opacity: 1;
  transform: translateY(calc(-100% - 16px)) translateX(0);
}

/* Small triangle arrow pointing down */
.geo-popup::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 6px;
  background: var(--bg-elevated);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-left: 1px solid var(--accent-geo-border);
  border-right: 1px solid var(--accent-geo-border);
}

.geo-popup-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.geo-popup-company {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-geo-light);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.geo-popup-prospect {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.geo-popup-roles {
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.geo-popup-role {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.geo-popup-role-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.geo-popup-role-period {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── GIS — CONTOUR LINE BACKGROUND ─────────────────────────────────────────── */

[data-mode="gis"] .section-alt::before {
  background-image:
    url('../images/contour-pattern.svg');
  background-size: 700px 420px;
  background-repeat: repeat;
  opacity: 0.55;
}

/* ─── GIS — PROJECT TILES ────────────────────────────────────────────────────── */

.gis-project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-tile {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.project-tile:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* Tile image area — replace with real screenshot by setting background-image */
.project-tile-img {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/*
 * TO REPLACE tile images:
 *   Add  background-image: url('../images/projects/your-file.jpg');
 *   to each class below — or swap the gradient entirely.
 *   Recommended size: 800×400px
 */
.proj-img--sediment {
  background:
    linear-gradient(135deg, #0d1e2e 0%, #122030 40%, #0a1820 70%, #0e2218 100%);
}
.proj-img--sediment::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(160deg, transparent, transparent 18px, rgba(61,156,245,0.06) 19px),
    repeating-linear-gradient(70deg,  transparent, transparent 28px, rgba(61,156,245,0.04) 29px);
}

.proj-img--tenement {
  background:
    linear-gradient(135deg, #0d1a2e 0%, #101e30 50%, #0e1a28 100%);
}
.proj-img--tenement::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 29px, rgba(61,156,245,0.07) 30px),
    repeating-linear-gradient(90deg,  transparent, transparent 29px, rgba(61,156,245,0.07) 30px);
}

.proj-img--mpm {
  background:
    linear-gradient(135deg, #1a0d2e 0%, #1e1030 50%, #120e2a 100%);
}
.proj-img--mpm::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(120,60,245,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 60%, rgba(61,156,245,0.12) 0%, transparent 50%);
}

.proj-img--lidar {
  background:
    linear-gradient(135deg, #0a1a1e 0%, #0e2028 50%, #0a1820 100%);
}
.proj-img--lidar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url('../images/contour-pattern.svg');
  background-size: 350px 210px;
  opacity: 0.4;
}

/* Overlay shimmer on hover */
.project-tile-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 50%);
  transition: opacity var(--t-med);
}
.project-tile:hover .project-tile-img-overlay {
  opacity: 0.6;
}

/* Placeholder label (visible until image is swapped in) */
.project-tile-img::before {
  content: "[ Replace with project image ]";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.project-tile-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-tile-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tile-tag {
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.03em;
}

.project-tile-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-top: 4px;
  transition: color var(--t-fast), letter-spacing var(--t-fast);
}
.project-tile:hover .project-tile-cta {
  color: var(--accent-light);
  letter-spacing: 0.06em;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-edu-block {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .gis-project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  /* Header: hide desktop nav, show hamburger */
  .nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }

  /* Shrink mode toggle text on small screens */
  .mode-btn { padding: 5px 12px; font-size: 0.8rem; }

  .hero-content { padding-top: 32px; }

  .tl-company-name-row { flex-direction: column; align-items: flex-start; gap: 6px; }

  .references-grid { grid-template-columns: 1fr; }

  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .ref-footer { flex-direction: column; align-items: flex-start; }
  .ref-contact { align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-name { font-size: 2.4rem; }
  .mode-btn span:not(.mode-icon) { display: none; }
  .mode-btn { padding: 7px; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
