/* ═══════════════════════════════════════════════════════════════════
   style.css — Subhadeep Mandal Portfolio
   Cleaned · Deduplicated · Fixed
   Last updated: 29 Sep 2026
═══════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────
   CSS CUSTOM PROPERTIES (THEME TOKENS)
───────────────────────────────────────────── */
:root {
  --bg:      #F6F5F1;
  --bg-alt:  #EBE9E2;
  --ink:     #131217;
  --soft:    #68666e;
  --accent:  #FF4B2B;
  --accent2: #5B4CF0;
  --card:    #FFFFFF;
  --line:    rgba(19,18,23,.1);
}
:root[data-theme="dark"] {
  --bg:      #0E0D11;
  --bg-alt:  #18171D;
  --ink:     #F3F2F0;
  --soft:    #9C99A3;
  --accent:  #FF6B4D;
  --accent2: #8B7CFF;
  --card:    #18171D;
  --line:    rgba(255,255,255,.12);
}


/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100vw;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
  .hero-name .glitch { opacity: 1 !important; transform: none !important }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  transition: background .25s, color .25s;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: 'Titillium Web', sans-serif;
  margin: 0;
  line-height: 1.08;
  letter-spacing: -.01em;
}

a { color: inherit }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 clamp(20px,5vw,60px) }


/* ─────────────────────────────────────────────
   REVEAL ON SCROLL
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1);
}
.reveal.in  { opacity: 1; transform: none }
.reveal.l   { transform: translate(-60px,20px) }
.reveal.r   { transform: translate(60px,20px) }
.reveal.l.in,
.reveal.r.in { transform: none; margin: 50px }


/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
header.sc { border-color: var(--line) }

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px,5vw,60px);
  width: 100%;
  box-sizing: border-box;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--ink);
}
.brand-name {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(0.84rem,2.1vw,1rem);
  white-space: nowrap;
}

.links { display: flex; gap: 32px; flex-shrink: 0 }

.nav-right { display: flex; align-items: center; gap: 36px }

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

.logo {
  width: 50px; height: 50px;
  border-radius: 50%;
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: 'Titillium Web', sans-serif;
  text-decoration: none;
  font-size: clamp(0.714rem,1.785vw,0.85rem);
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
}
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50% }

.links a {
  text-decoration: none;
  color: var(--soft);
  font-weight: 500;
  font-size: clamp(0.781rem,1.953vw,0.93rem);
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.links a svg { width: 14px; height: 14px; flex-shrink: 0 }
.links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s cubic-bezier(.16,.8,.24,1);
}
.links a:hover { color: var(--ink) }
.links a:hover::after { transform: scaleX(1); transform-origin: left }

.tgl {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tgl svg { width: 16px; height: 16px }
.tgl .sun { display: none }
:root[data-theme="dark"] .tgl .moon { display: none }
:root[data-theme="dark"] .tgl .sun  { display: block }

.resume-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line-strong, var(--line));
  color: var(--ink);
  font-size: clamp(0.722rem,1.806vw,0.86rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: .2s;
}
.resume-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.resume-btn svg { width: 14px; height: 14px }

.burger { display: none }

@keyframes wave {
  0%,72%,100% { transform: rotate(0) }
  75% { transform: rotate(-12deg) }
  78% { transform: rotate(10deg) }
  81% { transform: rotate(-8deg) }
  84% { transform: rotate(6deg) }
  87% { transform: rotate(0) }
}

@media (max-width: 1300px) {
  .links { display: none }
  .brand { min-width: 0 }
  .brand-name { display: inline-block !important; visibility: visible; opacity: 1 }
  .brand .logo { animation: wave 3.4s ease-in-out infinite; cursor: pointer }
  .nav-right { gap: 12px }
}
@media (max-width: 700px)  { .brand-name { font-size: .82rem } .nav { gap: 10px } }
@media (max-width: 480px)  { .resume-btn span { display: none } .resume-btn { padding: 9px } }


/* ─────────────────────────────────────────────
   MOBILE DRAWER
───────────────────────────────────────────── */
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(78vw,320px);
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 120;
  transform: translateX(-100%);
  transition: transform .45s cubic-bezier(.16,.8,.24,1);
  box-shadow: 20px 0 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  padding: 26px 8px;
}
.drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .4;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, black 12%, black 88%, transparent),
    linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, black 12%, black 88%, transparent),
    linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-composite: intersect;
}
.drawer.open { transform: translateX(0) }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.drawer-name {
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(0.823rem,2.058vw,0.98rem);
  color: var(--ink);
  flex: 1;
}
.drawer-close {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.drawer nav { display: flex; flex-direction: column }
.drawer nav a {
  text-decoration: none;
  color: var(--ink);
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(1.092rem,2.73vw,1.3rem);
  padding: 14px 18px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .4s ease, transform .4s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.drawer nav a::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 8px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s cubic-bezier(.16,.8,.24,1);
}
.drawer nav a:hover::after { transform: scaleX(1); transform-origin: left }
.drawer nav a svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--accent) }

.drawer-foot {
  margin-top: auto;
  padding: 16px 18px 4px;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.622rem,1.554vw,0.74rem);
  color: var(--soft);
}

.drawer.open nav a                  { opacity: 1; transform: translateX(0) }
.drawer.open nav a:nth-child(1)     { transition-delay: .08s }
.drawer.open nav a:nth-child(2)     { transition-delay: .14s }
.drawer.open nav a:nth-child(3)     { transition-delay: .20s }
.drawer.open nav a:nth-child(4)     { transition-delay: .26s }
.drawer.open nav a:nth-child(5)     { transition-delay: .32s }
.drawer.open nav a:nth-child(6)     { transition-delay: .38s }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s cubic-bezier(.16,.8,.24,1);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto }


/* ─────────────────────────────────────────────
   SOCIALS RAIL (LEFT)
───────────────────────────────────────────── */
.rail {
  position: fixed;
  left: 26px; bottom: 0; top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-bottom: 26px;
  pointer-events: none;
}
.rail a        { pointer-events: auto; color: var(--soft); display: flex }
.rail a:hover  { color: var(--accent) }
.rail svg      { width: 16px; height: 16px }
.rail-line     { width: 1px; height: 80px; background: var(--line) }
.rail-label {
  writing-mode: vertical-rl;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.62rem,1.428vw,0.68rem);
  letter-spacing: .15em;
  color: var(--soft);
}
@media (max-width: 1000px) { .rail { display: none } }

/* RAIL RIGHT */
.rail-right {
  position: fixed;
  right: 26px; bottom: 0; top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-bottom: 110px;
  pointer-events: none;
}
.rail-right .rail-name {
  writing-mode: vertical-rl;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(0.655rem,1.638vw,0.78rem);
  letter-spacing: .15em;
  color: var(--soft);
}
@media (max-width: 1000px) { .rail-right { display: none } }


/* ─────────────────────────────────────────────
   GRID BACKGROUND
───────────────────────────────────────────── */
.grid-bg { position: relative }
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 20%, black 30%, transparent 85%);
}


/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  padding: 64px 0 60px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  grid-template-areas: "badge photo" "text photo";
  gap: 28px 5px;
  align-items: center;
}
.hero-badge  { grid-area: badge; margin-bottom: 0; justify-self: start; width: fit-content }
.hero-text   { grid-area: text; min-width: 0; position: relative; z-index: 3 }
.hero-photo  {
  grid-area: photo;
  position: relative;
  aspect-ratio: 3/2;
  width: 130%;
  max-width: none;
  justify-self: start;
  margin-left: -60px;
  margin-right: -60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 1;
}
.hero-photo .glow { display: none }
.hero-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse 96% 96% at 50% 50%, #000 74%, transparent 98%);
  mask-image:         radial-gradient(ellipse 96% 96% at 50% 50%, #000 74%, transparent 98%);
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(circle, rgb(3, 163, 255), transparent 65%);
  filter: blur(50px);
  z-index: 0;
}

/* Hero name */
.hero-name {
  font-family: 'Anton', sans-serif;
  font-size: clamp(3.6rem,11.5vw,8.3rem);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
  display: block;
  color: var(--ink);
  position: relative;
  margin-top: .3em;
  margin-bottom: .4em;
  white-space: nowrap;
  word-spacing: -.18em;
}
.hero-name-outline {
  position: absolute;
  left: .15em; top: .1em;
  font-family: 'Anton', sans-serif;
  font-size: clamp(3.6rem,11.5vw,8.3rem);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-strong, var(--line));
  opacity: .92;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  word-spacing: -.18em;
}

/* Glitch animation */
.hero-name .glitch {
  position: relative;
  z-index: 1;
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation:
    namein .7s cubic-bezier(.16,.8,.24,1) .15s forwards,
    glitchpulse 6s ease-in-out .9s infinite;
}
@keyframes namein { to { opacity: 1; transform: none } }
@keyframes glitchpulse {
  0%,100% { transform: translate(0,0);  text-shadow: none }
  82%      { transform: translate(0,0);  text-shadow: none }
  85%      { transform: translate(9px,6px);   text-shadow: -12px -10px 8px rgba(255,45,25,.55) }
  89%      { transform: translate(-7px,5px);  text-shadow:  10px  -7px 5px rgba(91,76,240,.4) }
  93%      { transform: translate(6px,-5px);  text-shadow:  -9px   7px 7px rgba(255,45,25,.4) }
  97%      { transform: translate(0,0);  text-shadow: none }
}

/* Particle burst */
.gp {
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: particleburst 6s ease-in-out .9s infinite;
}
.gp:nth-child(2), .gp:nth-child(4), .gp:nth-child(6) { background: var(--accent2) }
@keyframes particleburst {
  0%,82% { opacity: 0; transform: translate(-50%,-50%) translate(0,0) scale(1) }
  86%    { opacity: 1; transform: translate(-50%,-50%) translate(var(--tx),var(--ty)) scale(1.4) }
  95%    { opacity: 0; transform: translate(-50%,-50%) translate(calc(var(--tx)*2.1),calc(var(--ty)*2.1)) scale(.4) }
  100%   { opacity: 0 }
}

.hero-role {
  margin-top: 14px;
  font-size: clamp(1.1rem,2.5vw,1.5rem);
  color: var(--soft);
  font-weight: 500;
}
.hero-role span { color: var(--accent) }

.hero p.tagline {
  margin: 22px 60px 36px 0;
  color: var(--soft);
  max-width: 52ch;
  font-size: clamp(.88rem,2.2vw,1.05rem);
}

.btns { display: flex; gap: 14px; flex-wrap: wrap }
.btn {
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: clamp(0.773rem,1.932vw,0.92rem);
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--ink);
  transition: .2s;
}
.btn.pri { background: var(--ink); color: var(--bg) }
.btn.pri:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px) }
.btn.sec { background: transparent; color: var(--ink); border-color: var(--line) }
.btn.sec:hover { border-color: var(--ink); transform: translateY(-2px) }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(0.672rem,1.68vw,0.8rem);
  background: var(--bg-alt);
  padding: 7px 14px;
  border-radius: 8px;
}
.badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .3 } }

/* Hero responsive */
.hero-break-mid { display: none }

@media (min-width: 1401px) {
  .hero { grid-template-columns: minmax(0,.96fr) minmax(540px,1.04fr); gap: 0 }
  .hero-photo { width: 135%; margin-left: -110px; margin-right: -50px }
}
@media (min-width: 1101px) and (max-width: 1400px) {
  .hero { grid-template-columns: minmax(0,.94fr) minmax(500px,1.06fr); gap: 0 }
  .hero-photo { width: 120%; margin-left: -58px; margin-right: -25px }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0,.90fr) minmax(430px,1.10fr); gap: 0 }
  .hero-photo { width: 110%; margin-left: -38px; margin-right: -25px }
  .hero-name, .hero-name-outline { font-size: clamp(3rem,7.8vw,5.5rem) }
  .hero-role { font-size: clamp(.82rem,1.75vw,.96rem) }
  .hero p.tagline { font-size: clamp(.75rem,1.55vw,.9rem) }
}
@media (min-width: 761px) and (max-width: 900px) {
  .hero {
    padding: 42px 0 36px;
    grid-template-columns: minmax(0,.84fr) minmax(360px,1.16fr);
    grid-template-areas: "badge photo" "text photo";
    gap: 0;
    align-items: center;
  }
  .hero-photo { width: 110%; max-width: none; margin-left: -28px; margin-right: -18px; justify-self: start }
  .hero-name, .hero-name-outline { font-size: clamp(2.55rem,8.1vw,4.4rem) }
  .hero-role { font-size: clamp(.9rem,2vw,1.15rem) }
  .hero p.tagline { font-size: clamp(.76rem,1.7vw,.92rem) }
}
@media (max-width: 900px) {
  .hero {
    padding: 42px 0 36px;
    grid-template-columns: 1fr;
    grid-template-areas: "badge" "photo" "text";
    gap: 14px;
  }
  .hero-photo { width: 100%; max-width: min(100%,560px); aspect-ratio: 3/2; margin: 4px auto; justify-self: center }
}
@media (max-width: 760px) {
  .hero-name { white-space: normal }
  .hero-name, .hero-name-outline { white-space: normal; line-height: .92; font-size: clamp(3rem,10vw,6rem) }
  .hero-name { margin-top: .1em; margin-bottom: .15em }
  .hero-name-outline { top: .1em }
  .hero-break-mid { display: block }
  .badge { padding: 5px 10px; font-size: clamp(0.62rem,1.512vw,0.72rem) }
  .hero-role { margin-top: 6px; font-size: clamp(0.798rem,1.995vw,0.95rem) }
  .hero p.tagline { margin: 10px 0 18px; font-size: clamp(0.756rem,1.89vw,0.9rem) }
  .btns { gap: 10px }
  .btn { padding: 10px 18px; font-size: clamp(0.689rem,1.722vw,0.82rem) }
}
@media (max-width: 400px) {
  .hero-name, .hero-name-outline { font-size: clamp(2.3rem,13vw,3rem) }
}


/* ─────────────────────────────────────────────
   STATS BAR
───────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 50px 0;
}
.stat h3 {
  font-size: clamp(1.5rem,4vw,2.1rem);
  font-weight: 800;
  background: linear-gradient(135deg,#3ECF8E,#1FA463);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat p { margin: 6px 0 0; color: var(--soft); font-size: clamp(0.722rem,1.806vw,0.86rem) }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2,1fr) } }


/* ─────────────────────────────────────────────
   SECTION BASE
───────────────────────────────────────────── */
section { padding: 80px 0 }

#about .head,       #about .about,
#projects .head,
#achievements .head, #achievements .roadmap,
#certifications .head,
#blog .head,
#skills .head,
#contact .head,     #contact .contact {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
}
#skills .skill-cats { max-width: 1220px; margin-left: auto; margin-right: auto }
@media (max-width: 1300px) { #skills .skill-cats { max-width: 1020px } }

.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.head h2 { font-size: clamp(1.8rem,3.4vw,2.5rem); font-weight: 700 }
.head p   { color: var(--soft); max-width: 36ch; font-size: clamp(0.798rem,1.995vw,0.95rem); margin: 8px 0 0 }

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .06em;
  font-size: clamp(0.714rem,1.785vw,0.85rem);
  font-family: 'JetBrains Mono', monospace;
}

/* Heading glare animation */
.head h2 {
  --glare: 60,150,255;
  color: var(--ink);
  background:
    linear-gradient(105deg, transparent 42%, rgba(var(--glare),.95) 50%, transparent 58%) 0 0/250% 100% no-repeat,
    linear-gradient(var(--ink), var(--ink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: headGlare 6s ease-in-out infinite;
}
:root[data-theme="dark"] .head h2 { --glare: 140,225,255 }
@keyframes headGlare {
  0%,45% { background-position: 100% 0, 0 0 }
  100%    { background-position:   0% 0, 0 0 }
}
@media (prefers-reduced-motion: reduce) { .head h2 { animation: none } }

/* SEO identity */
.seo-identity {
  margin: 0 0 10px;
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.68rem,1.5vw,.82rem);
  letter-spacing: .04em;
}


/* ─────────────────────────────────────────────
   ABOUT
───────────────────────────────────────────── */
#about {
  margin-left: 20px;
  max-width: 1300px;
}

.about {
  display: grid;
  grid-template-columns: minmax(250px,440px) minmax(0,1fr);
  gap: 24px;
  align-items: stretch;
  text-align: left;
  overflow: visible;
}

/* Text column */
.about > div:not(.aphoto-frame) {
  max-width: 640px;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: visible;
}

.about p {
  color: var(--soft);
  margin: 12px 0 0 16px;
  max-width: 56ch;
  font-size: clamp(.95rem,1.6vw,1.12rem);
  line-height: 1.6;
  text-align: justify;
}

/* Scrollable text */
.about-text-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 14px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong, var(--line)) transparent;
}
.about-text-scroll::-webkit-scrollbar        { width: 5px }
.about-text-scroll::-webkit-scrollbar-track  { background: transparent }
.about-text-scroll::-webkit-scrollbar-thumb  { background: var(--line-strong, var(--line)); border-radius: 4px }
.about-text-scroll::-webkit-scrollbar-button { display: none; width: 0; height: 0 }

/* ── Photo frame ─────────────────────────────── */
.aphoto-frame {
  position: relative;
  max-width: 440px;
  max-height: fit-content;
  width: 100%;
  margin: 0 auto;
  margin-left: 24px;     /* shifts frame right to balance left/right visual gap */
}

/* ── Photo container ─────────────────────────── */
.aphoto {
  aspect-ratio: 9/10;
  position: relative;
  overflow: hidden;
  border-radius: 18px;   /* all 4 corners rounded — no flat bottom */
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  -webkit-mask-image: radial-gradient(ellipse 82% 90% at 50% 50%, #000 86%, transparent 100%);
  mask-image:         radial-gradient(ellipse 82% 90% at 50% 50%, #000 86%, transparent 100%);
}

/* ── Photo image ─────────────────────────────── */
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;   /* shifts image upward so less ceiling, more face */
  display: block;
}

/* ── Bottom gradient overlay ─────────────────── */
.aphoto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(14,13,17,.88) 100%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Name — bottom RIGHT ─────────────────────── */
.aphoto-name {
  position: absolute;
  bottom: 58px;
  right: 16px;
  left: auto;
  top: auto;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 900;
  font-size: clamp(1.35rem,2.5vw,1.9rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: rgba(255,255,255,.92);
  text-shadow: 2px 2px 18px rgba(0,0,0,.35);
  z-index: 2;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: right;
  margin: 0;
}

/* ── Title — bottom LEFT ─────────────────────── */
.aphoto-title {
  position: absolute;
  bottom: 26px;
  left: auto;
  right: 16px;
  top: auto;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(0.75rem,1.2vw,0.78rem);
  color: rgba(255,255,255,.6);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
  margin: 0;
  text-align: left;
}

/* ── Dot indicators ──────────────────────────── */
.aphoto-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.aphoto-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background .3s ease, transform .3s ease;
}
.aphoto-dots span.on { background: #fff; transform: scale(1.3) }

/* ── Ken-burns slideshow frames ──────────────── */
.aframe {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease;
  z-index: 0;
}
.aframe.on {
  opacity: 1;
  animation: kenburns 6s ease-in-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.08) translate(1%,-1%) }
  to   { transform: scale(1) translate(0,0) }
}

/* ── Nav buttons (prev / next) ───────────────── */
.aphoto-nav-group {
  position: absolute;
  right: 16px;
  bottom: 38px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.aphoto-nav {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: clamp(0.62rem,1.512vw,0.72rem);
  font-weight: 600;
  letter-spacing: .02em;
  opacity: .6;
  transition: opacity .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.aphoto-nav:hover {
  opacity: 1;
  border-color: var(--accent);
  background: rgba(255,75,43,.18);
  box-shadow: 0 0 16px rgba(255,75,43,.35);
}
.aphoto-nav svg { width: 13px; height: 13px; flex-shrink: 0 }
.aphoto:hover .aphoto-nav { opacity: 1; pointer-events: auto }

/* ── About ribbon ────────────────────────────── */
.about-ribbon {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  flex-shrink: 0;
}

.rb-item  { display: flex; flex-direction: column; gap: 2px }
.rb-val   {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: clamp(0.84rem,2.1vw,1rem);
  color: #1FA463;
  font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .rb-val { color: #3ECF8E }
.rb-label { font-size: clamp(0.62rem,1.512vw,0.72rem); color: var(--soft) }
.rb-game  { justify-content: center }

.rb-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.2);
  background: color-mix(in srgb, var(--card) 40%, transparent);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 4px 14px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.25);
  color: var(--ink);
  font-size: clamp(0.638rem,1.596vw,0.76rem);
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  width: fit-content;
  margin-bottom: 4px;
}
.rb-play:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,75,43,.08) }
.rb-play svg   { width: 12px; height: 12px }

/* About responsive overrides */
#about .head,
#about .about {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
#about .about p     { max-width: none }
#about .about-photo { height: 100% }

@media (min-width: 1001px) {
  #about .about {
    grid-template-columns: minmax(360px,440px) minmax(0,1fr);
    gap: 40px;
    align-items: stretch;
  }
  #about .aphoto-frame {
    max-width: none;
    width: 100%;
    margin: 0;
  }
  #about .about > div:not(.aphoto-frame) {
    height: 0;
    min-height: 100%;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }
  #about .about-text-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
    padding-right: 30px;
    margin: 0;
  }
  #about .about-text-scroll p {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  #about .about-ribbon { margin-top: 16px; width: 100%; flex-shrink: 0 }
}

@media (max-width: 1000px) {
  #about .about { grid-template-columns: 1fr; gap: 32px }
  #about .aphoto-frame { max-width: 380px; margin: 0 auto }
  #about .about > div:not(.aphoto-frame) {
    height: auto;
    min-height: 0;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
  }
  #about .about-text-scroll { max-height: 420px; overflow-y: auto; padding-right: 14px }
  #about .about-ribbon { margin-top: 20px }
  .about-ribbon { grid-template-columns: repeat(2,1fr); row-gap: 22px }
  .rb-item:nth-child(3) { border-left: none }
}

@media (max-width: 520px) {
  #about .aphoto-frame { max-width: 290px }
  #about .about-text-scroll { max-height: 330px }
  .aphoto-nav-group { top: 10px; bottom: auto; right: 10px }
  .aphoto-nav { padding: 0 9px; font-size: clamp(0.62rem,1.386vw,0.66rem); height: 26px }
  .aphoto-name { right: 16px }
}

/* Experience items inside About */
.about-experience {
  display: grid;
  gap: 10px;
  margin: 4px 10px 18px;
}
.about-experience:empty { display: none }

.experience-kicker {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.0rem,1.55vw,1.0rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 2px;
  margin-top: 15px;
  margin-left: 4px;
  font-weight: 600;
}
.experience-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  padding: 12px 14px;
  margin-left: 10px;
  margin-right: 10px;
}
.experience-item strong {
  display: block;
  font-size: clamp(.8rem,1.9vw,.92rem);
  margin-bottom: 3px;
}
.experience-item .exp-meta {
  display: block;
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.61rem,1.45vw,.7rem);
  margin-bottom: 5px;
}
.experience-item p {
  margin: 0;
  font-size: clamp(.74rem,1.75vw,.82rem);
  line-height: 1.55;
  text-align: left;
}


/* ─────────────────────────────────────────────
   ARCADE MODAL
───────────────────────────────────────────── */
.game-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.game-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto }

.game-modal {
  width: 360px;
  max-width: calc(100vw - 32px);
  position: relative;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 22px;
  box-shadow:
    0 30px 90px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 0 60px rgba(255,255,255,.03);
  transform: scale(.95);
  transition: transform .3s cubic-bezier(.16,.8,.24,1);
  overflow: hidden;
}
.game-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,0) 30%);
  pointer-events: none;
  border-radius: inherit;
}
.game-backdrop.open .game-modal { transform: scale(1) }

.game-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 2px;
}
.game-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.game-picker-head h3 { font-size: clamp(1.1rem,2.6vw,1.3rem); margin: 0 }

.game-close, .game-back {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 30px; height: 30px;
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s ease, color .15s ease;
}
.game-close:hover, .game-back:hover { border-color: var(--accent); color: var(--accent) }
.game-back svg { width: 15px; height: 15px }

.game-cards { display: flex; flex-direction: column; gap: 10px }
.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-alt) 45%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s ease, box-shadow .2s ease, background .2s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: gameCardIn .45s ease forwards;
}
.game-card:nth-child(1) { animation-delay: .05s }
.game-card:nth-child(2) { animation-delay: .13s }
.game-card:nth-child(3) { animation-delay: .21s }
@keyframes gameCardIn { to { opacity: 1; transform: translateY(0) } }
.game-card:hover  { border-color: var(--accent); transform: translateY(-3px) scale(1.015); box-shadow: 0 12px 28px rgba(0,0,0,.16) }
.game-card:active { transform: translateY(-1px) scale(.99) }

.game-card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.game-card-text  { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 }
.game-card-name  { font-weight: 700; font-size: clamp(.88rem,2vw,.96rem); color: var(--ink) }
.game-card-tag   { font-size: clamp(.68rem,1.6vw,.76rem); color: var(--soft) }
.game-card-go    { width: 16px; height: 16px; color: var(--soft); flex-shrink: 0; transition: transform .2s ease, color .2s ease }
.game-card:hover .game-card-go { transform: translateX(4px); color: var(--accent) }

.game-play          { display: none }
.game-play.active   { display: block }
.game-picker.hidden { display: none }

.game-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.75rem,1.8vw,0.85rem);
  color: var(--ink);
}
.game-head #gameTitle { font-weight: 700 }
.game-score            { margin-left: auto; color: var(--soft) }
.game-score b          { color: var(--accent) }

.game-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gameCanvas {
  display: block;
  background: color-mix(in srgb, var(--bg-alt) 45%, transparent);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}

/* 2048 grid */
.grid2048 {
  display: none;
  width: 300px; height: 300px;
  background: color-mix(in srgb, var(--bg-alt) 45%, transparent);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
  grid-template-columns: repeat(4,1fr);
  grid-template-rows: repeat(4,1fr);
  gap: 8px;
}
.grid2048.active { display: grid }
.g2-tile {
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  color: var(--ink);
  transition: background .15s ease;
}
.g2-tile[data-v="2"]    { background:#EEE4DA; color:#776E65 }
.g2-tile[data-v="4"]    { background:#EDE0C8; color:#776E65 }
.g2-tile[data-v="8"]    { background:#F2B179; color:#fff }
.g2-tile[data-v="16"]   { background:#F59563; color:#fff }
.g2-tile[data-v="32"]   { background:#F67C5F; color:#fff }
.g2-tile[data-v="64"]   { background:#F65E3B; color:#fff }
.g2-tile[data-v="128"]  { background:#EDCF72; color:#fff; font-size:1rem }
.g2-tile[data-v="256"]  { background:#EDCC61; color:#fff; font-size:1rem }
.g2-tile[data-v="512"]  { background:#EDC850; color:#fff; font-size:1rem }
.g2-tile[data-v="1024"] { background:#EDC53F; color:#fff; font-size:.85rem }
.g2-tile[data-v="2048"] { background:#3ECF8E; color:#fff; font-size:.85rem }

.game-hint {
  margin: 12px 0 0;
  font-size: clamp(0.655rem,1.638vw,0.78rem);
  color: var(--soft);
  text-align: center;
  min-height: 2.4em;
}


/* ─────────────────────────────────────────────
   SKILLS
───────────────────────────────────────────── */
.skill-cats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 40px 32px;
  align-items: stretch;
}
.skill-cat { display: flex; flex-direction: column }
@media (max-width: 1300px) { .skill-cats { grid-template-columns: repeat(2,minmax(0,1fr)) } }
@media (max-width: 700px)  { .skill-cats { grid-template-columns: minmax(0,1fr) } }

.skill-cat h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.689rem,1.722vw,0.82rem);
  font-weight: 500;
  color: var(--soft);
  margin-bottom: 16px;
  text-transform: none;
}
.skill-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 1400px) { .skill-grid { padding: 0 10px } }

.skill-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  transition: border-color .2s ease, transform .2s ease;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.skill-item:hover { border-color: var(--accent); transform: translateX(2px) }

.sk-icon {
  width: 42px; height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(0.62rem,1.512vw,0.72rem);
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.sk-info { flex: 1; min-width: 0 }
.sk-info .nm  { font-weight: 600; font-size: clamp(0.773rem,1.932vw,0.92rem); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.sk-info .lvl { font-size: clamp(0.62rem,1.512vw,0.72rem); color: var(--soft); font-family: 'JetBrains Mono', monospace; display: block; margin-top: 2px }

.battery { display: flex; align-items: center; gap: 3px; flex-shrink: 0 }
.battery .cell {
  width: 6px; height: 18px;
  background: var(--line);
  border-radius: 1px;
  transition: background .35s ease;
}
.battery .cell.on { background: linear-gradient(180deg, var(--accent2), var(--accent)) }
.battery .nub     { width: 3px; height: 9px; background: var(--line); border-radius: 0 2px 2px 0 }

.skill-json-category { display: flex; flex-direction: column }


/* ─────────────────────────────────────────────
   PROJECTS
───────────────────────────────────────────── */
.proj-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  padding: 10px 0 30px;
}
.proj-track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: certScroll 38s linear infinite;
}
.proj-viewport:hover .proj-track { animation-play-state: paused }

.pcard {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
  flex: 0 0 380px;
  transition: transform .18s ease, opacity .18s ease;
  will-change: transform;
}
@media (max-width: 700px) { .pcard { flex-basis: 250px } }
@media (max-width: 480px) {
  .pcard { flex-basis: 210px }
  .pbody { padding: 16px 16px 18px }
  .pbody h3 { font-size: clamp(0.857rem,2.142vw,1.02rem) }
  .pbody p  { font-size: clamp(0.689rem,1.722vw,0.82rem) }
}

.pshot { position: relative; aspect-ratio: 16/10; overflow: hidden }
.pshot .frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease }
.pshot .frame.on { opacity: 1 }
.pshot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg-alt) 100%);
  pointer-events: none;
}
.pbody { padding: 24px 26px 26px; position: relative }
.pbody h3 { font-size: clamp(1.008rem,2.52vw,1.2rem); margin-bottom: 8px }
.pbody p  { color: var(--soft); font-size: clamp(0.756rem,1.89vw,0.9rem); margin: 0 0 16px }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px }
.tags span {
  font-size: clamp(0.62rem,1.512vw,0.72rem);
  font-family: 'JetBrains Mono', monospace;
  color: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 6px;
}
.pbody a.visit {
  font-size: clamp(0.714rem,1.785vw,0.85rem);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* JSON-driven project shots */
.proj-json-shot { position: absolute; inset: 0; overflow: hidden }
.proj-json-shot .json-frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease }
.proj-json-shot .json-frame.on { opacity: 1 }

#projTrack:empty::before {
  content: "Loading projects…";
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  padding: 18px;
}


/* ─────────────────────────────────────────────
   ROADMAP / ACHIEVEMENTS
───────────────────────────────────────────── */
.roadmap { position: relative; padding-top: 10px }
.roadmap::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
}
.roadmap-fill {
  position: absolute;
  left: 50%; top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  transform: translateX(-50%);
  transition: height .1s linear;
  z-index: 1;
}

.rnode {
  position: relative;
  width: 50%;
  padding: 0 44px 64px;
  box-sizing: border-box;
}
.rnode:nth-child(odd)  { left: 0;   text-align: right }
.rnode:nth-child(even) { left: 50%; text-align: left }

.rnode .dot {
  position: absolute;
  top: -9px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 0 0 4px var(--bg), 0 4px 14px rgba(0,0,0,.25);
  z-index: 2;
  transition: transform .25s cubic-bezier(.16,.8,.24,1);
}
.rnode .dot svg         { width: 17px; height: 17px }
.rnode:nth-child(odd)  .dot { right: -19px }
.rnode:nth-child(even) .dot { left:  -19px }
.rnode:hover .dot { transform: scale(1.15) }

.rnode .yr {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-weight: 600;
  font-size: clamp(0.714rem,1.785vw,0.85rem);
  margin-bottom: 6px;
}
.rnode .box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  display: inline-block;
  transition: transform .25s cubic-bezier(.16,.8,.24,1), border-color .25s ease, box-shadow .25s ease;
}
.rnode:hover .box {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.rnode h3 { font-size: clamp(0.857rem,2.142vw,1.02rem); margin-bottom: 6px }
.rnode p  { margin: 0; color: var(--soft); font-size: clamp(0.739rem,1.848vw,0.88rem) }

.rnode.placeholder .box { border-style: dashed }
.rnode.placeholder .yr  { color: var(--accent2) }

@media (max-width: 700px) {
  .roadmap::before, .roadmap-fill { left: 20px }
  .rnode,
  .rnode:nth-child(odd),
  .rnode:nth-child(even) { width: 100%; left: 0; text-align: left; padding: 0 0 44px 56px }
  .rnode:nth-child(odd) .dot,
  .rnode:nth-child(even) .dot { left: 1px; right: auto }
}


/* ─────────────────────────────────────────────
   CERTIFICATIONS COVERFLOW
───────────────────────────────────────────── */
.cert-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  padding: 30px 0 40px;
}
.cert-track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: certScroll 32s linear infinite;
}
.cert-viewport:hover .cert-track { animation-play-state: paused }

@keyframes certScroll {
  from { transform: translateX(0) }
  to   { transform: translateX(-50%) }
}

.cert-card {
  flex: 0 0 230px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  text-align: center;
  transition: transform .18s ease, opacity .18s ease;
  will-change: transform;
}
.cert-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 700;
  font-size: clamp(0.655rem,1.638vw,0.78rem);
}
.cert-card h3    { font-size: clamp(0.823rem,2.058vw,0.98rem); margin-bottom: 6px }
.cert-card p     { margin: 0; color: var(--soft); font-size: clamp(0.672rem,1.68vw,0.8rem) }
.cert-card .cert-yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.62rem,1.512vw,0.72rem);
  color: var(--accent);
  margin-top: 10px;
  display: block;
}
.cert-card.placeholder { border-style: dashed }
.cert-status {
  display: block;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--accent2);
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 700px) { .cert-card { flex-basis: 190px; padding: 20px 16px } }

.roadmap-data { display: contents }
.foot-brand .logo img { object-fit: contain }


/* ─────────────────────────────────────────────
   BLOG
───────────────────────────────────────────── */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.blog-tags     { display: flex; flex-wrap: wrap; gap: 8px }
.blog-tag-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.65rem,1.5vw,0.75rem);
  color: var(--soft);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.blog-tag-chip:hover  { border-color: var(--accent); color: var(--ink) }
.blog-tag-chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink) }
:root[data-theme="dark"] .blog-tag-chip.active { background: var(--ink); color: var(--bg) }

.blog-toolbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0 }

.blog-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.65rem,1.5vw,0.74rem);
  color: var(--soft);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.blog-admin-btn:hover { border-color: var(--accent); color: var(--ink) }
.blog-admin-btn svg  { width: 14px; height: 14px }
.blog-admin-btn.on   { border-color: var(--accent); color: var(--accent) }

.blog-new-btn {
  display: none;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(0.78rem,1.9vw,0.88rem);
  color: #fff;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}
.blog-new-btn.show { display: inline-flex }
.blog-new-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,75,43,.25) }
.blog-new-btn svg { width: 15px; height: 15px }

/* Blog carousel */
.blog-carousel { position: relative }
.blog-viewport  { overflow: hidden }
.blog-track {
  display: flex;
  gap: 22px;
  will-change: transform;
}
.blog-track.notransition { transition: none !important }
.blog-track.animating    { transition: transform .55s cubic-bezier(.22,.75,.2,1) }

.blog-arrow {
  position: absolute;
  top: 50%;
  margin-top: -26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: var(--ink);
  box-shadow:
    0 8px 28px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 0 0 1px rgba(255,255,255,.25);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, background .25s ease;
}
.blog-arrow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg, var(--accent2), var(--accent), #3ECF8E, var(--accent2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  animation: blogArrowSpin 4s linear infinite;
  animation-play-state: paused;
}
.blog-arrow:hover {
  transform: scale(1.14) translateY(-1px);
  box-shadow:
    0 14px 34px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.5),
    0 0 0 1px rgba(255,255,255,.3);
}
.blog-arrow:hover::before { opacity: 1; animation-play-state: running }
.blog-arrow:active         { transform: scale(.94) }
@keyframes blogArrowSpin { to { transform: rotate(360deg) } }

:root[data-theme="dark"] .blog-arrow { background: rgba(255,255,255,.08); color: #fff }

.blog-arrow.prev { left:  -22px }
.blog-arrow.next { right: -22px }
.blog-arrow svg  {
  width: 20px; height: 20px;
  position: relative; z-index: 1;
  transition: transform .2s ease;
}
.blog-arrow.prev:hover svg { transform: translateX(-2px) }
.blog-arrow.next:hover svg { transform: translateX( 2px) }

@media (max-width: 900px) {
  .blog-arrow.prev { left:  -14px }
  .blog-arrow.next { right: -14px }
}
@media (max-width: 760px) {
  .blog-arrow { width: 42px; height: 42px; margin-top: -21px }
  .blog-arrow.prev { left:   2px }
  .blog-arrow.next { right:  2px }
  .blog-arrow svg  { width: 17px; height: 17px }
}

.blog-progress-track {
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  margin-top: 22px;
  overflow: hidden;
}
.blog-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
}
.blog-progress-fill.run { animation: blogProg 5s linear forwards }
@keyframes blogProg { from { width: 0% } to { width: 100% } }

.blog-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px }
.blog-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .2s ease;
}
.blog-dot.active { background: var(--accent); width: 20px; border-radius: 4px }

.blog-slide { flex: 0 0 calc((100% - (var(--vis) - 1)*22px)/var(--vis)); min-width: 0 }

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  min-width: 0;
  height: 100%;
}
.blog-card:hover { border-color: var(--accent); box-shadow: 0 16px 34px rgba(0,0,0,.12) }

.blog-cover {
  aspect-ratio: 16/8;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.blog-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 18px 18px;
}
.blog-cover-emoji {
  font-size: clamp(1.8rem,5vw,2.4rem);
  position: relative; z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}

.blog-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.62rem,1.5vw,0.72rem);
  color: var(--soft);
}
.blog-meta .sep  { opacity: .5 }
.blog-card h3    { font-size: clamp(1rem,2.4vw,1.18rem); line-height: 1.3; cursor: pointer }
.blog-card .excerpt {
  margin: 0;
  color: var(--soft);
  font-size: clamp(0.8rem,1.9vw,0.88rem);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}
.blog-coming-mini {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.61rem,1.45vw,.7rem);
  color: var(--soft);
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.blog-coming-mini span { color: var(--accent) }

.blog-read {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(0.78rem,1.85vw,0.86rem);
  color: var(--accent);
  background: none; border: none;
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 5px;
}
.blog-read svg { width: 14px; height: 14px; transition: transform .15s ease }
.blog-card:hover .blog-read svg { transform: translateX(3px) }

.blog-del {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  opacity: 0;
  transition: opacity .15s ease;
}
.blog-card:hover .blog-del { opacity: 1 }

.blog-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--soft);
  font-size: clamp(0.85rem,2vw,0.95rem);
}

.blog-coming-soon-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.65rem,1.5vw,.74rem);
  white-space: nowrap;
}
.blog-coming-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.blog-coming-panel {
  justify-content: flex-start;
  gap: 18px;
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem;
}
.blog-coming-panel span { display: inline-flex; align-items: center; gap: 7px }

.blog-coming-comments { margin-top: 26px }
.blog-coming-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--soft);
  max-width: 640px;
}
.blog-coming-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 1rem;
  flex-shrink: 0;
}
.blog-coming-card h4 { margin: 0 0 4px; color: var(--ink); font-size: clamp(.9rem,2.1vw,1rem) }
.blog-coming-card p  { margin: 0; font-size: clamp(.76rem,1.8vw,.84rem); line-height: 1.5 }

/* Blog stats */
.blog-stats { display: flex; align-items: center; gap: 12px }
.blog-stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none; border: none;
  cursor: pointer;
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.68rem,1.6vw,0.76rem);
  padding: 4px;
  border-radius: 6px;
  transition: color .15s ease;
}
.blog-stat-btn svg      { width: 15px; height: 15px }
.blog-stat-btn:hover    { color: var(--ink) }
.blog-stat-btn.like.active   { color: var(--accent) }
.blog-stat-btn.like.active svg { fill: var(--accent) }
.blog-stat-btn.up.active     { color: #3ECF8E }
.blog-stat-btn.up.active svg { fill: #3ECF8E }
.blog-stat-btn.down.active   { color: #FF5F56 }
.blog-stat-btn.down.active svg { fill: #FF5F56 }

/* Blog overlay / modal */
.blog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,9,12,.6);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.blog-overlay.open { opacity: 1; pointer-events: auto }

.blog-modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 34px;
  position: relative;
  transform: translateY(18px) scale(.98);
  transition: transform .25s ease;
  box-sizing: border-box;
}
.blog-overlay.open .blog-modal { transform: translateY(0) scale(1) }

.blog-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}

.blog-reader-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px }
.blog-reader-tags span {
  font-size: clamp(0.62rem,1.5vw,0.72rem);
  font-family: 'JetBrains Mono', monospace;
  color: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 6px;
}
.blog-modal h2 {
  font-size: clamp(1.3rem,3.2vw,1.7rem);
  margin: 6px 0 2px;
  padding-right: 30px;
}
.blog-reader-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.68rem,1.6vw,0.78rem);
  color: var(--soft);
}
.blog-reader-body {
  margin-top: 22px;
  color: var(--ink);
  font-size: clamp(0.88rem,2vw,0.98rem);
  line-height: 1.75;
}
.blog-reader-body p { margin: 0 0 16px }

.blog-form label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.66rem,1.5vw,0.75rem);
  color: var(--soft);
  margin: 16px 0 6px;
}
.blog-form label:first-of-type { margin-top: 0 }
.blog-form input,
.blog-form textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.82rem,1.9vw,0.9rem);
  box-sizing: border-box;
  transition: border-color .15s ease;
}
.blog-form input:focus,
.blog-form textarea:focus { outline: none; border-color: var(--accent) }
.blog-form textarea { resize: vertical; min-height: 110px; line-height: 1.5 }
.blog-form-actions  { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px }

.blog-emoji-pick { display: flex; flex-wrap: wrap; gap: 8px }
.blog-emoji-pick button {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease;
}
.blog-emoji-pick button.sel { border-color: var(--accent); background: var(--card) }

@media (max-width: 640px) {
  .blog-modal { padding: 24px; max-height: 90vh }
  .blog-toolbar { flex-direction: column; align-items: stretch }
  .blog-toolbar-right { justify-content: space-between }
  .blog-new-btn { justify-content: center }
}

/* Blog reader stats & comments */
.blog-reader-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.blog-reader-stats .blog-stat-btn     { font-size: clamp(0.78rem,1.8vw,0.86rem) }
.blog-reader-stats .blog-stat-btn svg { width: 17px; height: 17px }

.blog-comments { margin-top: 26px }
.blog-comments h4 { font-size: clamp(0.9rem,2.1vw,1rem); margin: 0 0 14px; font-family: 'Inter', sans-serif }

.blog-comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px }
.blog-comment-form input,
.blog-comment-form textarea {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.8rem,1.85vw,0.87rem);
  box-sizing: border-box;
  width: 100%;
}
.blog-comment-form textarea { resize: vertical; min-height: 60px }
.blog-comment-form input:focus,
.blog-comment-form textarea:focus { outline: none; border-color: var(--accent) }
.blog-comment-submit {
  align-self: flex-end;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(0.76rem,1.8vw,0.84rem);
  color: #fff;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.blog-comment-list { display: flex; flex-direction: column; gap: 14px }
.blog-comment {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
}
.blog-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.blog-comment-name { font-weight: 600; font-size: clamp(0.8rem,1.85vw,0.87rem) }
.blog-comment-date { font-family: 'JetBrains Mono', monospace; font-size: clamp(0.6rem,1.4vw,0.68rem); color: var(--soft) }
.blog-comment-text { margin: 0; font-size: clamp(0.8rem,1.85vw,0.87rem); color: var(--soft); line-height: 1.5 }
.blog-comment-del  { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--soft); cursor: pointer; font-size: .7rem }
.blog-comment-empty { color: var(--soft); font-size: clamp(0.8rem,1.85vw,0.87rem); font-style: italic }


/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: 50px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#form {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 40px;
  text-align: right;
  min-width: 0;
}
#form .field, #form h3, #form p, #form .note { text-align: left }

.field { margin-bottom: 18px }
.field label { display: block; font-size: clamp(0.689rem,1.722vw,0.82rem); color: var(--soft); margin-bottom: 6px }
.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--card);
  font-family: inherit;
  font-size: clamp(0.798rem,1.995vw,0.95rem);
  color: var(--ink);
  transition: border-color .2s ease;
}
.field input:hover,
.field textarea:hover { border-color: var(--accent) }
.field textarea { min-height: 100px; resize: vertical }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--accent) }
.field input::placeholder,
.field textarea::placeholder { color: var(--soft); opacity: .7 }

.note     { font-size: clamp(0.689rem,1.722vw,0.82rem); color: var(--accent); margin-top: 6px; min-height: 1.2em }
.send-btn { display: inline-flex; align-items: center; gap: 9px; border: none }
.send-btn svg { width: 15px; height: 15px }

.contact-cards { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; overflow: hidden }

.ccard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
  min-width: 0; width: 100%; max-width: 100%;
  overflow: hidden; box-sizing: border-box;
}
.ccard > * { min-width: 0 }
.ccard:hover { border-color: var(--accent); transform: translateX(2px) }

.cc-icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-icon svg { width: 18px; height: 18px }

.cc-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; width: 100%; flex: 1; overflow: hidden;
}
.cc-text strong { font-size: clamp(0.798rem,1.995vw,0.95rem); font-weight: 600; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cc-text span   { font-size: clamp(0.689rem,1.722vw,0.82rem); color: var(--soft); display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

.cc-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-alt);
  margin-top: 12px;
  min-width: 0; width: 100%; max-width: 100%;
  overflow: hidden; box-sizing: border-box;
}
.cc-status .cc-text { min-width: 0 }
.cc-status .cc-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cc-status .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@media (max-width: 900px) {
  .contact { grid-template-columns: minmax(0,1fr) }
  #form { padding: 28px; max-width: 520px; margin: 0 auto; width: 100%; box-sizing: border-box }
  .contact > div:last-child { max-width: 520px; width: 100%; margin: 0 auto; min-width: 0; overflow: hidden; box-sizing: border-box }
}


/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  padding: 0;
  color: var(--soft);
  font-size: clamp(0.714rem,1.785vw,0.85rem);
  border-top: 1px solid var(--line);
}
.foot-grid {
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px clamp(20px,5vw,60px) 34px;
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr 1fr;
  gap: 36px;
}
.foot-brand .logo { margin-bottom: 14px }
.foot-brand p     { max-width: 32ch; font-size: clamp(0.731rem,1.827vw,0.87rem); line-height: 1.6 }

.foot-col h4 {
  font-family: 'Titillium Web', sans-serif;
  font-size: clamp(0.689rem,1.722vw,0.82rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px }
.foot-col a  { text-decoration: none; color: var(--soft); font-size: clamp(0.731rem,1.827vw,0.87rem) }
.foot-col a:hover { color: var(--accent) }

.foot-bottom {
  border-top: 1px solid var(--line);
  padding: 20px clamp(20px,5vw,60px);
  text-align: center;
  font-size: clamp(0.689rem,1.722vw,0.82rem);
}

.footer-socials { display: none; justify-content: center; gap: 18px; margin-bottom: 14px }
.footer-socials a   { color: var(--soft) }
.footer-socials svg { width: 17px; height: 17px }
@media (max-width: 900px) { .footer-socials { display: flex } }

@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; padding-top: 40px } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr } }

.foot-brand .logo img { object-fit: contain }


/* ─────────────────────────────────────────────
   PRELOADER
───────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0A0A0C;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#preloader.exit { animation: curtainUp .9s cubic-bezier(.76,0,.24,1) forwards .15s }
@keyframes curtainUp { to { transform: translateY(-100%) } }

.pl-noise {
  position: absolute; inset: 0;
  opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pl-corner {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.62rem,1.512vw,0.72rem);
  letter-spacing: .12em;
  color: #6A6874;
  transition: opacity .4s ease;
}
.pl-corner.tl { top: 32px; left:  32px }
.pl-corner.tr { top: 32px; right: 32px; text-align: right }
.pl-corner.bl { bottom: 32px; left:  32px }
.pl-corner.br { bottom: 32px; right: 32px; text-align: right }
.pl-corner .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  animation: pulse 2s infinite;
}
#preloader.exit .pl-corner { opacity: 0 }

.pl-center { position: relative; text-align: center }
.pl-big-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(1.9rem,6.5vw,3.4rem);
  line-height: 1;
  color: #fff;
  letter-spacing: .01em;
  transition: opacity .35s ease, transform .35s ease;
  white-space: nowrap;
  word-spacing: normal;
}
#preloader.exit .pl-big-name { opacity: 0; transform: translateY(-14px) }

.pl-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: #fff;
  margin-left: 3px;
  vertical-align: -.12em;
  animation: plblink .9s step-end infinite;
}
@keyframes plblink { 50% { opacity: 0 } }

.pl-track {
  width: min(60vw,280px);
  height: 4px;
  background: rgba(255,255,255,.14);
  border-radius: 4px;
  margin: 36px auto 0;
  position: relative; overflow: hidden;
  transition: opacity .35s ease;
}
.pl-track-fill {
  position: absolute; top: 0; left: 0;
  height: 100%; width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1FA463, #3ECF8E);
  transition: width .1s linear;
}
#preloader.exit .pl-track { opacity: 0 }

.pl-pct {
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.655rem,1.638vw,0.78rem);
  color: #8A88A0;
  transition: opacity .35s ease;
}
#preloader.exit .pl-pct { opacity: 0 }

.pl-sub {
  margin: 14px auto 0;
  max-width: 88vw;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.62rem,1.7vw,0.82rem);
  letter-spacing: .1em;
  color: #8A88A0;
  transition: opacity .35s ease;
  white-space: normal; text-align: center;
}
.pl-sub .sep { color: var(--accent); margin: 0 .6em }
#preloader.exit .pl-sub { opacity: 0 }

.pl-rocket {
  margin: 26px auto 6px;
  width: 64px; height: 110px;
  position: relative;
  transition: opacity .35s ease, transform .35s ease;
}
#preloader.exit .pl-rocket { opacity: 0; transform: translateY(-14px) }
.pl-rocket-body { animation: plHover 2.6s ease-in-out infinite }
@keyframes plHover {
  0%,100% { transform: translateY(0) }
  50%     { transform: translateY(-8px) }
}
.pl-flame {
  transform-origin: 50% 0%;
  animation: plFlame .35s ease-in-out infinite alternate;
}
@keyframes plFlame {
  from { transform: scaleY(.75) scaleX(.92); opacity: .85 }
  to   { transform: scaleY(1.15) scaleX(1.05); opacity: 1 }
}

.pl-term {
  margin: 22px auto 0;
  width: min(86vw,340px);
  background: #0D0E12;
  border: 1px solid #24252E;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow: hidden; text-align: left;
  transition: opacity .35s ease, transform .35s ease;
}
#preloader.exit .pl-term { opacity: 0; transform: translateY(-14px) }

.pl-term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: #16171D;
  border-bottom: 1px solid #24252E;
}
.pl-term-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block }
.pl-term-dot.r { background: #FF5F56 }
.pl-term-dot.y { background: #FFBD2E }
.pl-term-dot.g { background: #27C93F }
.pl-term-title { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: .66rem; color: #5C5D68; letter-spacing: .03em }

.pl-term-body {
  padding: 12px 14px;
  height: 132px; overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.62rem,1.6vw,.72rem);
  line-height: 1.65;
  color: #B7F3C4;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
}
.pl-term-line {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0;
  animation: plLineIn .3s ease forwards;
}
@keyframes plLineIn {
  from { opacity: 0; transform: translateY(3px) }
  to   { opacity: 1; transform: translateY(0) }
}
.pl-term-line .prompt { color: #5B9BFF; margin-right: 6px }
.pl-term-line .ok     { color: #3ECF8E }
.pl-term-cursor {
  display: inline-block;
  width: 6px; height: 12px;
  background: #B7F3C4;
  vertical-align: -2px;
  animation: plblink .9s step-end infinite;
}


/* ─────────────────────────────────────────────
   DROID CHATBOT
───────────────────────────────────────────── */
.droid-btn {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 80;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  animation: float 3s ease-in-out infinite;
  overflow: visible;
  isolation: isolate;
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

.droid-btn::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: .5;
  animation: ring 2.4s ease-out infinite;
  transition: opacity .3s ease;
}
@keyframes ring {
  0%   { transform: scale(.85); opacity: .6 }
  100% { transform: scale(1.35); opacity: 0 }
}
.droid-btn svg  { width: 30px; height: 30px; position: relative; z-index: 2 }
.droid-eye      { fill: var(--accent); animation: blink 3.2s infinite }
@keyframes blink { 0%,92%,100% { opacity: 1 } 96% { opacity: .15 } }

.droid-halo {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .45s ease, transform .45s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.droid-halo::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7C6FFF, #FF4B2B, #FFC24B, #3ECF8E, #5B9BFF, #7C6FFF);
  filter: blur(13px);
  animation: droidSpin 2.6s linear infinite;
}
.droid-halo::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--ink);
}
.droid-btn:hover .droid-halo { opacity: 1; transform: scale(1) }
@keyframes droidSpin { to { transform: rotate(360deg) } }

.droid-wave {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from 0deg, #7C6FFF, #FF4B2B, #FFC24B, #3ECF8E, #5B9BFF, #7C6FFF) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; pointer-events: none; z-index: -1;
}
.droid-btn:hover .droid-wave          { animation: droidWave 1.6s ease-out infinite }
.droid-btn:hover .droid-wave.w2       { animation-delay: .55s }
@keyframes droidWave {
  0%   { transform: scale(.85); opacity: .75 }
  100% { transform: scale(1.9); opacity: 0 }
}
.droid-btn:hover {
  background: var(--ink);
  box-shadow: 0 10px 34px rgba(124,111,255,.35), 0 8px 30px rgba(0,0,0,.3);
}
.droid-btn:hover .droid-eye { fill: #fff }

/* Chat panel */
.chat-panel {
  position: fixed;
  right: 24px; bottom: 98px;
  z-index: 80;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.15);
  display: flex; flex-direction: column;
  overflow: hidden;
  max-height: 70vh;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .3s ease, transform .35s cubic-bezier(.16,.8,.24,1), visibility .35s;
}
.chat-panel.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1) }

.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.chat-head .dot   { width: 8px; height: 8px; border-radius: 50%; background: #3ECF8E }
.chat-head h4     { font-family: 'Titillium Web', sans-serif; font-size: clamp(0.798rem,1.995vw,0.95rem); margin: 0 }
.chat-head p      { margin: 0; font-size: clamp(0.622rem,1.554vw,0.74rem); color: var(--soft) }
.chat-close       { margin-left: auto; background: none; border: none; color: var(--soft); cursor: pointer; font-size: clamp(0.924rem,2.31vw,1.1rem); line-height: 1 }

.chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
}
.msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: clamp(0.731rem,1.827vw,0.87rem);
  line-height: 1.4;
}
.msg.bot  { background: color-mix(in srgb, var(--bg-alt) 75%, transparent); backdrop-filter: blur(6px); align-self: flex-start; border-bottom-left-radius: 4px }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px }

.quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px }
.qchip {
  font-size: clamp(0.638rem,1.596vw,0.76rem);
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.qchip:hover { border-color: var(--accent); color: var(--accent) }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.14) }
.chat-input input {
  flex: 1;
  border: 1px solid rgba(255,255,255,.12);
  background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: clamp(0.731rem,1.827vw,0.87rem);
  color: var(--ink);
}
.chat-input input:focus { outline: 2px solid var(--accent) }
.chat-input button {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--ink); color: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-input button:hover { background: var(--accent) }
.chat-input svg { width: 15px; height: 15px }

@media (max-width: 520px) {
  .droid-btn  { right: 16px; bottom: 16px; width: 54px; height: 54px }
  .droid-btn svg { width: 26px; height: 26px }
  .chat-panel { right: 10px; left: 10px; bottom: 80px; width: auto; max-width: none; max-height: min(72vh,520px) }
}
@media (max-width: 400px) {
  .chat-panel { right: 0; left: 0; bottom: 0; top: auto; border-radius: 16px 16px 0 0; max-height: 85vh; width: 100% }
  .chat-panel.open     { transform: translateY(0) }
  .chat-panel:not(.open) { transform: translateY(14px) }
}


/* ─────────────────────────────────────────────
   DYNAMIC LOADING PLACEHOLDERS
───────────────────────────────────────────── */
#skillsData:empty::before {
  content: "Loading skills…";
  color: var(--soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
}
