/* =========================================================
   Erry Suprayogi — Personal Profile Website
   Gaya profesional, modern, bersih
   ========================================================= */

:root {
  --primary: #d4af37;
  --primary-dark: #b8962e;
  --primary-light: rgba(212, 175, 55, 0.12);
  --dark: #050505;
  --dark-2: #141414;
  --dark-3: #1d1d1d;
  --text: #c9c9c9;
  --text-light: #9a9a9a;
  --light: #0b0b0b;
  --border: #2a2a2a;
  --white: #f5f5f5;
  --shadow: 0 10px 30px rgba(212, 175, 55, 0.06);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --hero-bg-1: #1a1a1a;
  --photo-bg-1: #1a1a1a;
  --photo-bg-2: #333333;
  --nav-bg: rgba(5, 5, 5, 0.85);
}

/* Light theme */
[data-theme="light"] {
  --primary: #b8860b;
  --primary-dark: #9a7209;
  --primary-light: rgba(184, 134, 11, 0.12);
  --dark: #f8f9fa;
  --dark-2: #ffffff;
  --dark-3: #ffffff;
  --text: #374151;
  --text-light: #6b7280;
  --light: #eef1f5;
  --border: #e5e7eb;
  --white: #111827;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --hero-bg-1: #eef1f5;
  --photo-bg-1: #e5e7eb;
  --photo-bg-2: #d1d5db;
  --nav-bg: rgba(248, 249, 250, 0.85);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: var(--dark);
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ Navigation ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav__logo-dot {
  color: var(--primary);
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav__links a:hover {
  color: var(--primary);
}

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

.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--white);
  cursor: pointer;
}

/* ===== Language switcher ===== */
.nav__lang {
  position: relative;
  margin-left: 16px;
}

.nav__lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark-2);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.nav__lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav__lang-btn i.fa-globe {
  color: var(--primary);
}

.nav__lang-btn i.fa-chevron-down {
  font-size: 0.7rem;
  color: var(--text-light);
  transition: transform 0.25s ease;
}

.nav__lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  list-style: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 110;
}

.nav__lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav__lang-option:hover {
  background: var(--dark-2);
  color: var(--white);
}

.nav__lang-option.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav__lang-option .flag {
  font-size: 1.05rem;
}

/* ===== Theme toggle ===== */
.nav__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 6px;
  background: var(--dark-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.nav__theme:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(15deg);
}

.nav__theme .theme-icon-sun,
.nav__theme .theme-icon-moon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Default = dark theme: tampilkan ikon matahari */
.nav__theme .theme-icon-sun {
  opacity: 1;
  transform: scale(1);
}

.nav__theme .theme-icon-moon {
  opacity: 0;
  transform: scale(0.5);
}

/* Saat light mode aktif: tampilkan ikon bulan */
[data-theme="light"] .nav__theme .theme-icon-sun {
  opacity: 0;
  transform: scale(0.5);
}

[data-theme="light"] .nav__theme .theme-icon-moon {
  opacity: 1;
  transform: scale(1);
}

/* ============ Hero ============ */
.hero {
  padding: 160px 0 80px;
  background: radial-gradient(ellipse at top, var(--hero-bg-1) 0%, var(--dark) 60%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

.hero__eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.hero__name {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero__role {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--primary);
  margin: 14px 0 20px;
  min-height: 2em;
}

.hero__cursor {
  animation: blink 0.8s step-end infinite;
  color: var(--primary);
  font-weight: 400;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__desc {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--primary);
  color: #050505;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--ghost:hover {
  background: var(--primary);
  color: #050505;
}

.btn--block {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.hero__social {
  display: flex;
  gap: 14px;
}

.hero__social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-2);
  color: var(--white);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  transition: all 0.25s ease;
}

.hero__social a:hover {
  background: var(--primary);
  color: #050505;
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* Photo */
.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 6px var(--dark-3), 0 0 0 9px var(--primary), var(--shadow);
  position: relative;
  z-index: 2;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--photo-bg-1), var(--photo-bg-2));
}

.hero__badge {
  position: absolute;
  background: var(--dark-3);
  padding: 10px 18px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__badge i {
  color: var(--primary);
}

.hero__badge--skill {
  bottom: -18px;
  left: -30px;
  animation: float 4s ease-in-out infinite;
}

.hero__badge--code {
  top: 20px;
  right: -24px;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============ Stats ============ */
.stats {
  background: var(--dark-2);
  color: var(--white);
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats__num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stats__suffix {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stats__label {
  margin-top: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============ Sections ============ */
.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--light);
}

.section__eyebrow {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 10px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.section__lead {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* ============ About ============ */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 50px;
  align-items: start;
  margin-top: 40px;
}

.about__text p {
  color: var(--text);
  margin-bottom: 18px;
  font-size: 1.03rem;
}

.about__text strong {
  color: var(--white);
}

.about__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.about__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
}

.about__list i {
  color: var(--primary);
}

.about__card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.about__card h3 {
  color: var(--white);
  margin-bottom: 18px;
  font-size: 1.1rem;
}

.about__row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.about__row span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.about__row strong {
  color: var(--white);
  font-size: 0.9rem;
  text-align: right;
}

/* ============ Timeline ============ */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 40px auto 0;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 36px;
}

.timeline__dot {
  position: absolute;
  left: -30px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--dark);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline__card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.timeline__card:hover {
  transform: translateY(-3px);
}

.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.timeline__head h3 {
  color: var(--white);
  font-size: 1.12rem;
  font-weight: 700;
}

.timeline__period {
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.timeline__card p {
  color: var(--text-light);
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.timeline__card ul {
  list-style: none;
}

.timeline__card ul li {
  color: var(--text);
  font-size: 0.93rem;
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}

.timeline__card ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ============ Education ============ */
.edu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 40px;
}

.edu__card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  text-align: left;
}

.edu__card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.edu__card h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.edu__card p {
  color: var(--text-light);
}

.edu__meta {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ============ Skills ============ */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.skills__heading {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills__heading i {
  color: var(--primary);
}

.skills__item {
  margin-bottom: 22px;
}

.skills__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
}

.skills__bar {
  height: 9px;
  border-radius: 20px;
  background: var(--dark-3);
  overflow: hidden;
}

.skills__bar span {
  display: block;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 1s ease;
}

/* ============ Investing ============ */
.invest__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  margin-top: 40px;
}

.invest__card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.invest__card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.invest__card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.invest__card h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.invest__card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============ Contact ============ */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 36px;
}

.contact__card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.contact__card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.contact__card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.contact__card h3 {
  color: var(--white);
  margin-bottom: 6px;
}

.contact__card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============ Footer ============ */
.footer {
  background: var(--dark-2);
  color: var(--text-light);
  padding: 34px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 0.9rem;
}

.footer p i {
  color: var(--primary);
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-3);
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.footer__social a:hover {
  background: var(--primary);
  color: #050505;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }

  .hero__photo-wrap {
    order: -1;
  }

  .hero__desc,
  .hero__actions,
  .hero__social {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .stats__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .about__grid,
  .skills__grid {
    grid-template-columns: 1fr;
  }

  .about__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--dark-2);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .edu__grid,
  .invest__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .hero__badge--skill {
    left: 0;
  }

  .hero__badge--code {
    right: 0;
  }
}

@media (max-width: 480px) {
  .stats__inner {
    grid-template-columns: 1fr 1fr;
  }

  .stats__num {
    font-size: 2rem;
  }

  .timeline__head {
    flex-direction: column;
    gap: 8px;
  }
}

/* ===== Smooth theme transition ===== */
.nav,
.nav__links,
.section,
.section--alt,
.about__card,
.timeline__card,
.edu__card,
.invest__card,
.contact__card,
.stats,
.footer,
.hero,
.skills__bar,
.nav__lang-btn,
.nav__lang-menu,
.nav__theme,
.footer__social a,
.hero__social a {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease;
}
