:root {
  --bg-color: #f3f4f6; /* A slightly cooler gray */
  --text-color: #1f2937;
  --primary-color: #4f46e5; /* A modern, vibrant blue/indigo */
  --primary-text: #ffffff;
  --border-color: #d1d5db;
  --card-bg: #ffffff;
  --subtle-text: #6b7280;
  --shadow-color: rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.7;
  margin: 0;
  background: linear-gradient(-45deg, #f3f4f6, #e0e7ff, #f3f4f6, #dbeafe);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease-out forwards;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid var(--card-bg);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

h1 {
  font-size: 2.25rem;
  margin: 0.5em 0;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  margin-top: 60px;
  margin-bottom: 30px;
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0; /* Start hidden for animation */
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0;
  font-weight: 600;
}

.lead {
  font-size: 1.15rem;
  color: var(--subtle-text);
  margin-bottom: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-links {
  margin-top: 25px;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  margin: 5px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--primary-text);
  border-color: var(--primary-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.skills-grid > div {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.skills-grid h4 {
  margin-top: 0;
  font-size: 1rem;
}

.skills-grid p {
  font-size: 0.9rem;
  color: var(--subtle-text);
  margin-bottom: 0;
}

.highlight {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 25px;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.2s ease-in-out;
  animation: fadeIn 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.highlight:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.highlight .date {
  font-style: italic;
  color: var(--subtle-text);
  margin-top: 5px;
  font-size: 0.9rem;
}

.highlight ul {
  padding-left: 20px;
  margin-top: 15px;
  margin-bottom: 0;
}

.cert-list {
  font-size: 0.9rem;
  color: var(--subtle-text);
  text-align: center;
  padding: 20px;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
  opacity: 0;
}

@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .profile-photo {
    width: 100px;
    height: 100px;
  }

  .hero-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 80%;
    text-align: center;
  }
}

.android-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 80px 0;
  gap: 15px;
  text-align: center;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
  opacity: 0;
}

.android-divider .android-icon {
  fill: #3ddc84;
  animation: bobbing 3s ease-in-out infinite;
}

@keyframes bobbing {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.android-divider p {
  font-style: italic;
  color: var(--subtle-text);
  font-size: 1rem;
  margin: 0;
}

.android-divider code {
  font-style: normal;
  background-color: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

/*
 * Dark Theme
 * -------------------------------------------------- */
[data-theme="dark"] {
  --bg-color: #111827;
  --text-color: #f9fafb;
  --border-color: #374151;
  --card-bg: #1f2937;
  --subtle-text: #9ca3af;
  --shadow-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body {
  background: linear-gradient(-45deg, #111827, #1e1b4b, #111827, #1e293b);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

[data-theme="dark"] .android-divider code {
  background-color: #374151;
  color: #f9fafb;
}

[data-theme="dark"] .btn {
    color: var(--text-color);
}

[data-theme="dark"] .btn-primary {
    color: var(--primary-text);
}

/*
 * Theme Toggle Button
 * -------------------------------------------------- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 8px 12px;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.2s ease-in-out;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

[data-theme="dark"] .theme-toggle:hover {
  box-shadow: 0 8px 25px rgba(255,255,255,0.08);
}