* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fcfdfe;
  color: #333333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  color: #1a1a1a;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Header & Nav */
header {
  background: #245fff;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(36, 95, 255, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-weight: 700;
  font-size: 1.5rem;
  color: #ffffff;
  letter-spacing: 1px;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  color: rgba(255, 255, 255, 0.8); /* Warna putih agak transparan saat normal */
  margin-left: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.3s ease;
}

/* PERBAIKAN HOVER NAV: Menghilangkan efek warna biru muda */
nav a:hover {
  color: #ffffff; /* Menjadi putih bersih saat di-hover */
}

/* Efek garis bawah (underline transition) putih yang modern saat di-hover */
nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #ffffff;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Main Container */
main {
  flex: 1;
  max-width: 1000px;
  margin: 3rem auto 5rem;
  padding: 0 1.5rem;
  width: 100%;
}

/* Section General */
section {
  margin-bottom: 5rem;
  outline: none;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1.8rem;
  border-bottom: 3px solid #245fff;
  padding-bottom: 0.4rem;
  max-width: max-content;
  color: #245fff;
}

/* About Section */
#about {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: #ffffff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

#about img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #245fff;
  flex-shrink: 0;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #4a4a4a;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Skills Section Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 5px solid #245fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #245fff;
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-card li::before {
  content: "•";
  color: #245fff;
  font-weight: bold;
}

/* Projects Section Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.project-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(36, 95, 255, 0.1);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: #1a1a1a;
}

.project-card p {
  font-size: 0.95rem;
  color: #666666;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.tech-badge {
  background: #eef3ff;
  color: #245fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
}

.project-link {
  color: #245fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.project-link:hover {
  color: #163cb5;
}

/* Social Media Section */
.social-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
}

.social-list li {
  background: #245fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(36, 95, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s ease;
}

.social-list li a {
  color: #ffffff;
  font-weight: 600;
}

.social-list li:hover {
  background: #1a4cd2;
  transform: translateY(-2px);
}

.social-list .icon {
  font-size: 1.4rem;
}

/* Contact Section & Form */
#contact form {
  max-width: 600px;
  background: #245fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(36, 95, 255, 0.25);
}

.form-group {
  margin-bottom: 1.2rem;
}

#contact label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #ffffff; /* Memperbaiki kontras teks label */
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  background: #ffffff;
  color: #333333;
  outline: none;
  transition: box-shadow 0.3s;
}

#contact input:focus,
#contact textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

#contact button {
  background-color: #ffffff;
  border: none;
  padding: 0.8rem 2.5rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  color: #245fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#contact button:hover {
  background-color: #eef3ff;
  transform: translateY(-1px);
}

/* Validation Boxes (Memindahkan inline style dari PHP) */
.error-messages, .success-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  max-width: 600px;
}

.error-messages {
  background: #ffebeb;
  color: #d32f2f;
  border-left: 4px solid #d32f2f;
}

.success-message {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

/* Footer (Perbaikan bug fatal) */
footer {
  background: #245fff;
  color: #ffffff;
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.95rem;
  margin-top: auto; /* Memastikan footer berada di dasar halaman */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
  }
  nav a {
    margin: 0 0.8rem;
  }
  #about {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  #about img {
    width: 120px;
    height: 120px;
  }
}