/* CSS Custom Properties / Design Tokens */
:root {
  /* Color Palette */
  --bg-primary: #0a0a0a;          /* Matte black */
  --bg-secondary: #121212;        /* Dark charcoal */
  --bg-tertiary: #1a1a1a;         /* Dark grey for cards/inputs */
  --accent-gold: #c5a880;         /* Architectural gold/bronze */
  --accent-gold-hover: #b4966e;   /* Darker gold for hover states */
  --text-primary: #f5f5f7;        /* Clean soft white */
  --text-secondary: #9f9fa3;      /* Muted gray */
  --text-tertiary: #6c6c70;       /* Darker muted gray */
  --border-color: #222222;        /* Soft divider lines */
  --border-focus: #444444;        /* Focused states */
  --overlay-bg: rgba(10, 10, 10, 0.96); /* Fullscreen lightbox/menu bg */
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Layout & Sizing */
  --header-height: 80px;
  --container-max-width: 1200px;
  --section-padding: 100px 20px;
  --section-padding-mobile: 60px 15px;
  
  /* Animations & Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s ease-out;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable; /* Prevent layout shifting when scrollbars disappear */
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

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

button, input, textarea {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  outline: none;
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background-color: var(--accent-gold);
}

.section-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1060;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.header.scrolled {
  height: 70px;
  background-color: rgba(10, 10, 10, 0.95);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo-container a {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header.scrolled .logo-image {
  height: 42px;
}

/* Navigation Links (Desktop) */
.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hamburger Menu Button */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1100;
}

.burger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

/* Mobile Nav Drawer Open States */
.burger-menu.open .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-menu.open .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.open .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--overlay-bg);
  z-index: 1050;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, #181818 0%, #0a0a0a 100%);
  padding-top: var(--header-height);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 25px;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
  line-height: 1.8;
}

/* Elegant Buttons */
.btn {
  display: inline-block;
  padding: 14px 34px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-color: transparent;
  z-index: 1;
  isolation: isolate;
  transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent-gold);
  z-index: -1;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn:hover {
  color: var(--bg-primary);
}

.btn:hover::before {
  transform: translateX(0);
}

/* Hero Scroll Down Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-smooth);
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-gold);
  animation: bounce 2s infinite;
}

/* Work Section */
.work-section {
  padding: var(--section-padding);
  background-color: var(--bg-secondary);
}

/* Filter Controls */
.filter-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* Project Card */
.project-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition-smooth);
  aspect-ratio: 16 / 10;
}

.project-card.featured {
  grid-column: span 2;
}

.project-card.hidden {
  display: none;
}

.project-image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover overlay info */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.project-info {
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.project-card-category {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 5px;
}

.project-card-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.project-card-year {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Card Hover States */
.project-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-info {
  transform: translateY(0);
}

/* About Section */
.about-section {
  padding: var(--section-padding);
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 45px;
  max-width: 800px;
  margin: 0 auto;
}

/* Bio Area */
.bio-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 25px;
  font-weight: 300;
  text-align: center;
}

.bio-text p:first-of-type {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.7;
  text-align: center;
}

/* Skills display */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.skills-category {
  border-left: none;
  padding-left: 0;
  text-align: center;
}

.skills-category-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  color: var(--text-primary);
  text-align: center;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skill-tag {
  font-size: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

/* Contact Section */
.contact-section {
  padding: var(--section-padding);
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.contact-container {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 40px;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

/* Only apply hover effects on devices with a pointer (prevents sticky hover on touch) */
@media (hover: hover) {
  .contact-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  }
}

.contact-icon-box {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent-gold);
  transition: var(--transition-fast);
  margin-bottom: 15px;
}

@media (hover: hover) {
  .contact-item:hover .contact-icon-box {
    border-color: var(--accent-gold);
    background-color: var(--bg-secondary);
  }
}

.contact-icon-box svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-btn:hover {
  color: var(--bg-primary);
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Lightbox Modal (Detailed Project View) */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.lightbox.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Lightbox Container (Image Showcase only) */
.lightbox-container {
  width: 95%;
  max-width: 1000px;
  height: 80vh;
  max-height: 80vh;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: visible; /* Allow the close button to float outside */
  position: relative;
  animation: modalScaleUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Floating Close Button - Placed above the container to not obscure content */
.lightbox-close {
  position: absolute;
  top: -55px;
  right: 0;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2010;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.05) rotate(90deg);
  background-color: rgba(255, 255, 255, 0.05);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Media Viewer & Thumbnails */
.lightbox-media {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #050505;
  overflow: hidden;
  position: relative;
}

/* Active Preview Area */
.lightbox-gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0; /* Prevents stretching in flex container */
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease-in-out;
}

/* Navigation Arrows (Floating outside the gallery container) */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 2010;
  transition: var(--transition-fast);
}

.lightbox-nav:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav.prev {
  left: -70px;
}

.lightbox-nav.next {
  right: -70px;
}

.lightbox-nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Thumbnail Strip below */
.lightbox-thumbnails {
  height: 90px;
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar defaults, use clean ones */
.lightbox-thumbnails::-webkit-scrollbar {
  height: 4px;
}
.lightbox-thumbnails::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
.lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.lightbox-thumb {
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  opacity: 0.4;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.lightbox-thumb:hover {
  opacity: 0.8;
  border-color: var(--text-secondary);
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--accent-gold);
  outline: 1px solid var(--accent-gold);
}



/* Footer */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 60px 20px;
  text-align: center;
}

#footer-logo-container a {
  display: inline-block;
}

.footer-logo {
  height: 42px;
  width: auto;
  margin-bottom: 24px;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.footer-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copyright-main span {
  font-family: var(--font-serif);
  color: var(--accent-gold);
}

.footer-copyright-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-copyright-divider {
  color: var(--text-tertiary);
}

.footer-copyright-rights {
  color: var(--text-secondary);
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design Breakpoints */

/* Tablets / Small Desktops */
@media (max-width: 992px) {
  :root {
    --section-padding: 80px 20px;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .project-grid {
    gap: 20px;
  }
  
  .contact-info-grid {
    gap: 20px;
  }
  
  .lightbox-container {
    height: 75vh;
    max-height: 75vh;
    max-width: 90%;
  }
  
  .lightbox-media {
    border-bottom: none;
  }
  
  .lightbox-gallery-main {
    height: auto;
  }
  
  .lightbox-close {
    top: 15px;
    right: 15px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
  }
  
  .lightbox-nav {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
  }
  
  .lightbox-nav.prev {
    left: 15px;
  }
  
  .lightbox-nav.next {
    right: 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  .nav-menu {
    display: none; /* Hide desktop nav menu */
  }
  
  .burger-menu {
    display: flex; /* Show mobile burger menu */
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-tagline {
    font-size: 0.95rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .project-card {
    aspect-ratio: 4 / 3;
  }
  
  .project-overlay {
    opacity: 1; /* Show info directly on touch screens */
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.1) 100%);
    padding: 20px;
  }
  
  .project-info {
    transform: translateY(0);
  }
  
  .project-card-title {
    font-size: 1.4rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .lightbox-container {
    height: 65vh;
    max-height: 65vh;
  }
  
  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .footer-text {
    flex-direction: column;
    gap: 6px;
  }
  
  .footer-copyright-divider {
    display: none;
  }
}
