/* Defaŭltaj variabloj (hela reĝimo) */
:root {
  --bg-color: #ffffff;
  --bg2-color: #9299ee;
  /*   --bg3-color: linear-gradient(135deg, #470b8b 0%, #8e24aa 100%); */
  --bg4-color: linear-gradient(to right, #1b48c4, #8e24aa);
  --border-color: #e0e0e0;
  --text-color: #470b8b;
  --text2-color: #333333;
  --text3-color: #8e24aa;
  --text4-color: #35385d;
  --text5-color: linear-gradient(135deg, #6e37f8, #db66fc, #c51daf);
  --text6-color: #470b8b;
  --text-domain: #5961aa;
  --linio-color: #35385d;
  --linio2-color: white;
  --shadow-cont: 0 20px 35px -12px rgba(0, 0, 0, 1);
  --shadow2-cont: 0 20px 35px -12px rgba(27, 72, 196, 1);
  --hover-domain: #470b8b;
}

/* variabloj por malhela reĝimo */
[data-theme="dark"] {
  --bg-color: #1a1a24;
  --bg2-color: #292b43;
  --bg3-color: #0a0a0f;
  --bg4-color: linear-gradient(to right, #470b8b, #751e8d);
  --border-color: #393d40;
  --text-color: #f0f3ff;
  --text2-color: #b9c3d4;
  --text3-color: #c084fc;
  --text4-color: #818cf8;
  --text5-color: linear-gradient(135deg, #818cf8, #c084fc, #f472b6);
  --text6-color: #9ca3af;
  --text-domain: #818cf8;
  --linio-color: rgba(129, 140, 248, 0.25);
  --linio2-color: rgba(129, 140, 248, 0.4);
  --shadow-cont: 0 20px 35px -12px rgba(0, 0, 0, 1);
  --shadow2-cont: 0 25px 40px -12px rgba(99, 102, 241, 0.25);
  --hover-domain: #ffffff;
}

#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text3-color);
  transition: transform 0.2s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

#theme-toggle svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* Reset & bazaj stiloj */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    "Noto Sans",
    sans-serif;
  /*   background: #0a0a0f; */
  background: var(--bg3-color);
  color: #eef2ff;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Fona glita efiko */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.15),
      transparent 60%
    ),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1), transparent 60%);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Hero sekcio */
.hero {
  text-align: center;
  margin-bottom: 5rem;
  /*   animation: fadeInUp 0.8s ease-out; */
}

.hero-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(4px);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #a5b4fc;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
  /*   color: #4f487a; */
}

.gradient-text {
  background: var(--text5-color);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text6-color);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 400;
}

/* Krado de projektoj */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 3rem 0 4rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Projektkarto */
.project-card {
  background: var(--bg-color);
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: default !important;
  box-shadow: var(--shadow-cont);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 1.5rem;
  position: relative;
  /*   gap: 1rem; */
}

.project-card:hover {
  border-color: var(--linio2-color);
  box-shadow: var(--shadow2-cont);
}

.project-image,
.image-placeholder {
  width: 200px;
  height: auto;
  min-height: 200px;
  flex-shrink: 0;
}

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #1e1b2e, #0f0f1a);
}

.project-content {
  flex: 1;
  padding: 2rem;
}

.project-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  /*   background: linear-gradient(to right, #f0f3ff, #cbd5e6); */
  /*   background-clip: text; */
  /*   -webkit-background-clip: text; */
  color: var(--text-color);
}

.project-domain {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-domain);
  background: rgba(129, 140, 248, 0.15);
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(129, 140, 248, 0.25);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.project-domain:hover {
  background: rgba(129, 140, 248, 0.3);
  border-color: var(--linio2-color);
  color: var(--hover-domain);
}

.project-description {
  color: var(--text2-color);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.project-description strong {
  color: var(--text3-color);
  font-weight: 600;
}

.project-description em {
  font-style: italic;
  color: #a5b4fc;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #c084fc;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
  transition: gap 0.2s ease;
  border-bottom: 1px solid transparent;
}

.card-link:hover {
  gap: 0.75rem;
  color: #e9d5ff;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #6b7280;
  font-size: 0.85rem;
}

/* Animacioj */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adaptiĝo por poŝtelefonoj */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  .hero {
    margin-bottom: 3rem;
  }

  .project-card {
    flex-direction: column;
    cursor: default;
  }

  .project-image,
  .image-placeholder {
    width: 100%;
    height: 180px;
  }

  .projects-grid {
    max-width: 100%;
    gap: 1.5rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.75rem;
  }

  .project-description {
    font-size: 0.95rem;
  }
}
