:root {
  --bg-primary: #07070d;
  --bg-secondary: #0e0e18;
  --bg-card: #111120;
  --border-subtle: rgba(255, 255, 255, .06);
  --border-accent: rgba(120, 100, 255, .2);
  --text-primary: #e8e6f0;
  --text-secondary: #9a97b0;
  --text-muted: #5e5b73;
  --accent: #7c6aef;
  --accent-light: #a594ff;
  --accent-dim: rgba(124, 106, 239, .12);
  --accent-glow: rgba(124, 106, 239, .25);
  --gradient-hero: linear-gradient(135deg, #7c6aef 0%, #4fc3f7 100%);
  --gradient-card: linear-gradient(160deg, rgba(124, 106, 239, .08) 0%, rgba(79, 195, 247, .04) 100%);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;
  --fs-5xl: 4.5rem;
  --space-xs: .25rem;
  --space-sm: .5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  --container-max: 1100px;
  --container-wide: 1280px;
  --nav-height: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --duration: .4s;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image:
    radial-gradient(circle, rgba(124, 106, 239, .08) 1px, transparent 1px),
    linear-gradient(rgba(124, 106, 239, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 106, 239, .025) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative
}

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

ul,
ol {
  list-style: none
}

img {
  max-width: 100%;
  display: block
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl)
}

.section {
  padding: var(--space-5xl) 0;
  position: relative
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-md)
}

.section__label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent)
}

.section__title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -.02em
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out)
}

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

.reveal-group>.reveal:nth-child(1) {
  transition-delay: 0s
}

.reveal-group>.reveal:nth-child(2) {
  transition-delay: .08s
}

.reveal-group>.reveal:nth-child(3) {
  transition-delay: .16s
}

.reveal-group>.reveal:nth-child(4) {
  transition-delay: .24s
}

.reveal-group>.reveal:nth-child(5) {
  transition-delay: .32s
}

.reveal-group>.reveal:nth-child(6) {
  transition-delay: .4s
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(7, 7, 13, .88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out)
}

.nav.scrolled {
  background: rgba(7, 7, 13, .95);
  box-shadow: 0 1px 0 var(--border-subtle), 0 4px 24px rgba(0,0,0,.4)
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-wide)
}

.nav__logo {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary)
}

.nav__logo span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.nav__links {
  display: flex;
  gap: var(--space-lg)
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease-out);
  position: relative
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration) var(--ease-out)
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary)
}

.nav__link.active::after {
  width: 100%
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .3s var(--ease-out)
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 106, 239, .08) 0%, transparent 70%);
  pointer-events: none
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 740px
}

.hero__tag {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: .08em;
  margin-bottom: var(--space-lg)
}

.hero__name {
  font-size: var(--fs-5xl);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: var(--space-md)
}

.hero__name .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.hero__headline {
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6
}

.hero__desc {
  font-size: var(--fs-base);
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: var(--space-2xl)
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md)
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  border: none;
  white-space: nowrap
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow)
}

.btn--primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px)
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle)
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim);
  transform: translateY(-2px)
}

.about__intro {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: var(--space-3xl);
  line-height: 1.8
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl)
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out)
}

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

.card__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  margin-bottom: var(--space-lg)
}

.card li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
  line-height: 1.6
}

.card li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700
}

/* Philosophy */
.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl)
}

.philosophy__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.8
}

.philosophy__text p {
  margin-bottom: var(--space-lg)
}

.philosophy__domains {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg)
}

.philosophy__domain {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-xl)
}

/* Detail sections (Electra, MindExp, Agro-Rover) */
.detail {
  border-top: 1px solid var(--border-subtle)
}

.detail__badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg)
}

.detail__intro {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.8;
  margin-bottom: var(--space-2xl)
}

.detail__role {
  font-size: var(--fs-sm);
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: var(--space-md)
}

.detail__subsections {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl)
}

.subsection {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--duration) var(--ease-out)
}

.subsection:hover {
  border-color: var(--border-accent)
}

.subsection__number {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: var(--space-sm)
}

.subsection__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md)
}

.subsection__desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg)
}

.subsection__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg)
}

.subsection__list-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  margin-bottom: var(--space-md)
}

.subsection li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: var(--space-lg);
  position: relative
}

.subsection li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: var(--fs-xs)
}

/* Vision callout */
.vision {
  background: var(--gradient-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-2xl)
}

.vision__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md)
}

.vision__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md)
}

.vision__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm)
}

.vision__tag {
  font-size: var(--fs-xs);
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 4px 14px;
  border-radius: var(--radius-sm)
}

/* Projects */
.projects__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl)
}

.project {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out)
}

.project:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px)
}

.project__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg)
}

.project__name {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.01em
}

.project__type {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0
}

.project__desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  max-width: 700px
}

.project__layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg)
}

.project__layer {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md)
}

.project__layer-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  margin-bottom: var(--space-md)
}

.project__layer li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 2px 0;
  padding-left: var(--space-md);
  position: relative
}

.project__layer li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700
}

.project__purpose {
  margin-top: var(--space-lg);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: italic;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle)
}

.project__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md)
}

.project__feature {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-sm)
}

/* Skills */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl)
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out)
}

.skill-group:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px)
}

.skill-group__icon {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-md)
}

.skill-group__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-light);
  margin-bottom: var(--space-lg)
}

.skill-group li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: var(--space-lg);
  position: relative
}

.skill-group li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700
}

/* Awards */
.awards__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl)
}

.award {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out)
}

.award:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px)
}

.award__icon {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md)
}

.award__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm)
}

.award__event {
  font-size: var(--fs-sm);
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: var(--space-sm)
}

.award__detail {
  font-size: var(--fs-sm);
  color: var(--text-muted)
}

/* Research */
.research__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md)
}

.research__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out)
}

.research__item:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px)
}

.research__item-icon {
  font-size: var(--fs-lg);
  flex-shrink: 0
}

.research__item-text {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary)
}

/* Future */
.future__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-top: var(--space-xl)
}

.future__principles {
  margin-top: var(--space-2xl)
}

.future__principles li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: var(--space-lg);
  position: relative
}

.future__principles li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent)
}

/* Collab */
.collab {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle)
}

.collab__content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto
}

.collab__areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-2xl) 0
}

.collab__area {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  transition: all var(--duration) var(--ease-out)
}

.collab__area:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim)
}

.collab__note {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl)
}

/* Positioning */
.positioning {
  text-align: center;
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-subtle)
}

.positioning__line {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 2.2
}

.positioning__line strong {
  color: var(--accent-light);
  font-weight: 600
}

.positioning__footer {
  margin-top: var(--space-xl);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: italic
}

/* Footer */
.footer {
  padding: var(--space-4xl) 0 var(--space-2xl)
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center
}

.footer__name {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm)
}

.footer__location {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl)
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl)
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease-out)
}

.footer__link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim);
  transform: translateY(-2px)
}

.footer__divider {
  width: 60px;
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: var(--space-xl)
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-muted)
}

/* Responsive */
@media(max-width:1024px) {
  .hero__name {
    font-size: var(--fs-4xl)
  }

  .section__title {
    font-size: var(--fs-2xl)
  }

  .about__grid,
  .philosophy__grid,
  .future__grid {
    grid-template-columns: 1fr
  }

  .awards__grid {
    grid-template-columns: 1fr
  }

  .subsection__grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:768px) {
  :root {
    --space-5xl: 5rem
  }

  .container {
    padding: 0 var(--space-lg)
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 7, 13, .98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease-out);
    border-top: 1px solid rgba(124, 106, 239, .15)
  }

  .nav__links.open {
    opacity: 1;
    pointer-events: auto
  }

  .nav__toggle {
    display: flex
  }

  .nav__toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0
  }

  .nav__toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
  }

  .hero__name {
    font-size: var(--fs-3xl)
  }

  .hero__headline {
    font-size: var(--fs-base)
  }

  .hero__actions {
    flex-direction: column
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center
  }

  .project__header {
    flex-direction: column
  }

  .project__layers {
    grid-template-columns: 1fr
  }

  .skills__grid {
    grid-template-columns: 1fr 1fr
  }

  .footer__links {
    flex-direction: column;
    align-items: center
  }

  .footer__link {
    width: 100%;
    justify-content: center
  }

  .collab__areas {
    flex-direction: column;
    align-items: center
  }
}

@media(max-width:480px) {
  .skills__grid {
    grid-template-columns: 1fr
  }

  .research__list {
    grid-template-columns: 1fr
  }
}

/* === TECHNICAL BACKGROUND === */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .6
}

/* Floating diagonal accent lines */
.bg-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden
}

.bg-lines__line {
  position: absolute;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(124, 106, 239, .18) 30%, rgba(79, 195, 247, .14) 70%, transparent);
  width: 1.5px;
  animation: lineFloat linear infinite;
  opacity: 0
}

.bg-lines__line:nth-child(1) {
  left: 8%;
  height: 40vh;
  animation-duration: 18s;
  animation-delay: 0s
}

.bg-lines__line:nth-child(2) {
  left: 22%;
  height: 55vh;
  animation-duration: 24s;
  animation-delay: 3s
}

.bg-lines__line:nth-child(3) {
  left: 38%;
  height: 35vh;
  animation-duration: 20s;
  animation-delay: 7s
}

.bg-lines__line:nth-child(4) {
  left: 55%;
  height: 50vh;
  animation-duration: 22s;
  animation-delay: 2s
}

.bg-lines__line:nth-child(5) {
  left: 72%;
  height: 45vh;
  animation-duration: 26s;
  animation-delay: 5s
}

.bg-lines__line:nth-child(6) {
  left: 88%;
  height: 30vh;
  animation-duration: 19s;
  animation-delay: 9s
}

.bg-lines__line:nth-child(7) {
  left: 45%;
  height: 60vh;
  animation-duration: 28s;
  animation-delay: 11s
}

.bg-lines__line:nth-child(8) {
  left: 15%;
  height: 38vh;
  animation-duration: 21s;
  animation-delay: 6s
}

@keyframes lineFloat {
  0% {
    transform: translateY(110vh) rotate(3deg);
    opacity: 0
  }

  10% {
    opacity: 1
  }

  90% {
    opacity: 1
  }

  100% {
    transform: translateY(-120vh) rotate(-2deg);
    opacity: 0
  }
}

/* Soft radial glow accents */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px)
}

.bg-glow--1 {
  width: 500px;
  height: 500px;
  top: 20%;
  right: -5%;
  background: rgba(124, 106, 239, .09);
  animation: glowDrift1 30s ease-in-out infinite alternate
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  bottom: 30%;
  left: -8%;
  background: rgba(79, 195, 247, .07);
  animation: glowDrift2 35s ease-in-out infinite alternate
}

.bg-glow--3 {
  width: 350px;
  height: 350px;
  top: 60%;
  right: 20%;
  background: rgba(124, 106, 239, .06);
  animation: glowDrift3 25s ease-in-out infinite alternate
}

@keyframes glowDrift1 {
  0% {
    transform: translate(0, 0)
  }

  100% {
    transform: translate(-60px, 40px)
  }
}

@keyframes glowDrift2 {
  0% {
    transform: translate(0, 0)
  }

  100% {
    transform: translate(50px, -30px)
  }
}

@keyframes glowDrift3 {
  0% {
    transform: translate(0, 0)
  }

  100% {
    transform: translate(-40px, -50px)
  }
}

/* Ensure all content sits above the background */
.nav,
.section,
.footer,
.collab,
.positioning,
footer {
  position: relative;
  z-index: 1
}

/* Horizontal scanline sweep */
.bg-scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden
}

.bg-scanline::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 239, .15) 20%, rgba(79, 195, 247, .12) 50%, rgba(124, 106, 239, .15) 80%, transparent);
  box-shadow: 0 0 20px 4px rgba(124, 106, 239, .06);
  animation: scanSweep 12s ease-in-out infinite
}

@keyframes scanSweep {
  0% {
    top: -2px;
    opacity: 0
  }

  5% {
    opacity: 1
  }

  95% {
    opacity: 1
  }

  100% {
    top: 100%;
    opacity: 0
  }
}

/* Circuit corner accents on cards */
.subsection::before,
.project::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 28px;
  border-top: 2px solid rgba(124, 106, 239, .25);
  border-left: 2px solid rgba(124, 106, 239, .25);
  border-radius: 2px 0 0 0;
  pointer-events: none;
  transition: all var(--duration) var(--ease-out)
}

.subsection::after,
.project::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid rgba(79, 195, 247, .15);
  border-right: 2px solid rgba(79, 195, 247, .15);
  border-radius: 0 0 2px 0;
  pointer-events: none;
  transition: all var(--duration) var(--ease-out)
}

.subsection:hover::before,
.project:hover::before {
  width: 40px;
  height: 40px;
  border-color: rgba(124, 106, 239, .5)
}

.subsection:hover::after,
.project:hover::after {
  width: 40px;
  height: 40px;
  border-color: rgba(79, 195, 247, .35)
}

.subsection,
.project {
  position: relative
}

/* Hero crosshair decoration */
.hero__crosshair {
  position: absolute;
  top: 50%;
  right: 12%;
  width: 120px;
  height: 120px;
  transform: translateY(-50%);
  opacity: .12;
  pointer-events: none;
  z-index: 0
}

.hero__crosshair::before,
.hero__crosshair::after {
  content: '';
  position: absolute
}

.hero__crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent)
}

.hero__crosshair::after {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent), transparent)
}

@media (prefers-reduced-motion: reduce) {

  .bg-lines__line,
  .bg-glow,
  .bg-scanline::before {
    animation: none;
    opacity: 0
  }

  #bgCanvas {
    display: none
  }
}
/* Blog FAQ Section */
.blog-faq {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: rgba(124, 106, 239, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.blog-faq__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.faq-item {
  margin-bottom: var(--space-lg);
}

.faq-item__question {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: var(--space-xs);
}

.faq-item__answer {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.blog-post-page .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- BLOG ENHANCEMENTS (FUTURISTIC UI) --- */

.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 2000;
}

.reading-progress-bar {
  height: 100%;
  background: var(--gradient-hero);
  width: 0%;
  box-shadow: 0 0 15px var(--accent-glow);
  transition: width 0.1s ease-out;
}

.blog-post-page .blog-detail__content {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.blog-post-page .blog-detail__content h2 {
  color: var(--text-primary);
  font-size: var(--fs-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* FAQ Accordion */
.blog-faq {
  margin-top: var(--space-4xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--border-subtle);
}

.blog-faq__title {
  margin-bottom: var(--space-2xl) !important;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}

.faq-item:hover {
  border-color: var(--border-accent);
  background: rgba(124, 106, 239, 0.03);
}

.faq-item__question {
  padding: var(--space-lg);
  margin: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-base) !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

.faq-item__question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}

.faq-item.active {
  border-color: var(--accent);
  background: rgba(124, 106, 239, 0.05);
}

.faq-item.active .faq-item__question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--space-lg);
  opacity: 0;
  transition: all 0.4s var(--ease-out);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.faq-item.active .faq-item__answer {
  max-height: 500px;
  padding-bottom: var(--space-lg);
  opacity: 1;
}

/* Cyber Code Blocks */
.blog-post-page pre {
  position: relative;
  background: #0d0d17 !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  padding: var(--space-xl);
  padding-top: calc(var(--space-xl) + 20px);
  overflow-x: auto;
}

.code-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.code-dot--red { background: #ff5f56; }
.code-dot--yellow { background: #ffbd2e; }
.code-dot--green { background: #27c93f; }

.copy-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

/* Floating Action Hub */
.action-hub {
  position: fixed;
  bottom: var(--space-2xl);
  right: var(--space-2xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hub-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 17, 32, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hub-btn:hover {
  background: var(--accent);
  border-color: var(--accent-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.hub-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .blog-post-page .blog-detail__content {
    padding: var(--space-lg);
  }
  
  .action-hub {
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

/* --- BLOG REFINEMENTS (ToC, TTS, End-of-Post) --- */

/* --- BLOG SIDEBAR & REFINEMENTS --- */

.blog-sidebar {
  position: fixed;
  left: calc(50% + 420px);
  top: calc(var(--nav-height) + var(--space-4xl));
  width: 260px;
  display: none;
  flex-direction: column;
  gap: var(--space-xl);
  z-index: 999;
}

@media (min-width: 1400px) {
  .blog-sidebar { display: flex; }
}

.blog-toc {
  background: rgba(17, 17, 32, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-height: 40vh;
  overflow-y: auto;
}

.blog-toc__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
}

.blog-toc__link {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding: 6px 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.blog-toc__link:hover, .blog-toc__link.active {
  color: var(--accent);
  padding-left: 4px;
}

.blog-toc__link--h3 {
  padding-left: var(--space-md);
  font-size: 0.7rem;
}

/* AI Voice Card */
.blog-voice-card {
  padding: var(--space-lg);
  background: rgba(17, 17, 32, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: all 0.4s var(--ease-out);
}

.voice-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  margin-bottom: var(--space-md);
  position: relative;
}

.voice-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) brightness(90%);
  transition: all 0.4s ease;
}

.blog-voice-card.playing .voice-card__avatar img {
  filter: grayscale(0%) brightness(110%);
  box-shadow: 0 0 20px var(--accent-glow);
}

.voice-card__waves {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  display: none;
}

.blog-voice-card.playing .voice-card__waves {
  display: block;
}

.voice-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 2s infinite;
}

.voice-wave:nth-child(2) { animation-delay: 0.6s; }
.voice-wave:nth-child(3) { animation-delay: 1.2s; }

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.voice-card__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.voice-card__desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.voice-card__btn {
  background: var(--accent);
  border: none;
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-card__btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--accent-glow);
}

/* Mobile Inline TTS Player */
.tts-player {
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tts-btn {
  background: var(--accent);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tts-btn:hover { transform: scale(1.1); }
.tts-text { font-size: var(--fs-xs); color: var(--text-secondary); font-weight: 500; }

.voice-waveform {
  display: none;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.tts-player.playing .voice-waveform {
  display: flex;
}

.voice-bar {
  width: 2px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: waveform 0.8s ease-in-out infinite;
}

.voice-bar:nth-child(2) { animation-delay: 0.1s; height: 8px; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; height: 12px; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; height: 6px; }

@keyframes waveform {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
}

@media (min-width: 1400px) {
  .tts-player { display: none !important; }
}

/* Reading Complete Toast */
.blog-complete-toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px var(--accent-glow);
  z-index: 2000;
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
  font-weight: 600;
}

.blog-complete-toast.visible {
  transform: translateX(-50%) translateY(0);
}

.related-posts {
  margin-top: var(--space-4xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--border-subtle);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.related-card {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

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

.related-card__title { font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--space-xs); }
.related-card__link { font-size: var(--fs-xs); color: var(--accent-light); font-weight: 500; }

/* === Broadcast Stadium Theme === */
body.theme-broadcast {
  --bg-primary: #040a14;
  --bg-secondary: #081220;
  --bg-card: #0c1a2e;
  --accent: #00e676; /* Stadium Green */
  --accent-light: #69f0ae;
  --accent-dim: rgba(0, 230, 118, 0.12);
  --accent-glow: rgba(0, 230, 118, 0.25);
  --gradient-hero: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
  --border-accent: rgba(0, 230, 118, 0.2);
}

body.theme-broadcast .gradient-text {
  background: linear-gradient(135deg, #00e676 0%, #ffea00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.theme-broadcast .blog-detail__tag {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

body.theme-broadcast #bgCanvas {
  opacity: 0.4;
}

body.theme-broadcast .blog-toc__link.active,
body.theme-broadcast .blog-toc__link:hover {
  color: #ffea00;
  border-left-color: #ffea00;
}

body.theme-broadcast .voice-card__btn {
  background: #ffea00;
  color: #040a14;
}

body.theme-broadcast .voice-card__btn:hover {
  background: #fff14d;
  box-shadow: 0 0 15px rgba(255, 234, 0, 0.4);
}

body.theme-broadcast .tts-player.playing .voice-bar {
  background: #ffea00;
}

