:root {
  --accent: #2563EB;
  --bg: #0A0A0C;
  --surface: #1E2024;
  --surface-2: #262930;
  --border: #2E3138;
  --divider: #3A3E46;
  --text: #F2F3F5;
  --text-muted: #9CA0A6;
  --text-dim: #7A7E85;
  --glass-bg: rgba(10, 10, 12, 0.82);
}

:root[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F3F4F6;
  --surface-2: #E8EAED;
  --border: #D8DBE0;
  --divider: #C4C8CF;
  --text: #14161A;
  --text-muted: #4B5157;
  --text-dim: #6B7178;
  --glass-bg: rgba(255, 255, 255, 0.82);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Page shell ---------- */

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 56px;
}

.nav-pill {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 14px 28px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font: inherit;
  flex-shrink: 0;
  transition: border-color .2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle .icon-gs {
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-sep {
  color: var(--divider);
  font-size: 13px;
}

.navlink2 {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding-top: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}

.navlink2:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Sections ---------- */

.section-pad {
  padding-left: 56px;
  padding-right: 56px;
}

.section-divider {
  width: 300px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 20px;
  border-radius: 2px;
}

.hero-name {
  margin: 0;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.1;
}

/* ---------- Buttons / pills ---------- */

.pill-c {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: border-color .2s ease;
}

.pill-c:hover {
  border-color: var(--accent);
}

.pill-sm {
  padding: 8px 18px;
  font-size: 13px;
  box-shadow: none;
}

.icon-gs {
  font-family: 'Material Symbols Outlined';
  font-size: 18px;
  line-height: 1;
}

.badge-c {
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}

.badge-sm {
  font-size: 11px;
  padding: 5px 12px;
}

.link-c,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color .2s ease, background .2s ease;
}

.link-c:hover,
.back-link:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.link-c .arrow-ic,
.back-link .arrow-ic {
  display: inline-block;
  transition: transform .2s ease;
}

.link-c:hover .arrow-ic {
  transform: translateX(4px);
}

.back-link {
  font-size: 14px;
}

.back-link:hover .arrow-ic {
  transform: translateX(-4px);
}

/* ---------- Cards ---------- */

.card-c {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  transition: border-color .2s ease;
}

.card-c:hover {
  border-color: var(--accent);
}

.pcard-c {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  transition: border-color .2s ease;
  overflow: hidden;
}

.pcard-c:hover {
  border-color: var(--accent);
}

.thumb-box {
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.card-empty {
  min-height: 260px;
  border: 2px dashed var(--border);
  border-radius: 20px;
}

.is-disabled {
  opacity: .55;
}

.is-disabled:hover {
  border-color: var(--border);
}

/* ---------- Timeline ---------- */

.timeline-rail {
  border-left: 2px dashed var(--border);
  padding-left: 36px;
}

.timeline-rail .card-c:hover {
  border-color: var(--border);
}

.timeline-dot {
  position: absolute;
  left: -45px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--border);
}

/* ---------- Certifications ---------- */

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Material Symbols Outlined';
  font-size: 22px;
  color: var(--accent);
}

/* ---------- Carousel (project detail template) ---------- */

.nav-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.nav-arrow:hover {
  border-color: var(--accent);
}

.thumb-c {
  border-radius: 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  transition: border-color .2s ease;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  font: inherit;
  width: 100%;
}

.thumb-c:hover,
.thumb-c.active {
  border-color: var(--accent);
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  height: 420px;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .35s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.carousel-slide span {
  font-size: 12px;
  color: var(--text-dim);
}

.dot-c {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.dot-c.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 36px 56px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .pgrid {
    grid-template-columns: 1fr !important;
  }

  .pgrid4 {
    grid-template-columns: 1fr !important;
  }

  .certgrid {
    grid-template-columns: 1fr !important;
  }

  .thumbgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .site-nav {
    padding: 16px 24px;
  }

  .nav-pill {
    padding: 10px 18px;
  }

  .nav-links {
    gap: 12px;
  }

  .navlink2 {
    font-size: 13px;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
  }

  .theme-toggle .icon-gs {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .site-nav {
    padding: 14px 14px;
  }

  .nav-pill {
    padding: 8px 14px;
  }

  .nav-links {
    gap: 8px;
  }

  .navlink2 {
    font-size: 11px;
  }

  .theme-toggle {
    width: 26px;
    height: 26px;
  }

  .theme-toggle .icon-gs {
    font-size: 15px;
  }

  .section-pad {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-footer {
    padding: 24px 20px;
  }

  .carousel-viewport {
    height: 240px;
  }
}

@media (max-width: 400px) {
  .site-nav {
    padding: 12px 10px;
  }

  .nav-pill {
    padding: 6px 10px;
  }

  .nav-links {
    gap: 6px;
  }

  .navlink2 {
    font-size: 10px;
  }

  .theme-toggle {
    width: 24px;
    height: 24px;
  }

  .theme-toggle .icon-gs {
    font-size: 14px;
  }
}
