@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
}

/* ================= RESET ================= */

/* ================= THEME VARIABLES ================= */

:root {
  --bg-1: #0d1117;
  --bg-2: #161b22;
  --bg-3: #010409;
  --bg-4: #1e232a;
  --text-1: white;
  --text-2: #c9d1d9;
  --text-muted: #8b949e;
  --border: #30363d;
  --accent: #58a6ff;
}

html[data-theme="light"] {
  --bg-1: #ffffff;
  --bg-2: #f6f8fa;
  --bg-3: #f6f8fa;
  --bg-4: #f6f8fa;
  --text-1: black;
  --text-2: #24292f;
  --text-muted: #57606a;
  --border: #d0d7de;
  --accent: #0969da;
}

/* ================= THEME VARIABLES ================= */

body {
  background-color: var(--bg-1);
  color: var(--text-2);
}

header {
  background-color: var(--bg-2);
  border-bottom: 0.2rem solid var(--border);
}

footer {
  background-color: var(--bg-2);
  border-top: 0.2rem solid var(--border);
}
section#home.home.active {
  background-color: var(--bg);
}

.repo-card.github,
.service-item,
.skill-category,
.education-item,
.experience-item {
  background: var(--bg-1);
  border: 1px solid var(--border);
}

.repo-desc,
.repo-meta {
  color: var(--text-muted);
}

a,
.repo-name,
.notes {
  color: var(--accent);
}

.repo-card.github,
.service-item,
.skill-category,
.education-item,
.experience-item {
  background: var(--bg-1);
  border: 1px solid var(--border);
}

/* ================= THEME TRANSITION ================= */

html,
body {
  width: 100%;
  min-height: 100%;
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

html {
  font-size: 62.5%;
}

body {
  overflow: hidden;
}

a {
  font-weight: 700;
}

main#app {
  position: relative;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
a,
header,
footer,
section,
.nav a,
.repo-card,
.service-item,
.skill-category,
.education-item,
.experience-item,
.title,
.notes {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}

/* ================= HEADER ================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 9%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

header .logo img {
  width: 4rem;
}

.menu-toggle {
  display: none;
}

/* ================= NAV ================= */

nav a {
  font-size: 1.8rem;
  margin-left: 4rem;
  transition: 0.3s ease;
  border-bottom: 3px solid transparent;
  padding-bottom: 4px;
}

nav a:hover,
nav a.active {
  border-bottom: 3px solid #3d84df;
}

.logo {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.theme-hint {
  position: absolute;
  top: 50%;
  left: 5rem;
  transform: translateY(-50%) translateX(-6px);
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 1.2rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.logo:hover .theme-hint {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ================= SPA LAYOUT ================= */

section {
  min-height: auto;
  padding: 110px 9% 5rem;
  margin-top: 2em;
  display: none;
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

section.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

/* ================= HOME ================= */

section#home.home.active {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rem;
  min-height: calc(100vh - 70px);
}

.home-content h1 {
  font-size: 6rem;
  line-height: 1.2;
  color: var(--text-1);
}

.home-content h3 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--text-1);
}

.home-content h3 #typing {
  color: var(--text-1);
}

.home-content p {
  font-size: 2rem;
  opacity: 0.9;
}

.home-content p strong {
  color: var(--text-1);
}

.home-img img {
  width: 20vw;
  border-radius: 50%;
  box-shadow: 0 0 2rem var(--accent);
}

.notes:hover {
  text-decoration: underline;
}

/* ================= Links ================= */

.social-icons {
  margin-top: 3rem;
}

.social-icons h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-right: 1.5rem;
  border-radius: 50%;
  border: 2px solid #58a6ff;
  font-size: 2rem;
  text-decoration: none;
  transition: 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-5px) scale(1.1);
}

.reach-title {
  font-size: 2rem;
  font-weight: 600;
}

/* titik animasi */
.dots::after {
  content: "";
  animation: dots 1.5s infinite steps(4);
}

@keyframes dots {
  -14% {
    content: "";
  }
  14% {
    content: " . ";
  }
  28% {
    content: "  . . ";
  }
  42% {
    content: "   . . . ";
  }
  84% {
    content: "    . . . . ";
  }
  98% {
    content: "     . . . . . ";
  }
  112% {
    content: "       . . . . . . ";
  }
}

/* ================= BUTTON ================= */

.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.8rem;
  border-radius: 4rem;
  font-size: 1.6rem;
  transition: 0.3s ease;
  letter-spacing: 0.1rem;
  border: 2px solid var(--border);
}

.btn:hover {
  text-decoration: underline;
  color: var(--text-1);
  box-shadow: 0 0 20px var(--anccent);
}

/* ================= SERVICES ================= */

.services-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.service-item {
  background: #0d1117;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.4rem;
  transition: border 0.2s ease;
  width: 100%;
}

.service-item:hover {
}

.service-item h3 {
  font-size: 2.3rem;
  min-height: 2rem;
  margin-bottom: 1rem;
}

.service-item p {
  font-size: 1.6rem;
  opacity: 0.9;
}

/* ================= PROJECT ================= */

.repo-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 ke samping */
  gap: 2.5rem;
}

.repo-card.github {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.4rem;
  transition: border 0.2s ease;
  width: 100%;
}
.repo-card.github:hover {
  border-color: #58a6ff;
}
.repo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.repo-name {
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
}

.repo-name:hover {
  text-decoration: underline;
}

.repo-badge {
  font-size: 1.1rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #30363d;
}

.repo-badge.private {
}

.repo-desc {
  margin: 6px 0 10px;
  line-height: 1.4;
}

.repo-meta {
  display: flex;
  gap: 16px;
  font-size: 1.2rem;
  flex-wrap: wrap;
}

.repo-meta .lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.refresh-btn.github {
  font-size: 100rem;
  background-color: var(--bg-4);
  border: 1px solid #30363d;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2rem;
}

.refresh-btn.github p {
  font-size: 2rem;
  color: var(--text-1);
}

.refresh-btn.github:active {
  transform: translateY(1px);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.refresh-btn.github:hover {
  border-color: #58a6ff;
}

/* ================= SKILLS ================= */

.skills-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.skill-category {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.4rem;
  transition: border 0.2s ease;
  width: 100%;
}

.skill-category:hover {
  border-color: #58a6ff;
}

.skill-category h3 {
  min-height: 2rem;
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  color: var(--text-1);
}

.skill-chips {
  background-color: var(--bg-4);
  border: solid 1px var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 0.8rem;
}

.skill-chips h4 {
  display: block;
  width: 100%;
  font-size: 1.7rem;
  color: var(--text-muted);
}

.chip {
  color: var(--text-1);
  padding: 0.6rem 1.2rem;
  font-size: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip strong {
  font-weight: 500;
}

.chip:hover {
  box-shadow: 0 0 0.5rem var(--accent);
}

/* ================= SKILLS ================= */

/* ================= EDUCATION & EXPERIENCE ================= */
.main-title,
.main-title-non {
  font-size: 2.1rem;
  font-size: 3rem;
  color: var(--text-1);
}

.title {
  font-size: 2.1rem;
  color: var(--text-muted);
}
.education-item,
.experience-item {
  border-radius: 8px;
  padding: 2rem;
  font-size: 1.4rem;
  transition: border 0.2s ease;
  width: 100%;
  transition: 0.3s ease;
  margin-bottom: 2.5rem;
  background-color: var(--bg-4);
}

.education-item:hover,
.experience-item:hover {
  border-color: #58a6ff;
}

.education-item h3,
.experience-item h3 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
  color: var(--text-1);
}

.education-item p,
.experience-item p,
.experience-item li {
  font-size: 1.6rem;
  opacity: 0.9;
}

.experience-item ul {
  list-style: none;
  padding-left: 1rem;
}

.experience-item li::before {
  content: "•";
  margin-right: 0.6rem;
}

/* ================= EDUCATION GRID ================= */

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 1.5rem;
  margin-bottom: 4rem;
}

/* ================= FOOTER ================= */

footer {
  text-align: center;
  padding: 2.5rem 0;
  font-size: 1.4rem;
  opacity: 0.8;
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  opacity: 0.6;
}

/* ================= MOBILE ================= */

@media (max-width: 992px) {
   
   .menu-toggle {
    display: block;
    font-size: 2.5rem;
    color: var(--text-1);
    background: none;
    cursor: pointer;
    z-index: 101;
  }

  header {
    padding: 1.5rem 6%;
    height: 70px;
  }

  nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 60%;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: 0.35s ease;
    backdrop-filter: blur(10px);
    z-index: 1001;
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 2.2rem;
    margin: 2rem 0;
    position: relative;
  }

  /* ================= NAV OVERLAY ================= */

  .nav-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1000;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  nav a.active::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 999px;
  }
  
  .home {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 5rem;
  }

  .home-content h1 {
    font-size: 5rem;
    line-height: 1;
    color: var(--text-1);
  }

  .home-content h3 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-1);
  }

  .home-content h3 #typing {
    color: var(--text-1);
  }

  .home-content p {
    font-size: 3rem;
    opacity: 0.9;
  }

  .home-content p strong {
    color: var(--text-1);
  }

  .home-img img {
    width: 50%;
    border-radius: 50%;
    box-shadow: 0 0 2rem var(--accent);
  }

  .notes:hover {
    text-decoration: underline;
  }

  .repo-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    width: 100%;
  }

  .repo-card.github {
    width: 100%;
    min-width: 0; /* ⬅️ PENTING */
    box-sizing: border-box;
    padding: 1.4rem;
  }

  .repo-name {
    font-size: 3rem;
    flex-wrap: wrap;
  }

  .repo-desc {
    font-size: 2.5rem;
    line-height: 1;
  }

  .repo-meta {
    font-size: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
  }
}

.skills-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.skill-category {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.4rem;
  transition: border 0.2s ease;
  width: 100%;
}

.skill-category:hover {
  border-color: #58a6ff;
}

.skill-category h3 {
  min-height: 2rem;
  font-size: 3rem;
  margin-bottom: 1.2rem;
  color: var(--text-1);
}

.skill-chips {
  background-color: var(--bg-4);
  border: solid 1px var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 0.8rem;
}

.skill-chips h4 {
  display: block;
  width: 100%;
  font-size: 2.4rem;
  color: var(--text-muted);
}

.chip {
  color: var(--text-1);
  padding: 0.6rem 1.2rem;
  font-size: 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip strong {
  font-weight: 500;
}

.chip:hover {
  box-shadow: 0 0 0.5rem var(--accent);
}

.experience-item h3 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-1);
}

.education-item p,
.experience-item p,
.experience-item li {
  font-size: 2rem;
  opacity: 0.9;
}

.experience-item p,
.experience-item li strong {
  font-size: 2rem;
  color: var(--text-1);
  opacity: 0.9;
}

@media (max-width: 600px) {
  .menu-toggle {
    display: block;
    font-size: 2.5rem;
    color: var(--text-1);
    background: none;
    cursor: pointer;
    z-index: 101;
  }

  header {
    padding: 1.5rem 6%;
    height: 70px;
  }

  nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 60%;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: 0.35s ease;
    backdrop-filter: blur(10px);
    z-index: 1001;
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 2.2rem;
    margin: 2rem 0;
    position: relative;
  }

  /* ================= NAV OVERLAY ================= */

  .nav-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1000;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  nav a.active::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 999px;
  }

  /* ================= HOME ================= */

  .home {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    text-align: center;
    margin-top: 5rem;
  }

  .home-content h1 {
    font-size: 3.6rem;
    line-height: 1.2;
  }

  .home-content h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
  }

  .home-content p {
    font-size: 1.4rem;
    max-width: 90%;
    margin: 0 auto;
    opacity: 0.85;
  }

  .home-img img {
    width: 60vw;
    max-width: 280px;
  }

  /* ================= PROJECTS ================= */

  .projects {
    display: block;
  }

  .repo-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    width: 100%;
  }

  .repo-card.github {
    width: 100%;
    min-width: 0; /* ⬅️ PENTING */
    box-sizing: border-box;
    padding: 1.4rem;
  }

  .repo-name {
    font-size: 1.6rem;
  }

  .repo-desc {
    font-size: 1.3rem;
    line-height: 1.4;
  }

  .repo-meta {
    font-size: 1.2rem;
    gap: 1rem;
    flex-wrap: wrap;
  }

  /* ================= SKILLS ================= */

  .skill-icons img {
    display: block;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .chip {
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
  }
}
