/********************************
 * 1. GLOBAL VARIABLES & STYLES
 ********************************/
:root {
  --bg: #F5F9FF;
  --panel: #ffffff;
  --ink: #1c2a3a;
  --muted: #6b7a90;
  --brand: #89BFF5;
  --brand-strong: #5aa6f2;
  --brand-soft: #e8f2ff;
  --ring: rgba(90,166,242,.35);
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  background: var(--bg);
  color: var(--ink);
}

/********************************
 * 2. NAV & UI COMPONENT ELEMENTS
 ********************************/
.navbar { border-bottom: 1px solid #e8eef7; }
.navbar-brand { color: var(--ink); }
.nav-link { color: var(--muted); }
.nav-link:hover, .nav-link:focus { color: var(--brand-strong); }

.btn-primary {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn-outline-primary {
  color: var(--brand-strong);
  border-color: var(--brand-strong);
}
.btn-outline-primary:hover {
  background: var(--brand-strong);
  color: #fff;
}
.navbar .btn {
  margin-left: 1rem;
  padding: 0.375rem 0.75rem;
  vertical-align: middle;
}
.btn-resume {
  background: #2f65b3;
  border-color: #2f65b3;
  color: #fff;
}
.btn-resume:hover {
  background: #244f8c;
  border-color: #244f8c;
}

a:focus, button:focus, .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/********************************
 * 3. MAIN PORTFOLIO LANDING COMPONENTS
 ********************************/
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink);
  isolation: isolate;
  background:
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    url("assets/images/header_map.png") center/cover no-repeat;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}

.cursor {
  display: inline-block;
  width: 1px;
  height: 1.2em;
  background: var(--ink);
  animation: blink .9s steps(2, start) infinite;
  margin-left: 3px;
}
@keyframes blink { to { visibility: hidden; } }

.section { padding: 72px 0; }
.section-alt { background: var(--brand-soft); }
.section-header { text-align: center; margin-bottom: 28px; }

/* Landing Page Headings (Keeps index.html visually unaffected) */
.section-header .section-title {
  display: block;
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.section-subtitle { 
  color: var(--muted); 
  font-size: 1.1rem;
}

.btn-filter {
  border: 1px solid #d9e6f7;
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: .35rem .9rem;
}
.btn-filter.active, .btn-filter:hover {
  background: var(--brand);
  color: #0b2440;
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--ring);
}

.card {
  border: 1px solid #e6eef8;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.card-img-top { aspect-ratio: 16/9; object-fit: cover; }
.card-title { margin-bottom: .35rem; }
.card-text { color: var(--muted); }

.project-card .card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  cursor: pointer;
}
.project-card:hover .card,
.project-card:focus-within .card {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(12, 41, 80, 0.18);
  border-color: var(--brand);
  background: #ffffff;
}

.skill {
  background: #fff;
  border: 1px solid #e6eef8;
  border-radius: 10px;
  padding: .8rem;
  text-align: center;
  box-shadow: 0 1px 0 #f1f5fb;
}

/********************************
 * 4. PROJECT DYNAMIC PAGES COMPONENTS
 ********************************/
.project-hero {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(0,0,0,.06), transparent),
    linear-gradient(180deg, rgba(0,0,0,.02), transparent);
  border-radius: 1.25rem;
}

.map-hero {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.map-hero .ratio { --bs-aspect-ratio: 50%; }
.map-hero img, .map-hero arcgis-embedded-map {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body { max-width: 860px; margin: 0 auto; }
.section-block {
  padding: 2.5rem 0;
  border-top: 1px solid #e3eaf4;
}
.section-block:first-of-type { border-top: none; }

/* Project Layout Header Override Style */
.section-block .section-title {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: calc(1.325rem + .9vw);
}

.meta-card {
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  background: #ffffff;
  border: 1px solid #e3eaf4;
  font-size: .95rem;
}
.badge-custom-blue { background-color: #0A4D91 !important; color: #ffffff !important; }

/* Dynamic Inner Grid Gallery Cards */
.project-body .gallery-card {
  display: block !important;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  padding: 0.6rem 0.6rem 0;
  transition: transform .18s ease;
  height: 100%;
}

.project-body .gallery-card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 10px 26px rgba(0,0,0,.10); 
}

.project-body .arcgis-box {
  width: 100%;
  height: 350px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8f9fa;
}

.project-body .gallery-card img { 
  border-radius: 10px; 
  cursor: zoom-in; 
  width: 100%; 
  height: auto; 
  object-fit: normal;  
  display: block;
}

.project-body .gallery-card figcaption { 
  display: block !important;
  padding: .75rem .75rem 0.25rem; 
  margin-bottom: 0;
  font-size: .9rem; 
  color: #6c757d; 
}

/* Base Esri Asset Overrides */
arcgis-embedded-map, .arcgis-embedded-map {
  display: block;
  width: 100%;
  height: 100%;
}
.modal-dark-bg { background-color: #000000; }

/* Side Dot Tracking Navigation */
.section-dots {
  position: fixed;
  top: 50%;
  right: 2.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  z-index: 1040;
}
.section-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #c7d7f7;
  background: #f3f6ff;
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-dot.is-active {
  background: #0d6efd;
  border-color: #0d6efd;
  transform: scale(1.2);
}
.section-dot--top i { font-size: 0.55rem; color: #c7d7f7; }
.section-dot--top.is-active i { color: #ffffff; }

@media (max-width: 991.98px) { .section-dots { display: none; } }

/********************************
 * 5. PORTRAIT
 ********************************/
.portrait-img {
  width: 80%;
  max-width: 320px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.portrait-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer {
  padding: 64px 0;
  background: #fff;
  border-top: 1px solid #e8eef7;
}
.footer .hero-credit {
  position: static;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 0;
  font-size: 11px;
  color: #7a869a;
  background: none;
  border: none;
}
.footer .hero-credit a {
  color: #6c7a90;
  text-decoration: none;
}
.footer .hero-credit a:hover { text-decoration: underline; }
.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .easter { transition: none; }
  .easter::after { transition: none; }
}
