/* ==========================================================================
   ARCHITECTURAL PORTFOLIO DESIGN SYSTEM
   Theme: Minimalist Architectural Studio (Light & Dark Mode)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette - Light Mode Default */
  --bg-primary: #fbfbfb;
  --bg-secondary: #f3f3f3;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-main: #111111;
  --text-muted: #666666;
  --text-light: #888888;
  
  --border-color: #e5e5e5;
  --border-light: #f0f0f0;
  
  --accent: #1a1a1a;
  --accent-hover: #333333;
  --accent-gold: #c5a059;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --header-height: 80px;
}

/* Dark Mode Theme Tokens */
[data-theme="dark"] {
  --bg-primary: #0d0d0e;
  --bg-secondary: #161618;
  --bg-card: #1c1c1f;
  --bg-glass: rgba(13, 13, 14, 0.85);
  
  --text-main: #f5f5f7;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  
  --border-color: #27272a;
  --border-light: #1f1f23;
  
  --accent: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-gold: #d4af37;
  
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, textarea {
  font-family: inherit;
}

.container {
  width: 90%;
  max-width: 1320px;
  margin: 0 auto;
}

/* ==========================================================================
   NAVIGATION & HEADER (MOBILE RESPONSIVE & BOUNDED)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 110px);
  overflow: hidden;
}

.brand-logo img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 3.5vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  position: relative;
  padding: 4px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Dark Mode Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
}

/* ==========================================================================
   HERO / PROFILE TOP SECTION
   ========================================================================== */

.hero-section {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin-bottom: 16px;
  display: block;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  line-height: 1.1;
  font-weight: 300;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 500px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background-color: var(--text-main);
  color: var(--bg-primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--text-main);
}

/* Hero Showcase Carousel/Image */
.hero-showcase {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  aspect-ratio: 4/3;
}

.hero-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-showcase:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   PROJECTS SECTION & GALLERY GRID
   ========================================================================== */

.section-padding {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 400;
  margin-bottom: 24px;
}

/* Filter Controls */
.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 36px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-subtle);
  border-color: var(--text-light);
}

.card-media {
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

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

.card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  color: var(--text-main);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.project-card:hover .card-title {
  color: var(--accent-gold);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   PROJECT DETAIL MODAL & LIGHTBOX
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  width: 92%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: var(--radius-md);
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--text-main);
  color: var(--bg-primary);
}

.modal-content {
  padding: 48px;
}

.modal-header-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-project-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 32px;
}

/* Spec Grid Table */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 36px;
}

.spec-item label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}

.spec-item span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.modal-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 40px;
  white-space: pre-line;
}

/* Video & Media Gallery Container */
.media-section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  margin-bottom: 40px;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Gallery Grid & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Tag Pills */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag-pill {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Fullscreen Photo Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   ABOUT / PROFILE SECTION
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  aspect-ratio: 4/5;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-bio {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.about-philosophy-quote {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--text-main);
  border-left: 3px solid var(--accent-gold);
  padding-left: 24px;
  margin: 16px 0;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.info-block label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.info-block p, .info-block a {
  font-size: 1.1rem;
  color: var(--text-main);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0 40px;
  background: var(--bg-secondary);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-light);
}

.social-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.social-links a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   RESPONSIVE DESIGN (BOUNDED HEADER & COMPACT MOBILE)
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: var(--transition-smooth);
    box-sizing: border-box;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-nav-toggle {
    display: block;
  }
}

@media (max-width: 600px) {
  .brand-logo {
    max-width: calc(100% - 90px);
  }

  .brand-title {
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    padding: 24px;
  }

  .modal-project-title {
    font-size: 2rem;
  }
}
