:root {
  --primary-color: #D4B483;           
  --secondary-color: #B89A6D;        
  --accent-color: #E8D0A9;          
  --dark-bg: #0F0E0C;              
  --card-bg: #1A1815;                 
  --text-light: #F5F1EB;             
  --text-muted: #A89E91;              
  --card-shadow: 0 8px 32px rgba(0,0,0,0.25);
  --card-shadow-hover: 0 16px 48px rgba(0,0,0,0.35);
  --transition-speed: 0.4s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--dark-bg);
  color: var(--text-light);
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background:
    radial-gradient(
      ellipse at top center,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.05) 35%,
      rgba(0, 0, 0, 0.75) 100%
    ),
    url('images/Reyrove/Hero.jpg') center center/cover no-repeat;
  background-color: #121212;
  text-align: left;
  color: var(--text-light);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

/* Hero Buttons Styling */
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2.5rem;
  width: 100%;
}

.btn-hero {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 50px;
  padding: 0.875rem 2.5rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Primary Button */
.btn-hero.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--dark-bg);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-hero.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 180, 131, 0.4);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-hero.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(212, 180, 131, 0.3);
}

/* Outline Button */
.btn-hero.btn-outline-light {
  background: transparent;
  color: var(--text-light);
  border: 2px solid rgba(245, 241, 235, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.btn-hero.btn-outline-light:hover {
  background: rgba(245, 241, 235, 0.1);
  border-color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.btn-hero.btn-outline-light:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Button Icons */
.btn-hero i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.btn-hero:hover i {
  transform: translateX(3px);
}

.btn-hero.btn-primary:hover i {
  transform: translateX(3px) scale(1.1);
}

/* Soft Glow Animation */
@keyframes softGlow {
  0% {
    box-shadow: 0 4px 15px rgba(212, 180, 131, 0.2);
  }
  50% {
    box-shadow: 0 4px 20px rgba(212, 180, 131, 0.4);
  }
  100% {
    box-shadow: 0 4px 15px rgba(212, 180, 131, 0.2);
  }
}

.btn-hero.btn-primary {
  animation: softGlow 3s ease-in-out infinite;
}

.btn-hero.btn-primary:hover {
  animation: none;
}

/* Navigation */
.navbar-brand {
  font-weight: 900;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar-nav .nav-link {
  white-space: nowrap;
}

.nav-link {
  position: relative;
  font-weight: 500;
  margin: 0 0.5rem;
  color: var(--text-light) !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  box-shadow: none !important;
  outline: none !important;
}

.navbar-toggler {
  border: none;
  padding: 4px 8px;
}

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

.navbar-toggler-icon-custom {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28168,158,145,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Statement Section */
.statement-details {
  position: relative;
  color: var(--text-light);
  font-size: 1.15rem;
  line-height: 1.75;
  font-family: "Inter", "Segoe UI", sans-serif;
  text-shadow: 0 0 6px rgba(212, 180, 131, 0.1);
  animation: statementFloat 6s ease-in-out infinite;
  overflow: hidden;
}

.statement-details p {
  position: relative;
  z-index: 2;
}

@keyframes statementFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Main Content */
.main-content {
  background-color: var(--dark-bg);
  background-image:
    radial-gradient(circle 1.5px at 10px 10px, 
      rgba(255, 240, 210, 0.6) 0%,
      transparent 100%),
    radial-gradient(circle 1.5px at 40px 40px, 
      rgba(255, 245, 220, 0.5) 0%,
      transparent 100%),
    radial-gradient(circle 1.5px at 70px 20px, 
      rgba(255, 230, 190, 0.55) 0%,
      transparent 100%),
    radial-gradient(circle 1.5px at 80px 60px, 
      rgba(255, 235, 200, 0.5) 0%,
      transparent 100%);
  background-repeat: repeat;
  background-size: 90px 90px;
  animation: moveStars 10s linear infinite;
  flex: 1 0 auto;
  padding-bottom: 0;
  margin-bottom: 0;
  opacity: 1;
  transition: opacity 0.8s ease;
}

@keyframes moveStars {
  0% { background-position: 0 0; }
  100% { background-position: 90px 90px; }
}

/* Section Titles */
.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-align: center;
  padding: 0 15px;
  letter-spacing: 1px;
  font-family: 'Playfair Display', serif;
  opacity: 1;
  transform: translateY(0);
}

/* Grid Layout */
.row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

/* Project Cards */
.project-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(212, 180, 131, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 100%;
  min-height: 520px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.card-image-container {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

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

.card-content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
  min-height: 240px;
}

.work-title {
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0;
  color: var(--primary-color);
  line-height: 1.3;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
}

.work-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  font-weight: 300;
}

.compact-meta {
  background: rgba(212, 180, 131, 0.02);
  border-radius: 4px;
  padding: 0.75rem;
  margin: 0;
  border: 1px solid rgba(212, 180, 131, 0.05);
}

.meta-item {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: flex-start;
  font-weight: 300;
}

.meta-item strong {
  color: var(--primary-color);
  margin-right: 0.5rem;
  min-width: 70px;
  font-weight: 400;
  font-size: 0.8rem;
}

.meta-item:last-child {
  margin-bottom: 0;
}

/* Magical Buttons */
.btn-magical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--dark-bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(212, 180, 131, 0.25),
    0 0 20px rgba(232, 208, 169, 0.2);
  min-width: 160px;
  font-family: 'Inter', sans-serif;
  gap: 0.5rem;
}

.btn-magical:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 6px 20px rgba(212, 180, 131, 0.35),
    0 0 30px rgba(232, 208, 169, 0.25);
  background: linear-gradient(135deg, #B89A6D, #D4B483);
  color: var(--dark-bg);
}

.btn-magical i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.btn-magical:hover i {
  transform: translateX(3px) scale(1.1);
}

/* Tutorial section button containers */
.d-flex.gap-2.mt-auto {
  margin-top: auto !important;
}

/* Team Section */
.team-member {
  position: relative;
  padding: 2rem;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.member-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--primary-color);
}

.member-name {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
}

.member-role {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.member-social {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: auto;
  flex-shrink: 0;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: rgba(212, 180, 131, 0.02);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(212, 180, 131, 0.08);
}

.social-link:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.team-member.ai-member .member-avatar::after {
  content: 'AI';
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--accent-color);
  color: var(--dark-bg);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Footer */
footer {
  background-color: var(--dark-bg) !important;
  background-image:
    radial-gradient(circle 1.2px at 10px 10px, rgba(212, 180, 131, 0.2) 80%, transparent 100%),
    radial-gradient(circle 1.2px at 40px 40px, rgba(232, 208, 169, 0.15) 70%, transparent 100%),
    radial-gradient(circle 1.2px at 70px 20px, rgba(184, 154, 109, 0.15) 75%, transparent 100%),
    radial-gradient(circle 1.2px at 80px 60px, rgba(212, 180, 131, 0.1) 70%, transparent 100%);
  background-repeat: repeat;
  background-size: 90px 90px;
  animation: moveStars 10s linear infinite;
  border-top: none;
  margin-top: 0;
  padding: 3rem 0 1.5rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

#contact {
  text-align: center;
  margin-bottom: 2rem;
}

#contact .section-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.contact-list li {
  flex: 0 0 auto;
}

.contact-list a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(212, 180, 131, 0.15);
  border-radius: 8px;
  background: rgba(212, 180, 131, 0.03);
  transition: all 0.3s ease;
  min-width: auto;
  white-space: nowrap;
}

.contact-list a:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.contact-list .icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.contact-list a:hover .icon {
  transform: scale(1.1);
}

.footer-bottom {
  border-top: none;
  padding-top: 1.5rem;
  margin-top: 2rem;
}

footer .text-secondary {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
  margin: 0;
  font-weight: 300;
  text-align: center;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10000;
  width: 45px;
  height: 45px;
  border-radius: 4px;
  background: var(--primary-color);
  border: none;
  color: var(--dark-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Mobile Responsive */
@media (max-width: 767px) {
  /* Hero buttons mobile layout */
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }
  
  .btn-hero {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-width: unset;
  }
  
  /* Tutorial buttons mobile layout */
  .d-flex.flex-md-row.flex-column.gap-2.mt-auto {
    flex-direction: column !important;
  }
  
  .d-flex.flex-md-row.flex-column.gap-2.mt-auto .btn-magical {
    width: 100%;
    margin: 0 !important;
    min-width: unset;
  }
  
  /* Grid adjustments */
  .col-lg-4.col-md-6 {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .btn-magical {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-width: 140px;
  }
  
  .work-desc {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  .meta-item {
    font-size: 0.8rem;
  }
  
  .meta-item strong {
    font-size: 0.8rem;
    min-width: 65px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .team-member {
    padding: 1.5rem;
  }
  
  .member-avatar {
    width: 80px;
    height: 80px;
  }
  
  .member-name {
    font-size: 1.1rem;
  }
  
  .contact-list {
    flex-direction: column;
    align-items: stretch;
  }
  
  .contact-list a {
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .btn-hero {
    padding: 0.875rem 2rem;
    min-width: 160px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.05rem;
  }
}

@media (max-width: 575px) {
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero-section {
    min-height: -webkit-fill-available;
    height: -webkit-fill-available;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    align-items: flex-start;
    padding-top: 80px;
  }
}

@media (max-width: 767px) {
  .btn-magical,
  .social-link,
  .contact-list a {
    min-height: 44px;
  }
}

.row.justify-content-center {
  justify-content: center !important;
}
