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

html {
  scroll-behavior: smooth;
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  background-color: #040508;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #8da4c4; /* Soft periwinkle / slate blue from your mockup */
  overflow-x: hidden;
  position: relative;
}

/* Page entrance transition */
.page-fade-in {
  animation: fadeInPage 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

/* =========================================================
   1. FIXED BACKGROUND VIDEO & FROSTED BLUR OVERLAY
   ========================================================= */
.video-background-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Frosted glass overlay */
.blur-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(28px) brightness(0.65);
  -webkit-backdrop-filter: blur(28px) brightness(0.65);
  background: rgba(3, 5, 12, 0.5);
  opacity: 0; /* Default on Hero: sharp */
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Activated blur state */
body.is-blurred .blur-overlay {
  opacity: 1;
}

/* =========================================================
   2. PERSISTENT FIXED FRAMING (Header & Footer)
   ========================================================= */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 2.25rem 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.top-nav {
  display: flex;
  gap: 4.5rem;
  pointer-events: auto;
}

.nav-link {
  color: #8da4c4;
  text-decoration: none;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #cadcf3;
  opacity: 1;
  transform: translateY(-1px);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: rgba(202, 220, 243, 0.6);
}

.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 2.25rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.brand-name {
  pointer-events: auto;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #8da4c4;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.brand-name:hover {
  color: #cadcf3;
  opacity: 1;
}

.brand-role {
  pointer-events: auto;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #8da4c4;
  opacity: 0.9;
}

/* =========================================================
   3. HOME & ABOUT SECTIONS (index.html)
   ========================================================= */
.content-scroll-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

.page-section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 3.5rem;
  position: relative;
}

.hero-section {
  min-height: 100vh;
  pointer-events: none;
}

.about-section {
  min-height: 100vh;
}

.about-container {
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  margin: 0 auto;
}

.about-photo-wrap {
  flex-shrink: 0;
  width: 280px;
  max-width: 100%;
}

.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(141, 164, 196, 0.15);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.about-photo:hover {
  transform: scale(1.02);
  border-color: rgba(141, 164, 196, 0.35);
}

.about-text-wrap {
  flex: 1;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.about-paragraph {
  font-size: 1.4rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: #8da4c4;
  opacity: 0.92;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   4. PROJECTS & REELS PAGES (projects.html & reels.html)
   ========================================================= */
.projects-main,
.reels-main {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  padding: 7.5rem 4rem 7rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.projects-header-container {
  text-align: center;
  margin-bottom: 2.5rem;
}

.projects-main-title {
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #8da4c4;
  text-shadow: 0 0 25px rgba(141, 164, 196, 0.25);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 4.5rem;
  row-gap: 3.5rem;
  width: 100%;
}

.project-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* Align video boxes by locking text container to a consistent bottom-aligned height */
.project-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 5.8rem; /* Locks uniform height so video boxes are strictly aligned */
  margin-bottom: 0.85rem;
  gap: 0.35rem;
}

/* Specific styling for Reels titles */
.reel-info {
  min-height: 3rem; /* Shorter header height since Reels don't have subtitle descriptions */
  margin-bottom: 0.85rem;
}

.reel-title {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #8da4c4;
}

/* Reels Container Structure: 2 on Top, 1 Centered on Bottom */
.reels-container {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: 100%;
}

.reels-row-top {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 4.5rem;
  width: 100%;
}

.reels-row-bottom {
  display: flex;
  justify-content: center;
  width: 100%;
}

.reels-row-bottom .reel-item {
  width: calc((100% - 4.5rem) / 2);
}

/* Supports CSS subgrid for browsers that support it */
@supports (grid-template-rows: subgrid) {
  .projects-grid {
    row-gap: 0;
  }
  .projects-grid .project-item {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    margin-bottom: 3.5rem;
  }
  .projects-grid .project-info {
    min-height: unset;
  }
}

.project-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #8da4c4;
  transition: color 0.3s ease;
}

.project-item:hover .project-title {
  color: #cadcf3;
}

.project-meta {
  font-size: 1.05rem;
  line-height: 1.4;
  color: #7b92b1;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.project-thumbnail-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2e8f0; /* Matches clean light placeholder in mockup */
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(141, 164, 196, 0.2);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.project-thumbnail-box.has-embed,
.project-thumbnail-box.has-poster {
  background: #05070d;
}

.project-video-embed {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

.project-poster-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
}

.poster-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.45);
  transform: scale(1.15);
  z-index: 1;
}

.poster-foreground {
  position: relative;
  z-index: 2;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.75);
  transition: transform 0.4s ease;
}

.project-poster-link:hover .poster-foreground {
  transform: scale(1.02);
}

.imdb-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  background: rgba(6, 9, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #cadcf3;
  border: 1px solid rgba(141, 164, 196, 0.35);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.project-poster-link:hover .imdb-badge {
  opacity: 1;
  background: rgba(12, 18, 34, 0.92);
  border-color: rgba(202, 220, 243, 0.7);
}

.project-item:hover .project-thumbnail-box:not(.has-embed) {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6);
  border-color: rgba(202, 220, 243, 0.45);
}

.project-item:hover .project-thumbnail-box.has-embed {
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6);
  border-color: rgba(202, 220, 243, 0.45);
}

.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #edf2f7 0%, #cbd5e1 100%);
  position: relative;
}

.play-badge {
  font-size: 1.75rem;
  color: #334155;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-item:hover .play-badge {
  opacity: 0.85;
  transform: scale(1.15);
}

/* =========================================================
   5. RESUME PAGE (resume.html)
   ========================================================= */
.resume-main {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  padding: 7.5rem 4rem 7rem 4rem;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.resume-header-container {
  margin-bottom: 2.25rem;
}

.resume-actions {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.resume-download-link {
  color: #8da4c4;
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
  border-bottom: 1px solid rgba(141, 164, 196, 0.3);
  padding-bottom: 1px;
  transition: color 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.resume-download-link:hover {
  color: #cadcf3;
  opacity: 1;
  border-color: rgba(202, 220, 243, 0.75);
}

.resume-action-divider {
  color: #8da4c4;
  opacity: 0.5;
}

.resume-sheet {
  width: 100%;
  background: rgba(6, 9, 18, 0.58);
  border: 1px solid rgba(141, 164, 196, 0.22);
  border-radius: 3px;
  padding: 3.25rem 3.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #9cb3d1;
}

.resume-contact-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.resume-owner-name {
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cadcf3;
  margin-bottom: 0.4rem;
}

.resume-contact-line {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #8da4c4;
}

.resume-contact-link {
  color: #9cb3d1;
  text-decoration: none;
  border-bottom: 1px solid rgba(141, 164, 196, 0.25);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.resume-contact-link:hover {
  color: #cadcf3;
  border-color: rgba(202, 220, 243, 0.7);
}

.dot-sep {
  margin: 0 0.45rem;
  opacity: 0.5;
}

.resume-section {
  margin-bottom: 2.15rem;
}

.resume-section:last-child {
  margin-bottom: 0;
}

.resume-section-heading {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #cadcf3;
  border-bottom: 1px solid rgba(141, 164, 196, 0.35);
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}

.resume-entry {
  margin-bottom: 1.15rem;
}

.resume-entry:last-child {
  margin-bottom: 0;
}

.resume-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 0.25rem;
}

.resume-entry-title {
  font-size: 1.25rem;
  line-height: 1.4;
  color: #b4c8e2;
}

.resume-entry-title strong {
  color: #cadcf3;
  font-weight: 600;
}

.resume-entry-date {
  font-size: 1.1rem;
  color: #8da4c4;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.9;
}

.resume-bullets {
  list-style-type: disc;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.resume-bullets li {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #9cb3d1;
  opacity: 0.95;
}

.resume-skills-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 2.5rem;
  row-gap: 0.35rem;
}

/* =========================================================
   6. CONTACT PAGE (contact.html)
   ========================================================= */
.contact-main {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  padding: 7.5rem 4rem 7rem 4rem;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-header-container {
  margin-bottom: 2rem;
}

.contact-subtitle {
  margin-top: 0.75rem;
  font-size: 1.2rem;
  color: #8da4c4;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.contact-sheet {
  width: 100%;
  background: rgba(6, 9, 18, 0.58);
  border: 1px solid rgba(141, 164, 196, 0.22);
  border-radius: 3px;
  padding: 2.75rem 3.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #b4c8e2;
}

.form-input {
  width: 100%;
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(141, 164, 196, 0.28);
  border-radius: 3px;
  padding: 0.75rem 1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: #cadcf3;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
  color: rgba(141, 164, 196, 0.45);
}

.form-input:focus {
  border-color: rgba(202, 220, 243, 0.75);
  background: rgba(12, 18, 34, 0.88);
  box-shadow: 0 0 15px rgba(141, 164, 196, 0.14);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.form-submit-btn {
  background: rgba(141, 164, 196, 0.14);
  border: 1px solid rgba(141, 164, 196, 0.45);
  color: #cadcf3;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.65rem 2rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
}

.form-submit-btn:hover {
  background: rgba(141, 164, 196, 0.26);
  border-color: rgba(202, 220, 243, 0.85);
  transform: translateY(-1px);
}

.form-status {
  font-size: 1.15rem;
  color: #cadcf3;
  text-align: center;
  min-height: 1.5rem;
  letter-spacing: 0.02em;
}

/* =========================================================
   7. RESPONSIVE DESIGN (Tablets & Mobile Phones)
   ========================================================= */
@media (max-width: 900px) {
  .fixed-header,
  .fixed-footer {
    padding: 1.5rem 1.75rem;
  }

  .top-nav {
    gap: 2rem;
  }

  .nav-link {
    font-size: 1.35rem;
  }

  .brand-name,
  .brand-role {
    font-size: 1.25rem;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
    padding-top: 3rem;
  }

  .about-photo-wrap {
    width: 220px;
  }

  .about-paragraph {
    font-size: 1.25rem;
    line-height: 1.55;
  }

  /* Projects, Reels, Resume & Contact Page Responsive */
  .projects-main,
  .reels-main,
  .resume-main,
  .contact-main {
    padding: 7rem 2rem 5.5rem 2rem;
  }

  .contact-sheet {
    padding: 2rem 1.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .resume-sheet {
    padding: 2.25rem 1.75rem;
  }

  .resume-entry-top {
    flex-direction: column;
    gap: 0.15rem;
  }

  .resume-skills-list {
    grid-template-columns: 1fr;
  }

  .projects-main-title {
    font-size: 3rem;
    margin-bottom: 2rem;
  }

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

  .reels-container {
    gap: 3rem;
  }

  .reels-row-top {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .reels-row-bottom .reel-item {
    width: 100%;
  }

  .project-info {
    min-height: auto;
  }
}

@media (max-width: 550px) {
  .top-nav {
    gap: 0.95rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 1.05rem;
  }

  .fixed-footer {
    padding: 1.25rem 1.25rem;
  }

  .brand-name,
  .brand-role {
    font-size: 1.1rem;
  }

  .about-photo-wrap {
    width: 190px;
  }

  .about-paragraph {
    font-size: 1.15rem;
  }

  .projects-main-title {
    font-size: 2.5rem;
  }

  .project-title {
    font-size: 1.4rem;
  }

  .project-meta {
    font-size: 0.95rem;
  }

  .resume-main {
    padding: 6.5rem 1.15rem 5rem 1.15rem;
  }

  .resume-sheet {
    padding: 1.75rem 1.25rem;
  }

  .resume-owner-name {
    font-size: 1.75rem;
  }

  .resume-contact-line {
    font-size: 1rem;
    line-height: 1.5;
  }

  .resume-entry-title {
    font-size: 1.15rem;
  }

  .resume-bullets li {
    font-size: 1.05rem;
  }

  .contact-main {
    padding: 6.5rem 1.15rem 5rem 1.15rem;
  }

  .contact-sheet {
    padding: 1.65rem 1.25rem;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-submit-btn {
    width: 100%;
  }
}
