/* =========================
   Premium Portfolio — CSS
   ========================= */

/* Base reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: 10px; left: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.9);
  color: #111;
  transform: translateY(-150%);
  transition: transform .2s ease;
  z-index: 9999;
}
.skip-link:focus { transform: translateY(0); }

/* Theme tokens */
:root {
  --bg0: #0b1220;
  --bg1: #070b14;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --stroke: rgba(255,255,255,0.10);
  --stroke2: rgba(255,255,255,0.16);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --muted2: rgba(255,255,255,0.56);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --shadow2: 0 12px 30px rgba(0,0,0,.22);
  --radius: 18px;
  --radius2: 26px;

  --accentA: #7c3aed; /* violet */
  --accentB: #22d3ee; /* cyan */
  --accentC: #34d399; /* green-ish */
  --warn: #fbbf24;

  --container: 1120px;
  --padX: 20px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

:root[data-theme="light"] {
  --bg0: #f7f8fb;
  --bg1: #ffffff;
  --card: rgba(9, 12, 20, 0.04);
  --card2: rgba(9, 12, 20, 0.06);
  --stroke: rgba(9, 12, 20, 0.08);
  --stroke2: rgba(9, 12, 20, 0.12);
  --text: rgba(9, 12, 20, 0.92);
  --muted: rgba(9, 12, 20, 0.70);
  --muted2: rgba(9, 12, 20, 0.55);
  --shadow: 0 22px 60px rgba(9, 12, 20, .14);
  --shadow2: 0 12px 30px rgba(9, 12, 20, .10);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(34,211,238,.18), transparent 55%),
              radial-gradient(900px 600px at 90% 0%, rgba(124,58,237,.16), transparent 50%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height: 100svh;
}

/* Background decoration */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .08;
  transform: translateZ(0);
}
:root[data-theme="light"] .bg__grid { opacity: .06; }

.bg__glow {
  position: absolute;
  width: 520px; height: 520px;
  filter: blur(44px);
  opacity: .55;
}
.bg__glow--a {
  left: -140px; top: -160px;
  background: radial-gradient(circle at 40% 40%, rgba(34,211,238,.55), transparent 60%);
}
.bg__glow--b {
  right: -180px; top: -120px;
  background: radial-gradient(circle at 50% 50%, rgba(124,58,237,.5), transparent 62%);
}

.bg__noise {
  position: absolute; inset: 0;
  background-image: url("./assets/noise.png");
  opacity: .06;
  mix-blend-mode: overlay;
}
:root[data-theme="light"] .bg__noise { opacity: .04; }

/* Layout */
.container {
  width: min(var(--container), calc(100% - (var(--padX) * 2)));
  margin: 0 auto;
}

/* Typography */
.h1 { font-size: clamp(30px, 3.5vw, 46px); line-height: 1.08; margin: 14px 0 12px; letter-spacing: -0.02em; }
.h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
.h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.h4 { font-size: 15px; margin: 0 0 6px; color: var(--text); }
.lead { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 16px; }
.muted { color: var(--muted); }
code { background: var(--card2); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--stroke); }

.gradText {
  background: linear-gradient(90deg, var(--accentB), var(--accentA));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(0,0,0,.38), rgba(0,0,0,.12));
  border-bottom: 1px solid var(--stroke);
}
:root[data-theme="light"] .header {
  background: linear-gradient(180deg, rgba(247,248,251,.90), rgba(247,248,251,.72));
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.brand { display: inline-flex; gap: 10px; align-items: center; }
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34,211,238,.20), rgba(124,58,237,.22));
  border: 1px solid var(--stroke);
  display: grid; place-items: center;
  font-weight: 800;
}
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-weight: 750; letter-spacing: -0.01em; }
.brand__role { font-size: 12px; color: var(--muted2); margin-top: 2px; }

/* Nav */
.nav { justify-self: center; }
.nav__menu {
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav__link {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.nav__link:hover {
  color: var(--text);
  background: var(--card);
  border-color: var(--stroke);
}
.nav__link.is-active {
  color: var(--text);
  background: var(--card2);
  border-color: var(--stroke2);
}

.nav__toggle {
  display: none;
  border: 1px solid var(--stroke);
  background: var(--card);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}
.nav__toggleLines {
  display: block;
  width: 22px; height: 14px;
  position: relative;
}
.nav__toggleLines::before,
.nav__toggleLines::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}
.nav__toggleLines::before { top: 2px; }
.nav__toggleLines::after { bottom: 2px; opacity: .8; }

/* Header actions */
.header__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow2);
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--stroke2); background: var(--card2); }
.btn:active { transform: translateY(0px); }

.btn--primary {
  border: 1px solid rgba(34,211,238,.25);
  background: linear-gradient(135deg, rgba(34,211,238,.20), rgba(124,58,237,.18));
}
.btn--ghost {
  background: transparent;
}
.btn--sm { padding: 9px 12px; font-size: 13px; border-radius: 12px; }
.btn--block { width: 100%; }

/* Theme button */
.themeBtn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--stroke);
  background: var(--card);
  border-radius: 14px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--text);
}
.themeBtn__icon {
  width: 14px; height: 14px; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--accentB), var(--accentA));
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}
.themeBtn__text { font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding: 68px 0; }
.section--major { padding-top: 78px; }
.section__head {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

/* Cards */
.card {
  background: linear-gradient(180deg, var(--card), transparent 160%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  padding: 18px;
}
.stack { display: grid; gap: 16px; }

/* Hero */
.hero { padding: 52px 0 32px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 20px;
  align-items: start;
}
.badgeRow { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
}
.badge--soft { background: transparent; }
.badge--strong {
  background: linear-gradient(135deg, rgba(52,211,153,.14), rgba(34,211,238,.12));
  border-color: rgba(52,211,153,.22);
  color: var(--text);
}

.quickFacts { margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.quickFacts__item { list-style: none; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accentB), var(--accentA)); }

.ctaRow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.socialRow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.chip:hover { transform: translateY(-1px); color: var(--text); border-color: var(--stroke2); background: var(--card2); }

.hero__card { position: sticky; top: 86px; }
.profileCard { display: grid; gap: 14px; }
.profileCard__top { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 52px; height: 52px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(124,58,237,.16));
  display: grid; place-items: center;
  font-weight: 850;
}
.profileCard__name { margin: 0; font-weight: 800; }
.profileCard__title { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.profileCard__stats {
  display: grid;
  gap: 10px;
}
.stat {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
}
.stat__k { margin: 0; font-size: 12px; color: var(--muted2); }
.stat__v { margin: 0; font-size: 13px; color: var(--text); }

.profileCard__note {
  border-top: 1px dashed var(--stroke);
  padding-top: 12px;
}
.profileCard__actions { display: grid; gap: 10px; }

/* Scroll hint */
.hero__scrollHint {
  display: flex; gap: 8px; align-items: center;
  justify-content: center;
  margin-top: 26px;
}
.mouse {
  width: 22px; height: 34px;
  border: 1px solid var(--stroke2);
  border-radius: 999px;
  position: relative;
  background: var(--card);
}
.mouse::after {
  content: "";
  position: absolute;
  width: 4px; height: 6px;
  left: 50%; top: 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--text);
  opacity: .8;
  animation: scrollDot 1.3s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translate(-50%, 0); opacity: .85; }
  70% { transform: translate(-50%, 10px); opacity: .20; }
  100% { transform: translate(-50%, 0); opacity: .85; }
}

/* Grids */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Lists & pills */
.list { margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.list li { list-style: none; display: flex; gap: 10px; color: var(--muted); }
.check { color: var(--accentC); font-weight: 900; }

.pillRow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
}

/* Timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, rgba(34,211,238,.55), rgba(124,58,237,.55));
  opacity: .75;
  border-radius: 999px;
}
.timelineItem { position: relative; }
.timelineItem__dot {
  position: absolute;
  left: -2px; top: 18px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accentB), var(--accentA));
  box-shadow: 0 0 0 4px rgba(255,255,255,.05);
}
.timelineItem__content { padding: 18px; }
.timelineItem__top {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Tags */
.tagRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
}

/* Experience */
.xpCard {
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  background: linear-gradient(180deg, var(--card2), transparent 170%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.xpCard__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--stroke);
}
.xpCard__company { margin: 0; color: var(--muted2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.xpCard__meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.xpCard__right { display: grid; align-content: start; }

.xpCard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
}
.xpCard__block {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--card);
}
.xpCard__footer {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--stroke);
}

/* Filters + Projects */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.filterBtn {
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.filterBtn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--stroke2); background: var(--card2); }
.filterBtn.is-active {
  color: var(--text);
  border-color: rgba(34,211,238,.28);
  background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(124,58,237,.14));
}

.projectsGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.projCard {
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  background: linear-gradient(180deg, var(--card), transparent 160%);
  box-shadow: var(--shadow2);
  padding: 16px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}
.projCard:hover { transform: translateY(-2px); border-color: var(--stroke2); background: linear-gradient(180deg, var(--card2), transparent 170%); }
.projCard__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.projPill {
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(52,211,153,.14), rgba(34,211,238,.12));
  border: 1px solid rgba(52,211,153,.22);
  font-size: 12px;
  color: var(--text);
}
.projMeta { font-size: 12px; color: var(--muted2); }
.projCard.is-hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  position: absolute;
}

/* CV */
.cvCard {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: start;
}
.cvCard__side {
  border-left: 1px solid var(--stroke);
  padding-left: 16px;
}
.miniInfo { margin-bottom: 12px; }
.miniInfo__k { margin: 0; font-size: 12px; color: var(--muted2); }
.miniInfo__v { margin: 6px 0 0; color: var(--text); }

/* Contact */
.contactGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contactList { display: grid; gap: 10px; margin-top: 12px; }
.contactItem {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--card);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.contactItem:hover { transform: translateY(-1px); border-color: var(--stroke2); background: var(--card2); }
.contactItem--static:hover { transform: none; }
.contactItem__k { color: var(--muted2); font-size: 12px; }
.contactItem__v { color: var(--text); font-size: 13px; }
.note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--stroke); }

/* Footer */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 22px 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.20));
}
:root[data-theme="light"] .footer {
  background: linear-gradient(180deg, transparent, rgba(9,12,20,.03));
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer__links { display: flex; gap: 12px; }
.footer__links a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.footer__links a:hover { color: var(--text); background: var(--card); border-color: var(--stroke); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .header__inner { grid-template-columns: 1fr auto; }
  .nav { justify-self: end; }
  .header__actions { display: none; }

  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    right: var(--padX);
    top: 62px;
    width: min(320px, calc(100% - (var(--padX) * 2)));
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius2);
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--stroke2);
    box-shadow: var(--shadow);
  }
  .nav__menu.is-open { display: flex; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__card { position: relative; top: auto; }
  .grid3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .projectsGrid { grid-template-columns: 1fr; }
  .xpCard__grid { grid-template-columns: 1fr; }
  .cvCard { grid-template-columns: 1fr; }
  .cvCard__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--stroke); padding-top: 14px; }
  .contactGrid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; }
  .mouse::after { animation: none; }
  .btn, .chip, .projCard, .filterBtn, .contactItem { transition: none; }
}
