/* ── Reset & base ─────────────────────────────────────────────────────────── */

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

:root {
  --bg: #0a0a0d;
  --surface: #131318;
  --surface2: #1b1c24;
  --accent: #635bff;
  --accent2: #9d97ff;
  --text: #f2f2f6;
  --muted: #9496a8;
  --border: #24252f;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0,0,0,0.45);
  --transition: 0.2s ease;
}

:root[data-theme="light"] {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface2: #eef0f7;
  --accent: #5046e4;
  --accent2: #5046e4;
  --text: #16171f;
  --muted: #5c5e75;
  --border: #dfe1ef;
  --shadow: 0 12px 40px rgba(20,20,50,0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform var(--transition), opacity var(--transition), background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--surface2);
}

.btn-small {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,13,0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

:root[data-theme="light"] .site-header {
  background: rgba(247,247,251,0.8);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.3px;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.site-header nav {
  display: flex;
  gap: 1.75rem;
  flex: 1;
  justify-content: center;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem 0.65rem;
  line-height: 1.4;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text);
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--surface2);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  color: var(--accent2);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-punchline {
  color: var(--text);
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.7;
  max-width: 520px;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  margin-bottom: 2rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 1.75rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metric-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-avatar-wrap {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #4ade80;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.open-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section {
  margin-bottom: 5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Project filters ──────────────────────────────────────────────────────── */

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.filter-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Project grid ─────────────────────────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card-hidden {
  display: none;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  overflow: hidden;
}

.card-media img,
.card-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-media img,
.card:hover .card-thumb-video {
  transform: scale(1.04);
}

.card-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #17181f, #1f2030);
}

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  transition: background var(--transition);
}

.card:hover .play-icon {
  background: rgba(99,91,255,0.5);
}

.card-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Tags ─────────────────────────────────────────────────────────────────── */

.card-tags,
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--surface2);
  color: var(--accent2);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── About ────────────────────────────────────────────────────────────────── */

.about-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  max-width: 780px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about-text p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
  text-align: left;
  margin: 0;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Career Timeline (Experience) ─────────────────────────────────────────── */

.career-timeline {
  position: relative;
  display: flex;
  height: 560px;
  overflow-x: auto;
  padding: 0 0.5rem;
}

.career-timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: 50%;
  height: 2px;
  background: var(--border);
  transform: translateY(-50%);
}

.ct-node {
  position: relative;
  flex: 1 0 140px;
  min-width: 140px;
}

.ct-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--node-color, var(--accent));
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  width: 100%;
  max-width: 158px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.ct-card:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: var(--shadow);
}

.ct-up .ct-card { bottom: calc(50% + 24px); }
.ct-down .ct-card { top: calc(50% + 24px); }

.ct-date {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ct-role {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.ct-org {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--node-color, var(--accent2));
  margin-bottom: 0.5rem;
}

.ct-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.ct-now {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #4ade80;
}

.ct-now::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}

.ct-connector {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 24px;
  background: var(--node-color, var(--accent));
  transform: translateX(-50%);
  opacity: 0.6;
}

.ct-up .ct-connector { bottom: 50%; }
.ct-down .ct-connector { top: 50%; }

.ct-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--node-color, var(--accent));
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
}

.ct-current .ct-dot {
  box-shadow: 0 0 0 2px var(--node-color, var(--accent)), 0 0 0 5px rgba(99,91,255,0.25);
}

/* ── Career Arc (Education) ──────────────────────────────────────────────── */

.career-arc {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.arc-company {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
  margin-bottom: 0.9rem;
}

.arc-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  align-items: baseline;
}

.arc-row + .arc-row {
  margin-top: 0.9rem;
}

.arc-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--muted);
  white-space: nowrap;
}

.arc-role {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.arc-line {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.arc-line strong {
  color: var(--accent2);
  font-weight: 600;
}

@media (max-width: 600px) {
  .arc-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* ── Contact ──────────────────────────────────────────────────────────────── */

.contact-lead {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  transition: border-color var(--transition);
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-status-success {
  color: #4ade80;
}

.form-status-error {
  color: #f87171;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

.contact-links a:hover {
  border-color: var(--accent);
  background: var(--surface2);
  text-decoration: none;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

.modal-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  display: block;
}

/* ── Slideshow ────────────────────────────────────────────────────────────── */

.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.slide-img[hidden],
.slide-video[hidden],
.slide-tweet-wrap[hidden] {
  display: none;
}

.slide-tweet-wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0;
  background: var(--bg);
}

.slide-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.slide-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.slide-yt-fallback {
  position: absolute;
  bottom: 0.8rem;
  right: 0.8rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  z-index: 3;
  transition: background var(--transition);
}

.slide-yt-fallback:hover {
  background: #cc0000;
  text-decoration: none;
}

.slide-play-btn[hidden] {
  display: none;
}

.slide-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  font-size: 4rem;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition), font-size var(--transition);
}

.slide-play-btn:hover {
  background: rgba(99,91,255,0.5);
  font-size: 4.5rem;
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
  transition: background var(--transition);
}

.slide-arrow:hover {
  background: rgba(99,91,255,0.8);
}

.slide-prev { left: 0.5rem; }
.slide-next { right: 0.5rem; }

.slide-dots {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.slide-dot.active {
  background: #fff;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  padding: 1.2rem 1.5rem 0.4rem;
}

.modal-desc {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0 1.5rem 1rem;
  line-height: 1.7;
}

.modal-tags {
  padding: 0 1.5rem 1.5rem;
}

/* ── Skills ───────────────────────────────────────────────────────────────── */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--group-color, var(--accent));
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.skill-group:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.skill-group-control   { --group-color: #6c63ff; }
.skill-group-embedded  { --group-color: #38bdf8; }
.skill-group-robotics  { --group-color: #4ade80; }
.skill-group-software  { --group-color: #fbbf24; }
.skill-group-soft      { --group-color: #f472b6; }

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--group-color, var(--accent2));
  margin-bottom: 0.85rem;
}

.skill-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  background: var(--surface2);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 500;
  transition: border-color var(--transition), transform var(--transition), color var(--transition);
}

.skill-tag:hover {
  border-color: var(--group-color, var(--accent));
  color: var(--group-color, var(--accent2));
  transform: translateY(-1px);
}

/* ── Recognition ──────────────────────────────────────────────────────────── */

.recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.recognition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.recognition-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.recognition-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.recognition-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.recognition-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Recent Projects ──────────────────────────────────────────────────────── */

.recent-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.rp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.rp-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rp-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.rp-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.rp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.rp-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.rp-status-active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.rp-status-wip {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.rp-status-completed {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent2);
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.repo-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ── Publications ─────────────────────────────────────────────────────────── */

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pub-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: border-color var(--transition);
}

.pub-item:hover {
  border-color: var(--accent);
}

.pub-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 0.1rem;
}

.pub-badge-talk {
  background: rgba(99, 91, 255, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(99, 91, 255, 0.35);
}

.pub-badge-paper {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pub-badge-article {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.pub-badge-poster {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.pub-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.pub-year {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent2);
}

.pub-link-btn {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent2);
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.pub-link-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
  }

  .hero-avatar-wrap {
    max-width: 220px;
  }

  .site-header nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-metrics {
    grid-template-columns: repeat(2, auto);
  }

  .about-text p {
    text-align: left;
  }

  .header-inner {
    gap: 0.75rem;
  }
}
