/* Custom Properties - Gnomon x Ashim Style */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&family=Open+Sans:wght@400;600&display=swap');

:root {
  --bg-color: #000000;
  --surface-color: #111111;
  --surface-light: #32373c;
  --surface-border: #333333;
  --primary: #ff6900;
  --secondary: #cf2e2e;
  --text-main: #ffffff;
  --text-muted: #abb8c3;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --transition: all 0.3s ease;
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 1px;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons (Gnomon Style) */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px 16px 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background-color 300ms cubic-bezier(0.73, 0.24, 0.68, 0.82), color 300ms cubic-bezier(0.73, 0.24, 0.68, 0.82);
  font-family: var(--font-heading);
  border: none;
  font-size: 0.9rem;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 100%, 0% 100%);
}

.btn-primary {
  background: #ffd40b;
  color: #000;
}

.btn-primary:hover {
  background: #ffffff;
  color: #000;
}

.btn-secondary {
  background: #ffffff;
  color: #000;
}

.btn-secondary:hover {
  background: #ffd40b;
  color: #000;
}

.btn-small {
  padding: 10px 30px 10px 20px;
  font-size: 0.8rem;
}

/* Sections */
.section-padding {
  padding: 120px 5%;
}

.bg-alt {
  background-color: var(--surface-color);
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 20px;
}

.section-line {
  height: 4px;
  width: 80px;
  background: var(--primary);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 25px 5%;
  z-index: 1000;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
  background: #000;
  padding: 15px 5%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

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

.mobile-menu-btn {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Full-Bleed Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5%;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.hero-subtitle {
  font-family: var(--font-heading);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

.hero-title {
  font-size: 6rem;
  line-height: 1;
  margin-bottom: 30px;
  max-width: 1000px;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

/* About Grid */
.about {
  padding: 0;
  /* Edge to edge */
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 600px;
}

.about-text {
  padding: 100px 80px;
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h3 {
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Cinematic Stats */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--surface-border);
}

.stat-item h4 {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-item p {
  color: var(--text-main);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

/* Experience Timeline - Gnomon Style */
.timeline-container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
}

.timeline-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary);
  border-bottom: 2px solid var(--surface-border);
  padding-bottom: 20px;
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-date {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 10px;
}

.timeline-item h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Services Edge-to-Edge Grid */
.services {
  padding: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.service-card {
  background: var(--surface-color);
  padding: 80px 60px;
  border: 1px solid var(--surface-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  background: var(--primary);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 30px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  color: #fff;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card p {
  color: var(--text-muted);
  transition: var(--transition);
}

.service-card:hover p {
  color: #fff;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2px;
  background: var(--surface-border);
  border: 2px solid var(--surface-border);
  max-width: 1600px;
  margin: 0 auto;
}

.skill-card {
  background: var(--surface-color);
  padding: 50px 40px;
  text-align: center;
}

.skill-icon {
  font-size: 3rem;
  color: var(--text-main);
  margin-bottom: 20px;
}

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.skill-card p {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
}

.progress-bar {
  height: 4px;
  background: var(--surface-light);
  margin-top: 20px;
}

.progress {
  height: 100%;
  background: var(--primary);
}

/* Portfolio Tightly Packed Grid */
.portfolio {
  padding-bottom: 0;
}

.portfolio-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  padding: 10px 0;
  position: relative;
}

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--text-main);
}

.filter-btn.active::after {
  width: 100%;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 0;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  height: 400px;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: object-position 4s ease-in-out, transform 0.8s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
  text-align: center;
  padding: 40px;
}

.portfolio-item:hover img {
  transform: scale(1.02);
  object-position: bottom;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.category {
  color: var(--primary);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin-bottom: 15px;
  display: block;
}

.portfolio-overlay h3 {
  font-size: 2rem;
}

.portfolio-item.hide {
  display: none;
}

/* Contact */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
}

/* Project Details Page */
.project-header {
  height: 70vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 5% 100px;
}

.project-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

.project-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.project-title-box {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.project-title {
  font-size: 5rem;
  margin-bottom: 10px;
}

.project-meta {
  color: var(--primary);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.project-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 5%;
}

.project-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 60px;
  max-width: 800px;
}

.project-text h3 {
  color: var(--text-main);
  font-size: 2rem;
  margin-bottom: 20px;
  margin-top: 40px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  margin-bottom: 60px;
  background: var(--surface-light);
  border: 4px solid var(--surface-border);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-items: auto;
  gap: 10px;
  margin-bottom: 60px;
}

.photo-gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--surface-border);
  transition: object-position 4s ease-in-out, transform 0.4s ease, border-color 0.4s ease;
}

/* .photo-gallery img:hover {
  transform: scale(1.02);
  border-color: var(--primary);
  object-position: bottom;
} */

.gallery-full {
  display: block !important;
}

.gallery-full img {
  height: auto !important;
  max-height: none !important;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 40px;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--primary);
}

.contact-info {
  background: var(--primary);
  padding: 80px;
  color: #fff;
}

.contact-info h3,
.contact-info p,
.contact-item i,
.contact-item span {
  color: #fff;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item i {
  font-size: 2rem;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 60px;
}

.social-icon {
  font-size: 1.5rem;
  color: #fff;
  transition: var(--transition);
}

.social-icon:hover {
  transform: translateY(-5px);
  color: #000;
}

.contact-form {
  padding: 80px;
  background: var(--surface-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 20px;
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

footer {
  padding: 40px 5%;
  text-align: center;
  border-top: 1px solid var(--surface-border);
}

/* Architecture Featured Section */
.architecture-featured {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 5%;
}

.arch-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.arch-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.arch-content {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .architecture-featured {
    min-height: 60vh;
    padding: 60px 5%;
  }

  .architecture-featured h2 {
    font-size: 2.5rem !important;
  }
}

/* Animations Overrides */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay Utilities */
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* Mask Reveal for Hero */
.mask-up {
  overflow: hidden;
  display: inline-block;
}

.mask-up span {
  display: block;
  transform: translateY(110%);
  animation: maskUpAnimation 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes maskUpAnimation {
  to { transform: translateY(0); }
}


/* Custom Cursor - Morphing Liquid Lens */
.custom-cursor {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.1s ease-out, opacity 0.3s ease;
  mix-blend-mode: difference;
}

.custom-cursor-outline {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: 
    transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), 
    width 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
    height 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
    border-radius 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    background-color 0.4s ease;
}

.cursor-hover .custom-cursor-outline {
  width: 44px; /* Slightly larger than the 40px circle to show interaction, but still small */
  height: 44px;
  background-color: rgba(255, 105, 0, 0.1);
  border-radius: 12px; /* Subtle rounded square */
  border-color: rgba(255, 255, 255, 0.2);
}

.cursor-text .custom-cursor-outline {
  width: 2px;
  height: 30px;
  border-radius: 0;
  background-color: var(--primary);
}

@media (max-width: 1024px) {
  .custom-cursor, .custom-cursor-outline { display: none; }
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 4rem;
  }

  .about-grid,
  .timeline-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-text,
  .contact-info,
  .contact-form {
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    flex-direction: column;
    justify-content: center;
    transition: 0.4s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
    position: relative;
  }

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

  .hero-title {
    font-size: 3rem;
  }
}

@media(max-width: 480px) {
  .about-image {
    /* height: 290px; */
    width: 380px;
    margin: 0 auto;
  }

  .hero-actions {
    flex-direction: column;
    gap: 15px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .portfolio-item {
    align-items: center;
    width: 320px;
  }

  .about-text,
  .contact-info,
  .contact-form {
    padding: 20px;
  }

  .contact-item {
    flex-direction: column;
    gap: 5px;
  }
}

/* Contact Form Enhancements */
.form-headline {
    font-size: 2.5rem;
    margin-bottom: 30px;
    background: linear-gradient(to right, var(--primary), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    line-height: 1.2;
}

.form-closing {
    margin-top: 30px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
    border-top: 1px solid var(--surface-border);
    padding-top: 20px;
    text-align: left;
}

/* Video Modal Styling */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 50px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-item {
    cursor: pointer;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .video-modal {
        padding: 20px;
    }
    .form-headline {
        font-size: 1.8rem;
    }
}