/* ============================================================
   CSS CUSTOM PROPERTIES — edit these to theme your site!
   TODO: Try asking Copilot to suggest a color palette for you.
   ============================================================ */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a1a2e;
  --color-text-muted: #555577;
  --color-accent: #bb89bb;
  --color-accent-hover: #808080;
  --color-border: #e2e8f0;
  --color-surface: #ffffff;
  --color-surface-hover: #f8fafc;
  --color-button-bg: #f8fafc;
  --color-button-text: #1a1a2e;
  --hero-bg-image: url("images/pulpbg.gif");
  --font-main: 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --color-bg: #070607;
  --color-bg-alt: #111827;
  --color-text: #e5e7eb;
  --color-text-muted: #94a3b8;
  --color-accent: #ff6242;
  --color-accent-hover: #000000;
  --color-border: #243041;
  --color-surface: #111827;
  --color-surface-hover: #172033;
  --color-button-bg: #172033;
  --color-button-text: #e5e7eb;
  --hero-bg-image: url("images/snoirbg.gif");
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-menu-toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-button-bg);
  color: var(--color-button-text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.nav-menu-toggle:hover {
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.nav-menu-toggle__icon {
  display: inline-flex;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-button-bg);
  color: var(--color-button-text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.theme-toggle__icon {
  display: inline-flex;
  font-size: 1rem;
  line-height: 1;
}

/* TODO: The nav isn't responsive on mobile yet.
   Ask Copilot: "Make this navbar collapse into a hamburger menu on small screens" */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #fff;
  /*-webkit-text-stroke: 1.2px #000;*/
  text-shadow:
   #000000 10px 0 10px;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.14em solid #000;
  width: 0;
  animation:
    typing-reset 6s steps(20, end) infinite,
    blink-caret 0.75s step-end infinite;
}

.highlight {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 2rem;
  /*-webkit-text-stroke: 1.0px #000;*/
  text-shadow:
    #000000 1px 0 10px;
}

.film-marquee {
  margin-top: 1.5rem;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.65rem 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
}

.film-marquee__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
}

.film-marquee__track span::before {
  content: "•";
  margin-right: 2rem;
  color: var(--color-accent);
}

.watchlist-strip {
  margin-top: 1rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  color: #fff;
}

.watchlist-strip__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.watchlist-strip__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.watchlist-poster {
  width: 92px;
  margin: 0;
  text-align: center;
}

.watchlist-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translateY(0);
  transition: transform var(--transition), box-shadow var(--transition);
}

.watchlist-poster img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}

.watchlist-poster figcaption {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.cta-burst {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.hero-cta {
  position: relative;
  z-index: 2;
}

.star {
  position: absolute;
  left: 50%;
  top: 50%;
  color: #fff8a6;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  text-shadow: 0 0 8px rgba(255, 248, 166, 0.9);
}

.cta-burst:hover .star {
  animation: star-burst 900ms ease-out forwards;
}

.cta-burst:hover .star-1 {
  --x: -42px;
  --y: -54px;
  animation-delay: 0ms;
}

.cta-burst:hover .star-2 {
  --x: 0px;
  --y: -72px;
  animation-delay: 70ms;
}

.cta-burst:hover .star-3 {
  --x: 44px;
  --y: -50px;
  animation-delay: 140ms;
}

.cta-burst:hover .star-4 {
  --x: 72px;
  --y: -14px;
  animation-delay: 210ms;
}

@keyframes star-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.4) rotate(35deg);
  }
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes typing-reset {
  0% {
    width: 0;
  }

  30% {
    width: 100%;
  }

  66.6667% {
    width: 100%;
  }

  100% {
    width: 0;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: #000;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-accent) !important;
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff !important;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section-alt {
  background: var(--color-bg-alt);
  max-width: 100%;
  padding: 5rem 2rem;
}

.section-alt > * {
  max-width: 1000px;
  margin: 0 auto;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

/* Accent underline on section headings */
h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text p + p {
  margin-top: 1rem;
}

.avatar-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--color-border);
  display: block;
  box-shadow: var(--shadow);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-badge {
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-intro {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   RESPONSIVE
   TODO: This is a start, but there's more to do on mobile.
   Ask Copilot: "Improve the responsive styles for screens under 600px"
   ============================================================ */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .avatar-image {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 600px) {
  .navbar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0 0.25rem;
  }

  .nav-links li {
    flex: 0 0 auto;
  }

  .navbar.nav-open .nav-links {
    display: flex;
  }

  .theme-toggle {
    padding: 0.55rem 0.9rem;
  }

  .hero {
    min-height: auto;
    padding: 3rem 1rem 2.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 10vw, 2.4rem);
    white-space: normal;
    width: auto;
    border-right: 0;
    animation: none;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .film-marquee {
    margin-top: 1rem;
    padding: 0.5rem 0;
  }

  .film-marquee__track {
    font-size: 0.72rem;
    gap: 1.25rem;
    animation-duration: 14s;
  }

  .film-marquee__track span::before {
    margin-right: 1.25rem;
  }

  .watchlist-strip {
    padding: 0.85rem;
    border-radius: 1rem;
  }

  .watchlist-strip__items {
    gap: 0.65rem;
  }

  .watchlist-poster {
    width: 72px;
  }

  .watchlist-poster figcaption {
    font-size: 0.68rem;
  }

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

  .project-card {
    padding: 1.25rem;
  }
}
