:root {
  --bg: #070707;
  --bg-soft: #121212;
  --card: rgba(25, 25, 25, 0.74);
  --card-solid: #171717;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f1;
  --muted: #b3b3b3;
  --accent: #e50914;
  --accent-soft: #ff4d5a;
  --glow: rgba(229, 9, 20, 0.35);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(229, 9, 20, 0.14), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 99, 71, 0.08), transparent 20%),
    linear-gradient(180deg, #060606 0%, #0b0b0b 45%, #050505 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a[aria-current="page"] {
  color: #fff;
}

button {
  font: inherit;
}

#background-canvas,
.noise,
.intro,
.modal {
  position: fixed;
  inset: 0;
}

#background-canvas {
  z-index: -3;
}

.noise {
  z-index: -2;
  opacity: 0.09;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.intro {
  z-index: 20;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.15), #000 55%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-logo {
  display: grid;
  place-items: center;
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(10, 10, 10, 0.7);
  box-shadow: 0 0 60px rgba(229, 9, 20, 0.25);
  transform: perspective(800px) rotateX(16deg) rotateY(-22deg);
  animation: introPulse 2.4s ease-in-out infinite;
}

.intro-logo span,
.brand,
.hero h1,
.section-heading h2 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
}

.intro-logo span {
  font-size: 7rem;
  color: var(--accent);
  text-shadow: 0 0 35px rgba(229, 9, 20, 0.6);
}

.intro-text {
  margin-top: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1.2rem, 2vw, 2.4rem);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.22));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(7, 7, 7, 0.9);
  border-color: var(--line);
}

.brand {
  font-size: 2rem;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}

.menu-toggle {
  display: none;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.site-nav a,
.header-cta {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
}

.site-nav a:hover,
.header-cta:hover {
  color: #fff;
}

.header-cta {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

main {
  padding-bottom: 4rem;
}

.hero,
.section,
.contact-section {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 2rem;
  min-height: calc(100vh - 5rem);
  padding: 3rem 0 4rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent-soft);
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4.5rem, 11vw, 8.5rem);
  line-height: 0.9;
}

.hero-title-lockup {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
}

.hero-subtitle {
  max-width: 44rem;
  margin: 1rem 0 1.5rem;
  color: #f2f2f2;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-meta,
.hero-proofline,
.hero-actions,
.hero-signals,
.hero-stats,
.about-grid,
.modal-tech,
.modal-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-proofline {
  margin: 1.2rem 0 0.4rem;
}

.hero-proofline span {
  color: #f4d7d9;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-proofline span::after {
  content: "•";
  margin-left: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}

.hero-proofline span:last-child::after {
  content: "";
  margin: 0;
}

.hero-meta span,
.modal-tech span {
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #e6e6e6;
  font-size: 0.86rem;
}

.button {
  padding: 0.95rem 1.5rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, #ffffff, #cfcfcf);
  color: #111;
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.12);
}

.button-secondary {
  color: #fff;
  background: rgba(109, 109, 110, 0.65);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.button-tertiary {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.hero-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.4rem;
}

.signal-card {
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.signal-label {
  display: block;
  margin-bottom: 0.45rem;
  color: #ffb7bc;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1.08rem;
}

.signal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.hero-stats {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.hero-stats article,
.info-card,
.strip-card,
.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-stats article {
  padding: 1rem;
  border-radius: 1.35rem;
}

.hero-stats strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1.8rem;
}

.hero-stats span,
.timeline-item p,
.strip-card p,
.contact-copy,
.modal-body p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-scene {
  position: relative;
  height: 42rem;
  min-width: 0;
  transform-style: preserve-3d;
  perspective: 1500px;
}

.scene-ring,
.scene-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
}

.scene-ring {
  inset: 12% 8%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.02);
}

.scene-glow-a {
  width: 18rem;
  height: 18rem;
  top: 7%;
  left: 12%;
  background: rgba(229, 9, 20, 0.18);
}

.scene-glow-b {
  width: 12rem;
  height: 12rem;
  bottom: 16%;
  right: 8%;
  background: rgba(255, 196, 0, 0.12);
}

.feature-panel {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(10, 10, 10, 0.65), rgba(10, 10, 10, 0.86));
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.38), 0 0 60px rgba(229, 9, 20, 0.08);
  backdrop-filter: blur(12px);
}

.feature-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.feature-panel > * {
  position: relative;
  z-index: 1;
}

.panel-main,
.panel-side,
.panel-float {
  animation: drift 7s ease-in-out infinite;
}

.panel-main {
  top: 15%;
  left: 12%;
  width: 54%;
  padding: 2rem;
  border-radius: 2rem;
  transform: translateZ(110px) rotateY(-16deg) rotateX(10deg);
}

.panel-main h2,
.panel-side h3 {
  margin: 0.4rem 0 0.8rem;
}

.panel-main h2 {
  font-size: 2rem;
}

.panel-main p,
.panel-side p {
  color: #f0f0f0;
  line-height: 1.65;
}

.panel-side {
  width: 33%;
  padding: 1.35rem;
  border-radius: 1.6rem;
}

.panel-side-a {
  right: 6%;
  top: 22%;
  transform: translateZ(30px) rotateY(14deg) rotateX(-8deg);
  animation-delay: -2s;
}

.panel-side-b {
  bottom: 18%;
  left: 24%;
  transform: translateZ(180px) rotateY(-8deg) rotateX(8deg);
  animation-delay: -4s;
}

.panel-float {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  padding: 1rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
}

.panel-float-a {
  top: 6%;
  right: 4%;
  transform: translateZ(220px) rotateX(20deg) rotateY(-18deg);
}

.panel-float-b {
  bottom: 8%;
  right: 18%;
  transform: translateZ(120px) rotateX(-10deg) rotateY(-12deg);
  animation-delay: -3s;
}

.panel-float-c {
  left: 5%;
  bottom: 10%;
  transform: translateZ(70px) rotateX(16deg) rotateY(18deg);
  animation-delay: -5s;
}

.panel-kicker {
  color: #ffd7d9;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section {
  padding-top: 4rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.hidden {
  display: none !important;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skills-matrix,
.education-grid,
.papers-grid {
  display: grid;
  gap: 1rem;
}

.skills-matrix {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.skill-cluster {
  padding: 1.4rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.skill-cluster h3,
.paper-card h3 {
  margin-top: 0;
}

.skill-cluster p,
.paper-card p,
.repo-summary-card p,
.repo-table td {
  color: var(--muted);
}

.skill-tags,
.cert-strip,
.paper-links,
.repo-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tags span,
.cert-strip span {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
}

.info-card,
.strip-card,
.contact-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
}

.info-card h3,
.strip-card h3,
.contact-card h2 {
  margin-top: 0;
}

.rails {
  display: grid;
  gap: 2.6rem;
}

.rail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.rail-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.8rem;
  line-height: 1.05;
  text-wrap: balance;
}

.rail-header p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.rail-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
  padding-bottom: 0.5rem;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.project-card {
  appearance: none;
  position: relative;
  min-height: 23rem;
  width: 100%;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(12, 12, 12, 0.94) 60%);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
  text-align: left;
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(229, 9, 20, 0.14));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(229, 9, 20, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48), 0 0 35px rgba(229, 9, 20, 0.15);
}

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

.project-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.project-layer-a {
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateZ(30px);
}

.project-layer-b {
  inset: auto 1rem 1rem auto;
  width: 5rem;
  height: 5rem;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.36), transparent 68%);
  transform: translateZ(80px);
  filter: blur(6px);
}

.project-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  height: 100%;
}

.project-label,
.project-year,
.timeline-date,
.strip-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.project-label,
.strip-tag {
  color: #ffb7bc;
}

.project-card h4 {
  margin: 0.5rem 0 0.7rem;
  font-size: 1.5rem;
}

.project-card p {
  margin: 0;
  color: #ddd;
  line-height: 1.6;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.9), rgba(255, 255, 255, 0.08));
}

.timeline-item {
  position: relative;
  margin-left: 3rem;
  padding: 1.3rem 1.35rem 1.3rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.4rem;
  background: rgba(19, 19, 19, 0.75);
  backdrop-filter: blur(12px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: -2.35rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(229, 9, 20, 0.18);
}

.timeline-item h3 {
  margin: 0.3rem 0;
}

.timeline-role {
  margin: 0 0 0.4rem;
  color: #efefef !important;
  font-weight: 700;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.strip-card {
  min-height: 14rem;
}

.education-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.cert-strip {
  margin-top: 1.2rem;
}

.papers-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paper-card,
.repo-summary-card {
  padding: 1.5rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 18, 18, 0.82);
  box-shadow: var(--shadow);
}

.scholar-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(229, 9, 20, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(12, 12, 12, 0.92));
  box-shadow: var(--shadow);
}

.scholar-copy h3 {
  margin: 0.2rem 0 0.7rem;
  font-size: 2rem;
}

.scholar-copy p,
.scholar-note {
  color: var(--muted);
  line-height: 1.7;
}

.scholar-affiliation {
  margin: 0 0 0.85rem;
}

.scholar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.scholar-metrics,
.scholar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.scholar-metric {
  min-width: 9rem;
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.scholar-metric-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #ffb7bc;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scholar-metric strong {
  font-size: 1.6rem;
  color: #fff;
}

.scholar-badges img {
  height: 28px;
  width: auto;
}

.scholar-tags span {
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.scholar-actions {
  display: grid;
  align-content: center;
  gap: 0.9rem;
}

.scholar-actions .button {
  width: 100%;
  text-align: center;
}

.paper-status {
  color: #ffb7bc;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.paper-meta {
  margin: 0.8rem 0;
  color: #eee;
  font-size: 0.95rem;
}

.paper-points {
  padding-left: 1.1rem;
  line-height: 1.7;
  color: #ddd;
}

.paper-links a {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.paper-links a:hover {
  border-color: rgba(229, 9, 20, 0.5);
}

.repo-summary {
  margin-bottom: 1rem;
}

.repo-summary-card {
  min-width: 12rem;
}

.repo-summary-card strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.8rem;
  color: #fff;
}

.repo-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.4rem;
  background: rgba(13, 13, 13, 0.9);
}

.repo-table {
  width: 100%;
  border-collapse: collapse;
}

.repo-table th,
.repo-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  white-space: nowrap;
}

.repo-table th {
  color: #fff;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.repo-table td a {
  color: #fff;
}

.repo-table td a:hover {
  color: var(--accent-soft);
}

.contact-section {
  padding-top: 4rem;
}

.browse-body .site-header {
  position: sticky;
}

.browse-page {
  padding-bottom: 4rem;
}

.browse-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  align-items: end;
  gap: 1.5rem;
  width: min(1380px, calc(100% - 2rem));
  min-height: 78vh;
  margin: 0 auto;
  padding: 5.5rem 0 3rem;
}

.browse-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 75% 30%, rgba(229, 9, 20, 0.24), transparent 20%),
    radial-gradient(circle at 85% 65%, rgba(255, 255, 255, 0.08), transparent 15%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.browse-copy,
.browse-feature-card {
  position: relative;
  z-index: 1;
}

.browse-copy {
  padding: 2rem;
}

.browse-copy h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.05em;
}

.browse-copy p:last-of-type {
  max-width: 42rem;
  color: #ddd;
  line-height: 1.8;
  font-size: 1.02rem;
}

.browse-feature-card {
  margin: 2rem;
  padding: 1.6rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(12, 12, 12, 0.88));
  backdrop-filter: blur(14px);
  justify-self: end;
  max-width: 24rem;
}

.browse-feature-card h2 {
  margin: 0.5rem 0 0.8rem;
  font-size: 2rem;
}

.browse-feature-card p {
  color: #ddd;
  line-height: 1.7;
}

.browse-feature-card a {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.browse-section {
  padding-top: 2rem;
}

.browse-utility {
  padding-top: 1rem;
}

.browse-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.browse-chip-row a,
.browse-feature-card a {
  display: inline-flex;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.browse-chip-row a:hover,
.browse-feature-card a:hover {
  border-color: rgba(229, 9, 20, 0.45);
  background: rgba(229, 9, 20, 0.12);
}

.browse-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.browse-copy p {
  max-width: 42rem;
}

.browse-spotlight-card {
  padding: 1.25rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.browse-spotlight-card strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #fff;
}

.browse-spotlight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-card {
  text-align: center;
}

.contact-card h2 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
}

.contact-links {
  justify-content: center;
  margin-top: 1.5rem;
}

.contact-links a,
.modal-links a {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.contact-links a:hover,
.modal-links a:hover {
  border-color: rgba(229, 9, 20, 0.5);
  background: rgba(229, 9, 20, 0.12);
}

.modal {
  z-index: 30;
  display: grid;
  place-items: center;
}

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

.modal-card {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.7rem;
  background: #101010;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.modal-media {
  min-height: 16rem;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.3), transparent 22%),
    radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(135deg, #2a0d10, #0b0b0b 55%);
}

.modal-body {
  padding: 1.6rem;
}

.modal-body h2 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.modal-points {
  padding-left: 1.1rem;
  color: #ddd;
  line-height: 1.8;
}

.modal-exit {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 2;
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes introPulse {
  0%,
  100% {
    transform: perspective(800px) rotateX(16deg) rotateY(-22deg) scale(1);
  }
  50% {
    transform: perspective(800px) rotateX(8deg) rotateY(-8deg) scale(1.05);
  }
}

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@media (max-width: 1100px) {
  .site-header {
    align-items: center;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .browse-hero {
    grid-template-columns: 1fr;
  }

  .hero-scene {
    height: 34rem;
  }

  .hero-signals {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .about-grid,
  .skills-matrix,
  .education-grid,
  .papers-grid,
  .browse-spotlight-grid,
  .scholar-card {
    grid-template-columns: 1fr;
  }

  .panel-main {
    width: 62%;
  }

  .panel-side {
    width: 38%;
  }
}

@media (max-width: 900px) {
  .hero,
  .section,
  .contact-section,
  .browse-hero {
    width: min(100%, calc(100% - 1.5rem));
  }

  .site-header {
    padding-inline: 1rem;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-hero {
    min-height: auto;
    padding-top: 4.5rem;
  }

  .browse-feature-card {
    justify-self: stretch;
    max-width: none;
    margin: 0 2rem 2rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    order: 4;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.1rem;
    background: rgba(12, 12, 12, 0.96);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
  }

  .site-nav a {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
  }

  .header-cta {
    order: 3;
    margin-left: 0;
  }

  .hero {
    width: min(100%, calc(100% - 1rem));
    gap: 1.5rem;
    padding-top: 1.25rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-scene {
    order: 2;
  }

  .hero h1 {
    font-size: clamp(3rem, 17vw, 3.9rem);
  }

  .hero-title-lockup {
    font-size: 1.15rem;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .hero-meta span,
  .modal-tech span,
  .skill-tags span,
  .cert-strip span {
    font-size: 0.8rem;
  }

  .browse-copy h1 {
    font-size: clamp(2.9rem, 16vw, 3.6rem);
  }

  .hero-scene {
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    perspective: none;
    transform: none !important;
  }

  .panel-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1.3rem;
  }

  .panel-side {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1rem;
  }

  .panel-main,
  .panel-side,
  .panel-float,
  .scene-ring,
  .scene-glow {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none !important;
    animation: none;
  }

  .scene-ring,
  .scene-glow {
    display: none;
  }

  .panel-float {
    min-width: auto;
    max-width: 100%;
    justify-content: flex-start;
    font-size: 0.76rem;
    border-radius: 1rem;
  }

  .browse-feature-card,
  .browse-copy {
    margin: 0.75rem;
    padding: 1.2rem;
  }

  .rail-track {
    grid-auto-columns: minmax(15rem, 82vw);
  }

  .rail-header {
    align-items: flex-start;
  }

  .rail-header h3 {
    font-size: clamp(1.2rem, 7vw, 1.5rem);
    margin-bottom: 0.35rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .rail-header p {
    font-size: 0.92rem;
  }

  .project-card {
    min-height: 20rem;
  }

  .project-card h4 {
    font-size: 1.3rem;
    line-height: 1.15;
    text-wrap: balance;
  }

  .section-heading {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading h2 {
    max-width: 12ch;
    font-size: clamp(1.9rem, 8vw, 2.7rem);
    line-height: 0.98;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  .panel-main h2,
  .panel-side h3 {
    overflow-wrap: anywhere;
  }

  .rails {
    gap: 1.4rem;
  }

  .rail-track {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .project-card {
    min-height: auto;
  }

  .timeline-item {
    margin-left: 2.3rem;
    padding-inline: 1rem;
  }

  .timeline-item::before {
    left: -1.7rem;
  }

  .modal-card {
    width: min(100%, calc(100% - 1rem));
    max-height: calc(100vh - 1rem);
    border-radius: 1.2rem;
  }

  .modal-media,
  .modal-body {
    padding: 1.2rem;
  }

  .modal-links,
  .contact-links,
  .scholar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-links a,
  .contact-links a {
    justify-content: center;
    text-align: center;
  }

  .repo-table th,
  .repo-table td {
    padding: 0.8rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 520px) {
  .intro-logo {
    width: 8rem;
    height: 8rem;
    border-radius: 1.5rem;
  }

  .intro-logo span {
    font-size: 5rem;
  }

  .intro-text {
    padding-inline: 1rem;
    text-align: center;
    letter-spacing: 0.14em;
  }

  .brand {
    font-size: 1.65rem;
  }

  .header-cta,
  .menu-toggle {
    width: 100%;
  }

  .header-cta {
    order: 4;
  }

  .site-nav {
    order: 5;
  }

  .hero,
  .section,
  .contact-section,
  .browse-hero {
    width: min(100%, calc(100% - 0.75rem));
  }

  .hero-title-lockup {
    font-size: 1.02rem;
  }

  .hero-stats strong {
    font-size: 1.45rem;
  }

  .strip-grid {
    grid-template-columns: 1fr;
  }

  .browse-copy p:last-of-type,
  .browse-feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .section-heading h2 {
    max-width: 100%;
    font-size: clamp(1.6rem, 8.5vw, 2.15rem);
  }

  .repo-summary-card {
    min-width: 0;
  }

  .repo-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .repo-col-extra {
    display: none !important;
  }

  .repo-table,
  .repo-table thead,
  .repo-table tbody,
  .repo-table tr,
  .repo-table th,
  .repo-table td {
    display: block;
    width: 100%;
  }

  .repo-table thead {
    display: none;
  }

  .repo-table tr {
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    overflow: hidden;
    background: rgba(13, 13, 13, 0.9);
  }

  .repo-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    white-space: normal;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: right;
  }

  .repo-table td::before {
    content: attr(data-label);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: left;
  }

  .repo-table td:last-child {
    border-bottom: 0;
  }

  .rail-header h3 {
    font-size: 1.1rem;
    line-height: 1.1;
  }

  .rail-header p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .rail-track {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }

  .project-card {
    min-height: 16rem;
  }

  .project-card h4 {
    font-size: 1.18rem;
  }

  .repo-table th,
  .repo-table td {
    padding: 0.7rem;
    font-size: 0.8rem;
  }
}

.detail-page {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: stretch;
  min-height: calc(100vh - 7rem);
  padding-top: 4rem;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.82)),
    radial-gradient(circle at 18% 18%, rgba(229, 9, 20, 0.2), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(255, 196, 0, 0.1), transparent 18%);
  box-shadow: var(--shadow);
}

.detail-copy,
.detail-side-card {
  position: relative;
  z-index: 1;
}

.detail-copy {
  padding: 3rem;
  align-self: center;
}

.detail-copy h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.6rem, 8vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.05em;
}

.detail-lead {
  max-width: 48rem;
  margin: 1rem 0 1.5rem;
  color: #ededed;
  line-height: 1.8;
  font-size: 1.04rem;
}

.detail-side-card,
.detail-card,
.contact-form {
  padding: 1.5rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(12, 12, 12, 0.88));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.detail-side-card {
  margin: 2rem;
  align-self: end;
}

.detail-section {
  padding-top: 2.5rem;
}

.service-grid,
.pricing-grid {
  display: grid;
  gap: 1rem;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-card h3,
.detail-side-card h2 {
  margin-top: 0;
}

.detail-card p,
.detail-side-card p,
.detail-list,
.contact-form label span {
  color: var(--muted);
}

.detail-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.8;
}

.detail-list li + li {
  margin-top: 0.45rem;
}

.stat-highlight {
  display: block;
  margin-bottom: 0.45rem;
  color: #fff;
  font-size: 2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.compact-form {
  margin: 1.5rem 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
}

.contact-form label span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(229, 9, 20, 0.55);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

.form-span-2 {
  grid-column: span 2;
}

.site-footer {
  width: min(1380px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 0.5rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .detail-page {
    width: min(100%, calc(100% - 1.5rem));
  }

  .site-footer {
    width: min(100%, calc(100% - 1.5rem));
  }

  .detail-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }

  .detail-side-card {
    margin: 0 2rem 2rem;
  }

  .service-grid,
  .pricing-grid,
  .split-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .detail-page {
    width: min(100%, calc(100% - 1rem));
  }

  .site-footer {
    width: min(100%, calc(100% - 1rem));
  }

  .detail-copy {
    padding: 1.2rem;
  }

  .detail-copy h1 {
    font-size: clamp(3rem, 16vw, 3.8rem);
  }

  .detail-side-card {
    margin: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .detail-page {
    width: min(100%, calc(100% - 0.75rem));
  }

  .site-footer {
    width: min(100%, calc(100% - 0.75rem));
  }

  .detail-hero {
    padding-top: 2rem;
  }

  .detail-lead {
    font-size: 0.96rem;
  }
}
