/* Root variables for colors & transitions */
:root {
  --color-bg: #37378a;
  --color-bg-variant: #0b0b0e;
  --color-primary: #64ffda;
  --color-primary-variant: rgba(77, 181, 255, 0.4);
  --color-white: #fff;
  --color-light: hsl(0, 0%, 100%);
  --transition: all 400ms ease;
  --container-width-lg: 75%;
  --container-width-md: 86%;
  --container-width-sm: 90%;
}

/* Base styles */
body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(-45deg, #37378a, #0b0b0e, #23236e, #101014);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  color: var(--color-white);
  scroll-behavior: smooth;
}

/* Gradient animation */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Header */
header {
  background: var(--color-bg-variant);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

header .header-top {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .header-top .profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

header h1 {
  margin: 0;
  font-family: 'Lora', serif;
  color: var(--color-primary);
  font-size: 2rem;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: max-height 0.3s ease;
}

nav a {
  color: var(--color-white);
  margin: 0 10px;
  text-decoration: none;
  font-weight: 500;
}

nav a.active {
  text-decoration: underline;
  font-weight: bold;
  color: var(--color-primary);
}

/* Hamburger menu */
.menu-toggle {
  display: none;
  background: var(--color-bg-variant);
  color: var(--color-white);
  border: none;
  font-size: 1.5rem;
  margin-left: 10px;
  cursor: pointer;
}

/* Hero section */
.hero {
  flex: 1;
  text-align: center;
  padding: 4rem 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero.appear {
  opacity: 1;
  transform: translateY(0);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-light);
}

/* Hero profile image */
.hero-profile {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  display: block;
  margin: 0 auto 15px;
}

/* Typewriter effect */
.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: .15em solid var(--color-primary);
  white-space: nowrap;
  letter-spacing: 2px;
  animation: blink-caret .68s step-end infinite;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-primary); }
}

/* Hero buttons container */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInButtons 1s ease forwards;
  animation-delay: 3.5s;
}

@keyframes fadeInButtons {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 10px 25px;
  margin-top: 10px;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: var(--color-primary-variant);
  transform: translateY(-3px);
}

/* Content sections */
.content {
  max-width: var(--container-width-lg);
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Card grid */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

/* Card styling */
.card {
  background: var(--color-bg-variant);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(50px);
  text-decoration: none;
  color: var(--color-white);
}

.card.appear {
  opacity: 1;
  transform: translateY(0);
}

.card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
  object-fit: cover;
  max-height: 200px;
}

.card h3 {
  margin: 0.5rem 0;
  color: var(--color-primary);
}

.card p {
  flex: 1;
  color: var(--color-light);
}

.card:hover {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 12px 25px rgba(255, 253, 253, 0.5);
}

/* Social links */
.social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 1rem;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 2rem auto;
}

.contact-form label {
  margin-top: 1rem;
  font-weight: bold;
  color: var(--color-white);
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem;
  border: 1px solid var(--color-primary);
  border-radius: 5px;
  font-size: 1rem;
  background: var(--color-bg-variant);
  color: var(--color-white);
}

.contact-form button {
  margin-top: 1rem;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: var(--color-primary-variant);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-bg-variant);
  color: var(--color-white);
  margin-top: auto;
}

footer .social a {
  color: var(--color-white);
  margin: 0 8px;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

footer .social a:hover {
  color: var(--color-primary);
}

/* Scrollbar hidden */
::-webkit-scrollbar {
  display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
  nav a {
    display: none;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  nav.active a {
    display: block;
  }
  .menu-toggle {
    display: inline-block;
    cursor: pointer;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .cards-container {
    grid-template-columns: 1fr;
  }
  .card img {
    max-height: 180px;
  }
  header .header-top {
    flex-direction: column;
    gap: 10px;
  }
  header .header-top .profile-img {
    width: 50px;
    height: 50px;
  }
  .hero-profile {
    width: 100px;
    height: 100px;
  }
}
