/* =========================
   DESIGN TOKENS
========================= */

:root {
  /* ---------- Colors ---------- */
  --color-dark-900: #121416;
  --color-dark-800: #1c1f24;
  --color-dark-700: #222831;

  --color-light-100: #f8f9fa;
  --color-light-200: #e9eceff4;

  --color-primary: #0d6efd;
  --color-primary-glow: rgba(13, 110, 253, 0.5);

  /* ---------- Text ---------- */
  --text-dark: #212529;
  --text-light: #f1f1f1;
  --text-muted-dark: #adb5bd;
  --text-muted-light: #6c757d;

  /* ---------- Typography ---------- */
  --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;

  --font-size-h1: 3rem;
  --font-size-h2: 2.4rem;
  --font-size-h3: 1.8rem;
  --font-size-h4: 1.3rem;
  --font-size-body: 1.05rem;
  --font-size-small: 0.9rem;

  --line-height-heading: 1.2;
  --line-height-body: 1.7;
  --letter-spacing-heading: -0.02em;

  /* ---------- Spacing ---------- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* ---------- Radius ---------- */
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 30px;

  /* ---------- Shadow ---------- */
  --shadow-soft: 0 8px 20px rgba(0,0,0,0.25);
}

/* =========================
   THEME BINDING
========================= */

body {
  font-family: var(--font-sans);
  line-height: var(--line-height-body);
  background: var(--bg-main);
  color: var(--text-main);
  padding-top: 70px;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  --bg-main: radial-gradient(circle at top, var(--color-dark-700), var(--color-dark-900));
  --bg-surface: rgba(255,255,255,0.03);
  --text-main: var(--text-light);
  --text-muted: var(--text-muted-dark);
  --bg-modal: #1c1f24;
}

body.light-mode {
  --bg-main: radial-gradient(circle at top, var(--color-light-100), var(--color-light-200));
  --bg-surface: #ffffff;
  --text-main: var(--text-dark);
  --text-muted: var(--text-muted-light);
  --bg-modal: rgb(223, 231, 233);
}

/* =========================
   BASE STYLES
========================= */

body {
  background: var(--bg-main);
  color: var(--text-main);
  padding-top: 70px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
  margin-bottom: var(--space-sm);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  margin-bottom: var(--space-sm);
}

small {
  font-size: var(--font-size-small);
  color: var(--text-muted);
}

/* =========================
   LAYOUT
========================= */

.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-size: var(--font-size-h2);
  margin-bottom: var(--space-md);
}

/* =========================
   COMPONENTS
========================= */

/* Navbar */
.custom-navbar {
  backdrop-filter: blur(10px);
  background: rgba(18, 20, 22, 0.85);
}

/* Hero */
.hero {
  min-height: 100vh;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

/* =========================
   BUTTON SYSTEM
========================= */

.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
}

.btn-cta {
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 8px 20px var(--color-primary-glow);
}

/* Project Card */
.project-card {
  background: var(--bg-surface);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

/* =========================
   PAGE-SPECIFIC
========================= */

.page-about .about-section p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   ACHIEVEMENTS PAGE
========================= */

.page-achievements .achievement-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-achievements .achievement-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}


/* =========================
   CONTACT PAGE FIX
========================= */

.page-contact .section {
  min-height: 100vh;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.contact-surface {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-soft);
}

/* =========================
   Sosial Links
========================= */

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.social-links a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;

  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-main);

  font-size: 1.4rem;
  text-decoration: none;

  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  background: var(--color-primary);
  color: #fff;
}


/* =========================
   ACHIEVEMENT CARD
========================= */

.achievement-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.achievement-card img {
  max-height: 420px;
  object-fit: cover;
}

.achievement-card h3 {
  color: var(--text-main);
}

.achievement-card p {
  color: var(--text-muted);
}

/* Badge fix */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* =========================
   SEMANTIC TEXT COLORS
========================= */

.text-muted-custom {
  color: var(--text-muted);
}


/* =========================
   SEMANTIC SKILL BADGES
========================= */

.badge-skill {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Networking (Blue) ---------- */
body.light-mode .badge-networking {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

body.dark-mode .badge-networking {
  background: rgba(13, 110, 253, 0.28);
  color: #ffffff;
}

/* ---------- Linux (Green) ---------- */
body.light-mode .badge-linux {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

body.dark-mode .badge-linux {
  background: rgba(25, 135, 84, 0.28);
  color: #d1fae5;
}

/* ---------- Competition / LKS (Purple) ---------- */
body.light-mode .badge-competition {
  background: rgba(111, 66, 193, 0.12);
  color: #6f42c1;
}

body.dark-mode .badge-competition {
  background: rgba(111, 66, 193, 0.30);
  color: #f3e8ff;
}

/* =========================
   CTA BUTTONS (THEME AWARE)
========================= */

.btn-outline-custom {
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  font-weight: 500;
  transition: all 0.25s ease;
}

/* Light mode */
body.light-mode .btn-outline-custom {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

body.light-mode .btn-outline-custom:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Dark mode */
body.dark-mode .btn-outline-custom {
  border: 2px solid rgba(255,255,255,0.7);
  color: #ffffff;
  background: transparent;
}

body.dark-mode .btn-outline-custom:hover {
  background: #ffffff;
  color: #000000;
}


/* =========================
   THEME-AWARE MODAL
========================= */

.custom-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.55);
  z-index: 999;
}

.custom-modal.active {
  display: grid;
}

.custom-modal-content {
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  max-width: 900px;
  width: 90%;
  box-shadow: var(--shadow-soft);
  animation: modalFade 0.25s ease;
}

.custom-modal-content img {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Close button */
.custom-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
}

.custom-modal-close:hover {
  color: var(--text-main);
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   THEME-AWARE BOOTSTRAP MODAL
========================= */

.modal-content {
  background: var(--bg-modal);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: none;
}

.modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .modal-header {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.modal-title {
  color: var(--text-main);
}

/* Close button fix */
.btn-close {
  filter: invert(1);
  opacity: 0.7;
}

body.light-mode .btn-close {
  filter: none;
}

.btn-close:hover {
  opacity: 1;
}

/* Backdrop sedikit lebih soft */
.modal-backdrop.show {
  opacity: 0.55;
}
