/* ---------- Variables & reset ---------- */
:root {
  --navy: #0F2C4C;
  --blue: #1B4B91;
  --blue-light: #EAF1FB;
  --gold: #C9A227;
  --green: #2E9E5B;
  --grey: #8A93A0;

  --bg: #FFFFFF;
  --bg-alt: #F7F9FC;
  --text: #1E293B;
  --text-muted: #52607A;
  --border: #E2E8F0;
  --card-bg: #FFFFFF;
  --shadow: 0 4px 16px rgba(15, 44, 76, 0.08);

  --font-head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0B1524;
  --bg-alt: #0E1B2E;
  --text: #E5EAF2;
  --text-muted: #A9B4C6;
  --border: #1E3049;
  --card-bg: #132339;
  --blue-light: #16243A;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--blue); text-decoration: none; }
[data-theme="dark"] a { color: #6FA3E8; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text) !important;
  text-decoration: none;
}

.nav {
  display: none;
  gap: 22px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
}

.nav a:hover { color: var(--blue); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.icon-btn:hover { background: var(--blue-light); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.menu-toggle { flex-direction: column; gap: 4px; }
.menu-toggle span { width: 18px; height: 2px; background: var(--text); display: block; }

/* ---------- Mobile nav ---------- */
.nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  gap: 14px;
  box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--blue);
  color: #fff !important;
}
.btn-primary:hover { background: var(--navy); }

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue) !important;
}
[data-theme="dark"] .btn-outline { border-color: #6FA3E8; color: #6FA3E8 !important; }
.btn-outline:hover { background: var(--blue-light); }

.center-cta { text-align: center; margin-top: 40px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.85);
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.hero h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: .3em;
}

.hero-subtitle {
  color: #fff;
  font-weight: 500;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto .5em;
}

.hero-tagline {
  color: var(--gold);
  font-weight: 600;
  margin-bottom: .8em;
}

.hero-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero .btn-outline { border-color: #fff; color: #fff !important; }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: .3em;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 36px;
}

.about-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 40px auto 0;
  padding-left: 24px;
  border-left: 2px solid var(--border);
}

.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -31px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--blue);
}

.timeline-content h3 { font-size: 1.1rem; margin-bottom: .2em; }
.timeline-meta { font-weight: 600; color: var(--blue); margin-bottom: .6em; }
[data-theme="dark"] .timeline-meta { color: #6FA3E8; }

.exp-subheading {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin: 20px 0 10px;
}

.exp-list { margin: 0; padding-left: 1.1em; color: var(--text-muted); }
.exp-list li { margin-bottom: .5em; }
.exp-list li:last-child { margin-bottom: 0; }

.exp-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.exp-project {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.exp-project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: .3em;
}

.exp-project-head h5 { font-size: .96rem; font-weight: 700; color: var(--text); margin: 0; }
.exp-tag { font-weight: 500; color: var(--text-muted); font-size: .85rem; }

.exp-duration {
  flex-shrink: 0;
  background: var(--blue-light);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
[data-theme="dark"] .exp-duration { color: #8FBBEF; }

.exp-project p { font-size: .92rem; margin: 0; }

@media (min-width: 700px) {
  .exp-projects { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

.card.in-view { opacity: 1; transform: translateY(0); }

.card h3 { font-size: 1.02rem; margin-bottom: .3em; }
.card-meta { font-size: .88rem; color: var(--text-muted); margin-bottom: .2em; }

/* ---------- Skills ---------- */
.skills-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 32px;
}

.skills-col h3 { font-size: 1.05rem; margin-bottom: 18px; }
.mt { margin-top: 32px; }

.skill-bar { margin-bottom: 16px; }
.skill-name { font-size: .92rem; font-weight: 500; display: block; margin-bottom: 6px; }

.bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--navy));
  border-radius: 999px;
  transition: width 1.1s ease;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.tag {
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .85rem;
  font-weight: 500;
}
[data-theme="dark"] .tag { color: #8FBBEF; }

.tag-soft { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }

/* ---------- Certifications ---------- */
.certs-grid { grid-template-columns: 1fr; }

.cert-card { position: relative; }

.cert-featured {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, var(--blue-light), var(--card-bg));
}
.cert-featured h3 { font-size: 1.15rem; }

.cert-issuer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cert-issuer-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.cert-issuer-name {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--blue);
}
[data-theme="dark"] .cert-issuer-name { color: #6FA3E8; }

.cert-link {
  display: inline-block;
  margin-top: 10px;
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- Carousel ---------- */
.carousel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform .45s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel-slide a { display: block; }

.carousel-slide img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  background: var(--bg-alt);
  display: block;
}

.carousel-slide figcaption {
  padding: 14px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.carousel-btn {
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow);
}
.carousel-btn:hover { background: var(--blue-light); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active { background: var(--blue); }
[data-theme="dark"] .carousel-dot.active { background: #6FA3E8; }

@media (min-width: 640px) {
  .carousel-slide img { height: 400px; }
}

/* ---------- Volunteer ---------- */
.volunteer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}

.volunteer-text { display: flex; flex-direction: column; gap: 16px; }

.volunteer-img {
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 48px 0 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.footer-title { color: #fff; font-size: 1.2rem; }
.footer-inner a { color: #fff; }
.footer-inner p { color: rgba(255,255,255,.75); }

.footer-copy {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.4rem; }
}

@media (min-width: 768px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
  .skills-columns { grid-template-columns: 1fr 1fr; }
  .volunteer-grid { grid-template-columns: 1.1fr 1fr; }
  .footer-inner { flex-direction: row; align-items: center; }
}

@media (min-width: 1024px) {
  .certs-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 90px 0 72px; }
}
