/* =========================
   RESET
========================= */

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

/* =========================
   BASE
========================= */

body {
  min-height: 100dvh;
  background: #06082f;
  font-family: "Google Sans", system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.55);
}

/* =========================
   LOAD ANIMATIONS
========================= */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply animations */
.layout {
  animation: fadeIn 0.6s ease-out;
}

.skills {
  animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

.center h1 {
  animation: scaleIn 1s ease-out 0.4s both;
}

.dot {
  animation: fadeIn 0.5s ease-out 1s both;
}

.languages {
  animation: slideInFromRight 0.8s ease-out 0.6s both;
}

.hobbies {
  animation: slideInFromLeft 0.8s ease-out 0.6s both;
}

.experience {
  animation: slideInFromRight 0.8s ease-out 0.6s both;
}

/* =========================
   MAIN LAYOUT (DESKTOP)
========================= */

.layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.5rem, 4vw, 4rem);
}

/* =========================
   CENTER TITLE
========================= */

.center {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  place-items: center;
} 

.center h1::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 40%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(30px);
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.center h1 {
  font-size: clamp(5rem, 18vw, 20rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #c2463d;
}

.dot {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  background: #0f0f0f;
  border-radius: 50%;
  margin: 0 -0.15em;
}

/* =========================
   TEXT BLOCKS
========================= */

.block {
  font-size: clamp(0.75rem, 1.3vw, 0.9rem);
  line-height: 1.8;
}

h3 {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 500;
  color: #c2463d;
  margin-bottom: 0.8rem;
}

.block span {
  opacity: 0.75;
}

/* =========================
   DESKTOP POSITIONS
========================= */

.skills {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.languages {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: clamp(0.7rem, 1.1vw, 0.85rem);
}

.bottom-row {
  grid-column: 1 / -1;
  grid-row: 3;
  display: contents; /* desktop ignores wrapper */
}

.hobbies {
  grid-column: 1;
  text-align: left;
}

.experience {
  grid-column: 3;
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

.skills p,
.hobbies p {
  padding-left: 1.2em;
}

.experience p {
  padding-right: 1.2em;
}

/* =========================
   MOBILE (REAL RESPONSIVE)
========================= */

@media (max-width: 600px) {

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: clamp(2rem, 6vw, 3rem);
  }

  .skills {
    grid-row: 1;
  }

  .center {
    grid-row: 2;
  }

  .languages {
    grid-row: 3;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1.5rem;
  }

  /* KEY PART */
  .bottom-row {
    grid-row: 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(1.5rem, 5vw, 3rem);
  }

  .hobbies {
    text-align: left;
  }

  .experience {
    text-align: right;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
