/* Architectural Studio - Quantum Orange & Slate Theme */

/* CSS Reset and Base Styles */
:root {
  --primary-color: #FF6B35;
  --secondary-color: #2C3E50;
  --primary-light: #FF8A5B;
  --primary-dark: #E85A2B;
  --secondary-light: #34495E;
  --secondary-dark: #1A252F;
  --accent-orange: #FFA07A;
  --neutral-light: #F8F9FA;
  --neutral-gray: #6C757D;
  --neutral-dark: #212529;
  --white: #FFFFFF;
  --black: #000000;
  --shadow-light: rgba(255, 107, 53, 0.15);
  --shadow-dark: rgba(44, 62, 80, 0.3);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --border-radius-lg: 16px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: var(--white);
  font-weight: 400;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--neutral-gray);
}

/* Bootstrap 5 Overrides */
.container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 576px) {
  .container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-light);
  color: var(--white);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: 0 4px 15px var(--shadow-dark);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-dark);
  color: var(--white);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* Navigation */
.navbar {
  background: var(--white) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 62, 80, 0.1);
  padding: 1rem 0;
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--secondary-color) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--secondary-color) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: all var(--transition-fast);
}

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

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
}

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

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 50%, var(--primary-color) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.3;
}

.hero-content {
  z-index: 2;
  color: var(--white);
  text-align: center;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero .lead {
  font-size: 1.375rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-geometric {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: var(--primary-color);
  opacity: 0.1;
  transform: rotate(45deg);
  border-radius: var(--border-radius);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(45deg) translateY(0px); }
  50% { transform: rotate(45deg) translateY(-20px); }
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-smooth);
  overflow: hidden;
  background: var(--white);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  transition: transform var(--transition-smooth);
  height: 250px;
  object-fit: cover;
}

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

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--neutral-gray);
  line-height: 1.6;
}

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  background: var(--neutral-light);
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: all var(--transition-smooth);
  color: var(--white);
  text-align: center;
  padding: 2rem;
}

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

.portfolio-overlay h4 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.portfolio-overlay p {
  color: var(--white);
  opacity: 0.9;
}

/* Forms */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--shadow-light);
  background: var(--white);
}

.form-label {
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.form-floating > .form-control {
  height: calc(3.5rem + 2px);
}

.form-floating > label {
  color: var(--neutral-gray);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-alt {
  background: var(--neutral-light);
}

/* Footer */
.footer {
  background: var(--gradient-secondary);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-smooth);
  font-size: 1.25rem;
}

.social-icon:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 20px var(--shadow-light);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all var(--transition-smooth);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all var(--transition-smooth);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--neutral-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .hero-geometric {
    display: none;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .portfolio-item img {
    height: 250px;
  }
  
  .social-icons {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .portfolio-item img {
    height: 200px;
  }
  
  .portfolio-overlay {
    padding: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #FF4500;
    --secondary-color: #000000;
    --neutral-gray: #333333;
  }
}

/* Print styles */
@media print {
  .navbar,
  .hero-geometric,
  .btn,
  .social-icons {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
}