:root {
  --clr-body-bg: #0e0e0e;
  --clr-header-gradient: linear-gradient(-45deg, #6457c2, #8442dc, #4e2e91, #9b4cc7, #5b2c8f, #7e3eb2, #412b78, #633c9b, #6457c2);
  --clr-section-bg: #181818;
  --clr-card-bg: #222222;
  --clr-text: #ffffff;
  --clr-accent: #999cfa;
  --radius: 12px;
  --outer-gap: 1.5rem;
  --inner-pad: 1.5rem;
}

@keyframes gradientShift {
  0% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@keyframes coloredShine {
  0% { left: -110%; opacity: 0; }
  60% { left: 0; opacity: 0.5; }
  100% { left: 110%; opacity: 0; }
}

@keyframes coloredShineHover {
  0% { left: -120%; opacity: 0; }
  50% { left: 120%; opacity: 0.5; }
  100% { left: 120%; opacity: 0; }
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk[wght].woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  background-color: var(--clr-body-bg);
  color: var(--clr-text);
  line-height: 1.5;
  min-height: 100vh;
  position: sticky;
  z-index: -2;
}

html {
  scroll-behavior: smooth;
}

header {
  max-width: 1200px;
  margin: var(--outer-gap) auto;
  border-radius: var(--radius);
  background: var(--clr-header-gradient);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 8px #0a0a44d2;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.logo {
  max-height: 3rem;
  padding: 0.25rem 0;
  object-fit: contain;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

nav a:hover {
  color: var(--clr-accent);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.two-col {
  display: flex;
  flex-direction: column;
  gap: var(--inner-pad);
  margin-bottom: var(--outer-gap);
  align-items: stretch;
}

.two-col > section {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--inner-pad);
  }
}

.center-text {
  text-align: center;
}

section {
  background: var(--clr-section-bg);
  border-radius: var(--radius);
  margin-bottom: var(--outer-gap);
  padding: var(--inner-pad);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--clr-accent);
  font-weight: 700;
}

#contact {
  position: relative;
  overflow: hidden;
}

#contact:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(153, 156, 250, 0.25);
}

#contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: -110%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(153, 156, 250, 0.15), rgba(104, 109, 249, 0.15), rgba(46, 46, 191, 0.15), rgba(153, 156, 250, 0.15), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: coloredShine 6s ease-in-out infinite;
}

ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

li {
  margin: 0.25rem 0;
}

p {
  margin-bottom: 5px;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

#portfolio {
  text-align: center;
}

#portfolio-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 1rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  background: var(--clr-card-bg);
  border-radius: var(--radius);
  padding: var(--inner-pad);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.portfolio-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -110%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(153, 156, 250, 0.15), rgba(104, 109, 249, 0.15), rgba(46, 46, 191, 0.15), rgba(153, 156, 250, 0.15), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}

.portfolio-item:hover::after {
  animation: coloredShineHover 2.5s ease-in-out forwards;
}

.portfolio-item h3 {
  font-size: 1rem;
  color: var(--clr-text);
  margin: 0.5rem 0;
  font-weight: 600;
}

.portfolio-item p {
  font-size: 0.9rem;
  color: #bbb;
  margin-bottom: 0;
}

.portfolio-thumbnail {
  position: relative;
  cursor: pointer;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.portfolio-thumbnail img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}

.featured-wrapper {
  position: relative;
  margin-bottom: var(--outer-gap);
}

#featured {
  position: relative;
  z-index: 1;
  background: var(--clr-section-bg);
  border-radius: var(--radius);
  padding: var(--inner-pad);
  overflow: hidden;
}

.featured-video {
  width: 100%;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  padding-top: 56.25%;
  background-color: black;
  transition: background-color 0.5s ease-in-out, padding-top 0.5s ease-in-out;
}

.featured-video.expanded {
  padding-top: 41.9%;
  background-color: black;
}

.featured-video iframe,
.featured-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

.featured-video.video-loaded .play-overlay,
.featured-video.video-loaded video {
  opacity: 0;
  pointer-events: none;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.3s ease-in-out;
}

.aspect-ratio-16-9 {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.aspect-ratio-16-9 iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: none;
  display: block;
}

footer {
  max-width: 1200px;
  margin: var(--outer-gap) auto;
  border-radius: var(--radius);
  background: var(--clr-section-bg);
  padding: var(--inner-pad);
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

#about,
#services {
  flex: 1;
  background: var(--clr-section-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  height: auto;
  display: flex;
  flex-direction: column;
}

#about {
  align-items: center;
  justify-content: center;
}

#about h2 {
  font-size: 1.5rem;
  color: var(--clr-accent);
  margin-bottom: 1rem;
}

.about-content {
  max-width: 100%;
  margin: auto;
}

#about p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

#about p:last-child {
  margin-bottom: 0;
}

#services {
  display: grid;
  gap: 0.5rem;
}

.service-item {
  display: flex;
  align-items: flex-start;
  background: var(--clr-card-bg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: background 0.2s ease-in-out, transform 0.2s ease;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-item:hover {
  background: rgba(127, 129, 206, 0.15);
  transform: translateY(-2px);
}

.service-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -110%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(153, 156, 250, 0.15), rgba(104, 109, 249, 0.15), rgba(46, 46, 191, 0.15), rgba(153, 156, 250, 0.15), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-item:hover::after {
  opacity: 1;
  animation: coloredShineHover 2.5s ease-in-out forwards;
}

.service-title {
  font-weight: 600;
  color: var(--clr-text);
  width: 110px;
  flex-shrink: 0;
  white-space: normal;
  /* text-align: center; */
}

.service-description {
  color: #bbb;
  flex-grow: 1;
  word-break: break-word;
}

.service-item:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .two-col {
    flex-direction: column;
    gap: 1rem;
  }
  #about,
  #services {
    width: 100%;
  }
  .service-item {
    grid-template-columns: 1fr;
  }
}

::selection {
  background: rgba(153, 156, 250, 0.6);
  color: #fff;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65px;
  height: 65px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.featured-video.loading .spinner {
  opacity: 1;
}

#portfolio-filters {
  margin-bottom: 1rem;
}

#portfolio-filters button {
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--clr-card-bg);
  border: none;
  border-radius: var(--radius);
  color: var(--clr-text);
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.6rem;
  font-weight: 600;
}

#portfolio-filters button:hover {
  background: #7f82ce;
}

#portfolio-filters button.active {
  background: rgb(127, 129, 206);
}

@media (max-width: 768px) {
  .featured-video {
    transition: none;
    padding-top: 56.25%;
  }
  .featured-wrapper::before {
    display: none;
  }
  .featured-video.expanded {
    padding-top: 0;
    height: auto;
    overflow: hidden;
    position: relative;
  }
  .featured-video.expanded iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
  }
  .desktop-only {
    display: none;
  }
}

.reels-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.reel-card {
  background: var(--clr-card-bg);
  border-radius: var(--radius);
  padding: var(--inner-pad);
  text-align: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.reel-card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.25rem;
}

.reel-card p {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.reel-card iframe {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .reels-wrapper {
    grid-template-columns: 1fr;
  }
}
