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

header {
  padding: 4rem 2rem 0;
}

.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-text .hero-availability {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
}

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

.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;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  display: inline-block;
}

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 {
  display: flex;
  flex-direction: column;
  width: 300px;
  padding: 2rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card .company {
  font-size: 0.95rem;
  color: var(--primary);
}

.card .dates {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Experience cards: clickable buttons that open the details in a modal */
.exp-card {
  text-align: left;
  font: inherit;
  color: var(--text);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.exp-card:hover,
.exp-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--primary);
  outline: none;
}

.exp-title {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
}

.exp-more {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.exp-more::after {
  content: " →";
}

/* Education & certification cards */
.edu-title,
.cert-title {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--secondary);
}

.edu-meta,
.cert-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.edu-badge {
  align-self: flex-start;
  margin-top: 0.6rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
}

/* Languages */
.lang-list {
  list-style: none;
  max-width: 480px;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-item:last-child {
  border-bottom: none;
}

.lang-name {
  font-weight: 600;
}

.lang-level {
  color: var(--muted);
}

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

.skill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.12),
    rgba(56, 189, 248, 0.04)
  );
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  cursor: default;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.skill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.skill:hover {
  transform: translateY(-3px);
  color: #e0f2fe;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
}

/* Headline skills get a distinct (green) accent */
.skill--core {
  color: var(--secondary);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.15),
    rgba(34, 197, 94, 0.05)
  );
  border-color: rgba(34, 197, 94, 0.35);
}

.skill--core:hover {
  color: #dcfce7;
  border-color: var(--secondary);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}

/* Staggered entrance, enabled by JS once skills are shuffled.
   Uses the independent `translate` property so it never fights the
   `transform`-based hover lift. */
.skills.is-ready .skill {
  animation: skillIn 0.4s ease both;
}

@keyframes skillIn {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skills.is-ready .skill,
  .passions.is-ready .passion-card,
  .modal-box {
    animation: none;
  }
}

/* Passions */

.passions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.passion-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 220px;
  padding: 1.5rem;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.passion-card:hover,
.passion-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--primary);
  outline: none;
}

/* Staggered entrance once shuffled (reuses the skillIn keyframe) */
.passions.is-ready .passion-card {
  animation: skillIn 0.4s ease both;
}

.passion-icon {
  font-size: 2rem;
}

.passion-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
}

.passion-teaser {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Quick view modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 2.5rem 2rem 2rem;
  background: var(--card);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-icon {
  font-size: 2.5rem;
}

.modal-title {
  margin: 0.5rem 0 1rem;
  color: var(--secondary);
}

.modal-body {
  color: var(--text);
}

.modal-meta {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-list {
  list-style: none;
  text-align: left;
}

.modal-list li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  color: var(--text);
}

.modal-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Konami easter-egg overlay */
.konami-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.konami-actions .cv-download {
  margin-top: 0;
}

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) {
  .hero-text h1 {
    font-size: 2.4rem;
  }

  .hero-text 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;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.1rem;
  }

  .hero-text p {
    font-size: 0.95rem;
  }

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

  .cards {
    justify-content: center;
  }

  .card {
    width: 100%;
    padding: 1.5rem;
  }

  .skills {
    justify-content: center;
  }

  .passions {
    justify-content: center;
  }
}

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

  .hero-text 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);
}
