/* Pengaturan dasar */
:root {
  --background: #fafafa;
  --surface: #ffffff;
  --text: #171717;
  --muted: #737373;
  --border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 6px;
}

/* Navbar mengambang */
.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  width: min(1100px, calc(100% - 40px));
  padding: 18px 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
}

nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

/* Layout Home */
.hero {
  width: min(1100px, calc(100% - 48px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 150px 0 90px;

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 70px;
}



h1 {
  margin: 0 0 24px;
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -3px;
}

.muted {
  color: var(--muted);
}

.role-label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 14px;
}

.role {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -1px;
}

.description {
  max-width: 480px;
  margin: 0;
  color: #626262;
  font-size: 16px;
  line-height: 1.85;
}

/* Tombol */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px;

  border: 1px solid var(--text);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;

  transition: transform 0.2s, background 0.2s;
}

.button-primary {
  background: var(--text);
  color: #ffffff;
}

.button-primary:hover {
  background: #333333;
  transform: translateY(-3px);
}

.hero-note {
  margin-top: 52px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

/* Tempat foto */
.portrait-area {
  position: relative;
  width: 100%;
  max-width: 390px;
  justify-self: center;
}

.portrait-placeholder {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: linear-gradient(145deg, #292929, #101010);
  color: #ffffff;
  border: 8px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.portrait-initials {
  font-size: 120px;
  font-weight: 500;
  letter-spacing: -8px;
}

.portrait-caption {
  margin-top: 8px;
  color: #b0b0b0;
  font-size: 9px;
  letter-spacing: 3px;
}

.floating-card {
  position: absolute;
  bottom: 24px;
  left: -20px;

  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--text);
  border-radius: 50%;
}

/* About */
.about-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
  border-top: 1px solid var(--border);
}

.about-section h2 {
  margin: 0 0 24px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -1.5px;
}

/* Tampilan tablet dan HP */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 150px;
  }

  .portrait-area {
    max-width: 320px;
  }

  .floating-card {
    left: 0;
  }

  .navbar {
    top: 16px;
    padding: 16px 22px;
  }

  nav {
    gap: 20px;
  }

  .hero-note {
    margin-top: 32px;
  }
}

/* Mengikuti preferensi pengunjung yang mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .nav-link {
    transition: none;
  }
}


/* Menjaga tinggi teks saat tulisan sedang dihapus */
.role {
  min-height: 1.4em;
  line-height: 1.4;
}

/* Kursor efek mengetik */
.typing-cursor {
  display: inline-block;
  margin-left: 4px;
  font-weight: 400;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Mengikuti pengaturan pengunjung yang mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  .typing-cursor {
    display: none;
  }
}



/* Warna light mode */
:root {
  color-scheme: light;

  --description: #626262;
  --navbar-background: rgba(255, 255, 255, 0.9);
  --button-text: #ffffff;
  --button-hover: #333333;
}

/* Warna dark mode */
:root[data-theme="dark"] {
  color-scheme: dark;

  --background: #111111;
  --surface: #1c1c1c;
  --text: #f5f5f5;
  --muted: #aaaaaa;
  --border: #353535;

  --description: #bdbdbd;
  --navbar-background: rgba(28, 28, 28, 0.9);
  --button-text: #171717;
  --button-hover: #d4d4d4;
}

/* Hubungkan elemen dengan warna tema */
.navbar {
  background: var(--navbar-background);
}

.description {
  color: var(--description);
}

.button-primary {
  background: var(--text);
  color: var(--button-text);
}

.button-primary:hover {
  background: var(--button-hover);
}

/* Menu dan tombol tema */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 44px;
  height: 44px;
  padding: 0;

  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;

  font-family: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* Perubahan warna yang halus */
@media (prefers-reduced-motion: no-preference) {
  body,
  .navbar,
  .floating-card,
  .portrait-placeholder,
  .theme-toggle {
    transition:
      background-color 0.3s ease,
      color 0.3s ease,
      border-color 0.3s ease;
  }
}

/* Jarak menu lebih ringkas di HP */
@media (max-width: 480px) {
  .navbar-actions {
    gap: 12px;
  }

  nav {
    gap: 14px;
  }
}


/* Layar pembuka */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: grid;
  place-items: center;

  background: var(--background);
  color: var(--text);
  pointer-events: none;

  animation: intro-exit 0.5s ease 1.8s forwards;
}

.intro-content {
  padding: 24px;
  text-align: center;
}

.intro-name {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -2px;
}

.intro-caption {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
}

/* Garis animasi */
.intro-track {
  width: 180px;
  height: 2px;
  margin: 28px auto 0;
  overflow: hidden;
  background: var(--border);
}

.intro-line {
  width: 100%;
  height: 100%;
  background: var(--text);
  transform-origin: left;
  animation: intro-progress 1.8s ease-in-out both;
}

@keyframes intro-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes intro-exit {
  from {
    opacity: 1;
    visibility: visible;
  }

  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Home muncul perlahan setelah layar pembuka */
.hero-content {
  animation: home-enter 0.7s ease 1.9s backwards;
}

.portrait-area {
  animation: home-enter 0.7s ease 2.05s backwards;
}

@keyframes home-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Langsung tampilkan konten saat navigasi dengan keyboard */
body:focus-within .intro-screen {
  display: none;
}

.hero-content:focus-within {
  animation: none;
}

/* Lewati animasi jika pengunjung mengurangi gerakan */
@media (prefers-reduced-motion: reduce) {
  .intro-screen {
    display: none;
  }

  .hero-content,
  .portrait-area {
    animation: none;
  }
}

/* Foto profil di dalam lingkaran */
.portrait-placeholder {
  display: block;
  overflow: hidden;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Naikkan posisi foto pada tampilan laptop */
@media (min-width: 801px) {
  .portrait-area {
    top: -200px;
  }
}


/* ===== HOME: TATA LETAK BARU ===== */
.hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 60px;
}

.hero-content {
  min-width: 0;
}

/* Ukuran nama */
.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.hero-greeting {
  display: block;
  margin-bottom: 10px;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

/* Foto berada dekat bagian atas kolom */
.hero .portrait-area {
  top: 0;
  align-self: start;
  margin-top: 24px;
}

/* Kartu tetap menempel pada area foto */
.portrait-frame {
  position: relative;
}

/* Link di bawah foto */
.portrait-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
}

.portrait-links a {
  padding: 10px 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 5px;
}

.portrait-links a:hover {
  text-decoration-color: var(--text);
}

/* ===== DATA & ANALYTICS STACK ===== */
.stack-section {
  margin-top: 36px;
}

.stack-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stack-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 2px;
}

.stack-toggle {
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.stack-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Area logo */
.stack-window {
  overflow-x: auto;
  padding: 4px 0;
}

.stack-track {
  display: flex;
  width: max-content;
}

.stack-group {
  display: flex;
  flex-shrink: 0;
  gap: 14px;
  margin: 0;
  padding: 0 14px 0 0;
  list-style: none;
}

/* Kotak setiap tool */
.stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 12px;

  width: 120px;
  min-height: 102px;
  padding: 14px 8px;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.stack-item img,
.stack-item svg {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}

.stack-item span {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

/* Logo gambar menjadi putih saat dark mode */
:root[data-theme="dark"] .stack-item img {
  filter: invert(1);
}

/* Animasi aktif setelah JavaScript menyiapkan duplikat */
.stack-section.is-ready .stack-window {
  overflow: hidden;
}

.stack-section.is-ready .stack-track {
  animation: stack-scroll 26s linear infinite;
}

@keyframes stack-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}



/* Tampilan tablet dan HP */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero .portrait-area {
    margin-top: 0;
  }
}

/* Tanpa gerakan jika pengunjung mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  .stack-section.is-ready .stack-track {
    width: 100%;
    animation: none;
  }

  .stack-group {
    width: 100%;
    flex-wrap: wrap;
    padding: 0;
  }

  .stack-group[aria-hidden="true"],
  .stack-toggle {
    display: none;
  }
}

/* ===== ABOUT ME ===== */
.about-section {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 90px 0 110px;
  border-top: 1px solid var(--border);
}

.about-heading {
  margin-bottom: 54px;
  text-align: center;
}

.about-heading .eyebrow {
  margin-bottom: 14px;
}

.about-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -1.5px;
}

/* Foto kiri, teks kanan */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 54px;
}

/* Kartu foto */
.about-photo-card {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
}

.about-photo-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  font-size: 14px;
  font-weight: 600;
}

.about-photo-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* Dua kolom perkenalan */
.about-content {
  min-width: 0;
}

.about-introduction {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.about-text h3 {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);

  color: var(--text);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.7px;
}

.about-text p {
  margin: 0;
  color: var(--description);
  font-size: 15px;
  line-height: 1.9;
  text-align: justify;
}

/* Jarak antara paragraf pertama dan kedua */
.about-text p + p {
  margin-top: 20px;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

/* Informasi diri */
.about-details {
  margin-top: 38px;
}

.about-details h3 {
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 3px solid var(--text);
  font-size: 17px;
  font-weight: 600;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 30px;
  margin: 0;
}

.details-grid dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.details-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Tablet dan HP */
@media (max-width: 800px) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .about-photo-card {
    width: 100%;
    max-width: 340px;
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .about-introduction,
  .details-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .about-section {
    padding-top: 64px;
    padding-bottom: 72px;
  }
}

.about-heading {
  position: relative;
  top: -30px;
}

.about-photo-card {
  position: relative;
  top: -40px;
}

/* Animasi muncul saat scroll */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.7s ease,
      transform 0.7s ease;
  }

  .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== EXPERIENCE ===== */
.experience-section {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
}

.experience-heading {
  margin-bottom: 28px;
  text-align: center;
}

.experience-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
}

.experience-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.5px;
}

/* Garis timeline di tengah */
.experience-timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
}

.experience-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  padding-bottom: 44px;
}

.experience-item:last-child {
  padding-bottom: 0;
}

/* Titik pada garis timeline */
.experience-item::before {
  content: "";
  position: absolute;
  top: 32px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  transform: translateX(-50%);
}
/* Kartu pertama kanan, berikutnya kiri */
.experience-card {
  grid-column: 3;
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

.experience-item:nth-child(even) .experience-card {
  grid-column: 1;
}

.experience-date {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.experience-card h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.experience-company {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.experience-location {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.experience-points {
  margin: 22px 0;
  padding-left: 18px;
  color: var(--description);
  font-size: 14px;
  line-height: 1.8;
}

.experience-points li + li {
  margin-top: 10px;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-tags li {
  padding: 7px 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 500;
}

/* Timeline satu kolom di layar kecil */
@media (max-width: 700px) {
  .experience-section {
    padding: 64px 0 72px;
  }

  .experience-timeline::before,
  .experience-item::before {
    left: 7px;
  }

  .experience-item {
    grid-template-columns: 34px minmax(0, 1fr);
    padding-bottom: 28px;
  }

  .experience-card,
  .experience-item:nth-child(even) .experience-card {
    grid-column: 2;
    padding: 22px;
  }
}

/* Navbar tetap muat setelah menu bertambah */
@media (max-width: 600px) {
  .navbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 24px;
  }

  .navbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .navbar nav {
    gap: 14px;
  }

  .navbar .nav-link {
    font-size: 12px;
  }

  html {
    scroll-padding-top: 150px;
  }
}

/* ===== PROJECTS ===== */
.projects-section {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 90px 0 110px;
  border-top: 1px solid var(--border);
}

.projects-heading {
  text-align: center;
}

.projects-eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
}

.projects-heading h2 {
  max-width: 650px;
  margin: 0 auto;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.2;
  letter-spacing: -1.5px;
}

/* Kotak penghitung */
.projects-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.projects-counter strong {
  font-size: 22px;
}

.projects-counter > span:last-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.projects-counter-dot {
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
}

/* Tombol kategori */
.projects-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.projects-filters button {
  padding: 12px 18px;
  min-height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.projects-filters button:hover {
  border-color: var(--text);
}

.projects-filters button[aria-pressed="true"] {
  background: var(--text);
  color: var(--background);
  border-color: var(--text);
}

.projects-filters button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.projects-status {
  margin: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* Susunan kartu */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

/* Penting: kartu hasil filter benar-benar disembunyikan */
.project-card[hidden],
.projects-empty[hidden] {
  display: none;
}

/* Tempat gambar sementara */
.project-preview {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 16px;
}
/* Cover proyek berupa gambar */
.project-preview.project-preview-image {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.project-preview-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-number {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
}

.project-preview > span:last-child {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1.5px;
}

.project-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 8px 8px;
}

.project-category {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}

.project-card h3 {
  margin: 0 0 14px;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.6px;
}

.project-description {
  margin: 0 0 20px;
  color: var(--description);
  font-size: 14px;
  line-height: 1.8;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.project-tools li {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
}

.project-detail-button {
  margin-top: auto;
  padding: 16px 0 4px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-top: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.project-detail-button:disabled {
  cursor: not-allowed;
}

.projects-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 20px;
}

/* Animasi kartu saat kategori diganti */
@media (prefers-reduced-motion: no-preference) {
  .project-card {
    animation: project-appear 0.4s ease;
  }

  @keyframes project-appear {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Tablet */
@media (max-width: 960px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* HP */
@media (max-width: 600px) {
  .projects-section {
    padding: 64px 0 72px;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects-filters button {
    padding: 10px 14px;
    font-size: 11px;
  }

  .navbar-actions {
    min-width: 0;
    gap: 10px;
  }

  .navbar nav {
    min-width: 0;
    overflow-x: auto;
    padding: 8px 0;
    gap: 12px;
  }

  .navbar .nav-link {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11px;
  }

  .navbar .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

/* ===== HALAMAN DETAIL PROJECT ===== */
.detail-navbar {
  position: sticky;
  top: 20px;
  z-index: 100;

  width: min(1100px, calc(100% - 48px));
  margin: 24px auto 0;
  padding: 12px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  background: var(--navbar-background);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.detail-back {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
}

.case-study {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
}

.case-category {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
}

.case-study h1 {
  margin: 0 0 24px;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.12;
  letter-spacing: -2px;
}

.case-subtitle {
  margin: 0;
  color: var(--description);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
}

/* Focus, tanggal, dan tools */
.case-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;

  margin: 40px 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.case-metadata dt {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.case-metadata dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

/* Cover sementara */
.case-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;

  min-height: 320px;
  padding: 36px;
  margin-bottom: 60px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.case-cover span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

.case-cover strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: -1px;
}

/* Isi cerita proyek */
.case-section {
  margin-bottom: 38px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--border);
}

.case-section h2,
.case-resources h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.7px;
}

.case-section p,
.case-section li,
.case-resources p {
  color: var(--description);
  font-size: 15px;
  line-height: 1.9;
}

.case-section p,
.case-resources p {
  margin: 0;
}

.case-section ul {
  margin: 0;
  padding-left: 22px;
}

.case-section li + li {
  margin-top: 14px;
}

.case-resources {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.case-bottom-link {
  display: inline-block;
  margin-top: 36px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
}

/* Link View Details yang sudah aktif */
a.project-detail-button {
  display: block;
  color: var(--text);
}

a.project-detail-button:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Lewati intro saat kembali ke Projects */
.skip-intro .intro-screen {
  display: none;
}

.skip-intro .hero-content,
.skip-intro .portrait-area {
  animation: none;
}

@media (max-width: 600px) {
  .detail-navbar {
    top: 12px;
    padding: 10px 16px;
  }

  .detail-back {
    font-size: 12px;
  }

  .case-study {
    padding-top: 48px;
  }

  .case-metadata {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .case-cover {
    min-height: 260px;
    padding: 24px;
  }

  .case-resources {
    padding: 24px;
  }
}

/* ===== CONTACT ===== */
.contact-section {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 100px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
}

.contact-section h2 {
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.1;
  letter-spacing: -2px;
}

.contact-description {
  max-width: 440px;
  margin: 0 auto 28px;
  color: var(--description);
  font-size: 15px;
  line-height: 1.8;
}

.contact-email {
  display: inline-block;
  max-width: 100%;
  padding: 8px 0;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-email:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 48px;
  padding: 14px 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

.contact-button-primary {
  background: var(--text);
  color: var(--background);
  border-color: var(--text);
}

.contact-button:hover {
  border-color: var(--text);
}

/* ===== FOOTER ===== */
.site-footer {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;

  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .contact-section {
    padding: 72px 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Rapikan Home khusus layar HP */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 160px 0 56px;
    gap: 28px;
  }

  /* Foto tampil lebih dulu */
  .hero .portrait-area {
    order: -1;
    width: 100%;
    max-width: none;
    margin-top: 0;
    top: 0;
  }

  .hero .portrait-frame {
    width: 220px;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero .portrait-placeholder {
    border-width: 5px;
  }

  /* Label di bagian bawah lingkaran */
  .hero .floating-card {
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: max-content;
    max-width: 100%;
    padding: 10px 12px;
    gap: 8px;
    font-size: 10px;
    border-radius: 12px;
  }

  .hero .portrait-links {
    margin-top: 20px;
    gap: 8px 16px;
  }

  .hero .portrait-links a {
    font-size: 12px;
  }

  /* Perkenalan di bawah foto */
  .hero-content {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(28px, 7.5vw, 34px);
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 20px;
  }

  .hero-greeting {
    margin-bottom: 4px;
  }

  .hero .role-label {
    font-size: 12px;
  }

  .hero .role {
    font-size: 25px;
    margin-bottom: 16px;
  }

  .hero .description {
    font-size: 14px;
    line-height: 1.75;
    margin-inline: auto;
  }

  .hero .stack-section {
    margin-top: 28px;
    text-align: left;
  }
}

/* ===== MY TECH STACK ===== */
.skills-section {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 100px;
  border-top: 1px solid var(--border);
}

.skills-heading {
  margin-bottom: 56px;
  text-align: center;
}

.skills-heading > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
}

.skills-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.5px;
}

/* Keterangan kiri, kartu kanan */
.skills-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 40px;
}

.skills-row + .skills-row {
  margin-top: 36px;
}

.skills-intro h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.5px;
}

.skills-intro p {
  max-width: 300px;
  margin: 0;
  color: var(--description);
  font-size: 13px;
  line-height: 1.8;
}

/* Empat kartu per baris di laptop */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;

  min-width: 0;
  min-height: 130px;
  padding: 22px 10px;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.skills-card img,
.skills-card svg {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}

.skills-card span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

/* Logo mengikuti dark mode */
:root[data-theme="dark"] .skills-card img {
  filter: invert(1);
}

/* Efek saat diarahkan dengan mouse */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .skills-card {
    transition:
      transform 0.25s ease,
      border-color 0.25s ease;
  }

  .skills-card:hover {
    transform: translateY(-5px);
    border-color: var(--muted);
  }
}

/* Tablet */
@media (max-width: 800px) {
  .skills-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .skills-intro p {
    max-width: 480px;
  }

  .skills-row + .skills-row {
    margin-top: 40px;
  }
}

/* HP */
@media (max-width: 600px) {
  .skills-section {
    padding: 64px 0 72px;
  }

  .skills-heading {
    margin-bottom: 36px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .skills-card {
    min-height: 116px;
    padding: 18px 10px;
  }
}

/* Penanda framework dan metode pemodelan */
.skills-card .skills-abbreviation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;

  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.skills-card .skills-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

/* ===== DUA KOTAK DI BAWAH FOTO ABOUT ===== */
.about-profile {
  position: relative;
  top: -40px;
  width: 100%;
  min-width: 0;
}

/* Posisi foto mengikuti pembungkus baru */
.about-profile .about-photo-card {
  top: 0;
  width: 100%;
  max-width: none;
}

/* Dua kotak berdampingan */
.about-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.internship-status,
.about-cv-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: 0;
  min-height: 54px;
  padding: 12px 10px;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

/* Kotak status dengan pinggiran membulat */
.internship-status {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 100px;
}

/* Titik dusty pink */
.internship-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #c98fa4;
  box-shadow: 0 0 0 6px rgba(201, 143, 164, 0.15);
}

/* Tombol persegi panjang berwarna pink */
.about-cv-button {
  background: #e4b8c5;
  color: #452832;
  border: 1px solid #e4b8c5;
  border-radius: 14px;
  font-weight: 700;
}

.about-cv-button:hover {
  background: #dba5b5;
  border-color: #dba5b5;
}

.about-cv-button:focus-visible {
  outline: 2px solid #c98fa4;
  outline-offset: 4px;
}

/* Tablet dan HP */
@media (max-width: 800px) {
  .about-profile {
    top: 0;
    max-width: 340px;
    justify-self: center;
  }
}

@media (max-width: 380px) {
  .about-profile-actions {
    gap: 8px;
  }

  .internship-status,
  .about-cv-button {
    padding-inline: 8px;
    font-size: 11px;
    gap: 8px;
  }
}

/* Tiga kolom informasi di bawah perkenalan */
.about-summary {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.25fr)
    minmax(0, 1fr);
  gap: 24px;

  margin: 32px 0 0;
  padding: 24px 0;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-summary dt {
  margin-bottom: 10px;
  color: #96566d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.about-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

/* Dusty pink lebih terang saat dark mode */
:root[data-theme="dark"] .about-summary dt {
  color: #dba5b5;
}

/* Susunan vertikal di HP */
@media (max-width: 600px) {
  .about-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

/* Light mode: latar lebih lembut, batas kartu lebih jelas */
:root:not([data-theme="dark"]) {
  --background: #f3f4f5;
  --surface: #ffffff;
  --border: #d9dde1;

  --text: #171717;
  --muted: #707070;
  --description: #626262;
  --navbar-background: rgba(255, 255, 255, 0.94);
}

/* Bayangan tipis untuk memperjelas kartu */
:root:not([data-theme="dark"]) .stack-item,
:root:not([data-theme="dark"]) .skills-card,
:root:not([data-theme="dark"]) .project-card,
:root:not([data-theme="dark"]) .experience-card {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* ===== PILIHAN WORK & ORGANIZATION ===== */


.experience-switch {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.experience-switch button {
  min-width: 150px;
  min-height: 48px;
  padding: 13px 26px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.experience-switch button:hover {
  border-color: var(--text);
}

/* Tombol aktif: pink lembut */
.experience-switch button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--background);
}

.experience-switch button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* Hanya tampilkan kategori yang dipilih */
#work-panel[hidden],
#organization-panel[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .experience-switch button {
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      color 0.2s ease;
  }
}

@media (max-width: 600px) {
  .experience-switch {
    gap: 10px;
    margin-bottom: 32px;
  }

  .experience-switch button {
    min-width: 120px;
    padding: 12px 20px;
    font-size: 13px;
  }
}

/* ===== KARTU ORGANISASI ===== */

#organization-panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

/* Garis timeline di sebelah kiri */
.organization-item {
  position: relative;
  margin-left: 8px;
  padding: 0 0 32px 32px;
  border-left: 1px solid var(--border);
}

.organization-item:last-child {
  padding-bottom: 0;
}

.organization-item::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
}

/* Kartu lebar dengan pinggiran pink lembut */
#organization-panel .organization-card {
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
}

/* Bagian identitas organisasi */
.organization-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.organization-logo {
  display: block;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  padding: 5px;
  box-sizing: border-box;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.organization-identity {
  min-width: 0;
}

#organization-panel .organization-identity h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

.organization-identity p {
  margin: 0;
  color: var(--description);
  font-size: 14px;
  line-height: 1.6;
}

/* Jabatan dengan titik kecil di samping */
.organization-role {
  position: relative;
  padding-left: 32px;
}

.organization-role::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--text);
  border-radius: 50%;
}

.organization-role h4 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.organization-period {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.organization-description {
  margin: 0;
  color: var(--description);
  font-size: 14px;
  line-height: 1.8;
}

/* Foto-foto kegiatan */
.organization-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 500px;
  margin-top: 20px;
}

.organization-gallery a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.organization-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.organization-gallery a:focus-visible {
  outline: 2px solid #c98fa4;
  outline-offset: 4px;
}

/* Tampilan HP */
@media (max-width: 600px) {
  .organization-item {
    padding-left: 20px;
  }

  #organization-panel .organization-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .organization-header {
    gap: 12px;
    margin-bottom: 24px;
  }

  .organization-logo {
    width: 54px;
    height: 54px;
  }

  .organization-role {
    padding-left: 24px;
  }

  .organization-role h4 {
    font-size: 17px;
  }

  .organization-gallery {
    gap: 8px;
  }
}

/* Titik timeline Work dan Organization */
.experience-item::before,
.organization-item::before {
  background: #c98fa4;
  box-shadow:
    0 0 0 6px rgba(201, 143, 164, 0.15),
    0 0 16px rgba(201, 143, 164, 0.25);
}

/* Efek radar lembut */
@media (prefers-reduced-motion: no-preference) {
  .experience-item::before,
  .organization-item::before {
    animation: experience-radar 2.4s ease-out infinite;
  }
}

@keyframes experience-radar {
  0% {
    box-shadow:
      0 0 0 4px rgba(201, 143, 164, 0.30),
      0 0 14px rgba(201, 143, 164, 0.25);
  }

  75% {
    box-shadow:
      0 0 0 16px rgba(201, 143, 164, 0),
      0 0 20px rgba(201, 143, 164, 0.12);
  }

  100% {
    box-shadow:
      0 0 0 16px rgba(201, 143, 164, 0),
      0 0 14px rgba(201, 143, 164, 0.25);
  }
}

.organization-gallery .organization-certificate img {
  aspect-ratio: auto;
  height: auto;
}