/* ====== GLOBAL ====== */
:root {
  --bg-main: #020617;
  --bg-elevated: #020617;
  --surface: #020617;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.1);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
}

[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-elevated: #e5e7eb;
  --surface: #ffffff;
  --accent: #16a34a;
  --accent-soft: rgba(22, 163, 74, 0.08);
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --border-subtle: rgba(148, 163, 184, 0.45);
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
}


body {
  min-height: 100vh;
}

/* ====== TOPBAR ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 6vw;
  backdrop-filter: blur(16px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: radial-gradient(circle at 20% 20%, #22c55e, #16a34a, #0f172a);
  color: #e5e7eb;
}

.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

/* ====== BUTTONS ====== */
.icon-button {
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b1120;
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.45);
}

.btn.ghost {
  border-color: var(--border-subtle);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.4);
}

.btn.ghost:hover {
  border-color: var(--accent);
}

/* ====== HERO ====== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr);
  align-items: center;
  gap: 3rem;
  padding: 3.5rem 6vw 2.5rem;
}

.hero-left {
  display: flex;
  justify-content: center;
}

.avatar {
  width: 230px;
  height: 230px;
  border-radius: 32px;
  padding: 4px;
  background: conic-gradient(from 220deg, #22c55e, #0ea5e9, #6366f1, #22c55e);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.95);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  object-position: center 40%; /* foto turun tanpa crop */
  display: block;
}



.hero-right {
  max-width: 640px;
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 2.8vw, 2.8rem);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0.35rem 0 0.6rem;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-text {
  margin: 0.25rem 0 1.1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-info a {
  color: var(--accent);
  text-decoration: none;
}

/* ====== SECTIONS ====== */
.section {
  padding: 0.5rem 6vw 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ====== GRID & CARD ====== */
.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 40%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.08), transparent 40%),
    var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.card ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-tag {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
}

/* ====== TIMELINE ====== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.25rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1rem;
}

.timeline-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-place {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-item ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ====== EDUCATION ====== */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.edu-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.1rem;
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.12), transparent 50%),
    linear-gradient(to bottom right, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-soft);
}

.edu-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.edu-main h3 {
  margin: 0;
  font-size: 1rem;
}

.edu-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.edu-detail {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.edu-grades {
  margin: 0.4rem 0 0.2rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ====== CONTACT ====== */
.contact-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.2rem 1.3rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.98));
  box-shadow: var(--shadow-soft);
}

.contact-grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.8rem;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 0.95rem;
}

.contact-card p {
  margin: 0.15rem 0;
  font-size: 0.92rem;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
}

/* ====== FOOTER ====== */
.footer {
  padding: 1.5rem 6vw 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ====== REVEAL ANIMATION ====== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 860px) {
  .topbar {
    padding-inline: 4vw;
  }

  .main-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .hero-left {
    order: -1;
  }

  .section {
    padding-inline: 5vw;
  }
}

@media (max-width: 480px) {
  .avatar {
    width: 190px;
    height: 190px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================
   FIX LIGHT MODE BACKGROUNDS
   ========================== */

[data-theme="light"] body {
  background: #f1f5f9; /* background utama */
}

[data-theme="light"] .section {
  background: transparent !important;
}

/* Kartu pendidikan (edu-item) */
[data-theme="light"] .edu-item {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Kartu Contact */
[data-theme="light"] .contact-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  background-image: none !important;
}

/* Hero gradient fix */
[data-theme="light"] .hero-right,
[data-theme="light"] .hero-left {
  background: none !important;
}

/* Topbar lebih terang */
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(12px);
}

/* Card portfolio */
[data-theme="light"] .card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05) !important;
  background-image: none !important;
}

/* Text color fix */
[data-theme="light"] {
  --text-main: #0f172a;
  --text-muted: #475569;
}