/* Basic css */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0a0a0a;
  color: #fff;
  line-height: 1.6;
}

/* Top Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #0a0a0a;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-sizing: border-box;
  transform: translateY(0);
  opacity: 1;
}

header .logo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
}

header .logo img {
  height: 40px;
  margin-right: 10px;
}

nav a {
  color: #fff;
  margin-left: 2rem;
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
}

nav a:hover {
  color: #1e90ff;
}

/* Hero */
.hero {
  padding-top: 8rem;
  text-align: center;
  padding-bottom: 6rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #1e90ff;
}

.hero h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: normal;
  color: #fff;
}

/* Hero fade-up reveal (Brittany-style) */
.reveal-vertical {
  opacity: 0;
  transform: translateY(20px);
}
body.ready .reveal-vertical {
  opacity: 1;
  transform: translateY(0);
  transition: transform 600ms cubic-bezier(0.645, 0.045, 0.355, 1),
              opacity 600ms cubic-bezier(0.645, 0.045, 0.355, 1);
}
/* Stagger: subtitle after title */
body.ready .hero h1.reveal-vertical { transition-delay: 120ms; }
body.ready .hero h2.reveal-vertical { transition-delay: 240ms; }

/* About section stagger similar to hero */
body.ready #about .rv-1 { transition-delay: 80ms; }
body.ready #about .rv-2 { transition-delay: 160ms; }
body.ready #about .rv-3 { transition-delay: 240ms; }
body.ready #about .rv-4 { transition-delay: 320ms; }

/* Scroll-based progressive reveal for sections */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1000ms cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 1000ms cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: transform, opacity;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card-by-card scroll reveal with stagger */
.reveal-card {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1100ms cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 1100ms cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: transform, opacity;
}
.reveal-card.visible { opacity: 1; transform: translateY(0); }

/* Section */
section {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

h2 {
  color: #1e90ff;
  margin-bottom: 1rem;
}

/* Projects */
.projects-note {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: left;
  font-style: italic;
}

.featured-projects {
  margin-bottom: 4rem;
}

.featured-projects h3,
.other-projects h3 {
  color: #1e90ff;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.featured-project {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #1e90ff;
}

.featured-project h4 {
  color: #1e90ff;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.featured-project .project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.featured-project .project-header h4 {
  margin-bottom: 0;
  flex: 1;
}

.project-details {
  margin: 1.5rem 0;
}

.project-section {
  margin-bottom: 1.5rem;
}

.project-section h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #333;
  padding-bottom: 0.3rem;
}

.feature-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.feature-list li {
  margin-bottom: 0.8rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.feature-list li::before {
  content: "•";
  color: #1e90ff;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.project-video {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tech-stack {
  margin-top: auto;
  padding-top: 1rem;
}

.tech-tag {
  display: inline-block;
  background: #1e90ff;
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  row-gap: 3rem;
}

.project {
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project p {
  flex-grow: 1;
}

.project h4 {
  color: #1e90ff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.project-header h4 {
  margin-bottom: 0;
  flex: 1;
}

.github-link {
  display: inline-block;
  transition: transform 0.2s ease;
}

.github-link:hover {
  transform: scale(1.1);
}

.github-icon {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.github-icon:hover {
  opacity: 1;
}

.project-hidden {
  display: none;
}

.show-more-container {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.show-more-btn,
.show-less-btn {
  background: transparent;
  color: #1e90ff;
  border: 2px solid #1e90ff;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.show-more-btn:hover,
.show-less-btn:hover {
  background: #1e90ff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

/* Image Carousel */
.image-carousel {
  margin: 1rem 0;
}

.carousel-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  background: #1a1a1a;
  height: 400px;
}

.carousel-images {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(30, 144, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 15px;
}

.next-btn {
  right: 15px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: #1e90ff;
  transform: scale(1.2);
}

.indicator:hover {
  background: #1e90ff;
}

/* Link */
a {
  color: #1e90ff;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  background: #0a0a0a;
  color: #777;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 0.8rem 1rem;
  }
  
  header .logo {
    font-size: 1.1rem;
  }
  
  header .logo img {
    height: 30px;
  }
  
  nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    padding: 0.5rem 1rem;
  }
  
  nav {
    margin-top: 0.5rem;
  }
  
  nav a {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-size: 0.8rem;
  }
  
  .project-list {
    grid-template-columns: 1fr;
  }
}

/* Language Toggle Button */
.language-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 1rem;
}

.language-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid #1e90ff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-toggle:hover {
  background: #1e90ff;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

.language-toggle:active {
  transform: translateY(0);
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.language-toggle.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #fff;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: #1e90ff;
  color: #fff;
}

.dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.dropdown-item:only-child {
  border-radius: 8px;
}

@media (max-width: 768px) {
  .language-dropdown {
    margin-left: 0.5rem;
  }
  
  .language-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .dropdown-menu {
    min-width: 100px;
  }
  
  .dropdown-item {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .language-dropdown {
    margin-left: 0.3rem;
  }
  
  .language-toggle {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
  
  .dropdown-menu {
    min-width: 90px;
  }
  
  .dropdown-item {
    padding: 0.5rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: background-color 0.35s ease;
}

#preloader.clear { background-color: transparent; }

.preloader-inner {
  display: grid;
  place-items: center;
}

.preloader-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(30, 144, 255, 0.25));
  /* Top-to-bottom reveal */
  clip-path: inset(0 0 100% 0);
  animation:
    preloader-reveal 2.8s ease-out forwards;
  will-change: clip-path, transform, opacity;
}

.preloader-logo.shrink {
  transition: transform 0.2s ease-out;
  transform: scale(0);
}


@keyframes preloader-reveal {
  to { clip-path: inset(0 0 0 0); }
}

/* Lock scroll while loading */
body.loading {
  overflow: hidden;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .preloader-logo {
    animation: none;
    clip-path: none;
  }
  #preloader { transition: background-color 0.01s linear; }
}

