:root {
  --bg: #0f0e11;
  --bg2: #15141a;
  --bg3: #1d1b24;
  --bg4: #252330;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.13);
  --text: #ede9e3;
  --muted: #8a8499;
  --faint: #4e4a5a;
  --gold: #c9a84c;
  --gold2: #e8c96d;
  --gold-glow: rgba(201, 168, 76, 0.15);
  --green: #4caf7d;
  --red: #e05c5c;
  --ff: "DM Sans", system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", monospace;
  --sidebar: 300px;
  --r: 14px;
}
body.light {
  --bg: #f2ede6;
  --bg2: #fff;
  --bg3: #f7f2eb;
  --bg4: #ede7dc;
  --border: rgba(0, 0, 0, 0.07);
  --border2: rgba(0, 0, 0, 0.14);
  --text: #1a1714;
  --muted: #6b6458;
  --faint: #b8ad9e;
  --gold: #9a6f1e;
  --gold2: #b8860b;
  --gold-glow: rgba(154, 111, 30, 0.12);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition:
    background 0.3s,
    color 0.3s;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--bg4);
  border-radius: 99px;
}

/* ── LAYOUT ── */
.cv-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar);
  min-width: var(--sidebar);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
  transition: background 0.3s;
}
.sidebar::-webkit-scrollbar {
  width: 3px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--bg4);
}

.sb-top {
  padding: 32px 28px 0;
}

/* Profile photo */
.photo-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  padding: 2.5px;
  margin: 0 auto 20px;
  position: relative;
}
.photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-family: var(--mono);
}
.photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
}
.photo-inner .photo-placeholder {
  padding: 8px;
  line-height: 1.4;
}

.sb-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 4px;
}
.sb-role {
  text-align: center;
  font-size: 0.78rem;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 auto 28px;
  width: fit-content;
  padding: 5px 14px;
  background: rgba(76, 175, 125, 0.12);
  border: 1px solid rgba(76, 175, 125, 0.25);
  border-radius: 99px;
  font-size: 0.78rem;
  color: var(--green);
  font-family: var(--mono);
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.sb-divider {
  height: 1px;
  background: var(--border);
  margin: 0 28px 24px;
}

/* Sidebar sections */
.sb-section {
  padding: 0 28px;
  margin-bottom: 26px;
}
.sb-label {
  font-size: 0.68rem;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.c-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--gold-glow);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 1px;
}
.c-info {
  flex: 1;
  min-width: 0;
}
.c-tag {
  font-size: 0.68rem;
  color: var(--faint);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.c-val {
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.3;
}
.c-val a:hover {
  color: var(--gold);
}

/* Skill bars */
.skill-row {
  margin-bottom: 13px;
}
.skill-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.skill-name {
  font-size: 0.82rem;
  color: var(--text);
}
.skill-pct {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--muted);
}
.skill-track {
  height: 3px;
  background: var(--bg4);
  border-radius: 99px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sb-tag {
  font-size: 0.72rem;
  font-family: var(--mono);
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: 0.2s;
}
.sb-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Theme btn */
.theme-wrap {
  padding: 0 28px;
  margin-top: auto;
}
.theme-btn {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--mono);
  cursor: pointer;
  transition: 0.2s;
  letter-spacing: 0.06em;
}
.theme-btn:hover {
  border-color: var(--border2);
  color: var(--text);
}

/* ── MAIN CONTENT ── */
.main {
  flex: 1;
  min-width: 0;
  padding: 0 56px 80px;
  max-width: 820px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 0;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  transition: background 0.3s;
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}
.breadcrumb span {
  color: var(--gold);
}
.nav-dots {
  display: flex;
  gap: 6px;
}
.dot-link {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1px solid var(--border2);
  transition: 0.2s;
  cursor: pointer;
}
.dot-link:hover,
.dot-link.active {
  background: var(--gold);
  border-color: var(--gold);
}
.dot-link[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: var(--bg3);
  color: var(--text);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  margin-top: 14px;
}

/* Sections */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-child {
  border-bottom: none;
}

.sec-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}
.sec-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.sec-sub {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 36px;
}

/* ── HERO SECTION ── */
#hero {
  padding-top: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-tagline em {
  font-style: italic;
  color: var(--gold);
}
.hero-p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.hstat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 16px;
  transition: 0.2s;
  position: relative;
  overflow: hidden;
}
.hstat::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    135deg,
    rgba(201, 168, 76, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: 0.2s;
  border-radius: var(--r);
}
.hstat:hover::before {
  opacity: 1;
}
.hstat:hover {
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-2px);
}
.hstat-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.hstat-label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
  border: 1px solid transparent;
}
.btn-gold {
  background: var(--gold);
  color: #0f0e11;
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold2);
  border-color: var(--gold2);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border2);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── EXPERIENCE TIMELINE ── */
.timeline {
  display: grid;
  gap: 0;
}
.tl-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0 20px;
  padding-bottom: 36px;
  position: relative;
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gold);
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
  margin-top: 5px;
  z-index: 1;
}
.tl-line {
  flex: 1;
  width: 1px;
  background: var(--border2);
  margin-top: 6px;
}
.tl-item:last-child .tl-line {
  display: none;
}
.tl-body {
  padding-bottom: 0;
}
.tl-period {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.tl-role {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.tl-company {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.tl-bullets {
  display: grid;
  gap: 8px;
}
.tl-bullets li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}
.tl-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 1px;
  background: var(--gold);
}

/* ── SKILLS SECTION ── */
.skills-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sk-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  transition: 0.18s;
}
.sk-card:hover {
  border-color: var(--border2);
}
.sk-card-icon {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.sk-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  font-size: 0.73rem;
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: 0.2s;
}
.tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── PROJECTS ── */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.proj-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: 0.2s;
  cursor: default;
}
.proj-card:hover {
  border-color: rgba(201, 168, 76, 0.32);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(201, 168, 76, 0.06);
}
.proj-card.span2 {
  grid-column: span 2;
}
.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.proj-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gold-glow);
  border: 1px solid rgba(201, 168, 76, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.proj-actions {
  display: flex;
  gap: 7px;
}
.proj-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--muted);
  transition: 0.2s;
}
.proj-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.proj-name {
  font-size: 1rem;
  font-weight: 600;
}
.proj-desc {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
  flex: 1;
}
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proj-tag {
  font-size: 0.7rem;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ── EDUCATION ── */
.edu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  transition: 0.18s;
}
.edu-card:hover {
  border-color: var(--border2);
}
.edu-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--gold-glow);
  border: 1px solid rgba(201, 168, 76, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.edu-period {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--gold);
  margin-bottom: 3px;
}
.edu-degree {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.edu-school {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.edu-note {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.ccontact {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: 0.18s;
}
.ccontact:hover {
  border-color: rgba(201, 168, 76, 0.3);
}
.cc-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--gold-glow);
  border: 1px solid rgba(201, 168, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.cc-label {
  font-size: 0.7rem;
  color: var(--faint);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.cc-val {
  font-size: 0.88rem;
  font-weight: 500;
}
.cc-val a:hover {
  color: var(--gold);
}
.cta-box {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--r);
  padding: 32px;
  text-align: center;
}
.cta-box h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.cta-box p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 20px;
}
.cta-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: 0.18s;
}
.chip:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  border-top: 1px solid var(--border);
}
footer span {
  color: var(--gold);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    transition: left 0.3s;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    left: 0;
  }
  .main {
    padding: 0 24px 60px;
  }
  .topbar {
    padding-top: 20px;
    margin-bottom: 32px;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .skills-main-grid,
  .proj-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .proj-card.span2 {
    grid-column: span 1;
  }
}
@media (max-width: 600px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .hero-tagline {
    font-size: 1.8rem;
  }
}

/* Mobile topbar btn */
.mob-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
  transition: 0.2s;
}
@media (max-width: 900px) {
  .mob-menu-btn {
    display: flex;
  }
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 199;
  backdrop-filter: blur(4px);
}
.overlay.on {
  display: block;
}
