@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
:root {
  --bg-light: #ece4f4;       /* Lavender-grey */
  --text-light: #3a2a42;     /* Plum soft */
  --bg-dark: #101420;
  --text-dark: #e6efff;
  --accent-light: #c27ba0;   /* Orchid pink */
  --accent-dark: #b2dfff;
  --card-light: #e0d4ed;     /* Mist purple */
  --card-dark: #1e293b;
}

body {
  font-family: Ubuntu;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

header {
  background-color: inherit;
  color: var(--text-light);
  padding: 50px 0 20px 17rem;
  border-bottom: 5px solid var(--accent-light);
  display: flex;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s, color 0.3s;
}

header img {
  margin-right: 40px;
  width: 170px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
}

header .header-text {
  max-width: 900px;
}

header h1 {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  margin: 15px 0 5px 0;
}

header p {
  color: inherit;
}

body.dark-mode header {
  color: var(--text-dark);
  border-bottom: 5px solid var(--accent-dark);
}

body.dark-mode header p {
  color: var(--text-dark);
}

section .project {
  display: block;
}

/* ==== Project Grid Responsive ==== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  justify-content: end; /* kanan di layar besar */
}

.project-card {
  background-color: var(--card-light);
  color: var(--text-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  max-width: 290px;
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
  margin-top: 20px;
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.project-card .project-info {
  padding: 15px;
  text-align: center;
}

.project-card .project-info h3 {
  color: #e91e63;
  margin-bottom: 10px;
}

body.dark-mode .project-card .project-info h3 {
  color: var(--accent-dark);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(160, 103, 139, 0.2);
}

body.dark-mode .project-card {
  background-color: var(--card-dark);
  color: var(--text-dark);
}

/* ==== Section ==== */
section {
  background-color: #ddeeff;
  color: var(--text-light);
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  max-width: 950px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode section {
  background-color: #1c2533;
  color: var(--text-dark);
}

h1, h3 {
  color: var(--accent-light);
}

h2 {
  display: inline-block;
  border-bottom: 3px solid #e91e63;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 {
  color: var(--accent-dark);
}

.skill:hover {
  background-color: #3d4b64;
}

body.dark-mode .skill:hover {
  background-color: #7db6ff;
}

input, textarea {
  background-color: #f5fbff;
  color: #101420;
  border: 1.5px solid #ccc;
  padding: 0.8rem;
  border-radius: 10px;
  width: 100%;
  margin-bottom: 1.2rem;
  box-sizing: border-box;
}

.programming-language {
  filter: grayscale(100%);
  width: 2rem;
}

body.dark-mode input, body.dark-mode textarea {
  background-color: #1e1e2f;
  color: #eee;
  border-color: #444;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  font-size: 2.5em;
  color: #e91e63;
  margin: 0 15px;
  transition: color 0.3s ease, transform 0.2s;
}

.social-links a:hover {
  color: #f50057;
  transform: scale(1.2);
}

.tombol {
  background: #e91e63;
  color: white;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

body.dark-mode .tombol {
  background: #e91e63;
  color: whitesmoke;
}

footer {
  text-align: center;
  font-size: 0.95rem;
  padding: 3rem 0;
  color: gray;
  background-color: var(--bg-light);
  margin-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

body.dark-mode footer {
  background-color: var(--bg-dark);
  color: #ddd;
}

/* ==== Skills ==== */
.skills {
  max-width: 1000px;
  margin: auto;
  padding: 0 1rem;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

.skill-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  text-align: left;
  transition: transform 0.2s ease;
  opacity: 1;
}

.skill-card:hover {
  transform: translateY(-4px);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.skill-header img {
  margin-bottom: 7px;
  object-fit: contain;
}

.skill-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a1a1a;
}

.skill-card p {
  margin: 0;
}

.hidden {
  display: none;
  opacity: 0;
}

.fade-in {
  display: block !important;
  animation: fadeSlideIn 0.4s ease forwards;
}

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

#toggleButton {
  margin: 30px auto 0;
  padding: 10px 20px;
  align-items: center;
  display: flex;
  background: #e91e63;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

#toggleButton:hover {
  background: #4a55cc;
}

body.dark-mode .skill-card {
  background-color: var(--card-dark);
  color: var(--text-dark);
}

.skill-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: var(--accent-light);
}

body.dark-mode .skill-card h3 {
  color: var(--accent-dark);
}

.show-more-container {
  text-align: center;
  margin-top: 1.5rem;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .project-grid {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  header {
    padding: 30px 1rem 20px 1rem;
    text-align: center;
    flex-direction: column;
    align-items: center;
  }
  header img {
    margin-right: 0;
    margin-bottom: 15px;
    width: 120px;
  }
  header .header-text {
    max-width: 100%;
  }
  h1 {
    font-size: 1.8em;
  }
  .skills-container {
    grid-template-columns: 1fr;
  }
  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .social-links a {
    font-size: 2em;
    margin: 0 10px;
  }
}
