
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}


/* Color Variable */
:root {
  --primary: #0f172a;
  --secondary: #2563eb;
  --background: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
}

/* Global*/
body {
  background-color: var(--background);
  color: var(--text);
  line-height: 1.7;
}

/* Header*/
.header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
}

.subtitle {
  opacity: 0.8;
  font-size: 0.95rem;
}


.nav {
  position:relative;
  display: flex;
  justify-content: center;
  gap: 2rem;
  background-color: white;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.nav-link.active {
  color: var(--secondary);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}



/* Nav Animation */
.nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}

.nav a:hover {
  color: var(--secondary);
}

.nav a:hover::after {
  width: 100%;
}

ul{
  list-style-position: outside;
  padding: 20px;
}


/* Main */
.container {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  align-items: flex-start;
}

/* Article */
.content {
  flex: 3;
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-artikel{
  width: 100%;
  max-width: 60rem;
 
}

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

.content h2 {
  margin-bottom: 0.5rem;
}

.content h3 {
  margin-top: 1.5rem;
}

.content p {
  margin: 0.4rem 0;
}

/* Aside */
.sidebar {
  flex: 1;
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-height: fit-content;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.sidebar img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--secondary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--primary);
  color: white;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: 420px;
    margin: 2rem auto 0; /* 🔥 center */
  }

  .nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Desktop & Tablet */
section,
article,
h2 {
  scroll-margin-top: 90px;
}



@media (max-width: 480px) {

  /* NAVBAR */
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 4.5rem; 
  }

  /* STACK LAYOUT */
  .container {
    flex-direction: column;
  }

  /* ARTICLE */
  .content {
    padding: 1.25rem;
  }

  /* ASIDE */
  .sidebar {
    width: 100%;
    max-width: 360px;
    margin: 2rem auto 0;
    padding: 4rem;
  }

  section,
  article,
  h2 {
    scroll-margin-top: 120px;
  }

}







@media (max-width: 360px) {

  .nav {
    margin-bottom: 4.5rem; /* 🔥 penting */
  }

  .nav a {
    font-size: 0.85rem;
  }

  .sidebar {
    max-width: 300px;
  }

  .sidebar img {
    width: 90px;
    height: 90px;
  }

  .sidebar p {
    font-size: 0.8rem;
  }

  .content {
    padding: 1rem;
  }

  section,
  article,
  h2 {
    scroll-margin-top: 130px;
  }
}





