/* ── Custom Properties ── */
:root {
  --color-primary: #1a365d;
  --color-primary-light: #3b82f6;
  --color-primary-pale: #93c5fd;
  --color-text-dark: #1e293b;
  --color-text: #334155;
  --color-text-muted: #64748b;
  --color-text-faint: #94a3b8;
  --color-surface: #f8fafc;
  --color-surface-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --color-white: #ffffff;
  --color-arcgis: #3b82f6;
  --color-powerbi: #f59e0b;
  --color-tableau: #10b981;
  --color-excel: #6366f1;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  color: var(--color-primary);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; font-weight: 300; }
h2 { font-size: 1.75rem; font-weight: 400; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.overline {
  font-size: 0.6875rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-surface);
}

.section__header {
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-align: center;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: #152a4a;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* ── Scroll Animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav--scrolled {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.nav__logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.5px;
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-base);
  font-weight: 450;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-primary);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition-base);
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.hero__content {
  flex: 1;
}

.hero__name {
  font-size: 2.75rem;
  font-weight: 300;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.hero__title {
  font-size: 1.125rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.hero__intro {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.hero__buttons {
  display: flex;
  gap: 0.75rem;
}

.hero__photo {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 3rem;
  box-shadow: var(--shadow-lg);
}

/* ── Experience Timeline ── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline__item:nth-child(2) .timeline__dot {
  background: var(--color-primary-light);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.timeline__item:nth-child(3) .timeline__dot {
  background: var(--color-primary-pale);
  box-shadow: 0 0 0 2px var(--color-primary-pale);
}

.timeline__role {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.timeline__org {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.timeline__desc {
  font-size: 0.875rem;
  color: var(--color-text);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ── Project Cards ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.project-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card__preview {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.project-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.75rem;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-white);
}

.badge--arcgis { background: var(--color-arcgis); }
.badge--powerbi { background: var(--color-powerbi); }
.badge--tableau { background: var(--color-tableau); }
.badge--excel { background: var(--color-excel); }

.project-card__body {
  padding: 1.25rem;
}

.project-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
}

.project-card__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-size: 0.6875rem;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.project-card__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-primary);
}

.project-card__link:hover {
  color: var(--color-primary-light);
}

/* ── Education ── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.education-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.education-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.education-card__degree {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
}

.education-card__school {
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 500;
}

.education-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.education-card__details {
  font-size: 0.8125rem;
  color: var(--color-text);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ── Languages ── */
.languages {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.language {
  text-align: center;
}

.language__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.language__level {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

/* ── Certifications ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cert-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cert-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.cert-card__org {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ── Footer ── */
.footer {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 3.5rem 2rem;
}

.footer__heading {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--color-primary-pale);
  transition: color var(--transition-base);
}

.footer__links a:hover {
  color: var(--color-white);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ── Portfolio Page ── */
.page-header {
  padding-top: 7rem;
  padding-bottom: 1rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 300;
}

.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1.25rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 450;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.filter-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ── Project Detail Page ── */
.back-link {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-top: 6rem;
}

.back-link:hover {
  color: var(--color-primary);
}

.project-detail__badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.project-detail__title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.project-detail__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 2rem;
}

.embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 2.5rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface-alt);
  border: 2px solid var(--color-border);
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.embed-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-detail__findings h3,
.project-detail__tools h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.project-detail__findings ul {
  list-style: none;
  padding: 0;
}

.project-detail__findings li {
  font-size: 0.9375rem;
  color: var(--color-text);
  padding: 0.375rem 0;
  padding-left: 1rem;
  position: relative;
}

.project-detail__findings li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--color-primary-light);
}

.project-detail__tools {
  margin-top: 2rem;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tools-list .tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
}

/* ── Mobile Navigation Overlay ── */
.nav__overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

.nav__overlay.open {
  display: block;
}

.nav__mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--color-white);
  z-index: 1001;
  padding: 2rem;
  transition: right var(--transition-base);
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
}

.nav__mobile-menu.open {
  right: 0;
}

.nav__mobile-menu a {
  display: block;
  font-size: 1rem;
  color: var(--color-text);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.nav__mobile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ── View All Link ── */
.view-all {
  text-align: center;
  margin-top: 2rem;
}

.view-all a {
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 2px;
  transition: all var(--transition-base);
}

.view-all a:hover {
  color: var(--color-primary-light);
  border-color: var(--color-primary-light);
}

/* ── Filter Transition ── */
.project-card[data-category] {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 7rem;
  }

  .hero__photo {
    margin: 0 0 2rem 0;
    width: 180px;
    height: 180px;
  }

  .hero__intro {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__buttons {
    justify-content: center;
  }

  h1 { font-size: 2rem; }
  .hero__name { font-size: 2.25rem; }

  .project-grid,
  .project-grid--2col {
    grid-template-columns: 1fr;
  }

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

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

  .section {
    padding: 3rem 0;
  }

  .timeline {
    padding-left: 1.5rem;
  }
}
