/* ══════════════════════════════════════════════════════
   ALEX DEVRON PORTFOLIO — MAIN CSS
   Direction : Luxury Editorial · Warm Ivory + Slate + Gold
   Fonts: Cormorant Garamond (display) · Syne (UI) · JetBrains Mono
   ══════════════════════════════════════════════════════ */

/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ─── TOKENS ─── */
:root {
  /* Palette */
  --ivory:        #FAF8F3;
  --ivory-2:      #F2EEE5;
  --ivory-3:      #E8E2D4;
  --cream:        #F5F1E8;
  --slate:        #1C2333;
  --slate-2:      #2D3448;
  --slate-3:      #3D4560;
  --slate-light:  #8892AA;
  --slate-muted:  #B0BAD0;
  --gold:         #C9A84C;
  --gold-light:   #E4C76B;
  --gold-dark:    #A0813A;
  --rust:         #CE5A3A;
  --sage:         #5C8A6E;
  --sky:          #4A82C4;

  /* Semantic */
  --bg:           var(--ivory);
  --bg-alt:       var(--cream);
  --bg-card:      #ffffff;
  --text:         var(--slate);
  --text-2:       var(--slate-2);
  --text-muted:   var(--slate-light);
  --text-faint:   var(--slate-muted);
  --accent:       var(--gold);
  --border:       rgba(28, 35, 51, 0.08);
  --border-md:    rgba(28, 35, 51, 0.14);
  --shadow-sm:    0 1px 3px rgba(28,35,51,0.06), 0 1px 2px rgba(28,35,51,0.04);
  --shadow-md:    0 4px 16px rgba(28,35,51,0.08), 0 1px 4px rgba(28,35,51,0.05);
  --shadow-lg:    0 12px 40px rgba(28,35,51,0.12), 0 4px 12px rgba(28,35,51,0.07);
  --shadow-xl:    0 24px 64px rgba(28,35,51,0.14), 0 8px 20px rgba(28,35,51,0.08);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Syne', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad:  120px;
  --gap:          24px;
  --radius:       12px;
  --radius-lg:    20px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast:     0.18s;
  --t-med:      0.35s;
  --t-slow:     0.6s;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; font-size: 16px; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ─── SELECTION ─── */
::selection { background: rgba(201,168,76,0.25); color: var(--slate); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ivory-2); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ════════════════════════════════════
   CURSOR
════════════════════════════════════ */
.cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000; mix-blend-mode: normal; }
.cursor__dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width .2s var(--ease-out), height .2s var(--ease-out), background .2s;
}
.cursor__outline {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(201,168,76,0.5);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease-out), height .35s var(--ease-out), border-color .25s, transform .12s;
}
.cursor__label {
  position: absolute;
  top: 24px; left: 24px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--slate);
  background: var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity .2s;
}
body.cursor--active .cursor__dot { width: 10px; height: 10px; background: var(--gold-dark); }
body.cursor--active .cursor__outline { width: 56px; height: 56px; border-color: var(--gold); }
body.cursor--label .cursor__label { opacity: 1; }

/* ════════════════════════════════════
   PRELOADER
════════════════════════════════════ */
.preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--slate);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  transition: opacity .7s var(--ease-out), visibility .7s;
}
.preloader.out { opacity: 0; visibility: hidden; }
.preloader__inner { position: relative; width: 120px; height: 120px; }
.preloader__ring {
  width: 120px; height: 120px;
  transform: rotate(-90deg);
}
.preloader__track {
  fill: none; stroke: rgba(201,168,76,.15); stroke-width: 3;
}
.preloader__fill {
  fill: none; stroke: var(--gold); stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset .15s linear;
}
.preloader__pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 300;
  color: var(--gold);
}
.preloader__name {
  font-family: var(--font-ui);
  font-size: .75rem; font-weight: 700;
  letter-spacing: .35em;
  color: rgba(201,168,76,.6);
  text-transform: uppercase;
}

/* ════════════════════════════════════
   BUTTONS
════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; padding: 13px 28px;
  border-radius: 6px;
  transition: all var(--t-med) var(--ease-out);
  white-space: nowrap; cursor: pointer;
}

.btn--gold {
  background: var(--gold); color: #fff;
  box-shadow: 0 4px 20px rgba(201,168,76,.35);
}
.btn--gold:hover {
  background: var(--gold-dark);
  box-shadow: 0 6px 28px rgba(201,168,76,.45);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent; color: var(--slate);
  border: 1.5px solid var(--border-md);
}
.btn--ghost:hover {
  border-color: var(--slate);
  background: rgba(28,35,51,.04);
}

.btn--outline {
  background: transparent; color: var(--slate);
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold); color: white;
  box-shadow: 0 4px 20px rgba(201,168,76,.3);
  transform: translateY(-1px);
}

.btn--outline-dark {
  background: transparent; color: var(--slate);
  border: 1.5px solid var(--border-md);
  font-size: .78rem; padding: 10px 22px;
}
.btn--outline-dark:hover {
  border-color: var(--gold); color: var(--gold);
}

.btn--full { width: 100%; justify-content: center; }

/* ════════════════════════════════════
   HEADER / NAV
════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .4s, box-shadow .4s, padding .4s;
}
.site-header.scrolled {
  background: rgba(250,248,243,.94);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}
.header__container {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 22px 48px;
  transition: padding .4s;
}
.site-header.scrolled .header__container { padding: 14px 48px; }

.header__logo {
  font-family: var(--font-display); font-size: 1.35rem;
  font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; flex-shrink: 0;
}
.logo__first { color: var(--slate); }
.logo__last  { color: var(--slate); }
.logo__dot   { color: var(--gold); }

.header__nav {
  display: flex; align-items: center; gap: 6px;
  margin: 0 auto;
}
.nav__link {
  font-family: var(--font-ui); font-size: .8rem; font-weight: 500;
  color: var(--text-muted); padding: 7px 14px;
  border-radius: 6px;
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.nav__link::before {
  content: attr(data-index);
  font-size: .58rem; font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold);
  position: absolute;
  top: 2px; left: 10px;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.nav__link:hover, .nav__link.active {
  color: var(--slate); background: var(--ivory-2);
}
.nav__link:hover::before, .nav__link.active::before { opacity: 1; }

.header__actions {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}

.avail-badge {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  color: var(--sage); letter-spacing: .04em;
  background: rgba(92,138,110,.1);
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid rgba(92,138,110,.25);
}
.avail-badge__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(92,138,110,.2);
  animation: pulseDot 2.5s ease infinite;
}

.burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--slate); transition: all .3s; border-radius: 2px; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.burger.open span:nth-child(2) { opacity: 0; }

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 48px 60px;
  position: relative; overflow: hidden;
  background: var(--ivory);
}

.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .55;
}
.hero__mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 70% 50%, rgba(201,168,76,.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(76,130,196,.05) 0%, transparent 60%);
}

.hero__container {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}

.hero__eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
}
.eyebrow__line {
  flex: 0 0 40px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  font-weight: 300; line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 28px;
}
.hero__title-line { display: block; }
.hero__title-line--em {
  font-style: italic; font-weight: 600;
  color: var(--gold);
}

.hero__desc {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 40px; max-width: 480px;
}

.hero__cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Hero card */
.hero__right { display: flex; flex-direction: column; gap: 24px; }

.hero__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero__card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: var(--ivory-2);
  border-bottom: 1px solid var(--border);
}
.card-dots { display: flex; gap: 6px; }
.cd { width: 10px; height: 10px; border-radius: 50%; }
.cd--r { background: #FF5F57; }
.cd--y { background: #FEBC2E; }
.cd--g { background: #28C840; }
.card-title {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--text-muted); margin-left: 6px;
}

.hero__card-body { padding: 20px 24px; }

.json-preview { font-family: var(--font-mono); font-size: .8rem; line-height: 1.75; color: var(--text); }
.j-key  { color: var(--gold-dark); }
.j-str  { color: var(--rust); }
.j-num  { color: var(--sky); }
.j-bool { color: var(--sage); font-weight: 500; }

.hero__card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: var(--ivory-2); border-top: 1px solid var(--border);
}
.cf-lang {
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--text-faint); letter-spacing: .1em;
}
.cf-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--sage); font-weight: 500;
}
.cf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); animation: pulseDot 2s infinite; }

/* Hero stats */
.hero__stats {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  box-shadow: var(--shadow-md);
}
.hstat { flex: 1; text-align: center; }
.hstat__num {
  font-family: var(--font-display); font-size: 2.4rem;
  font-weight: 600; line-height: 1;
  color: var(--slate);
}
.hstat__label {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 4px;
}
.hstat__sep {
  width: 1px; height: 36px; background: var(--border-md); flex-shrink: 0;
}

/* Hero scroll */
.hero__scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted);
  animation: scrollBounce 2.5s ease infinite;
}

/* ════════════════════════════════════
   TICKER
════════════════════════════════════ */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--ivory-2);
  overflow: hidden; padding: 14px 0;
}
.ticker__track {
  display: flex; align-items: center; gap: 0;
  white-space: nowrap;
  animation: tickerMove 28s linear infinite;
}
.ticker__item {
  display: inline-flex; align-items: center; gap: 28px;
  padding: 0 28px;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted);
}
.ticker__item .sep {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); opacity: .5;
}

/* ════════════════════════════════════
   SECTION COMMON
════════════════════════════════════ */
.section { padding: var(--section-pad) 0; }
.section__container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

.section__label {
  font-family: var(--font-ui); font-size: .68rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 300; line-height: 1.1;
  color: var(--slate); margin-bottom: 60px;
}
.section__title em {
  font-style: italic; font-weight: 600; color: var(--gold);
}

/* ════════════════════════════════════
   ABOUT
════════════════════════════════════ */
.about { background: var(--bg-alt); }

.about__grid {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 80px; align-items: start;
}

.about__photo {
  width: 100%; aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ivory-3) 0%, var(--ivory-2) 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.about__photo::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,.08) 0%, transparent 60%);
}
.about__initials {
  font-family: var(--font-display); font-size: 7rem;
  font-weight: 300; letter-spacing: -.02em;
  color: var(--gold);
  position: relative; z-index: 1;
  text-shadow: 0 4px 24px rgba(28,35,51,.1);
}
.about__photo-badge {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(250,248,243,.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 16px;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  color: var(--sage); letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
}
.about__photo-badge svg { color: var(--sage); flex-shrink: 0; }

.about__meta-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

.meta-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.meta-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.meta-card__icon { font-size: 1.2rem; }
.meta-card__title {
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  color: var(--slate);
}
.meta-card__sub { font-size: .74rem; color: var(--text-muted); margin-top: 1px; }

.about__content .section__title { margin-bottom: 28px; }
.about__text p {
  color: var(--text-muted); line-height: 1.8;
  margin-bottom: 18px; font-size: .95rem;
}

.about__pillars {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 40px;
}
.pillar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.pillar__num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 300;
  color: var(--gold); opacity: .4; line-height: 1; margin-bottom: 4px;
}
.pillar__title {
  font-family: var(--font-ui); font-size: .82rem; font-weight: 700;
  color: var(--slate); margin-bottom: 4px;
}
.pillar__techs { font-size: .75rem; color: var(--text-muted); }

/* ════════════════════════════════════
   SKILLS
════════════════════════════════════ */
.skills__layout {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 64px; align-items: start; margin-bottom: 60px;
}

.skills__visual {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.skills__radar {
  width: 100%; border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); padding: 16px;
}
#radarCanvas { display: block; width: 100%; height: auto; }

.skills__legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.legend-item {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: .7rem; font-weight: 500;
  color: var(--text-muted);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.skills__cats { display: flex; flex-direction: column; gap: 20px; }

.skill-cat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-med);
}
.skill-cat:hover { box-shadow: var(--shadow-md); }

.skill-cat__header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px;
  background: var(--ivory-2); border-bottom: 1px solid var(--border);
}
.skill-cat__icon { font-size: 1rem; }
.skill-cat__title {
  font-family: var(--font-ui); font-size: .82rem; font-weight: 700;
  color: var(--slate); flex: 1;
}
.skill-cat__avg {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: var(--gold);
}
.skill-cat__avg small { font-size: .75rem; font-weight: 300; }

.skill-items { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.skill-item { display: grid; grid-template-columns: 150px 1fr 32px; align-items: center; gap: 12px; }
.skill-item__name { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.skill-item__bar {
  height: 5px; background: var(--ivory-3); border-radius: 3px; overflow: hidden;
}
.skill-item__fill {
  height: 100%; width: 0; border-radius: 3px;
  background: var(--color, var(--gold));
  transition: width 1.4s var(--ease-out);
  box-shadow: 0 0 8px rgba(0,0,0,.1);
}
.skill-item__pct {
  font-family: var(--font-mono); font-size: .7rem;
  color: var(--text-muted); text-align: right;
}

/* Tech cloud */
.tech-cloud {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; padding: 40px 0 0;
}
.tech-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: .74rem; font-weight: 600;
  padding: 7px 14px; border-radius: 40px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-med) var(--ease-out);
  cursor: default;
}
.tech-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  color: var(--gold);
}
.tech-chip__dot { width: 6px; height: 6px; border-radius: 50%; }

/* ════════════════════════════════════
   PROJECTS
════════════════════════════════════ */
.projects__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 0;
}
.projects__head .section__title { margin-bottom: 0; }

.projects__filters {
  display: flex; gap: 6px; padding-bottom: 8px;
}
.filter {
  font-family: var(--font-ui); font-size: .74rem; font-weight: 600;
  color: var(--text-muted); padding: 7px 16px;
  border-radius: 40px; border: 1.5px solid var(--border-md);
  background: transparent;
  transition: all var(--t-fast);
}
.filter:hover { border-color: var(--gold); color: var(--gold); }
.filter.active { background: var(--gold); color: white; border-color: var(--gold); box-shadow: 0 4px 16px rgba(201,168,76,.3); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: var(--gap);
  margin-top: 40px;
}

/* Project card base */
.proj {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-slow) var(--ease-out),
              box-shadow var(--t-slow) var(--ease-out),
              border-color var(--t-med);
  display: flex; flex-direction: column;
}
.proj:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(201,168,76,.3);
}

.proj--featured {
  grid-column: span 2; flex-direction: row;
}
.proj--featured .proj__media { flex: 0 0 55%; }
.proj--wide { grid-column: span 2; flex-direction: row; }
.proj--wide .proj__media { flex: 0 0 50%; }

/* Mockups */
.proj__media { background: var(--ivory-2); border-radius: 0; overflow: hidden; }
.proj--card .proj__media { border-bottom: 1px solid var(--border); }
.proj--featured .proj__media { border-right: 1px solid var(--border); }
.proj--wide .proj__media { border-right: 1px solid var(--border); }

.proj__mockup { height: 260px; overflow: hidden; }
.proj--featured .proj__mockup, .proj--wide .proj__mockup { height: 100%; min-height: 280px; }

/* Browser mockup */
.mockup--browser { display: flex; flex-direction: column; }
.mbr__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #F0EDE4; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mbr__dots { display: flex; gap: 5px; }
.mbr__dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mbr__dots i:nth-child(1) { background: #FF5F57; }
.mbr__dots i:nth-child(2) { background: #FEBC2E; }
.mbr__dots i:nth-child(3) { background: #28C840; }
.mbr__url {
  font-family: var(--font-mono); font-size: .65rem;
  color: var(--text-muted); background: rgba(255,255,255,.6);
  padding: 3px 10px; border-radius: 4px; flex: 1;
}
.mbr__btns { display: flex; gap: 4px; }
.mbr__btns i { width: 14px; height: 14px; background: rgba(0,0,0,.06); border-radius: 3px; display: block; }
.mbr__screen { flex: 1; overflow: hidden; }

/* Stream UI */
.stream-ui { display: flex; height: 100%; background: #12141A; }
.sui__sidebar { width: 48px; background: #0D0F14; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; }
.sui__logo { width: 28px; height: 28px; background: var(--gold); border-radius: 6px; opacity: .8; margin-bottom: 8px; }
.sui__nav-item { width: 28px; height: 28px; background: rgba(255,255,255,.06); border-radius: 6px; }
.sui__nav-item--active { background: rgba(201,168,76,.25); border: 1px solid rgba(201,168,76,.4); }
.sui__main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.sui__hero-banner { height: 80px; background: linear-gradient(135deg, #1C2333, #2D3448); border-radius: 6px; }
.sui__row { display: flex; gap: 8px; }
.sui__card { flex: 1; height: 60px; background: rgba(255,255,255,.04); border-radius: 4px; border: 1px solid rgba(255,255,255,.05); }
.sui__card--tall { height: 80px; }

/* Terminal mockup */
.mockup--terminal { display: flex; flex-direction: column; background: #1C2333; }
.mtr__bar { display: flex; align-items: center; gap: 5px; padding: 10px 14px; background: #161E2E; border-bottom: 1px solid rgba(255,255,255,.06); }
.mtr__bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mtr__bar i.r { background: #FF5F57; }
.mtr__bar i.y { background: #FEBC2E; }
.mtr__bar i.g { background: #28C840; }
.mtr__bar span { font-family: var(--font-mono); font-size: .65rem; color: rgba(255,255,255,.3); margin-left: 8px; }
.mtr__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mtr__line { font-family: var(--font-mono); font-size: .72rem; color: rgba(255,255,255,.6); line-height: 1.5; }
.mtr__line--out { padding-left: 12px; }
.mtr__prompt { color: #28C840; margin-right: 6px; }
.mtr__ok { color: #28C840; margin-right: 4px; }
.mtr__line--gold { color: var(--gold-light); }

/* Chart mockup */
.mockup--chart { background: var(--bg-card); display: flex; align-items: stretch; }
.chart-ui { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
.chart-ui__header { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-ui); font-size: .75rem; font-weight: 600; color: var(--slate); }
.chart-badge { font-size: .65rem; background: rgba(92,138,110,.12); color: var(--sage); padding: 3px 8px; border-radius: 10px; border: 1px solid rgba(92,138,110,.25); }
.chart-ui__bars { display: flex; align-items: flex-end; gap: 6px; flex: 1; }
.cb { flex: 1; height: var(--h); background: linear-gradient(to top, var(--ivory-3), var(--ivory-2)); border-radius: 3px 3px 0 0; transition: height .5s var(--ease-out); }
.cb--accent { background: linear-gradient(to top, var(--gold-dark), var(--gold-light)); }
.chart-ui__footer { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .68rem; color: var(--text-muted); }
.chart-green { color: var(--sage); font-weight: 600; }

/* Code mockup */
.mockup--code { background: #1C2333; padding: 20px; }
.mockup--code code { font-family: var(--font-mono); font-size: .74rem; line-height: 1.8; }
.ck { color: #C792EA; }
.cf { color: #82AAFF; }
.ct { color: #FFCB6B; }
.cm { color: #637777; font-style: italic; }

/* Ruby mockup */
.mockup--ruby { background: #1A1A2E; padding: 20px; }
.mockup--ruby code { font-family: var(--font-mono); font-size: .74rem; line-height: 1.8; }
.cr { color: #E9573F; }
.cc { color: #F5A623; }

/* Project info */
.proj__info { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.proj__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.proj__num {
  font-family: var(--font-display); font-size: 2rem;
  font-weight: 300; color: var(--ivory-3); line-height: 1;
}
.proj__cat-tag {
  font-family: var(--font-ui); font-size: .65rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); padding: 4px 10px;
  background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.25);
  border-radius: 4px;
}
.proj__title {
  font-family: var(--font-display); font-size: 1.55rem;
  font-weight: 600; color: var(--slate);
  margin-bottom: 10px; line-height: 1.2;
}
.proj__desc { font-size: .83rem; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 16px; }
.proj__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.proj__stack span {
  font-family: var(--font-mono); font-size: .66rem;
  color: var(--slate-2); padding: 4px 9px;
  background: var(--ivory-2); border: 1px solid var(--border-md);
  border-radius: 4px; letter-spacing: .04em;
}
.proj__links { display: flex; gap: 16px; align-items: center; }
.proj__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.proj__link--primary { color: var(--gold); }
.proj__link:hover { color: var(--slate); }
.proj__link--primary:hover { color: var(--gold-dark); }

.projects__more { display: flex; justify-content: center; margin-top: 48px; }

/* ════════════════════════════════════
   JOURNEY / TIMELINE
════════════════════════════════════ */
.journey { background: var(--bg-alt); }

.timeline { position: relative; max-width: 880px; margin: 0 auto; }
.timeline__line {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--border-md);
  transform: translateX(-50%);
}
.timeline__line::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 30%;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.timeline__item {
  position: relative; width: 50%; padding-bottom: 56px;
  display: flex;
}
.timeline__item[data-side="right"] { left: 50%; padding-left: 48px; }
.timeline__item[data-side="left"] { padding-right: 48px; justify-content: flex-end; }

.timeline__dot {
  position: absolute; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,.15), var(--shadow-sm);
  z-index: 2;
}
.timeline__item[data-side="right"] .timeline__dot { left: -7px; }
.timeline__item[data-side="left"] .timeline__dot { right: -7px; }

.timeline__content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); max-width: 380px;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.timeline__content:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.tl__date {
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--gold); font-weight: 500; margin-bottom: 6px;
  letter-spacing: .06em;
}
.tl__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--slate); margin-bottom: 3px; }
.tl__company { font-family: var(--font-ui); font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; }
.tl__desc { font-size: .82rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.tl__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl__tags span {
  font-family: var(--font-mono); font-size: .64rem;
  color: var(--slate-2); padding: 3px 8px;
  background: var(--ivory-2); border: 1px solid var(--border);
  border-radius: 4px;
}

/* ════════════════════════════════════
   ACTIVITY
════════════════════════════════════ */
.activity__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 0;
}
.activity__head .section__title { margin-bottom: 0; }
.activity__live {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  color: var(--sage); padding-bottom: 8px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); animation: pulseDot 2s infinite; }

.activity__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--gap); margin-top: 40px;
}
.activity__loading {
  grid-column: span 3; text-align: center;
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--text-muted); padding: 40px;
}

.activity-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-med) var(--ease-out);
}
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(201,168,76,.3); }
.ac__type {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.ac__project {
  font-family: var(--font-ui); font-size: .88rem; font-weight: 700;
  color: var(--slate); margin-bottom: 6px;
}
.ac__message { font-size: .78rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 14px; }
.ac__footer { display: flex; align-items: center; justify-content: space-between; }
.ac__lang {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: .68rem; color: var(--text-muted);
}
.ac__lang-dot { width: 8px; height: 8px; border-radius: 50%; }
.ac__time {
  font-family: var(--font-mono); font-size: .65rem;
  color: var(--text-faint);
}

/* ════════════════════════════════════
   CONTACT
════════════════════════════════════ */
.contact { background: var(--bg-alt); }

.contact__grid {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 80px; align-items: start;
}

.contact__left .section__title { margin-bottom: 20px; }
.contact__intro { font-size: .92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 36px; }

.contact__channels { display: flex; flex-direction: column; gap: 12px; }
.contact-ch {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-med) var(--ease-out);
}
.contact-ch:hover {
  transform: translateX(6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.contact-ch__icon {
  width: 40px; height: 40px;
  background: var(--ivory-2); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--slate);
}
.contact-ch:hover .contact-ch__icon { background: rgba(201,168,76,.1); border-color: rgba(201,168,76,.3); color: var(--gold); }
.contact-ch__label { font-family: var(--font-ui); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.contact-ch__val { font-size: .84rem; color: var(--slate); font-weight: 500; margin-top: 1px; }
.contact-ch__arrow { margin-left: auto; color: var(--text-faint); flex-shrink: 0; transition: color var(--t-fast), transform var(--t-fast); }
.contact-ch:hover .contact-ch__arrow { color: var(--gold); transform: translateX(3px); }

/* Form */
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.cf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cf__group { display: flex; flex-direction: column; gap: 7px; }
.cf__label {
  font-family: var(--font-ui); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.cf__input {
  width: 100%; background: var(--ivory-2);
  border: 1.5px solid var(--border-md);
  border-radius: 8px; padding: 12px 16px;
  font-size: .9rem; color: var(--slate);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  appearance: none;
}
.cf__input:focus {
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 3px rgba(201,168,76,.12);
}
.cf__input::placeholder { color: var(--text-faint); }
.cf__select { cursor: pointer; }
.cf__select option { background: white; color: var(--slate); }
.cf__textarea { min-height: 120px; resize: vertical; }

.cf__footer { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.cf__privacy { font-size: .72rem; color: var(--text-faint); text-align: center; }

.cf__feedback {
  border-radius: 8px; padding: 12px 16px;
  font-family: var(--font-ui); font-size: .82rem;
  display: none;
}
.cf__feedback.success { display: block; background: rgba(92,138,110,.1); color: var(--sage); border: 1px solid rgba(92,138,110,.25); }
.cf__feedback.error   { display: block; background: rgba(206,90,58,.08); color: var(--rust); border: 1px solid rgba(206,90,58,.2); }

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--ivory-2);
  padding: 36px 0;
}
.sf__container {
  max-width: 1280px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; gap: 32px;
}
.sf__brand { flex: 1; }
.sf__name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--slate); }
.sf__tagline { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.sf__copy { font-family: var(--font-mono); font-size: .68rem; color: var(--text-faint); letter-spacing: .04em; }
.sf__top-btn {
  width: 40px; height: 40px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); box-shadow: var(--shadow-sm);
  transition: all var(--t-fast); flex-shrink: 0;
}
.sf__top-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1100px) {
  .skills__layout { grid-template-columns: 1fr; }
  .skills__visual { position: static; }
  #radarCanvas { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 900px) {
  :root { --section-pad: 80px; }
  .hero__container { grid-template-columns: 1fr; gap: 48px; }
  .hero__right { max-width: 520px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .projects__grid { grid-template-columns: 1fr 1fr; }
  .proj--featured, .proj--wide { grid-column: span 2; flex-direction: column; }
  .proj--featured .proj__media, .proj--wide .proj__media { flex: 0 0 auto; border-right: none; border-bottom: 1px solid var(--border); }
  .proj--featured .proj__mockup, .proj--wide .proj__mockup { height: 220px; min-height: 0; }
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .activity__grid { grid-template-columns: 1fr 1fr; }
  .timeline__line { left: 20px; }
  .timeline__item { width: 100%; padding-left: 56px; padding-right: 0; left: 0; justify-content: flex-start; }
  .timeline__item[data-side="left"] { padding-right: 0; justify-content: flex-start; }
  .timeline__item[data-side="right"] .timeline__dot,
  .timeline__item[data-side="left"] .timeline__dot { left: 14px; right: auto; }
  .timeline__content { max-width: 100%; }
}

@media (max-width: 640px) {
  .header__container { padding: 16px 24px; }
  .header__nav { display: none; }
  .header__actions .btn--outline-dark { display: none; }
  .burger { display: flex; }
  .hero { padding: 90px 24px 48px; }
  .section__container { padding: 0 24px; }
  .projects__grid { grid-template-columns: 1fr; }
  .proj--featured, .proj--wide { grid-column: span 1; }
  .projects__head { flex-direction: column; align-items: flex-start; }
  .hero__stats { flex-direction: column; gap: 16px; }
  .hstat__sep { width: 60px; height: 1px; }
  .about__pillars { grid-template-columns: 1fr; }
  .cf__row { grid-template-columns: 1fr; }
  .activity__grid { grid-template-columns: 1fr; }
  .sf__container { flex-direction: column; text-align: center; gap: 16px; }
  .projects__filters { flex-wrap: wrap; }
}