* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --card-width: 280px;
  --card-height: 200px;
  --card-gap: 1.5rem;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

.grid-pattern {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
}

header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: 1rem;
  position: relative;
  color: #00ffd5;
  text-shadow: 
    0 0 5px #00ffd5,
    0 0 10px #00ffd5,
    0 0 20px #00aaff,
    0 0 30px #0088ff;
}

.subtitle {
  max-width: 600px;
  margin: 1rem auto;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #ccc;
  line-height: 1.6;
}

.cta-button {
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  background: #00ffd5;
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-button:hover {
  background: #00c8a0;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 213, 0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #00ffd5;
  font-size: 0.9rem;
  animation: bounce 2s infinite;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
  40% {transform: translateX(-50%) translateY(-15px);}
  60% {transform: translateX(-50%) translateY(-7px);}
}

section {
  padding: 4rem 1rem;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#projects {
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #000 100%);
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 3rem;
  color: #00ffd5;
  text-shadow: 
    0 0 5px #00ffd5,
    0 0 10px #00ffd5,
    0 0 20px #00aaff;
}

.category {
  margin-bottom: 3rem;
}

.category-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  color: #00ffd5;
  text-shadow: 0 0 10px #00ffd5;
}

/* --- Carousel Styles --- */
.carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-container {
  width: calc(var(--card-width) * 3 + var(--card-gap) * 2); /* Frame for 3 cards */
  height: calc(var(--card-height) + 20px); /* Extra height for scaling effect */
  overflow: hidden;
  position: relative;
}

.catalog {
  display: flex;
  align-items: center;
  gap: var(--card-gap);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  /* JS will handle transition */
}

.project {
  flex: 0 0 var(--card-width);
  width: var(--card-width);
  height: var(--card-height);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 1px solid #00ffd5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 255, 213, 0.2);
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  position: relative;
  overflow: hidden;
  opacity: 0.7;
  transform: scale(0.9);
}

.project.is-active {
  transform: scale(1.05);
  opacity: 1;
  border-width: 2px;
  box-shadow: 0 8px 30px rgba(0, 255, 213, 0.4);
}

.project:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 213, 0.1), rgba(0, 136, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project.is-active:before {
  opacity: 1;
}

.project-title-decode { 
  font-size: 1.1rem;
  text-align: center;
  text-shadow: 0 0 5px rgba(0,0,0,0.8);
  position: relative;
  z-index: 1;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  max-width: calc(var(--card-width) * 3 + var(--card-gap) * 2 + 100px);
  left: 50%;
  display: flex;
  justify-content: space-between;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.nav-btn {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.7);
  color: #00ffd5;
  border: 1px solid #00ffd5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: #00ffd5;
  color: #000;
  box-shadow: 0 0 15px #00ffd5;
  transform: scale(1.1);
}

/* --- Contact Section Styles --- */
#contact {
  background: radial-gradient(ellipse at bottom, #1a1a1a 0%, #000 100%);
}

.contact-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid #00ffd5;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 8px 30px rgba(0, 255, 213, 0.2);
  backdrop-filter: blur(8px);
}

.contact-flex-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.contact-form-wrapper { flex: 1; min-width: 300px; }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; text-align: left; }
.form-group label {
  margin-bottom: 0.5rem; color: #00ffd5; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 1px;
}
.form-group input, .form-group textarea {
  background: rgba(0, 0, 0, 0.7); border: 1px solid #00ffd5;
  border-radius: 8px; padding: 0.8rem; color: #fff; font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: #00ffd5;
  box-shadow: 0 0 10px rgba(0, 255, 213, 0.5);
}
.form-group textarea { min-height: 165px; resize: vertical; }
.submit-button {
  margin-top: 1rem; padding: 0.8rem 2rem; font-size: 1rem;
  background: #00ffd5; color: #000; border: none; border-radius: 8px;
  cursor: pointer; transition: all 0.3s ease; font-weight: 600;
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem;
}
.submit-button:hover {
  background: #00c8a0; transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 213, 0.4);
}
.contact-info {
  flex: 1; min-width: 300px; text-align: left; padding-top: 1rem;
}
.contact-info h3 { font-size: 1.8rem; color: #00ffd5; margin-bottom: 1rem; }
.contact-info p { color: #ccc; line-height: 1.6; margin-bottom: 2rem; }
.social-links { margin-top: 2rem; display: flex; justify-content: flex-start; gap: 1.5rem; }
.social-link { font-size: 1.8rem; color: #00ffd5; transition: all 0.3s ease; }
.social-link:hover {
  color: #fff; transform: scale(1.2) translateY(-3px);
  text-shadow: 0 0 15px #00ffd5;
}
footer { text-align: center; padding: 2rem; color: #666; font-size: 0.9rem; }

/* --- Responsive Design --- */
@media (max-width: 960px) {
  .carousel-container { width: calc(var(--card-width) * 1.5); }
}
@media (max-width: 768px) {
  .hero-title { font-size: clamp(2rem, 7vw, 3rem); }
  .subtitle { padding: 0 1rem; }
  .carousel-container { width: var(--card-width); }
  .nav-btn { width: 35px; height: 35px; }
  .contact-container { padding: 1.5rem; }
  .contact-info { text-align: center; margin-top: 2rem; }
  .social-links { justify-content: center; }
  .submit-button { align-self: center; }
}
@media (max-width: 480px) {
  :root { --card-width: 240px; --card-height: 180px; }
  header { padding: 1.5rem; }
  .hero-title { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .nav-btn { width: 30px; height: 30px; }
  section { padding: 3rem 0.5rem; }
  .contact-container {
    border: none; background: transparent;
    box-shadow: none; backdrop-filter: none;
  }
}