:root {
  --primary-color: #000;
  --secondary-color: #333;
  --accent-color: #555;
  --background-color: #fff;
  --text-color: #000;
  --inverse-text: #fff;
  --section-spacing: 60px;
  --rain-color: rgba(0, 0, 0, 0.2);
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient-start: rgba(255, 255, 255, 0.1);
  --gradient-end: rgba(255, 255, 255, 0.05);
}

.dark-theme {
  --primary-color: #fff;
  --secondary-color: #ccc;
  --accent-color: #aaa;
  --background-color: #121212;
  --text-color: #fff;
  --inverse-text: #000;
  --rain-color: rgba(255, 255, 255, 0.3);
  --card-bg: rgba(30, 30, 30, 0.8);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --gradient-start: rgba(255, 255, 255, 0.05);
  --gradient-end: rgba(255, 255, 255, 0.02);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.rain-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.drop {
  position: absolute;
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, var(--rain-color), transparent);
  border-radius: 0 0 5px 5px;
  animation: rain linear infinite;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.splash {
  position: absolute;
  width: 15px;
  height: 10px;
  border-radius: 50%;
  background: var(--rain-color);
  opacity: 0;
  animation: splash 0.5s ease-out infinite;
  transition: all 0.3s ease;
}

@keyframes rain {
  0% {
    transform: translateY(-100px);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@keyframes splash {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  90% {
    opacity: 0;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

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

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background-color);
  border-bottom: 1px solid var(--accent-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid transparent;
}

.nav-logo:hover {
  border-color: var(--text-color);
  transform: translateY(-2px);
}

.nav-controls {
  display: flex;
  gap: 10px;
}

.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--text-color);
  color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
  transform: scale(1.1);
}

.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(30deg);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  padding: 40px 0;
  margin-bottom: var(--section-spacing);
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 300px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  border-radius: 50%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 15px;
  text-transform: uppercase;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-subtitle {
  font-size: 16px;
  color: var(--secondary-color);
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Roboto Mono', monospace;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: var(--section-spacing);
  align-items: stretch;
}

.project-item {
  border: 1px solid var(--accent-color);
  padding: 20px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  border-radius: 15px;
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  isolation: isolate;
  min-height: 420px;
  height: 100%;
}

.project-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gradient-start), transparent);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.project-item:hover::before {
  left: 100%;
}

.project-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gradient-start) 0%, transparent 50%, var(--gradient-end) 100%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.project-item:hover::after {
  opacity: 1;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--accent-color);
  border-color: var(--primary-color);
}

.dark-theme .project-item:hover {
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1), 0 0 0 1px var(--primary-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
  position: relative;
  min-height: 30px;
}

.project-type {
  background: linear-gradient(135deg, var(--text-color), var(--accent-color));
  color: var(--background-color);
  padding: 6px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 80px;
  text-align: center;
}

.project-item:hover .project-type {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.project-item .image-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 10px;
  position: relative;
  border: 1px solid var(--accent-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.project-item:hover .image-container {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.95);
}

.project-item:hover img {
  filter: brightness(1);
}

.project-item .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 180px;
}

.project-item h3 {
  font-size: 18px;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.3px;
  position: relative;
  padding-bottom: 8px;
  line-height: 1.3;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--accent-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover h3::after {
  width: 60px;
  background: var(--primary-color);
}

.project-item p {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-family: 'Roboto Mono', monospace;
  line-height: 1.5;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.project-item:hover p {
  color: var(--text-color);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 15px;
  min-height: 30px;
  align-items: center;
}

.tech-tag {
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  color: var(--background-color);
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  min-width: 50px;
}

.project-item:hover .tech-tag {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.details-link {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--text-color), var(--secondary-color));
  color: var(--background-color);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--text-color);
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  z-index: 2;
  width: 100%;
  text-align: center;
  font-size: 12px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.details-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.details-link:hover::before {
  left: 100%;
}

.details-link:hover {
  background: transparent;
  color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.dark-theme .details-link:hover {
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.inactive-link {
  cursor: not-allowed;
  opacity: 0.7;
}

.inactive-link:hover {
  transform: none !important;
  box-shadow: none !important;
  background: linear-gradient(135deg, var(--text-color), var(--secondary-color)) !important;
  color: var(--background-color) !important;
}

.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: var(--section-spacing);
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer p {
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-family: 'Roboto Mono', monospace;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-info-btn {
  background: none;
  border: none;
  color: var(--secondary-color);
  text-decoration: underline;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.footer-info-btn:hover {
  color: var(--text-color);
}

.footer-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background-color: var(--background-color);
  border: 1px solid var(--accent-color);
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark-theme .footer-content {
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.footer-content.active {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 10px);
}

.footer-content h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-color);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-content ul {
  list-style-type: none;
}

.footer-content li {
  margin-bottom: 8px;
  color: var(--secondary-color);
  font-family: 'Roboto Mono', monospace;
  line-height: 1.5;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 16px;
  background-color: var(--text-color);
  color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform-origin: 1px;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 20px;
  margin: 12px 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu a:hover {
  color: var(--accent-color);
}

.mobile-controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.mobile-theme-toggle, .mobile-lang-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  border: 1px solid var(--accent-color);
}

.mobile-lang-toggle {
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.mobile-theme-toggle:hover, .mobile-lang-toggle:hover {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

@media (max-width: 1200px) {
  .projects-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .header h1 {
    font-size: 36px;
  }
  
  .header-subtitle {
    font-size: 14px;
  }
  
  .projects-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project-item {
    padding: 20px;
    min-height: 380px;
  }
  
  .project-item:hover {
    transform: translateY(-5px);
  }
  
  .container {
    padding: 20px 15px;
  }
  
  .footer-content {
    width: 95%;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 32px;
  }
  
  .projects-list {
    grid-template-columns: 1fr;
  }
  
  .project-item {
    min-height: 350px;
    padding: 15px;
  }
  
  .project-item h3 {
    font-size: 16px;
    min-height: 40px;
  }
  
  .project-item p {
    font-size: 13px;
    min-height: 50px;
  }
  
  .details-link {
    padding: 8px 16px;
    font-size: 11px;
    min-height: 36px;
  }
  
  .project-item:hover {
    transform: translateY(-3px);
  }
}