:root {
  --bg: #1e1f21;
  --peach: #facfb8;
  --sand: #d7d1c6;
  --teal: #238488;
  --red: #d5534d;
  --font-body: "Clash Grotesk", sans-serif;
  --font-logo: "Codystar", cursive;
}

html {
  scroll-behavior: smooth;
}

/* Global link styles */
a,
a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none !important;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--sand);
  font-family: var(--font-body);
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 3rem;
  z-index: 100;
  background-color: rgba(30, 31, 33, 0.8);
  backdrop-filter: blur(5px);
}

nav a {
  color: var(--sand);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--red);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  min-height: 80vh;
  background: linear-gradient(to bottom, rgba(30, 31, 33, 0.9), var(--bg)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%231e1f21"/><circle cx="10" cy="10" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="30" cy="10" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="50" cy="10" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="70" cy="10" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="90" cy="10" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="10" cy="30" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="30" cy="30" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="50" cy="30" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="70" cy="30" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="90" cy="30" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="10" cy="50" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="30" cy="50" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="50" cy="50" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="70" cy="50" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="90" cy="50" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="10" cy="70" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="30" cy="70" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="50" cy="70" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="70" cy="70" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="90" cy="70" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="10" cy="90" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="30" cy="90" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="50" cy="90" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="70" cy="90" r="1" fill="%23facfb8" opacity="0.3"/><circle cx="90" cy="90" r="1" fill="%23facfb8" opacity="0.3"/></svg>');
  background-size: cover;
  justify-content: center;
}

.hero-logo {
  margin-bottom: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo img {
  height: 180px;
  margin-bottom: 1rem;
  transition: transform 0.5s ease;
  animation: float 6s ease-in-out infinite;
}

.hero-logo h1 {
  font-family: var(--font-logo);
  font-size: 3.5rem;
  color: var(--red);
  margin: 0;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(213, 83, 77, 0.3);
}

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

.hero h2 {
  font-size: 3.5rem;
  color: var(--peach);
  margin-top: 2rem;
  margin-bottom: 1rem;
  max-width: 900px;
  line-height: 1.2;
  animation: fadeIn 1s ease-in;
}

.hero p {
  max-width: 600px;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-top: 1rem;
  margin-bottom: 1rem;
  animation: fadeIn 1.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-button {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  animation: fadeIn 2s ease-in;
}

/* Ensure no underline on hero button link */
.hero-button a,
.hero-button a:link,
.hero-button a:visited,
.hero-button a:hover,
.hero-button a:active {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Button styling */
.hero-button button {
  background-color: var(--red);
  color: white;
  font-size: 1.2rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: 2px solid var(--red);
  text-decoration: none !important;
  cursor: pointer;
}

.hero-button button:hover {
  background-color: transparent;
  color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(213, 83, 77, 0.2);
}

.section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section h2 {
  color: var(--red);
  font-size: 2rem;
}

.clients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Projects Layout */
.projects-row {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

.website-projects {
  grid-template-columns: repeat(2, 1fr);
}

.mobile-projects {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
}

.project-item {
  background-color: #2a2b2e;
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.project-item h3,
.project-item h3 a,
.project-item h3 a:active,
.project-item h3 a:visited {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--teal);
  font-size: 1.5rem;
}

.project-item h3 a:hover {
  color: #fff;
}

.project-item p {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--sand);
}

/* Carousel Styles */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #1a1b1d;
}

.website-carousel {
  aspect-ratio: 16/9;
}

.mobile-carousel {
  aspect-ratio: 393/852; /* iPhone 15 Pro exact dimensions */
  max-width: 280px;
  margin: 0 auto;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.carousel-image:hover {
  transform: scale(1.02);
}

.carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  padding: 0 15px;
}

.carousel-prev,
.carousel-next {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-prev i,
.carousel-next i {
  font-size: 16px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dot.active {
  background-color: white;
}

/* Fullscreen Carousel Styles */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-carousel {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.fullscreen-overlay.active .fullscreen-carousel {
  transform: scale(1);
}

.fullscreen-carousel-container {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.fullscreen-carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 1010;
}

.fullscreen-close i {
  font-size: 20px;
}

.fullscreen-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.fullscreen-carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  padding: 0 30px;
  z-index: 1010;
}

.fullscreen-carousel-prev,
.fullscreen-carousel-next {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.fullscreen-carousel-prev i,
.fullscreen-carousel-next i {
  font-size: 24px;
}

.fullscreen-carousel-prev:hover,
.fullscreen-carousel-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.fullscreen-carousel-dots {
  display: flex;
  gap: 12px;
}

.fullscreen-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.fullscreen-carousel-dot.active {
  background-color: white;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .hero {
    padding: 5rem 2rem 3rem;
    min-height: auto;
  }

  .hero h2 {
    font-size: 3rem;
    margin-top: 1.5rem;
  }

  .website-projects {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .mobile-projects {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 4rem 1.5rem 2.5rem;
  }

  .hero h2 {
    font-size: 2.5rem;
  }

  .hero-logo img {
    height: 150px;
  }

  .hero-logo h1 {
    font-size: 3rem;
  }

  .mobile-projects {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .mobile-carousel {
    max-width: 100%;
    aspect-ratio: 393/852; /* Maintain iPhone 15 Pro aspect ratio */
  }
}

/* Form container to wrap the form */
.form-container {
  position: relative;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  transition: all 0.5s ease;
  position: relative;
  z-index: 1;
}

input,
textarea,
button {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  border: none;
}

button {
  background-color: var(--red);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Form submission states - simplified */
.form-submitting button {
  pointer-events: none;
  opacity: 0.8;
}

/* Error state */
.form-error {
  border: 1px solid var(--red);
}

/* Spinner */
.spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

/* Form status message - simplified */
.form-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.form-status.success {
  background-color: rgba(35, 132, 136, 0.2);
  color: var(--teal);
  opacity: 1;
  height: auto;
  padding: 1rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-status.error {
  background-color: rgba(213, 83, 77, 0.2);
  color: var(--red);
  opacity: 1;
  height: auto;
  padding: 0.75rem;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--sand);
}
