:root {
  --bg: #070b14;
  --bg-2: #0c1220;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b95a8;
  --blue: #4f8cff;
  --violet: #9b72ff;
  --pink: #e86fc1;
  --grad: linear-gradient(120deg, #4f8cff 0%, #9b72ff 50%, #e86fc1 100%);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* subtle grid backdrop */
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
strong { color: #fff; font-weight: 600; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }

.container { width: min(1120px, 100% - 3rem); margin-inline: auto; }

.gradient-text {
  background: var(--grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ---------- Scroll progress & cursor glow ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--grad);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 200;
}
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,140,255,0.10), rgba(155,114,255,0.05) 40%, transparent 70%);
  pointer-events: none; z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .4s;
}
@media (hover: hover) { body:hover .cursor-glow { opacity: 1; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav__logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 2rem; align-items: center; font-size: .92rem; }
.nav__links a { color: var(--muted); position: relative; transition: color .2s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text) !important;
}
.nav__cta:hover { border-color: rgba(155,114,255,.6); }
.nav__toggle { display: none; background: none; border: 0; width: 32px; height: 32px; cursor: pointer; position: relative; z-index: 101; }
.nav__toggle span {
  position: absolute; left: 4px; right: 4px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav__toggle span:first-child { top: 11px; }
.nav__toggle span:last-child { top: 19px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 15px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 15px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  will-change: transform;
}
.btn--primary {
  background: var(--grad); background-size: 150% auto; color: #fff;
  box-shadow: 0 8px 30px -8px rgba(124, 108, 255, .6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(124,108,255,.85); background-position: right center; }
.btn--ghost { border: 1px solid var(--border); background: var(--surface); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  overflow: hidden;
}
#neural { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 4rem; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .9rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #3ddc97;
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}
.hero__subtitle { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); max-width: 34ch; margin-bottom: 1.25rem; }
.hero__typed { font-size: .98rem; color: #b9c3d6; margin-bottom: 2.2rem; min-height: 1.6em; }
.prompt { color: var(--violet); }
.caret { color: var(--blue); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.reveal-hero { opacity: 0; transform: translateY(24px); animation: heroIn 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero__photo { position: relative; justify-self: center; width: min(380px, 80vw); aspect-ratio: 1; }
.photo-ring {
  position: relative; width: 100%; height: 100%; border-radius: 50%; padding: 6px;
  isolation: isolate;
}
.photo-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #4f8cff, #9b72ff, #e86fc1, #4f8cff);
  animation: spin 6s linear infinite; z-index: -1;
}
.photo-ring::after {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  background: conic-gradient(from 0deg, #4f8cff, #9b72ff, #e86fc1, #4f8cff);
  filter: blur(50px); opacity: .35; z-index: -2;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-ring img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 6px solid var(--bg);
}
.float-chip {
  position: absolute; padding: .5rem .9rem; border-radius: 12px; font-size: .8rem;
  background: rgba(12, 18, 32, .8); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  animation: float 6s ease-in-out infinite;
}
.chip--1 { top: 8%; left: -8%; color: #8fb4ff; }
.chip--2 { bottom: 14%; right: -10%; color: #c4a8ff; animation-delay: -2s; }
.chip--3 { bottom: -2%; left: 6%; color: #f2a5d8; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--text); animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(5rem, 10vw, 8rem) 0; z-index: 1; }
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3rem; }
.section__head h2 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; font-weight: 700; }
.section__index { color: var(--violet); font-size: .95rem; }
.section__head::after {
  content: ""; flex: 1; height: 1px; align-self: center; margin-left: 1rem;
  background: linear-gradient(90deg, var(--border), transparent);
}

.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--stagger, 0s); }
.reveal.visible { opacity: 1; transform: none; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3.5rem; align-items: start; }
.about__text p { color: #b9c3d6; margin-bottom: 1.2rem; }
.about__text .lead { font-size: 1.2rem; color: var(--text); }
.hobbies { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.tag {
  padding: .45rem .9rem; border-radius: 999px; font-size: .88rem;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s;
}
.tag:hover { transform: translateY(-3px); border-color: rgba(155,114,255,.5); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  padding: 1.6rem 1.3rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: rgba(79,140,255,.4); }
.stat__num {
  display: block; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: .85rem; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: var(--border);
}
.timeline::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 2px;
  height: calc((100% - 16px) * var(--progress, 0));
  background: var(--grad);
  box-shadow: 0 0 12px rgba(155,114,255,.6);
}
.tl-item { position: relative; margin-bottom: 1.75rem; }
.tl-dot {
  position: absolute; left: calc(-2.5rem + 1px); top: 1.75rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--violet); z-index: 1;
  transition: background .4s, box-shadow .4s;
}
.tl-item.visible .tl-dot { background: var(--violet); box-shadow: 0 0 0 5px rgba(155,114,255,.15); }
.tl-dot--live { border-color: #3ddc97; }
.tl-item.visible .tl-dot--live { background: #3ddc97; box-shadow: 0 0 0 5px rgba(61,220,151,.18); animation: livePulse 2s infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } }

.card {
  position: relative; padding: 1.6rem 1.75rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  overflow: hidden;
}
.card::before {
  /* spotlight following the mouse */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(155,114,255,.12), transparent 50%);
}
.card:hover { border-color: rgba(155,114,255,.35); transform: translateX(6px); }
.card:hover::before { opacity: 1; }
.card__top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.card h3 { font-size: 1.15rem; font-weight: 600; }
.company { color: #a9b8ff; font-size: .95rem; }
.date { font-size: .78rem; color: var(--muted); white-space: nowrap; padding-top: .25rem; }
.card > p { color: #b9c3d6; font-size: .96rem; }
.sub-roles { margin-top: 1rem; display: grid; gap: .75rem; }
.sub-role { padding: .9rem 1rem; border-radius: 12px; background: rgba(255,255,255,.025); border-left: 2px solid var(--violet); }
.sub-role__head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sub-role h4 { font-size: .93rem; font-weight: 600; }
.sub-role p { font-size: .9rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.chips span {
  font-family: "JetBrains Mono", monospace; font-size: .74rem;
  padding: .28rem .6rem; border-radius: 6px;
  background: rgba(79,140,255,.08); color: #9fbcff; border: 1px solid rgba(79,140,255,.18);
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.skill-card {
  position: relative; padding: 2rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transform-style: preserve-3d; transition: border-color .3s, transform .2s ease-out, opacity .9s var(--ease);
  overflow: hidden;
}
.skill-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(79,140,255,.12), transparent 45%);
}
.skill-card:hover { border-color: rgba(79,140,255,.4); }
.skill-card:hover::before { opacity: 1; }
.skill-card__icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 1.2rem;
}
.skill-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.skill-card p { color: var(--muted); font-size: .95rem; }

/* Education */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.edu {
  position: relative; padding: 1.75rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s var(--ease), border-color .3s;
}
.edu:hover { transform: translateY(-5px); border-color: rgba(232,111,193,.35); }
.edu h3 { font-size: 1.1rem; margin: .4rem 0 .3rem; }
.edu p { color: #b9c3d6; font-size: .95rem; }
.edu__badge {
  position: absolute; top: 1.4rem; right: 1.4rem; font-size: .7rem; padding: .25rem .6rem; border-radius: 999px;
  background: var(--grad); color: #fff;
}
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.awards__col { padding: 1.75rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.awards__title { font-size: 1.05rem; margin-bottom: 1rem; }
.awards ul { list-style: none; display: grid; gap: .7rem; }
.awards li { position: relative; padding-left: 1.3rem; color: #b9c3d6; font-size: .94rem; }
.awards li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--grad); transform: rotate(45deg);
}

/* Languages */
.hello { text-align: center; font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 3rem; min-height: 1.3em; }
.hello__word { display: inline-block; transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s; }
.hello__word.out { opacity: 0; transform: translateY(-20px); filter: blur(8px); }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem 3rem; }
.lang__top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; font-weight: 500; }
.lang__top .muted { font-size: .85rem; font-weight: 400; text-align: right; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad);
  transition: width 1.6s var(--ease) .2s;
}

/* Contact */
.contact__box {
  text-align: center; padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem); border-radius: 28px;
  background: radial-gradient(ellipse at top, rgba(155,114,255,.18), transparent 60%), var(--surface);
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.contact__box::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, #9b72ff, #4f8cff, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: borderSpin 5s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --angle: 360deg; } }
.contact__box h2 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1rem; }
.contact__box p { color: var(--muted); max-width: 46ch; margin: 0 auto 2rem; }
.contact__actions { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; font-size: .88rem; position: relative; z-index: 1; }
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero__photo { order: -1; width: min(280px, 70vw); }
  .hero__subtitle { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .about { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 2rem;
    font-size: 1.3rem; background: rgba(7, 11, 20, .97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
  }
  .nav__links.open { opacity: 1; pointer-events: auto; }
  .nav__links a { transform: translateY(16px); transition: transform .4s var(--ease), color .2s; }
  .nav__links.open a { transform: none; }
  .skills-grid, .edu-grid, .awards, .lang-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 2rem); }
  .timeline { padding-left: 1.75rem; }
  .tl-dot { left: calc(-1.75rem + 1px); }
  .card { padding: 1.3rem; }
  .card__top { flex-direction: column; gap: .3rem; }
  .card:hover { transform: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.2rem 1rem; }
  .stat__num { font-size: 1.9rem; }
  .chip--1 { left: -4%; } .chip--2 { right: -6%; }
  .section__head::after { display: none; }
  .btn { width: 100%; justify-content: center; }
  .contact__actions .btn { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .reveal-hero { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Three.js hero canvas ---------- */
#hero3d {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  opacity: 0;
}
#neural { display: none; }
.has-webgl .photo-ring::after { opacity: .22; }

/* ---------- Logo tiles ---------- */
.logo-tile {
  position: relative; flex: none;
  width: 52px; height: 52px; border-radius: 14px;
  background: #fff; display: grid; place-items: center; padding: 8px;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.4);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.logo-tile--bleed { padding: 0; overflow: hidden; }
.logo-tile--bleed img { object-fit: cover; }
.logo-tile--wide { padding: 6px 5px; }
.logo-tile--duo { overflow: visible; }
.logo-tile__badge {
  position: absolute; right: -8px; bottom: -8px; width: 26px !important; height: 26px !important;
  background: #fff; border-radius: 8px; padding: 3px; box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.logo-tile--text { background: linear-gradient(135deg, #1d2b4f, #2b1d4f); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.logo-tile--text span { font-weight: 800; font-size: .74rem; letter-spacing: .08em; color: #fff; }
.logo-tile--lg { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 1rem; }
.logo-tile--lg.logo-tile--wide { width: 120px; padding: 8px 12px; }
.card:hover .logo-tile, .edu:hover .logo-tile { transform: rotate(-4deg) scale(1.06); box-shadow: 0 10px 30px -8px rgba(155,114,255,.55); }

.card__top { justify-content: flex-start; align-items: center; }
.card__title { flex: 1; min-width: 0; }
.card__top .date { align-self: flex-start; padding-top: .35rem; }

/* ---------- Logo marquee ---------- */
.marquee { position: relative; z-index: 1; padding: 1rem 0 2rem; }
.marquee__label { text-align: center; font-size: .78rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.4rem; }
.marquee__viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; gap: 1rem; width: max-content; animation: marquee 45s linear infinite; }
.marquee__viewport:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - .5rem)); } }
.marquee__item {
  display: flex; align-items: center; gap: .7rem; height: 60px; padding: 0 1.2rem 0 .6rem;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  white-space: nowrap; font-weight: 600; font-size: .92rem; color: #cfd6e4;
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.marquee__item img {
  width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; padding: 5px;
  opacity: .9; transition: opacity .4s, transform .4s var(--ease);
}
.marquee__item--wide { padding: 0 .6rem; }
.marquee__item--wide img { width: auto; max-width: 120px; padding: 6px 10px; }
.marquee__item:hover { border-color: rgba(155,114,255,.45); transform: translateY(-3px); background: var(--surface-2); }
.marquee__item:hover img { opacity: 1; transform: scale(1.06); }

@media (max-width: 560px) {
  .card__top { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .9rem; }
  .card__top .date { flex-basis: 100%; padding-top: 0; order: 3; }
  .logo-tile { width: 44px; height: 44px; border-radius: 12px; }
  .logo-tile--lg { width: 56px; height: 56px; }
  .marquee__item { height: 52px; font-size: .85rem; }
  .marquee__item img { width: 36px; height: 36px; }
}
