:root {
  color-scheme: dark;
  --bg-1: #05030f;
  --bg-2: #0f1a45;
  --accent: #6a7bff;
  --accent-2: #42e8e0;
  --text-main: #f5f8ff;
  --text-muted: rgba(245, 248, 255, 0.7);
  --card-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --glow: 0 10px 40px rgba(80, 131, 255, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: radial-gradient(circle at top, var(--bg-2), var(--bg-1) 40%);
  color: var(--text-main);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/5/5f/Noise_texture.jpg");
  opacity: 0.03;
  mix-blend-mode: screen;
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-10%, -10%);
  }
}

.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 123, 255, 0.5), rgba(5, 3, 15, 0));
  filter: blur(20px);
  animation: float 16s ease-in-out infinite;
  pointer-events: none;
}

.orb:nth-child(1) {
  top: -80px;
  left: -60px;
  animation-delay: -4s;
}
.orb:nth-child(2) {
  bottom: 60px;
  right: -80px;
  background: radial-gradient(circle, rgba(66, 232, 224, 0.45), rgba(5, 3, 15, 0));
  animation-delay: -8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-40px) scale(1.05);
  }
}

main {
  position: relative;
  padding: 80px 24px;
  max-width: 960px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 60px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(66, 232, 224, 0.12);
  border: 1px solid rgba(66, 232, 224, 0.2);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.email-card {
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
}

nav {
  position: relative;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 60px;
}

nav > div:first-child {
  display: flex;
  gap: 16px;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

nav a:hover {
  background: rgba(106, 123, 255, 0.15);
  border-color: rgba(106, 123, 255, 0.3);
  color: var(--accent-2);
  transform: translateY(-2px);
}

nav a.active {
  color: var(--accent-2);
  background: rgba(66, 232, 224, 0.15);
  border-color: rgba(66, 232, 224, 0.4);
  box-shadow: 0 4px 16px rgba(66, 232, 224, 0.15);
}

/* Language Switcher */
.language-switcher {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(15, 26, 69, 0.6);
  border: 1px solid rgba(106, 123, 255, 0.25);
  border-radius: 50px;
  padding: 4px;
  backdrop-filter: blur(12px);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lang-btn {
  position: relative;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 1;
}

.lang-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(106, 123, 255, 0.4), rgba(66, 232, 224, 0.3));
  border-radius: 50px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.lang-btn:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.lang-btn:hover::before {
  opacity: 0.5;
  transform: scale(1);
}

.lang-btn.active {
  color: #fff;
  text-shadow: 0 0 12px rgba(66, 232, 224, 0.6);
}

.lang-btn.active::before {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 
    0 4px 20px rgba(106, 123, 255, 0.4),
    0 0 30px rgba(66, 232, 224, 0.2);
}

.lang-btn:active {
  transform: scale(0.95);
}

/* Glow animation for active button */
@keyframes langGlow {
  0%, 100% {
    box-shadow: 
      0 4px 20px rgba(106, 123, 255, 0.4),
      0 0 30px rgba(66, 232, 224, 0.2);
  }
  50% {
    box-shadow: 
      0 4px 25px rgba(106, 123, 255, 0.6),
      0 0 40px rgba(66, 232, 224, 0.35);
  }
}

.lang-btn.active::before {
  animation: langGlow 3s ease-in-out infinite;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.card {
  position: relative;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--glow);
  overflow: hidden;
  transition: transform 0.5s ease, border-color 0.5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: -100% -80%;
  background: radial-gradient(circle, rgba(106, 123, 255, 0.3), transparent 65%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(88, 119, 255, 0.9);
}

.card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 24px;
  color: var(--accent);
}

.card-title {
  font-size: 1.2rem;
  margin: 0 0 6px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.card a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card a span {
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card a:hover span {
  opacity: 1;
  transform: translateX(4px);
}

.card-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
}

section {
  margin-top: 90px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.showcase {
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(106, 123, 255, 0.12), rgba(5, 3, 15, 0.4));
  position: relative;
  overflow: hidden;
}

.showcase::before,
.showcase::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(66, 232, 224, 0.35);
  filter: blur(40px);
  animation: pulse 12s ease-in-out infinite;
}

.showcase::before {
  top: -40px;
  right: -10px;
  animation-delay: -3s;
}

.showcase::after {
  bottom: -30px;
  left: -20px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.showcase p {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text-muted);
  line-height: 1.6;
}

.why-list {
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 20px;
  margin: 0;
  list-style: disc;
}

.why-list li {
  margin-bottom: 6px;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-buttons a {
  flex: 1 1 120px;
  text-align: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.social-buttons a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(106, 123, 255, 0.4), rgba(66, 232, 224, 0.4));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-buttons a span {
  position: relative;
  z-index: 1;
}

.social-buttons a:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

.social-buttons a:hover::after {
  opacity: 1;
}

.project-card {
  background: linear-gradient(135deg, rgba(106, 123, 255, 0.1), rgba(66, 232, 224, 0.05));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(88, 119, 255, 0.9);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.difficulty-easy {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.difficulty-medium {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.difficulty-hard {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.project-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(106, 123, 255, 0.15);
  border: 1px solid rgba(106, 123, 255, 0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent-2);
}

.code-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
}

.code-header {
  background: rgba(106, 123, 255, 0.1);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
}

.code-content {
  padding: 0;
  position: relative;
  max-height: 400px;
  overflow-y: auto;
}

.code-content pre {
  margin: 0;
  padding: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e0e0e0;
  background: transparent;
}

.code-content code {
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
}

.copy-btn {
  background: rgba(106, 123, 255, 0.2);
  border: 1px solid rgba(106, 123, 255, 0.3);
  color: var(--accent-2);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(106, 123, 255, 0.4);
  border-color: rgba(106, 123, 255, 0.6);
}

.copy-btn.copied {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

footer {
  text-align: center;
  margin-top: 120px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  main {
    padding-top: 60px;
  }

  .card {
    padding: 20px;
  }

  .social-buttons {
    flex-direction: column;
  }

  .project-header {
    flex-direction: column;
  }

  .code-content {
    max-height: 300px;
  }
}


