:root {
  --bg: #0b0b0f;
  --surface: rgba(15, 15, 23, 0.72);
  --text: #f5f5f7;
  --muted: #b6b6c0;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.2);
  --border: rgba(255, 255, 255, 0.14);
}

body[data-theme='light'] {
  --bg: #f6f6f6;
  --surface: rgba(255, 255, 255, 0.9);
  --text: #111;
  --muted: #555;
  --accent: #1f1f1f;
  --accent-soft: rgba(20, 20, 20, 0.12);
  --border: rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

#bg-canvas { position: fixed; inset: 0; z-index: -2; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 75% 10%, var(--accent-soft), transparent 35%);
  z-index: -1;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 5vw;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.05em; }
.logo span { color: var(--accent); }

.primary-nav { display: flex; gap: 1.4rem; align-items: center; }
.primary-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.primary-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 0.55rem; }
.theme-btn, .menu-toggle {
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer;
}
.menu-toggle {
  display: none; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 0.22rem;
}
.menu-toggle span { width: 1.15rem; height: 2px; background: var(--text); transition: transform .25s ease, opacity .2s ease; }
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

main { width: min(1060px, 92vw); margin: 0 auto; }
.section { padding: 4rem 0; }

.hero { min-height: 62vh; display: grid; align-content: center; gap: 0.8rem; }
.hero-top { position: relative; padding-bottom: 3.4rem; }
.hero-banner { width: 100%; height: 240px; border-radius: 1rem; overflow: hidden; border: 1px solid var(--border); }
.hero-banner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-wrap {
  position: absolute; left: 1.2rem; bottom: 0; width: 120px; height: 120px;
  border-radius: 50%; overflow: hidden; border: 4px solid var(--bg); box-shadow: 0 12px 25px rgba(0,0,0,.25);
}
.profile-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }

.eyebrow { margin: 0; color: var(--accent); font-weight: 700; }
h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.1; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); margin: 0 0 .6rem; }
.lead, .section-intro { color: var(--muted); max-width: 70ch; margin: 0; }
.experience-note {
  margin-top: .9rem; padding: .75rem 1rem; border-radius: .75rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600;
}

.hero-actions, .contact-links { margin-top: 1rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: .72rem 1.16rem;
  border-radius: .75rem; border: 1px solid var(--border); text-decoration: none; font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn-outline { color: var(--text); }

.info-grid, .metrics {
  margin-top: 1.2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-grid article, .metrics article, .recent-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem;
}
.info-grid a { color: var(--text); }
.metrics strong { color: var(--accent); font-size: 2rem; }

.work-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  align-items: stretch;
  grid-auto-flow: dense;
}
.work-card {
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease;
  background: var(--surface);
}
.work-card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}
.work-card h3 { margin: 0 0 .55rem; }
.work-card p { margin: 0; }

.work-card--xl { grid-column: span 6; min-height: 190px; }
.work-card--lg { grid-column: span 5; min-height: 190px; }
.work-card--md { grid-column: span 4; min-height: 190px; }
.work-card--sm { grid-column: span 3; min-height: 150px; }
.work-card--full { grid-column: 1 / -1; min-height: 150px; }

.work-card--hot { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; }
.work-card--hot2 { background: linear-gradient(140deg, #ec4899, #8b5cf6); color: #fff; }
.work-card--blue { background: #4d5f7d; color: #fff; }
.work-card--darkblue { background: #172238; color: #fff; }
.work-card--light { background: #ececec; color: #141414; }

.work-card--hot p,
.work-card--hot2 p,
.work-card--blue p,
.work-card--darkblue p { color: rgba(255, 255, 255, 0.92); }
.work-card--light p { color: #1d1d1d; }

.tabs { margin: 1rem 0 1.2rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.tabs-modern {
  display: inline-flex;
  padding: .35rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}
.tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: .65rem;
  padding: .5rem 1rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.tab-btn:hover { transform: translateY(-1px); border-color: var(--border); }
.tab-btn.active {
  background: linear-gradient(135deg, #f00672, #8b5cf6);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 8px 18px rgba(240, 6, 114, 0.25);
}

.recent-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.recent-card { padding: .7rem; }
.recent-card img { width: 100%; height: 170px; object-fit: cover; border-radius: .8rem; display: block; }
.recent-card h3 { margin: .75rem 0 .3rem; }
.recent-card.hidden { display: none; }
.recent-card a { color: #f00672; text-decoration: none; font-weight: 700; }
.recent-card a:hover { text-decoration: underline; }
.lightbox-trigger { cursor: zoom-in; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 120; padding: 1rem;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(980px,92vw); max-height: 86vh; border-radius: .7rem; border: 2px solid rgba(255,255,255,.16); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(10,10,10,.5); color: #fff; font-size: 1.45rem; cursor: pointer;
}

footer { border-top: 1px solid var(--border); text-align: center; padding: 2rem 5vw; color: var(--muted); }


@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(6, 1fr); }
  .work-card--xl, .work-card--lg, .work-card--md, .work-card--sm { grid-column: span 3; min-height: auto; }
  .work-card--full { grid-column: 1 / -1; min-height: auto; }
}

@media (max-width: 900px) {
  .hero-banner { height: 210px; }
  .profile-avatar-wrap { width: 106px; height: 106px; }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; left: 5vw; right: 5vw; top: 76px; display: grid; background: var(--surface);
    border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; max-height: 0;
    opacity: 0; pointer-events: none; transform: translateY(-10px);
    transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
  }
  .primary-nav a { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
  .primary-nav a:last-child { border-bottom: 0; }
  body.menu-open .primary-nav { max-height: 320px; opacity: 1; transform: translateY(0); pointer-events: auto; }

  .hero-top { padding-bottom: 3rem; }
  .hero-banner { height: 180px; }
  .profile-avatar-wrap { width: 92px; height: 92px; left: .9rem; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card--xl, .work-card--lg, .work-card--md, .work-card--sm, .work-card--full { grid-column: auto; min-height: auto; }
}


.info-grid .fa-linkedin, .contact-links .fa-linkedin { color: #0a66c2; }
