:root {
  --dark-bg: #0a0a0a;
  --darker-bg: #050505;
  --accent: #ff4d4d;
  --orange: #f37413;
  --text: #fff;
  --text-light: #aaa;
  --card-bg: #151515;
  --section-padding: 40px 0;
  --header-height: 90px;
  --transition-speed: 0.6s;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  background: var(--dark-bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Intro Splash */
.premium-intro {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  animation: fadeOut .5s ease-in-out 2.5s forwards;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  color: #FF5722;
  font-size: clamp(2rem, 6vw, 6rem);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.logo-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: letterAppear .6s cubic-bezier(.175,.885,.32,1.275) forwards;
}
@keyframes letterAppear {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut { 100% { opacity: 0; visibility: hidden; } }

/* Header */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  z-index: 1100;
}
.logo { display: flex; align-items: center; height: 60px; }
.logo-img { max-height: 60px; object-fit: contain; transition: transform .4s ease; }
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 34px; height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}
.menu-toggle.active span:nth-child(1){transform:translateY(9px) rotate(45deg);}
.menu-toggle.active span:nth-child(2){opacity:0;}
.menu-toggle.active span:nth-child(3){transform:translateY(-9px) rotate(-45deg);}

nav {
  position: fixed;
  top: 0; right: -100%;
  width: 100%; max-width: 500px;
  height: 100vh;
  background: rgba(10,10,10,.98);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right .6s cubic-bezier(.68,-.55,.265,1.55);
  z-index: 1050;
  border-left: 1px solid rgba(255,255,255,.06);
}
nav.active { right: 0; }
nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
  padding: 0 2rem;
  text-align: center;
}
nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.5rem;
  padding: 1rem;
  position: relative;
}
nav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width .45s;
}
nav a:hover::before { width: 100%; }

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-background {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: translateZ(0);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,rgba(0,0,0,.2),rgba(0,0,0,.45));
  z-index: -1;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 90%;
  max-width: 1200px;
  padding: 0 20px;
}
.animated-heading {
  font-size: clamp(2rem,5vw,4rem);
  font-weight: 500;
  color: #fff;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  white-space: nowrap;
}
#changing-text {
  display: inline-block;
  opacity: 0;
  animation: fadeInOut 4s infinite;
}
@keyframes fadeInOut {
  0%,100% { opacity: 0; transform: translateY(10px); }
  20%,80% { opacity: 1; transform: translateY(0); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.mouse {
  width: 24px; height: 40px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 12px;
  position: relative;
}
.mouse:before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollAnim 2s infinite;
}
@keyframes scrollAnim {
  0% { opacity: 1; transform: translateY(0) translateX(-50%); }
  100% { opacity: 0; transform: translateY(16px) translateX(-50%); }
}

/* Sections */
.section { padding: var(--section-padding); background: #000; }
.dark-section { background: var(--darker-bg); padding-left: 0; padding-right: 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
  padding: 0 20px;
}
.section-header h2 {
  font-size: clamp(1.8rem,5vw,2.8rem);
  font-weight: 700;
  margin-top: 20px;
  background: linear-gradient(90deg,#fff,#fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

/* Gallery Grid */
.container { max-width: 1920px; margin: 0 auto; padding: 0 20px; }
.gallery-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .3rem;
  width: 100%;
  grid-auto-flow: dense;
}
.project-item {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  transition: transform .4s ease, box-shadow .4s ease;
}
.project-item .thumbnail {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease, filter .6s ease;
  will-change: transform;
}
.project-item:hover .thumbnail {
  transform: scale(1.08);
  filter: brightness(.82);
}
.project-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px;
  background: linear-gradient(to top,rgba(0,0,0,.6),transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s, transform .35s;
}
.project-item:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}
.project-name {
  font-weight: 700;
  font-size: clamp(.95rem,2.2vw,1.2rem);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.span-2x2{grid-column:span 2;grid-row:span 2;}
.span-2x1{grid-column:span 2;}
.span-3x1{grid-column:span 3;}
.tall{grid-row:span 2;}

/* Project Detail */
.project-detail {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--card-bg);
  overflow-y: auto;
  z-index: 1000;
  padding: 80px 5% 60px;
}
.project-detail[hidden]{display:none;}
.project-detail img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
  cursor: zoom-in;
  transition: transform .25s;
}
.close-btn {
  position: fixed;
  top: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: 0;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease, background .3s ease;
}
.close-btn:hover { transform: rotate(90deg) scale(1.05); background: #f37413; }

/* Responsive */
@media (max-width:1100px){
  .gallery-row{grid-template-columns:repeat(3,1fr);}
  .animated-heading{font-size:clamp(1.8rem,6vw,3.2rem);}
}
@media (max-width:760px){
  .gallery-row{grid-template-columns:repeat(2,1fr);}
  .menu-toggle{display:block;}
  .logo-img{max-height:48px;}
}
@media (max-width:420px){
  .gallery-row{grid-template-columns:1fr;}
  .section-header{margin-bottom:2rem;}
}
