* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

:root {
  --primary: #2dd4bf;
  --primary-dark: #14b8a6;
  --bg-dark: #0a0a0a;
  --bg-card: #151515;
  --text-light: #f0f0f0;
  --text-gray: #a0a0a0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Scroll bar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Header styles */
header {
  padding: 80px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.05;
  background: radial-gradient(
      circle at 20% 30%,
      var(--primary) 0%,
      transparent 70%
    ),
    radial-gradient(circle at 80% 70%, var(--primary-dark) 0%, transparent 70%);
}

.header-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.header-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 80px;
  height: 4px;
  background-color: var(--primary);
  transform: translateX(-50%);
  transition: width 0.5s ease;
}

.header-title:hover::after {
  width: 100%;
}

.header-subtitle {
  font-size: 18px;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Portfolio grid */
.portfolio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 50px 0;
}

.portfolio-item {
  background-color: var(--bg-card);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
  animation-delay: calc(var(--animation-order) * 0.1s);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(45, 212, 191, 0.25);
}

.portfolio-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
  transition: transform 0.5s ease;
  filter: brightness(0.9);
}

.portfolio-item:hover .portfolio-img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.portfolio-item a {
  color: var(--text-light);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.portfolio-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.portfolio-item a:hover h3 {
  color: var(--primary);
}

.portfolio-item p {
  color: var(--text-gray);
  font-size: 14px;
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 0;
  transform: translateY(100%);
  transition: transform 0.6s ease;
}

.portfolio-item:hover .card-shine {
  transform: translateY(-100%);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 0;
  background-color: var(--bg-card);
  position: relative;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  z-index: 1;
}

footer p {
  font-size: 14px;
  color: var(--text-gray);
  position: relative;
  z-index: 2;
}

/* Page transition */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  z-index: 9999;
  transform-origin: bottom;
  transform: scaleY(0);
  pointer-events: none;
}

/* Cursor effects */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

body:hover .cursor-dot,
body:hover .cursor-outline {
  opacity: 1;
}

/* Loading animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(45, 212, 191, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  margin-top: 20px;
  font-size: 16px;
  color: var(--primary);
  letter-spacing: 2px;
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: var(--bg-dark);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(45, 212, 191, 0.3);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background-color: var(--primary-dark);
}

.scroll-arrow {
  border: solid var(--bg-dark);
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 5px;
  transform: rotate(-135deg);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .header-title {
    font-size: 36px;
  }

  .header-subtitle {
    font-size: 16px;
  }

  .portfolio-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 28px;
  }

  .container {
    padding: 0 20px;
  }

  .portfolio-list {
    grid-template-columns: 1fr;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
