/* ============================================
   LAYOUT — Grid & Page Structure
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background-color: var(--color-surface);
}

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

.section {
  padding-block: var(--space-12);
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.section--alt {
  background-color: var(--color-surface-alt);
}

/* ---- NAVIGATION ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding-block: var(--space-4);
  transition: background-color var(--transition-slow), padding var(--transition-slow), box-shadow var(--transition-slow);
}

.nav--scrolled {
  background-color: rgba(26, 26, 46, 0.97);
  padding-block: var(--space-3);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-surface);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-right: var(--space-8);
}

.nav__logo span {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  gap: clamp(var(--space-3), 1.6vw, var(--space-6));
  align-items: center;
  margin-left: auto;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-inverse);
  opacity: 0.8;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

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

.nav__link:hover,
.nav__link--active {
  opacity: 1;
  color: var(--color-accent);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-surface);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* ---- HERO ---- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--color-surface-dark);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(22, 33, 62, 0.8) 0%, transparent 50%),
    linear-gradient(135deg, var(--color-surface-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 69, 96, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 69, 96, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.hero__text {
  max-width: 600px;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
}

.hero__label::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background-color: var(--color-accent);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-surface);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
}

.hero__title span {
  color: var(--color-accent);
}

.hero__description {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  line-height: 1.7;
  max-width: 50ch;
  margin-bottom: var(--space-8);
}

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

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image-wrapper {
  position: relative;
  width: 380px;
  height: 460px;
}

.hero__image-frame {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__image-frame::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--radius-xl) - 3px);
  background: var(--color-primary);
  z-index: 0;
}

.hero__image-placeholder {
  position: relative;
  z-index: 1;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: calc(var(--radius-xl) - 3px);
  background: linear-gradient(135deg, var(--color-primary-light) 0%, rgba(233, 69, 96, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__image-placeholder svg {
  width: 120px;
  height: 120px;
  opacity: 0.3;
}

/* ---- HERO STATIC IMAGE ---- */

.hero__static-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: calc(var(--radius-xl) - 3px);
}

/* ---- HERO SLIDESHOW ---- */

.hero__slideshow,
.about__slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__slide,
.about__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero__slide--active,
.about__slide--active {
  opacity: 1;
}

.hero__slideshow .hero__slide {
  border-radius: calc(var(--radius-xl) - 3px);
}

.about__slideshow .about__slide {
  border-radius: var(--radius-lg);
}

.about__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero__image-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 16px;
  left: 16px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-xl);
  opacity: 0.3;
  z-index: -1;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-light);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: bounce 2s ease-in-out infinite;
}

/* ---- ABOUT ---- */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.about__image {
  position: relative;
}

.about__image-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--color-surface-alt), var(--color-border));
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__image-inner svg {
  width: 80px;
  height: 80px;
  opacity: 0.2;
}

.about__stats {
  position: absolute;
  bottom: -24px;
  right: -24px;
  z-index: var(--z-raised);
}

.about__stats--cycle {
  width: 170px;
  height: 110px;
  right: -24px;
}

.about__stat {
  position: relative;
  z-index: var(--z-raised);
  background: var(--color-surface);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.about__stats--cycle .about__stat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.about__stats--cycle .about__stat--active {
  opacity: 1;
  pointer-events: auto;
}

.about__stats--cycle .about__stat-number {
  font-size: var(--text-2xl);
}

.about__stats-dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-raised) + 1);
  display: flex;
  gap: 6px;
}

.about__stats-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.about__stats-dot--active {
  background: var(--color-accent);
  transform: scale(1.3);
}

.about__stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: 1.2;
}

.about__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: var(--space-1);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.section__label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-accent);
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.section__description {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: 1.7;
  max-width: 55ch;
}

/* ---- SERVICES / EXPERTISE ---- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.service-card {
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-dark);
  transition: transform var(--transition-slow), border-color var(--transition-slow), background var(--transition-slow);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  background: rgba(233, 69, 96, 0.05);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent), #ff6b81);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-surface);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
}

.service-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---- PORTFOLIO / PROJECTS ---- */

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-alt);
  cursor: pointer;
  group: true;
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  transition: transform var(--transition-slow);
}

.project-card__placeholder--1 { background: linear-gradient(135deg, #1a1a2e, #e94560); }
.project-card__placeholder--2 { background: linear-gradient(135deg, #0f3460, #16213e); }
.project-card__placeholder--3 { background: linear-gradient(135deg, #1a1a2e, #533483); }
.project-card__placeholder--4 { background: linear-gradient(135deg, #16213e, #0f3460); }

.project-card__placeholder-text {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: -0.02em;
  pointer-events: none;
}

.project-card:hover .project-card__placeholder {
  transform: scale(1.05);
}

.project-card__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.2;
  color: var(--color-surface);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

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

.project-card:hover .project-card__image,
.project-card:hover .project-card__placeholder {
  transform: scale(1.05);
}

.project-card__category {
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.project-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-surface);
}

.project-card__arrow {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(8px, -8px);
  opacity: 0;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.project-card:hover .project-card__arrow {
  transform: translate(0, 0);
  opacity: 1;
}

.project-card__arrow svg {
  width: 18px;
  height: 18px;
  color: var(--color-surface);
}

/* Touch devices have no hover: show the card content by default. */
@media (hover: none) {
  .project-card__overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(12, 12, 28, 0.88) 0%, rgba(12, 12, 28, 0.35) 55%, rgba(12, 12, 28, 0) 100%);
  }

  .project-card__arrow {
    opacity: 1;
    transform: translate(0, 0);
  }

  .project-card__placeholder-text {
    opacity: 0;
  }
}

/* ---- PROJECT DETAIL MODAL ---- */

.project-modal__content {
  max-width: 760px;
}

.project-modal__panel {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.project-modal__category {
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.project-modal__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.project-modal__body p {
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.project-modal__body h4 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: var(--space-5) 0 var(--space-2);
}

.project-modal__body ul {
  padding-left: 1.2em;
  margin-bottom: var(--space-3);
}

.project-modal__body li {
  line-height: 1.55;
  margin-bottom: var(--space-2);
}

.project-modal__body a {
  color: var(--color-accent);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .project-modal__content {
    width: 92%;
  }

  .project-modal__panel {
    padding: var(--space-5);
    max-height: 80vh;
  }

  .project-modal__title {
    font-size: var(--text-xl);
  }
}

/* ---- NAV: collapse to the drawer menu before the eight links can collide ---- */

@media (max-width: 1240px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    margin-left: 0;
    background: var(--color-surface-dark);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-6);
    transition: right var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }

  .nav__links--open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
  }
}

/* ---- SKILLS ---- */

.skills__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  margin-top: var(--space-10);
}

.skills__group-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-5);
}

.skill {
  margin-bottom: var(--space-5);
}

.skill__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.skill__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.skill__percent {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.skill__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #ff6b81);
  border-radius: var(--radius-pill);
  width: 0;
  transition: width 1s ease-out;
}

/* ---- CONTACT ---- */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  margin-top: var(--space-10);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact__item-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(233, 69, 96, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact__item-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.contact__item-label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.contact__item-value {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.form__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.form__input,
.form__textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.form__textarea {
  resize: vertical;
  min-height: 140px;
}

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

/* ---- ABOUT TAGS ---- */

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---- TIMELINE ---- */

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-8);
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: calc(-1 * var(--space-8) + 7px);
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-surface-alt);
  z-index: 1;
}

.timeline__marker--edu {
  background: var(--color-primary);
  border-color: var(--color-accent);
}

.timeline__content {
  background: var(--color-surface);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.timeline__content:hover {
  box-shadow: var(--shadow-md);
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1.3;
}

.timeline__org {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-style: italic;
}

.timeline__date {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: var(--space-1) var(--space-3);
  background: rgba(233, 69, 96, 0.08);
  border-radius: var(--radius-pill);
}

.timeline__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.timeline__list li {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.6;
  padding-left: var(--space-4);
  position: relative;
}

.timeline__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.5;
}

/* ---- VIDEOS ---- */

.videos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.video-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  overflow: hidden;
}

.video-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__placeholder svg {
  width: 64px;
  height: 64px;
  color: var(--color-surface);
  opacity: 0.15;
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.video-card:hover .video-card__play {
  opacity: 1;
}

.video-card__play svg {
  width: 52px;
  height: 52px;
  color: var(--color-surface);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.video-card__info {
  padding: var(--space-4) var(--space-5);
}

.video-card__duration {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-light);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 2px var(--space-2);
  margin-bottom: var(--space-2);
  font-variant-numeric: tabular-nums;
}

.video-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.video-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.5;
}

/* ---- VIDEO MODAL ---- */

.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.video-modal--open {
  display: flex;
}

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

.video-modal__content {
  position: relative;
  width: 90%;
  max-width: 900px;
  z-index: 1;
}

.video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-surface);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.video-modal__close svg {
  width: 24px;
  height: 24px;
}

.video-modal__player {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0a0a;
}

.video-modal__player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal__fallback {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: color var(--transition-fast);
}

.video-modal__fallback:hover {
  color: var(--color-accent);
}

.video-modal__fallback svg {
  width: 14px;
  height: 14px;
}

/* ---- PUBLICATIONS ---- */

.publications__list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.publication {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.publication:hover {
  box-shadow: var(--shadow-md);
}

.publication__type {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  background: rgba(233, 69, 96, 0.08);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.pub--under-review { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.pub--journal      { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.pub--poster       { color: var(--color-accent); background: rgba(233, 69, 96, 0.08); }
.pub--talk         { color: #6366f1; background: rgba(99, 102, 241, 0.1); }
.pub--article      { color: #0ea5e9; background: rgba(14, 165, 233, 0.1); }

.publication__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  margin-bottom: var(--space-1);
}

.publication__venue {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* ---- CV DOWNLOAD ---- */

.cv-download {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
  margin-top: var(--space-2);
}

.cv-download__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(233, 69, 96, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cv-download__icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.cv-download__label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.cv-download__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

.cv-download__link:hover {
  color: var(--color-accent-hover);
}

/* ---- FOOTER ---- */

.footer {
  background-color: var(--color-surface-dark);
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-border-dark);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.footer__socials {
  display: flex;
  gap: var(--space-4);
}

.footer__social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.footer__social:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(233, 69, 96, 0.1);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__text {
    max-width: 100%;
  }

  .hero__description {
    max-width: 100%;
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image {
    display: none;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about__stats {
    position: relative;
    bottom: auto;
    right: auto;
    margin: -44px var(--space-4) 0;
  }

  .about__stats--cycle {
    width: 100%;
    max-width: 200px;
    height: 110px;
    margin-left: auto;
    margin-right: 0;
  }

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

  .skills__content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

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

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

  .timeline__header {
    flex-direction: column;
    gap: var(--space-2);
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--space-10);
  }

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

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

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

  .publication {
    flex-direction: column;
    gap: var(--space-3);
  }

  .timeline {
    padding-left: var(--space-6);
  }

  .timeline__marker {
    left: calc(-1 * var(--space-6) + 7px);
  }

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

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 375px) {
  .hero__title {
    font-size: var(--text-3xl);
  }
}
