/* Could probably be optimised, I'm not a front-end developer */

:root {
  --bg: #0f172a;
  --card: #111827;
  --primary: #38bdf8;
  --secondary: #22c55e;
  --text: #e5e7eb;
  --muted: #9ca3af;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  background: linear-gradient(180deg, #020617, var(--bg));
  color: var(--text);
  line-height: 1.6;
}

header {
  padding: 4rem 2rem;
}

.hero {
  max-width: 1100px;
  margin: auto;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

.hero-text h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
}

.hero-text p {
  max-width: 720px;
  margin-top: 1.5rem;
  color: var(--muted);
}

.hero-social-inline {
  margin-top: 3rem;
  display: flex;
  align-items: center;
}

.hero-social-inline img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.3s;
}

.hero-social-inline img:hover {
  transform: scale(1.2);
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  display: inline-block;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

header h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
}

header p {
  max-width: 720px;
  margin: 1.5rem auto 0;
  color: var(--muted);
}

section {
  max-width: 1100px;
  margin: auto;
  padding: 3rem 2rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
  align-items: stretch;
}

.card {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;

  width: 300px;
  height: 450px;
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.card ul {
  list-style: none;
}

.card li {
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

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

#footer_title {
  color: var(--primary);
}

/* ===================== */
/* Responsive breakpoints */
/* ===================== */

/* Tablets */
@media (max-width: 1024px) {
  header h1 {
    font-size: 2.4rem;
  }

  header h2 {
    font-size: 1.25rem;
  }

  section {
    padding: 2.5rem 1.5rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-image img {
    width: 180px;
    height: 180px;
  }

  .hero-social-inline img {
    width: 30px;
    height: 30px;
    margin-top: 2rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .cards {
    justify-content: center;
  }

  .card {
    width: 100%;
    height: auto;
  }

  .skills {
    justify-content: center;
  }

  header h1 {
    font-size: 2rem;
  }

  header h2 {
    font-size: 1.1rem;
  }

  header p {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }

  .skills {
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.7rem;
  }

  header h2 {
    font-size: 1rem;
  }

  section {
    padding: 2rem 1rem;
  }

  footer {
    font-size: 0.8rem;
  }
}

/* Language selection */

.lang-switch {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.lang-switch button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--primary);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.lang-switch button.active {
  background: var(--primary);
  color: #020617;
}

/* Don't look as this */

@keyframes rotateOnce {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-image img.rotate {
  animation: rotateOnce 0.6s linear;
}

.popup-container {
  text-align: center;
  margin: 1rem 0;
}

.popup {
  display: inline-block;
  background: var(--primary);
  color: #020617;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.popup.show {
  opacity: 1;
  transform: translateY(-5px);
}
