@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #18092a;
  --bg-deep: #10061a;
  --panel: rgba(42, 26, 63, 0.94);
  --text: #eeeeee;
  --muted: rgba(238, 238, 238, 0.76);
  --accent: #b78eea;
  --accent-bright: #e0c8ff;
  --accent-soft: rgba(183, 142, 234, 0.12);
  --border: rgba(183, 142, 234, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top right, rgba(183, 142, 234, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.55;
  animation: driftGlow 14s ease-in-out infinite alternate;
}

body::before {
  width: 26rem;
  height: 26rem;
  top: 10rem;
  right: -8rem;
  background: rgba(183, 142, 234, 0.18);
}

body::after {
  width: 20rem;
  height: 20rem;
  bottom: 8rem;
  left: -6rem;
  background: rgba(64, 198, 255, 0.1);
  animation-duration: 18s;
}

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

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 3rem 5% 6rem;
  position: relative;
  z-index: 1;
  animation: pageReveal 0.8s ease-out both;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 3rem;
  position: sticky;
  top: 1.8rem;
  z-index: 20;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(183, 142, 234, 0.18);
  border-radius: 2rem;
  backdrop-filter: blur(12px);
  background: rgba(24, 9, 42, 0.8);
  box-shadow: 0 12px 30px rgba(8, 3, 15, 0.28);
}

.brand {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-links,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.chip-link,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  font-size: 1.3rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.chip-link:hover,
.action-link:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 142, 234, 0.5);
  background: rgba(183, 142, 234, 0.2);
  box-shadow: 0 10px 28px rgba(134, 86, 188, 0.22);
}

.project-hero,
.projects-hero,
.content-grid,
.section-grid {
  display: grid;
  gap: 2rem;
}

.project-hero,
.projects-hero {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  margin-bottom: 3rem;
}

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

.content-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.hero-panel,
.panel {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(183, 142, 234, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(42, 26, 63, 0.98), rgba(24, 9, 42, 0.98));
  border: 1px solid var(--border);
  border-radius: 2.4rem;
  box-shadow: 0 12px 34px rgba(8, 3, 15, 0.45);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero-panel::before,
.panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(183, 142, 234, 0.14), transparent 65%);
  pointer-events: none;
  animation: auraShift 12s ease-in-out infinite alternate;
}

.hero-panel::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(183,142,234,0.05), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-panel:hover,
.panel:hover {
  transform: translateY(-8px);
  border-color: rgba(183, 142, 234, 0.55);
  box-shadow: 0 24px 56px rgba(104, 72, 140, 0.26);
}

.hero-copy,
.panel-copy,
.content-card,
.meta-card,
.project-card-body {
  padding: 2.6rem;
}

.eyebrow {
  display: inline-flex;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(183, 142, 234, 0.08);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 24px rgba(183, 142, 234, 0.12);
}

.hero-copy h1,
.panel-copy h1 {
  font-size: 4.2rem;
  line-height: 1.2;
  margin-bottom: 1.4rem;
  background: linear-gradient(90deg, #ffffff 0%, #f2e8ff 50%, #b78eea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p,
.panel-copy p,
.body-copy,
.project-card p {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--muted);
}

.cover-image,
.hero-image {
  overflow: hidden;
  border-radius: 2.4rem;
  position: relative;
  background: linear-gradient(180deg, rgba(31, 16, 47, 0.92), rgba(17, 8, 28, 0.98));
}

.cover-image img,
.hero-image img,
.project-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.7s ease, filter 0.7s ease;
  cursor: zoom-in;
}

.cover-image::after,
.hero-image::after,
.project-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(24, 9, 42, 0.42));
  pointer-events: none;
}

.project-card::after {
  display: none;
}

.hero-panel:hover .cover-image img,
.project-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.04);
}

.meta-card h3 {
  font-size: 1.15rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.meta-card p {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--text);
}

.content-card h2 {
  font-size: 2.4rem;
  margin-bottom: 1.4rem;
}

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

.tags span {
  display: inline-flex;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(183, 142, 234, 0.08);
  font-size: 1.2rem;
  text-transform: uppercase;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.tags span:hover {
  transform: translateY(-2px);
  background: rgba(183, 142, 234, 0.16);
  border-color: rgba(183, 142, 234, 0.5);
}

.bullet-list {
  list-style: none;
  display: grid;
  gap: 1.2rem;
}

.bullet-list li {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--muted);
  padding-left: 1.8rem;
  position: relative;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.project-card {
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation: riseIn 0.7s ease-out both;
  display: flex;
  flex-direction: column;
}

.project-card:nth-child(2) { animation-delay: 0.05s; }
.project-card:nth-child(3) { animation-delay: 0.1s; }
.project-card:nth-child(4) { animation-delay: 0.15s; }
.project-card:nth-child(5) { animation-delay: 0.2s; }
.project-card:nth-child(6) { animation-delay: 0.25s; }
.project-card:nth-child(7) { animation-delay: 0.3s; }
.project-card:nth-child(8) { animation-delay: 0.35s; }
.project-card:nth-child(9) { animation-delay: 0.4s; }

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(183, 142, 234, 0.55);
  box-shadow: 0 24px 56px rgba(104, 72, 140, 0.26);
}

.project-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(31, 16, 47, 0.96), rgba(17, 8, 28, 0.98));
  flex-shrink: 0;
}

.project-card h3 {
  font-size: 2rem;
  margin: 1rem 0 0.9rem;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card-body .action-row {
  margin-top: auto !important;
  padding-top: 1.8rem;
}

.footer-note {
  margin-top: 3rem;
  text-align: center;
  font-size: 1.35rem;
  color: var(--muted);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: rgba(7, 3, 12, 0.86);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 1000;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-lightbox-dialog {
  position: relative;
  width: min(1100px, 100%);
  border-radius: 2.4rem;
  border: 1px solid rgba(183, 142, 234, 0.24);
  background:
    radial-gradient(circle at top right, rgba(183, 142, 234, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(42, 26, 63, 0.98), rgba(24, 9, 42, 0.98));
  box-shadow: 0 24px 56px rgba(8, 3, 15, 0.45);
  padding: 2rem;
  transform: scale(0.94) translateY(14px);
  transition: transform 0.28s ease;
}

.image-lightbox.active .image-lightbox-dialog {
  transform: scale(1) translateY(0);
}

.image-lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(183, 142, 234, 0.28);
  background: rgba(183, 142, 234, 0.1);
  color: var(--text);
  cursor: pointer;
}

.image-lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 1.6rem;
  display: block;
}

@keyframes pageReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes driftGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2rem, -1.2rem, 0) scale(1.12);
  }
}

@keyframes auraShift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(3rem, 2rem, 0) rotate(16deg);
  }
}

@media (max-width: 900px) {
  .project-hero,
  .projects-hero,
  .content-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 57%;
  }

  .page-shell {
    padding: 2rem 4% 4rem;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    top: 1rem;
  }

  .hero-copy h1,
  .panel-copy h1 {
    font-size: 3.3rem;
  }

  .hero-panel,
  .panel,
  .cover-image,
  .hero-image {
    border-radius: 2rem;
  }

  .project-card img {
    aspect-ratio: 16 / 9;
  }

  .image-lightbox {
    padding: 1.6rem;
  }

  .image-lightbox-dialog {
    padding: 1.4rem;
    border-radius: 1.8rem;
  }

  .action-link,
  .chip-link {
    width: 100%;
  }
}
