/* styles.css */

:root {
  --bg-color: #e3f8ff;
  --text-color: #002855;
  --accent-color: #0061a8;
  --header-bg: #ffffff;
  --card-bg: #d2f1ff;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.header {
  background-color: var(--header-bg);
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
}

.nav a {
  margin-left: 1rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--accent-color);
}

.main {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.section {
  margin-bottom: 4rem;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.about {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: var(--shadow);
  background-image: url('images/avatar.png');
  background-size: cover;
  background-position: center;
  animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

.about-text {
  flex: 1;
}

.blog h2 {
  margin-bottom: 1rem;
}

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px var(--shadow);
}

.post h3 {
  margin-top: 0;
  color: var(--accent-color);
}

.footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--header-bg);
  color: var(--text-color);
  box-shadow: 0 -2px 8px var(--shadow);
}

#scrollToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background-color 0.3s;
}

#scrollToTop:hover {
  background-color: #004c87;
}

@media (max-width: 600px) {
  .about {
    flex-direction: column;
    text-align: center;
  }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-list a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-list a:hover {
  color: #004c87;
}
