*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:  #070707;
  --deep:   #0c0c0c;
  --s1:     #111;
  --s2:     #181818;
  --s3:     #222;
  --b1:     rgba(255,255,255,0.06);
  --b2:     rgba(255,255,255,0.12);
  --b3:     rgba(255,255,255,0.20);
  --white:  #efefef;
  --g1:     #ccc;
  --g2:     #888;
  --g3:     #444;
  --g4:     #1e1e1e;
  --glass:  rgba(15,15,15,0.55);
  --hl:     rgba(255,255,255,0.08);
  --r:      18px;
  --rl:     28px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Mono', monospace;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Scroll Reveal ─── */
.section-header, .project-card, .about-grid, .tech-category, .tech-universe, .faq-wrap, .contact-glass, .tl-item, .timeline, .hero-content, .stat, .ct-info-item, .gh-repo-card, .footer-inner {
  will-change: opacity, transform;
}

/* Touch devices — disable custom cursor */

/* Touch devices — disable custom cursor */
@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
  a, button, .nav-lang, .nav-book, .faq-q, .modal-cta, .btn-dossier,
  .ct-card, .gh-repo-card { cursor: pointer; }
}

/* ─── Canvas & Grain ─── */
#orbs {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ─── Custom Cursor ─── */
.cursor-dot {
  position: fixed; width: 6px; height: 6px;
  background: var(--white); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transition: width .2s, height .2s, opacity .3s;
  opacity: 0;
}

.cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%; pointer-events: none; z-index: 9998;
  transition: width .3s, height .3s, border-color .3s, opacity .3s;
  opacity: 0;
}

body.hovering .cursor-dot { width: 10px; height: 10px; }
body.hovering .cursor-ring { width: 50px; height: 50px; border-color: rgba(255,255,255,0.6); }

/* ─── Navbar ─── */
#navbar {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 200; width: min(1100px, 96vw);
  animation: navSlideDown .8s cubic-bezier(.16,1,.3,1) .1s both;
}
.navbar-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.2rem;
  background: rgba(8,8,8,.7);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(0,0,0,.4),
    0 20px 60px rgba(0,0,0,.55),
    0 0 80px rgba(0,0,0,.2),
    0 0 0 .5px rgba(255,255,255,.04);
  transition: border-color .4s, box-shadow .4s;
}

.nav-inner:hover {
  border-color: rgba(255,255,255,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.4),
    0 28px 90px rgba(0,0,0,.6),
    0 0 100px rgba(0,0,0,.15),
    0 0 0 .5px rgba(255,255,255,.06);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; font-weight: 300;
  letter-spacing: .35em; color: var(--white);
  position: relative;
  padding-right: 2rem;
}

.nav-logo::after {
  content: '';
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.15), transparent);
}

.nav-links { display: flex; gap: 2rem; padding-left: .6rem; }

.nav-links a {
  font-size: .72rem; letter-spacing: .14em;
  color: var(--g2); text-decoration: none;
  text-transform: uppercase;
  transition: color .25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -6px; left: 0;
  width: 0; height: 1px;
  background: var(--white);
  transition: width .3s cubic-bezier(.16,1,.3,1);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex; align-items: center; gap: 1rem;
  padding-left: 1.2rem;
  position: relative;
}

.nav-right::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.15), transparent);
}

.nav-lang {
  background: transparent; border: 1px solid rgba(255,255,255,.1);
  color: var(--g2); font-family: 'DM Mono', monospace;
  font-size: .64rem; letter-spacing: .14em;
  padding: .5rem .9rem; border-radius: 999px;
  cursor: none; transition: all .25s;
}
.nav-lang:hover {
  border-color: var(--white); color: var(--white);
  box-shadow: 0 0 16px rgba(255,255,255,.08);
}

.nav-book {
  font-family: 'DM Mono', monospace;
  font-size: .72rem; letter-spacing: .12em;
  padding: .6rem 1.5rem;
  background: var(--white); color: var(--black);
  border: none; border-radius: 999px; cursor: none;
  transition: opacity .2s, transform .15s, box-shadow .3s;
  box-shadow: 0 2px 16px rgba(255,255,255,.12);
}
.nav-book:hover {
  opacity: .9; transform: scale(1.03);
  box-shadow: 0 6px 28px rgba(255,255,255,.18);
}

/* ─── Hero ─── */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 4rem;
}

.hero-eyebrow {
  font-size: .65rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--g2);
  margin-bottom: 2rem;
  opacity: 0; animation: fadeUp .8s .2s forwards;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(5.5rem, 17vw, 15rem);
  font-weight: 300; line-height: .88;
  letter-spacing: -.02em;
  display: flex; flex-direction: column; gap: .04em;
}

.hl {
  display: block;
  opacity: 0; transform: translateY(70px);
  animation: slideUp 1.1s cubic-bezier(.16,1,.3,1) forwards;
}
.hl:nth-child(1) { animation-delay: .35s; }
.hl:nth-child(2) { animation-delay: .52s; color: var(--g2); }
.hl.italic { font-style: italic; }

.hero-sub {
  font-size: .78rem; color: var(--g2); letter-spacing: .18em;
  margin-top: 2.5rem;
  opacity: 0; animation: fadeUp .8s .9s forwards;
}

.hero-cta {
  display: inline-block; margin-top: 2.2rem;
  padding: .75rem 2rem;
  font-family: 'DM Mono', monospace;
  font-size: .72rem; letter-spacing: .15em;
  color: var(--white); text-decoration: none;
  border: 1px solid var(--b2); border-radius: 999px;
  background: var(--b1);
  backdrop-filter: blur(10px);
  transition: background .3s, border-color .3s;
  opacity: 0; animation: fadeUp .8s 1.1s forwards;
}
.hero-cta:hover { background: rgba(255,255,255,.1); border-color: var(--b3); }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  font-size: .6rem; letter-spacing: .3em; color: var(--g3);
  animation: pulse 2.5s infinite;
}

/* ─── Sections ─── */
.section {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 8rem 2rem;
}

.section-dark { max-width: 100%; background: var(--deep); }
.section-dark > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-dark.section { padding: 8rem 2rem; }

.section-header {
  display: flex; align-items: center; gap: 1.4rem;
  margin-bottom: 3.5rem;
}

.section-num-badge {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--b2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .2rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(0,0,0,.3);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}

.section-header:hover .section-num-badge {
  border-color: var(--b3);
  transform: scale(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 32px rgba(0,0,0,.4);
}

.section-header:hover .section-badge-logo {
  transform: scale(1.15);
  box-shadow: 0 0 22px rgba(255, 136, 0, 0.7) !important;
}

.section-badge-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 136, 0, 0.4);
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 2px;
}

/* Logo-only badge variant (projects section) */
.section-logo-badge {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.section-logo-badge .section-badge-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 136, 0, 0.55);
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 0 !important;
}

.section-header:hover .section-logo-badge .section-badge-logo {
  transform: scale(1.12);
  box-shadow: 0 0 32px rgba(255, 136, 0, 0.8) !important;
}

.section-num-badge svg {
  width: 20px; height: 20px;
  color: var(--g2);
  transition: color .3s;
}

.section-header:hover .section-num-badge svg {
  color: var(--white);
}

.section-num-badge span {
  font-size: .5rem; color: var(--g3);
  letter-spacing: .15em;
  font-family: 'DM Mono', monospace;
}

.section-title-wrap {
  display: flex; flex-direction: column; gap: .3rem;
}

.section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300; color: var(--white);
  line-height: 1.1;
}

.section-sub {
  font-size: .7rem; color: var(--g3);
  letter-spacing: .1em;
}

/* ─── Tech Universe (Orbiting Rings) ─── */
.tech-universe {
  position: relative;
  width: 420px; height: 420px;
  margin: 0 auto 5rem;
}

.tech-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 70px; height: 70px;
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  box-shadow: 0 0 40px rgba(255,255,255,.06), inset 0 0 20px rgba(255,255,255,.03);
}

.core-label {
  font-size: .9rem; color: var(--g2);
  font-family: 'DM Mono', monospace;
}

.orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-ring {
  position: absolute; inset: 0;
  border: 1px solid var(--b1);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-1 {
  width: 200px; height: 200px;
  margin-top: -100px; margin-left: -100px;
  animation: orbitSpin 25s linear infinite;
}

.orbit-2 {
  width: 300px; height: 300px;
  margin-top: -150px; margin-left: -150px;
  animation: orbitSpin 35s linear infinite reverse;
}

.orbit-3 {
  width: 400px; height: 400px;
  margin-top: -200px; margin-left: -200px;
  animation: orbitSpin 45s linear infinite;
}

.tech-node {
  position: absolute;
  width: 50px; height: 50px;
  background: rgba(12,12,12,.7);
  border: 1px solid var(--b2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .4s, background .3s;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

/* Tooltip from data-tech */
.tech-node::after {
  content: attr(data-tech);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%; transform: translateX(-50%) translateY(6px);
  font-family: 'DM Mono', monospace;
  font-size: .58rem; letter-spacing: .08em;
  color: var(--white);
  background: rgba(0,0,0,.85);
  border: 1px solid var(--b2);
  padding: .3rem .7rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  transition: opacity .25s, transform .25s cubic-bezier(.16,1,.3,1);
}

/* Tooltip arrow */
.tech-node::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px;
  background: rgba(0,0,0,.85);
  border-right: 1px solid var(--b2);
  border-bottom: 1px solid var(--b2);
  rotate: 45deg;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 6;
}

.tech-node:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tech-node:hover::before {
  opacity: 1;
}

.tech-node span {
  font-size: .55rem; color: var(--g1);
  letter-spacing: .05em;
  font-family: 'DM Mono', monospace;
}

.tech-node i {
  font-size: 1.1rem;
  color: var(--g3);
  transition: color .3s, transform .3s, filter .3s;
}

.tech-node:hover i {
  color: var(--white);
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(255,255,255,.4));
}

.tech-node:hover {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  box-shadow:
    0 0 20px rgba(255,255,255,.12),
    0 0 40px rgba(255,255,255,.05),
    inset 0 0 12px rgba(255,255,255,.04);
  transform: scale(1.3);
  z-index: 20;
}

/* counter-rotate so labels stay upright */
.orbit-1 .tech-node { animation: orbitCounterSpin 25s linear infinite; }
.orbit-2 .tech-node { animation: orbitCounterSpin 35s linear infinite reverse; }
.orbit-3 .tech-node { animation: orbitCounterSpin 45s linear infinite; }

/* Position nodes around each orbit */
.tn-1  { top: -25px; left: calc(50% - 25px); }
.tn-2  { bottom: -25px; left: calc(50% - 25px); }
.tn-3  { top: calc(50% - 25px); left: -25px; }
.tn-4  { top: calc(50% - 25px); right: -25px; }

.tn-5  { top: -25px; left: calc(50% - 25px); }
.tn-6  { bottom: -25px; left: calc(50% - 25px); }
.tn-7  { top: calc(50% - 25px); left: -25px; }
.tn-8  { top: calc(50% - 25px); right: -25px; }

.tn-9  { top: -25px; left: calc(50% - 25px); }
.tn-10 { bottom: -25px; left: calc(50% - 25px); }
.tn-11 { top: calc(50% - 25px); left: -25px; }
.tn-12 { top: calc(50% - 25px); right: -25px; }

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes orbitCounterSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ─── Tech Grid (Cards) ─── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tech-category {
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), 0 20px 60px rgba(0,0,0,.4);
  transition: border-color .3s, transform .3s;
}

.tech-category:hover {
  border-color: var(--b3);
  transform: translateY(-4px);
}

.tc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 300;
  color: var(--white); margin-bottom: 1.5rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--b1);
}

.tc-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tc-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--g2);
  transition: color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-card:hover .tc-icon { color: var(--white); }

.tc-icon svg { width: 100%; height: 100%; }

.tc-icon i {
  font-size: 1.1rem;
  color: inherit;
  transition: color .2s, transform .3s;
}

.tech-card:hover .tc-icon i {
  transform: scale(1.15);
}

.tc-name {
  font-size: 0.72rem;
  color: var(--g1);
  letter-spacing: .05em;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
}

.tc-bar-wrap {
  display: none;
}

.tc-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #444 0%, #fff 100%);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 0 15px rgba(255,255,255,0.25);
}

/* Segmented look using mask */
.tc-bar::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, 
    transparent 0, 
    transparent 4px, 
    #0c0c0c 4px, 
    #0c0c0c 6px
  );
  z-index: 2;
}

/* Shimmer animation */
.tc-bar::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255,255,255,0.3), 
    transparent
  );
  animation: tcShimmer 3s infinite;
  z-index: 3;
}

@keyframes tcShimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ─── Tech Ticker ─── */
.tech-ticker {
  margin-top: 4rem;
  overflow: hidden;
  border-top: 1px solid var(--b1);
  border-bottom: 1px solid var(--b1);
  padding: 1.2rem 0;
}

.ticker-track {
  display: flex; gap: 3rem;
  animation: ticker 30s linear infinite;
  width: max-content;
}

.ticker-track span {
  font-size: .7rem; color: var(--g3);
  letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap;
  transition: color .3s;
}

.ticker-track span:hover { color: var(--white); }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Red Team Section ─── */
.rt-intro {
  margin-bottom: 3.5rem;
  max-width: 700px;
}

.rt-lead {
  font-family: var(--font-main);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 300; color: var(--white);
  line-height: 1.3; margin-bottom: 1rem;
}

.rt-sub {
  font-size: .82rem; color: var(--g2);
  line-height: 1.8; letter-spacing: .02em;
}

/* RAT Showcase */
.rt-showcase { margin-bottom: 3.5rem; }

.rt-hero-card {
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), 0 30px 80px rgba(0,0,0,.5);
  transition: border-color .35s, transform .35s;
}

.rt-hero-card:hover {
  border-color: var(--b3);
  transform: translateY(-4px);
}

/* Terminal */
.rt-terminal {
  background: #0a0a0a;
  border-bottom: 1px solid var(--b1);
}

.rt-term-header {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem 1.2rem;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--b1);
}

.rt-term-dots {
  display: flex; gap: 5px;
}

.rt-term-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--g3);
}

.rt-term-dots span:first-child { background: #ff5f57; opacity: .7; }
.rt-term-dots span:nth-child(2) { background: #febc2e; opacity: .7; }
.rt-term-dots span:last-child  { background: #28c840; opacity: .7; }

.rt-term-title {
  font-size: .62rem; color: var(--g3);
  letter-spacing: .08em;
  font-family: 'DM Mono', monospace;
}

.rt-term-body {
  padding: 1.4rem 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: .72rem; line-height: 2;
}

.rt-line { color: var(--g2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-prompt { color: var(--g3); }
.rt-cmd { color: var(--white); font-weight: 400; }
.rt-flag { color: var(--g2); }
.rt-ok { color: #28c840; opacity: .8; }
.rt-dim { color: var(--g3); }
.rt-hl { color: var(--white); }

.rt-blink {
  animation: termBlink 1s step-end infinite;
  color: var(--white);
}

@keyframes termBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hero info below terminal */
.rt-hero-info {
  padding: 2rem 2.5rem 2.5rem;
}

.rt-badge-row {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.2rem;
}

.rt-badge {
  display: inline-block;
  font-size: .55rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--black);
  background: var(--white);
  padding: .3rem .8rem; border-radius: 999px;
}

.rt-badge-outline {
  background: transparent;
  color: var(--g2);
  border: 1px solid var(--b2);
}

.rt-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 300;
  color: var(--white); margin-bottom: .8rem;
}

.rt-desc {
  font-size: .82rem; color: var(--g2);
  line-height: 1.8;
}

/* Capabilities Grid */
.rt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.rt-card {
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), 0 20px 60px rgba(0,0,0,.4);
  transition: border-color .35s, transform .35s;
  position: relative;
  overflow: hidden;
}

.rt-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.rt-card:hover::before { opacity: 1; }

.rt-card:hover {
  border-color: var(--b3);
  transform: translateY(-4px);
}

.rt-card-icon {
  width: 36px; height: 36px;
  color: var(--g2); margin-bottom: 1.2rem;
  transition: color .3s;
}

.rt-card:hover .rt-card-icon { color: var(--white); }

.rt-card-icon svg { width: 100%; height: 100%; }

.rt-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; font-weight: 300;
  color: var(--white); margin-bottom: .6rem;
}

.rt-card-desc {
  font-size: .75rem; color: var(--g2);
  line-height: 1.8; margin-bottom: 1.2rem;
}

.rt-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
}

.rt-tags span {
  font-size: .55rem; letter-spacing: .08em;
  padding: .25rem .6rem;
  border: 1px solid var(--b2);
  border-radius: 999px; color: var(--g3);
  transition: color .2s, border-color .2s;
}

.rt-card:hover .rt-tags span {
  color: var(--g2);
  border-color: var(--b3);
}

.rt-ticker span { color: var(--g3) !important; }
.rt-ticker span:hover { color: var(--white) !important; }

@media (max-width: 900px) {
  .rt-grid { grid-template-columns: 1fr; }
  .rt-term-body { font-size: .62rem; }
  .rt-line { white-space: normal; }
}

/* ─── Projects ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), 0 20px 60px rgba(0,0,0,.4);
  transition: border-color .35s, transform .35s;
  will-change: transform, opacity;
}

.project-card:hover {
  border-color: var(--b3);
  transform: translateY(-6px);
}

.pc-featured {
  grid-column: span 2;
}

.pc-visual {
  padding: 1.5rem 1.5rem 0;
}

.pc-screen {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 12px 12px 0 0;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.pc-screen::before {
  content: '';
  position: absolute; top: .8rem; left: 1rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--g3);
  box-shadow: 12px 0 0 var(--g3), 24px 0 0 var(--g3);
}

.pc-screen-dark {
  background: #080808;
}

.pc-screen-react {
  background: #0d1117;
}

.pc-code {
  font-family: 'DM Mono', monospace;
  font-size: .72rem; line-height: 1.8;
  color: var(--g2);
  padding-top: .8rem;
  overflow-x: auto;
  white-space: nowrap;
}

.code-ln { color: var(--g3); margin-right: 1rem; user-select: none; }
.code-kw { color: var(--g1); }
.code-fn { color: var(--white); }
.code-str { color: var(--g2); }
.code-num { color: var(--g1); }
.code-cm { color: var(--g3); font-style: italic; }

.pc-info { padding: 1.5rem 2rem 2rem; }

.pc-tag {
  font-size: .6rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--g3);
  margin-bottom: .6rem; display: block;
}

.pc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 300;
  color: var(--white); margin-bottom: .6rem;
}

.pc-desc {
  font-size: .78rem; color: var(--g2);
  line-height: 1.7; margin-bottom: 1rem;
}

.pc-tech-tags {
  display: flex; gap: .5rem; flex-wrap: wrap;
}

.pc-tech-tags span {
  font-size: .6rem; letter-spacing: .1em;
  padding: .3rem .7rem;
  border: 1px solid var(--b2);
  border-radius: 999px;
  color: var(--g2);
  transition: color .2s, border-color .2s;
}

.pc-tech-tags span:hover {
  color: var(--white); border-color: var(--b3);
}

/* ─── About ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem;
  align-items: start;
}

.about-img-wrap {
  border-radius: var(--r); overflow: hidden;
  aspect-ratio: 3/4;
  border: 1px solid var(--b1);
  background: var(--s2);
  display: flex; align-items: center; justify-content: center;
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 300; line-height: 1.4;
  color: var(--white); margin-bottom: 1.5rem;
}

.about-body {
  font-size: .8rem; color: var(--g2);
  line-height: 1.85; margin-bottom: 3rem;
}

.stats-row { display: flex; gap: 3rem; }

.stat { display: flex; flex-direction: column; gap: .3rem; }

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem; font-weight: 300;
  color: var(--white); line-height: 1;
}

.stat-label { font-size: .65rem; color: var(--g3); letter-spacing: .2em; }

/* ─── Timeline (Experience) ─── */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--b2) 10%, var(--b2) 90%, transparent);
}

.tl-item {
  position: relative;
  padding-bottom: 3rem;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute; left: -2.5rem;
  top: .3rem;
  width: 16px; height: 16px;
  background: var(--black);
  border: 1px solid var(--b2);
  border-radius: 50%;
  transition: border-color .3s, box-shadow .3s;
}

.tl-item:hover .tl-dot {
  border-color: var(--white);
  box-shadow: 0 0 12px rgba(255,255,255,.15);
}

.tl-dot::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 4px; height: 4px;
  background: var(--g3);
  border-radius: 50%;
  transition: background .3s;
}

.tl-item:hover .tl-dot::after { background: var(--white); }

.tl-date {
  font-size: .62rem; color: var(--g3);
  letter-spacing: .2em; display: block;
  margin-bottom: .4rem;
}

.tl-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 300;
  color: var(--white); margin-bottom: .4rem;
}

.tl-desc {
  font-size: .78rem; color: var(--g2);
  line-height: 1.7;
}

.tl-content {
  background: var(--b1);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  padding: 1.5rem 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, transform .3s;
}

.tl-item:hover .tl-content {
  border-color: var(--b2);
  transform: translateX(6px);
}

/* ─── FAQ ─── */
.faq-wrap {
  border: 1px solid var(--b2); border-radius: var(--rl); overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 var(--hl), 0 30px 80px rgba(0,0,0,.5);
}

.faq-item { border-bottom: 1px solid var(--b1); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%; background: transparent; border: none;
  color: var(--g1); font-family: 'DM Mono', monospace;
  font-size: .82rem; letter-spacing: .03em;
  padding: 1.4rem 2rem;
  text-align: left; cursor: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: background .25s, color .25s;
}
.faq-q:hover { background: rgba(255,255,255,.03); color: var(--white); }
.faq-item.open .faq-q { color: var(--white); }

.fq-icon { width: 20px; height: 20px; position: relative; flex-shrink: 0; }
.fq-icon span {
  position: absolute;
  background: var(--g2); border-radius: 1px;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .3s;
}
.fq-icon span:first-child { width: 14px; height: 1px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.fq-icon span:last-child  { width: 1px; height: 14px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-item.open .fq-icon span:last-child { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }

.faq-a { display: none; }
.faq-inner {
  padding: 0 2rem 1.4rem;
  font-size: .8rem; color: var(--g2); line-height: 1.9;
}

/* ─── Contact ─── */
.ct-hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.ct-lead {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300; color: var(--white);
  margin-bottom: .8rem;
}

.ct-sub {
  font-size: .78rem; color: var(--g2);
  line-height: 1.8; max-width: 500px;
  margin: 0 auto; letter-spacing: .02em;
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ct-card {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 3rem 2rem 2.5rem;
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .4s, transform .4s, box-shadow .4s;
  cursor: none;
}

.ct-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.ct-card-glow {
  position: absolute;
  top: -40%; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s;
}

.ct-card:hover .ct-card-glow { opacity: 1; }

/* Platform accent glows */
.ct-telegram .ct-card-glow { background: radial-gradient(circle, rgba(38,165,219,.15) 0%, transparent 70%); }
.ct-discord .ct-card-glow  { background: radial-gradient(circle, rgba(88,101,242,.15) 0%, transparent 70%); }
.ct-email .ct-card-glow     { background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%); }

/* Platform accent borders on hover */
.ct-telegram:hover { border-color: rgba(38,165,219,.3); }
.ct-discord:hover  { border-color: rgba(88,101,242,.3); }
.ct-email:hover    { border-color: rgba(255,255,255,.15); }

.ct-card-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--b2);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.8rem;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}

.ct-card:hover .ct-card-icon {
  transform: scale(1.08);
}

.ct-telegram:hover .ct-card-icon {
  border-color: rgba(38,165,219,.3);
  box-shadow: 0 0 30px rgba(38,165,219,.12);
}

.ct-discord:hover .ct-card-icon {
  border-color: rgba(88,101,242,.3);
  box-shadow: 0 0 30px rgba(88,101,242,.12);
}

.ct-email:hover .ct-card-icon {
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 0 30px rgba(255,255,255,.06);
}

.ct-card-icon svg {
  width: 32px; height: 32px;
  color: var(--g2);
  transition: color .3s, filter .3s;
}

.ct-telegram:hover .ct-card-icon svg { color: #26a5db; filter: drop-shadow(0 0 8px rgba(38,165,219,.4)); }
.ct-discord:hover .ct-card-icon svg  { color: #5865f2; filter: drop-shadow(0 0 8px rgba(88,101,242,.4)); }
.ct-email:hover .ct-card-icon svg    { color: var(--white); filter: drop-shadow(0 0 8px rgba(255,255,255,.3)); }

.ct-card-body {
  display: flex; flex-direction: column; gap: .4rem;
  margin-bottom: 1.8rem;
}

.ct-card-label {
  font-size: .6rem; color: var(--g3);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

.ct-card-handle {
  font-size: .85rem; color: var(--white);
  font-family: 'DM Mono', monospace;
  letter-spacing: .04em;
  transition: color .3s;
}

.ct-telegram:hover .ct-card-handle { color: #26a5db; }
.ct-discord:hover .ct-card-handle  { color: #5865f2; }

.ct-card-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--b2);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, border-color .3s, transform .3s;
}

.ct-card-arrow svg {
  width: 16px; height: 16px;
  color: var(--g3);
  transition: color .3s, transform .25s;
}

.ct-card:hover .ct-card-arrow {
  background: rgba(255,255,255,.08);
  border-color: var(--b3);
}

.ct-card:hover .ct-card-arrow svg {
  color: var(--white);
  transform: translate(2px, -2px);
}

.ct-card-copy svg {
  transform: none !important;
}

.ct-card:hover .ct-card-copy svg {
  transform: scale(1.1) !important;
}

@media (max-width: 768px) {
  .ct-grid { grid-template-columns: 1fr; }
}

/* ─── GitHub CTA ─── */
.gh-section {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.about-img-wrap {
  position: relative;
  width: 100%; aspect-ratio: 4/5;
  border-radius: var(--rl); overflow: hidden;
  border: 1px solid var(--b2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform .5s cubic-bezier(.16,1,.3,1), border-color .3s;
}
.about-img-wrap:hover {
  transform: scale(1.02) translateY(-5px);
  border-color: var(--b3);
}
.about-img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.about-img-wrap:hover .about-img { transform: scale(1.1); }
.gh-card {
  position: relative;
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: var(--rl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--hl), 0 30px 80px rgba(0,0,0,.5);
  transition: border-color .4s, transform .4s;
}

.gh-card:hover {
  border-color: var(--b3);
  transform: translateY(-4px);
}

.gh-glow {
  position: absolute;
  top: -60%; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity .4s;
}

.gh-card:hover .gh-glow {
  opacity: 1.5;
}

.gh-content {
  display: flex; align-items: center; gap: 2rem;
  padding: 2.5rem 3rem;
}

.gh-icon-wrap {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--b2);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}

.gh-card:hover .gh-icon-wrap {
  border-color: rgba(255,255,255,.2);
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(255,255,255,.08);
}

.gh-icon {
  width: 28px; height: 28px;
  color: var(--g2);
  transition: color .3s, filter .3s;
}

.gh-card:hover .gh-icon {
  color: var(--white);
  filter: drop-shadow(0 0 10px rgba(255,255,255,.3));
}

.gh-text { flex: 1; min-width: 0; }

.gh-title {
  font-family: var(--font-main);
  font-size: 1.6rem; font-weight: 300;
  color: var(--white); margin-bottom: .4rem;
}

.gh-desc {
  font-size: .75rem; color: var(--g2);
  line-height: 1.7; letter-spacing: .02em;
}

.gh-btn {
  display: flex; align-items: center; gap: .6rem;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
  font-size: .72rem; letter-spacing: .08em;
  color: var(--black); background: var(--white);
  text-decoration: none;
  padding: .7rem 1.5rem;
  border-radius: 999px;
  transition: opacity .2s, transform .2s, box-shadow .3s;
  box-shadow: 0 2px 12px rgba(255,255,255,.1);
}

.gh-btn:hover {
  opacity: .9; transform: scale(1.03);
  box-shadow: 0 4px 24px rgba(255,255,255,.18);
}

.gh-btn svg {
  transition: transform .25s;
}

.gh-btn:hover svg {
  transform: translate(2px, -2px);
}

.gh-stats {
  display: flex; gap: 0;
  border-top: 1px solid var(--b2);
}

.gh-stat {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem;
  border-right: 1px solid var(--b2);
  transition: background .3s;
}

.gh-stat:last-child { border-right: none; }

.gh-stat:hover {
  background: rgba(255,255,255,.02);
}

.gh-stat svg { color: var(--g3); flex-shrink: 0; }

.gh-stat span {
  font-family: 'DM Mono', monospace;
}

.gh-stat span:first-of-type {
  font-size: .95rem; color: var(--white);
  letter-spacing: .05em; font-weight: 500;
}

.gh-stat-label {
  font-size: .55rem; color: var(--g3);
  letter-spacing: .12em;
}

.gh-stat:hover svg { color: var(--g2); }
.gh-stat:hover .gh-stat-label { color: var(--g2); }

/* ─── Repo Cards Grid ─── */
.gh-repos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.gh-repo-card {
  background: var(--b1);
  border: 1px solid var(--b2);
  border-radius: 14px;
  padding: 1.6rem;
  text-decoration: none;
  display: flex; flex-direction: column;
  gap: .8rem;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  will-change: transform, box-shadow;
  cursor: none;
}

.gh-repo-card:hover {
  border-color: var(--b3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

.gh-repo-top {
  display: flex; align-items: center; gap: .6rem;
}

.gh-repo-top svg { color: var(--g3); flex-shrink: 0; }

.gh-repo-name {
  font-family: 'DM Mono', monospace;
  font-size: .78rem; color: var(--white);
  letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.gh-repo-card:hover .gh-repo-name { color: #58a6ff; }

.gh-repo-desc {
  font-size: .7rem; color: var(--g3);
  line-height: 1.7; flex: 1;
}

.gh-repo-meta {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding-top: .6rem;
  border-top: 1px solid var(--b1);
}

.gh-repo-lang {
  display: flex; align-items: center; gap: .4rem;
  font-size: .6rem; color: var(--g2);
  font-family: 'DM Mono', monospace;
  letter-spacing: .06em;
}

.gh-lang-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gh-repo-stat {
  display: flex; align-items: center; gap: .3rem;
  font-size: .6rem; color: var(--g3);
  font-family: 'DM Mono', monospace;
}

.gh-repo-stat svg { color: var(--g3); }

.gh-repo-date {
  font-size: .55rem; color: var(--g3);
  font-family: 'DM Mono', monospace;
  letter-spacing: .06em;
  margin-left: auto;
}

@media (max-width: 768px) {
  .gh-content { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
  .gh-stats { flex-direction: column; }
  .gh-stat { border-right: none; border-bottom: 1px solid var(--b2); }
  .gh-stat:last-child { border-bottom: none; }
  .gh-repos { grid-template-columns: 1fr; }
}

/* ─── Footer ─── */
.footer {
  position: relative; z-index: 2;
  padding: 3rem 2rem; max-width: 1100px; margin: 0 auto;
}

.footer-rule { height: 1px; background: var(--b2); margin-bottom: 2rem; }

.footer-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; letter-spacing: .25em; color: var(--white);
}
.footer-copy, .footer-made { font-size: .65rem; color: var(--g3); letter-spacing: .1em; }

/* ─── Modal ─── */
#modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
}

#modal-box {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 90vw);
  background: rgba(14,14,14,.9);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--b2); border-radius: var(--rl);
  box-shadow: inset 0 1px 0 var(--hl), 0 40px 100px rgba(0,0,0,.8);
  z-index: 501; padding: 2.5rem;
}

#modal-content { display: none; }

#modal-close {
  position: absolute; top: 1.2rem; right: 1.4rem;
  background: none; border: none; color: var(--g2);
  font-size: .9rem; cursor: none;
  transition: color .2s;
}
#modal-close:hover { color: var(--white); }

.modal-tag {
  font-size: .6rem; letter-spacing: .3em; color: var(--g2);
  text-transform: uppercase; margin-bottom: 1rem;
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 300; color: var(--white);
  margin-bottom: 1rem;
}

.modal-body { font-size: .8rem; color: var(--g2); line-height: 1.8; }
.modal-body strong { color: var(--g1); font-weight: 400; }

.modal-cta {
  display: block; width: 100%; margin-top: 2rem;
  font-family: 'DM Mono', monospace; font-size: .75rem;
  letter-spacing: .1em; padding: .85rem;
  background: var(--white); color: var(--black);
  border: none; border-radius: 10px; cursor: none;
  transition: opacity .2s;
}
.modal-cta:hover { opacity: .85; }

/* ─── Dossier Modal ─── */
#dossier-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
}

#dossier-box {
  display: none; position: fixed;
  flex-direction: column;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 95vw); max-height: 90vh;
  background: rgba(14,14,14,.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--b2); border-radius: var(--rl);
  box-shadow: inset 0 1px 0 var(--hl), 0 40px 100px rgba(0,0,0,.9);
  z-index: 501; overflow: hidden;
}

#dossier-content {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; width: 100%;
  overflow: hidden;
}

.dossier-header-sticky {
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--b2);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(14,14,14,.8);
}

.dossier-tag {
  font-family: 'DM Mono', monospace;
  font-size: .65rem; letter-spacing: .2em; color: #ff3333;
  text-transform: uppercase;
}

#dossier-close {
  background: none; border: none; color: var(--g2);
  font-size: 1.1rem; cursor: none;
  transition: color .2s;
}
#dossier-close:hover { color: var(--white); }

.dossier-body {
  flex: 1; min-height: 0;
  padding: 2.5rem; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--b3) transparent;
}
.dossier-body::-webkit-scrollbar { width: 6px; }
.dossier-body::-webkit-scrollbar-thumb { background: var(--b3); border-radius: 6px; }

.dossier-title-wrap {
  display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem;
}

.dossier-logo-container {
  position: relative; width: 100px; height: 100px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  animation: logo-pop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
}

.dossier-logo {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  mix-blend-mode: screen; /* Removes white background if it's pure white */
  z-index: 2;
  transition: transform 0.3s;
}

.dossier-logo-container:hover .dossier-logo {
  transform: scale(1.1);
}

.dossier-text-ring {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  animation: rotate-text 20s linear infinite; /* Slower, smoother rotation */
  z-index: 1;
}

.dossier-text-ring text {
  font-family: 'DM Mono', monospace; font-size: 11px; /* Smaller text */
  fill: #ff8800; /* Nice orange color */
  letter-spacing: 0.12em;
}

@keyframes logo-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-45deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes rotate-text {
  100% { transform: rotate(360deg); }
}

.dossier-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 300; color: var(--white);
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-bottom: 0; /* overridden since wrap handles it */
}
.dossier-version { font-family: 'DM Mono', monospace; font-size: 1rem; color: var(--g3); }

.dossier-badges { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.d-badge { font-family: 'DM Mono', monospace; font-size: .65rem; padding: .3rem .8rem; border-radius: 4px; letter-spacing: .05em; color: var(--black); font-weight: 600; }
.d-blue { background: #58a6ff; } .d-gold { background: #f0c352; } .d-red { background: #ff5555; }

.dossier-intro { font-size: .85rem; color: var(--g2); line-height: 1.8; }
.dossier-hr { border: none; border-top: 1px dashed var(--b2); margin: 2rem 0; }

.dossier-h3 { font-family: 'DM Mono', monospace; font-size: .95rem; color: var(--white); margin-bottom: 1rem; margin-top: 1.5rem; letter-spacing: .05em; }
.dossier-body p { font-size: .8rem; color: var(--g2); line-height: 1.8; margin-bottom: 1rem; }
.dossier-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.dossier-list li { position: relative; padding-left: 1.5rem; font-size: .8rem; color: var(--g2); line-height: 1.7; }
.dossier-list li::before { content: '>'; position: absolute; left: 0; color: #ff5555; font-family: 'DM Mono', monospace; }
.dossier-list strong { color: var(--white); font-weight: 500; }

.dossier-code { background: #0c0c0c; border: 1px solid var(--b2); border-radius: 6px; padding: 1rem; font-family: 'DM Mono', monospace; font-size: .75rem; color: #a1d279; line-height: 1.6; overflow-x: auto; margin-top: 1rem; }

.dossier-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--b2);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 2rem;
  gap: 4px;
}
.dossier-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--g2);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.65rem;
  border-radius: 6px;
  cursor: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
}
.dossier-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 4px 12px rgba(0,0,0,0.3);
}
.dossier-tab:hover:not(.active) {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.dossier-tab-content {
  display: none;
}
.dossier-tab-content.active {
  display: block;
  animation: fadeUp 0.4s ease forwards;
}

.btn-dossier {
  font-family: 'DM Mono', monospace;
  font-size: .75rem; letter-spacing: .1em;
  padding: .6rem 1.2rem;
  background: var(--white); color: var(--black);
  border: none; border-radius: 6px; cursor: none;
  transition: opacity .2s;
  text-transform: uppercase;
}
.btn-dossier:hover { opacity: .85; }

/* ─── Keyframes ─── */
@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%,100% { opacity: .3; }
  50%     { opacity: .8; }
}

@media (max-width: 900px) {
  .tech-grid { grid-template-columns: 1fr; }
  .tech-universe { width: 320px; height: 320px; }
  .orbit-1 { width: 150px; height: 150px; margin-top: -75px; margin-left: -75px; }
  .orbit-2 { width: 230px; height: 230px; margin-top: -115px; margin-left: -115px; }
  .orbit-3 { width: 310px; height: 310px; margin-top: -155px; margin-left: -155px; }
  .projects-grid { grid-template-columns: 1fr; }
  .pc-featured { grid-column: span 1; }
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .stats-row { justify-content: center; }
  .contact-glass { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .tech-universe { width: 280px; height: 280px; }
  .orbit-1 { width: 130px; height: 130px; margin-top: -65px; margin-left: -65px; }
  .orbit-2 { width: 200px; height: 200px; margin-top: -100px; margin-left: -100px; }
  .orbit-3 { width: 270px; height: 270px; margin-top: -135px; margin-left: -135px; }
  .tech-node { width: 40px; height: 40px; }
  .tech-node span { font-size: .48rem; }
  .tech-node i { font-size: .9rem; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 3.5rem; }
  #dossier-box { width: 95vw; height: 90vh; }
  .dossier-header-sticky { padding: 1rem 1.5rem; }
  .dossier-body { padding: 1.5rem; }
  .dossier-title { font-size: 1.6rem; }
  .rt-term-body { font-size: .65rem; padding: 1rem; }
  .rt-term-header { padding: .6rem 1rem; }
  .rt-term-dots span { width: 8px; height: 8px; }
  .rt-term-title { font-size: .65rem; }
  .rt-badge-row { gap: .5rem; }
  .rt-badge { font-size: .55rem; padding: .2rem .5rem; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0.7rem 1.1rem; }
  .nav-logo { font-size: 0.95rem; padding-right: 0; letter-spacing: .2em; }
  .nav-logo::after { display: none; }
  .nav-right { padding-left: 0.8rem; gap: 0.5rem; }
  .nav-lang { padding: 0.4rem 0.6rem; font-size: 0.52rem; }
  .nav-book { padding: 0.5rem 0.9rem; font-size: 0.58rem; }

  .hero-title { font-size: 2.6rem; }
  .section-header { margin-bottom: 2rem; }
  .section-num-badge { width: 28px; height: 28px; font-size: .55rem; }
  .section-badge-logo { width: 18px; height: 18px; margin-bottom: 1px; }
  .section-logo-badge {
    width: 28px !important;
    height: 28px !important;
  }
  .section-logo-badge .section-badge-logo {
    width: 28px !important;
    height: 28px !important;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5) !important;
  }
  
  .about-photo { display: flex; justify-content: center; margin-bottom: 1rem; }
  .about-img-wrap { width: 180px; aspect-ratio: 1/1; border-radius: 50%; }
  .stats-row { gap: 1.5rem; justify-content: center; }
  .stat-num { font-size: 2.2rem; }
  
  .dossier-title-wrap { flex-direction: column; text-align: center; gap: 1rem; }
  .dossier-logo-container { width: 80px; height: 80px; }
  .dossier-logo { width: 50px; height: 50px; }
  .dossier-text-ring { display: none; }
  #dossier-box { 
    inset: 0; width: auto; height: auto; max-height: none; 
    border-radius: 0; top: 0; left: 0; transform: none; 
  }
  #dossier-content { max-height: none; height: 100%; }
  
  .rt-hero-card { margin: 0; border-radius: var(--rl); }
  .rt-term-body { font-size: .6rem; }
  
  .footer-row { flex-direction: column; gap: 1.5rem; text-align: center; }
}
