:root {
  --primary-color: #4a90e2;
  --bg-color: #ffffff;
  --text-color: #222;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* HEADER & NAVBAR */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  margin: 0 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  transition: transform 0.2s, opacity 0.2s;
}

nav a:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

#theme-btn {
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  background-color: #fff;
  color: var(--primary-color);
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

#theme-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* HERO SECTION */

.hero {
  position: relative;
  text-align: center;
  margin-bottom: 2rem;
  overflow: hidden;
}

.hero img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  filter: brightness(0.6);
  transform: translateZ(0);
}

.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.hero-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 2;
  text-align: center;
  padding: 0 1rem;
}

.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  animation: fadeIn 1s ease forwards;
}

.hero-text p {
  font-size: 1.1rem;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
  animation: fadeIn 1.4s ease forwards;
}

/* MAIN CONTENT */

main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

section p,
section li {
  font-size: 1.05rem;
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* ABOUT */

.about-info {
  margin-bottom: 2rem;
}

/* PROJECT CARDS */

.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card {
  flex: 1 1 280px;
  background: #f5f5f5;
  padding: 1.1rem;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card h2 {
  margin-top: 0;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: bold;
}

/* SKILLS */

.skills-list ul {
  list-style: none;
  padding: 0;
}

.skills-list li::before {
  content: "• ";
  color: var(--primary-color);
  font-weight: bold;
}

/* SKILLS EXTRA LINKS */

.skills-links {
  margin-top: 2rem;
  text-align: center;
}

.skills-links-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* CONTACT & COMMON BUTTON STYLE */

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
  font-size: 1rem;
  background: rgba(0,0,0,0.35);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.contact-link i {
  font-size: 1.1rem;
}

.contact-link:hover {
  transform: scale(1.07);
  background: rgba(0,0,0,0.55);
}

/* CV SECTION */

.cv-section {
  text-align: center;
  padding: 2rem 1rem;
}

.cv-section p {
  margin-bottom: 1.5rem;
}

/* GENERAL LINKS */

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* SCROLL ANIMATION */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

[data-animate].show {
  opacity: 1;
  transform: translateY(0);
}

/* KEYFRAMES */

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* DARK THEME */

body.dark {
  --bg-color: #101015;
  --text-color: #eaeaea;
  --primary-color: #0abde3;
}

body.dark .card {
  background: #1c1c24;
}

body.dark .skills-list li::before {
  color: #0abde3;
}

body.dark header {
  background-color: var(--primary-color);
}

body.dark #theme-btn {
  color: var(--primary-color);
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 1.9rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
  header {
    flex-direction: column;
    gap: 0.5rem;
  }
  nav a {
    font-size: 0.85rem;
  }
}
