/* PORTFOLIO MEP - Ahmad Fauzan Hazima
  Theme: Dark red
  Main colors are defined in :root */

:root {
  /* Dark red theme */
  --bg-dark: #050608;
  --bg-card: #0f0f14;
  --bg-card-hover: #1f1018;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #e94560;
  --primary-hover: #ff2e5c;
  --primary-light: #ff7b9c;
  --accent: #ff3d5a;
  --text: #f5f5f7;
  --text-muted: #a8a8b3;
  --text-dim: #7c7c8a;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --anim-speed: 360ms;
  --anim-intensity: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(233, 69, 96, 0.12), transparent 25%),
              radial-gradient(circle at bottom left, rgba(255, 61, 90, 0.1), transparent 22%);
  z-index: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Smooth transitions for theme change and UI polish */
body,
.nav-container,
.service-card,
.profile-header,
.contact-box,
.calc-card,
.history-sidebar,
.gallery-item,
.footer,
.hero,
.calc-sidebar {
  transition: background-color var(--anim-speed) ease, color var(--anim-speed) ease, border-color var(--anim-speed) ease, box-shadow var(--anim-speed) ease;
}

.icon { width: 1em; height: 1em; vertical-align: middle; fill: currentColor; margin-right: 0.6rem; display: inline-block; }
.btn-icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; margin-right: 0.6rem; }
.hidden { display: none !important; }
.btn .icon { pointer-events: none; }
.theme-toggle { transition: background-color calc(var(--anim-speed) - 100ms) ease, color calc(var(--anim-speed) - 100ms) ease, transform 160ms ease; }
.theme-toggle:active { transform: scale(calc(1 - (var(--anim-intensity) * 0.02))); }

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  display: block;
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 1rem;
  z-index: 1000;
  display: flex;
  justify-content: center;
  background: transparent;
  padding: 0 1rem;
}

.nav-container {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  background: rgba(10, 14, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 69, 96, 0.12);
  color: var(--primary-light);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-light);
}

.nav-links a.nav-highlight {
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.nav-links a.nav-highlight:hover {
  background: rgba(233, 69, 96, 0.25);
  border-color: rgba(233, 69, 96, 0.5);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== LOGIN OVERLAY ========== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.login-card h2 {
  margin-bottom: 1rem;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2rem;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ========== HERO ========== */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.88) 55%, rgba(0, 0, 0, 0.92) 100%),
    url('../images/bg-home.webp') no-repeat center center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 0.9rem;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  min-width: 175px;
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hero-copy {
  text-align: left;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-start;
  margin-top: 1.8rem;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.pipe-scene {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(255, 69, 96, 0.05);
}

.pipe-line {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.95), rgba(255, 61, 90, 0.25));
  box-shadow: 0 0 18px rgba(233, 69, 96, 0.35);
}

.pipe-line-1 {
  top: 16%;
  left: 8%;
  width: 62%;
  height: 18px;
  animation: pipeFlow 4s linear infinite;
}

.pipe-line-2 {
  top: 32%;
  left: 60%;
  width: 18px;
  height: 42%;
  animation: pipeFlow 3.5s linear infinite reverse;
}

.pipe-line-3 {
  bottom: 16%;
  left: 20%;
  width: 52%;
  height: 18px;
  animation: pipeFlow 4.5s linear infinite;
}

.pipe-joint {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(233, 69, 96, 0.6));
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.45);
}

.pipe-joint-1 {
  top: 28%;
  left: 60%;
}

.pipe-joint-2 {
  top: 28%;
  left: 18%;
}

.pipe-joint-3 {
  bottom: 18%;
  left: 60%;
}

.pulse {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 69, 96, 0.2);
  opacity: 0;
  transform: scale(0.3);
  animation: pulseGlow 2.5s infinite ease-out;
}

.pulse-1 {
  top: 28%;
  left: 60%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.pulse-2 {
  top: 28%;
  left: 18%;
  width: 80px;
  height: 80px;
  animation-delay: 0.6s;
}

.pulse-3 {
  bottom: 18%;
  left: 60%;
  width: 80px;
  height: 80px;
  animation-delay: 1.2s;
}

@keyframes pipeFlow {
  0%, 100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(20deg);
  }
}

@keyframes pulseGlow {
  0% {
    opacity: 0.4;
    transform: scale(0.4);
  }
  50% {
    opacity: 0.08;
    transform: scale(1.25);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  z-index: 5;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(233, 69, 96, 0.14);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff1f4c);
  color: white;
}

/* Outline button — transparent with primary border (clean, consistent look) */
.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
}

/* WhatsApp button — solid green */
.btn-wa {
  background: #25d366;
  color: white;
}

.btn-wa:hover {
  background: #1da851;
  color: white;
}

/* ========== STATS ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ========== SERVICES ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.8rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(12px);
}

.service-card:hover {
  border-color: rgba(233, 69, 96, 0.85);
  background: rgba(233, 69, 96, 0.08);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.service-card .icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== CONTACT ========== */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-box h2 {
  margin-bottom: 0.5rem;
}

.contact-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.contact-info a {
  color: var(--primary-light);
}

/* ========== FOOTER ========== */
.footer {
  background: #060a12;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer p,
.footer a {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ========== GALLERY ========== */
.gallery-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.gallery-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-item .thumb {
  height: 180px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(15, 8, 16, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.gallery-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-item:hover .thumb img {
  transform: scale(1.08);
}

.gallery-item .info {
  padding: 1rem;
}

.gallery-item .info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.gallery-item .info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Staggered gallery item entrance animation */
.gallery-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

.gallery-item:nth-child(1)  { animation-delay: 0.05s; }
.gallery-item:nth-child(2)  { animation-delay: 0.10s; }
.gallery-item:nth-child(3)  { animation-delay: 0.15s; }
.gallery-item:nth-child(4)  { animation-delay: 0.20s; }
.gallery-item:nth-child(5)  { animation-delay: 0.25s; }
.gallery-item:nth-child(6)  { animation-delay: 0.30s; }
.gallery-item:nth-child(7)  { animation-delay: 0.35s; }
.gallery-item:nth-child(8)  { animation-delay: 0.40s; }
.gallery-item:nth-child(9)  { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.50s; }
.gallery-item:nth-child(11) { animation-delay: 0.55s; }
.gallery-item:nth-child(12) { animation-delay: 0.60s; }


/* ========== ANIMASI 3D ========== */
.animasi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.animasi-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.animasi-card:nth-child(1) { animation-delay: 0.1s; }
.animasi-card:nth-child(2) { animation-delay: 0.2s; }

.animasi-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.animasi-card:hover .animasi-emoji {
  transform: scale(1.15);
}

.animasi-thumb {
  height: 140px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(15, 8, 16, 0.9));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.animasi-emoji {
  display: inline-block;
  transition: transform 0.4s ease;
}

.animasi-info {
  padding: 1.25rem;
}

.animasi-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.animasi-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Software image styling */
.software-img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.software-card:hover .software-img {
  transform: scale(1.05);
}

/* Staggered software card entrance animation */
.software-card {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.software-card:nth-child(1)  { animation-delay: 0.05s; }
.software-card:nth-child(2)  { animation-delay: 0.10s; }
.software-card:nth-child(3)  { animation-delay: 0.15s; }
.software-card:nth-child(4)  { animation-delay: 0.20s; }
.software-card:nth-child(5)  { animation-delay: 0.25s; }
.software-card:nth-child(6)  { animation-delay: 0.30s; }
.software-card:nth-child(7)  { animation-delay: 0.35s; }
.software-card:nth-child(8)  { animation-delay: 0.40s; }
.software-card:nth-child(9)  { animation-delay: 0.45s; }
.software-card:nth-child(10) { animation-delay: 0.50s; }
.software-card:nth-child(11) { animation-delay: 0.55s; }


/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: lightboxPop 0.3s ease;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.2);
  border: 1px solid rgba(233, 69, 96, 0.4);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--primary);
  transform: scale(1.1);
}

@keyframes lightboxPop {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}


/* ========== SOFTWARE GALLERY ========== */

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}


.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.software-card:hover {

  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.software-thumb {
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(15, 8, 16, 0.9));
  border-bottom: 1px solid var(--border);
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  padding: 1rem;
  text-align: center;
}

.badge-made,
.badge-dev {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-made {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-dev {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.software-emoji {
  font-size: 2rem;
}

.software-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.software-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.software-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

.software-lang {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.software-contact {
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  transition: color 0.2s;
}

.software-contact:hover {
  color: var(--primary);
}

/* ========== CALCULATOR PAGE BACKGROUND ========== */
#calculator {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.88) 100%),
    url('../images/bg-calculator.jpg') no-repeat center center;
  background-size: cover;
}

/* ========== KALKULATOR ========== */
.calc-layout {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 1.5rem;
  min-height: 70vh;
}

.calc-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.calc-sidebar h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-nav {
  list-style: none;
}

.calc-nav li {
  margin-bottom: 0.25rem;
}

.calc-nav button {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.calc-nav button:hover,
.calc-nav button.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
}

.calc-content {
  min-width: 0;
}

.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.calc-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.calc-card .formula {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.input-group input,
.input-group select {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary);
}

.calc-result {
  background: linear-gradient(180deg, rgba(233, 69, 96, 0.08), rgba(0, 0, 0, 0.14));
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-top: 1.25rem;
  display: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.calc-result.show {
  display: block;
}

.calc-result h4 {
  margin-bottom: 0.75rem;
  color: var(--primary-light);
}

.calc-result .value {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Calculator result cards */
.calc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.calc-metric-card {
  background: rgba(15,17,27,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.calc-metric-card .metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.calc-metric-card .metric-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-light);
}
.calc-refs {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.calc-notes.small {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.calc-notes {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-notes table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.calc-notes th,
.calc-notes td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.calc-notes th {
  background: #0f172a;
  color: var(--text-muted);
}

/* History Panel */
.history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 2rem;
}

.history-panel h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
}

.history-item {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.history-item .time {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.history-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem;
}

/* ========== PROFILE / CONTACT ENHANCEMENTS ========== */
.profile-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 12px 30px rgba(233,69,96,0.18);
}

.profile-info h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
}

.profile-bio {
  margin-top: 0.6rem;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.6;
}

.contact-box {
  background: linear-gradient(180deg, rgba(15,15,20,0.85), rgba(10,12,16,0.9));
  border: 1px solid rgba(255,255,255,0.06);
  padding: 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}

.contact-box .contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.contact-box .btn-wa {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy { text-align: center; }
  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-info { width: 100%; }
}

/* ========== PROFIL ========== */
.profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.profile-info h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.profile-info .location {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.profile-stats .item {
  text-align: center;
}

.profile-stats .item .num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.profile-stats .item .lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.7rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item .period {
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 0.25rem;
}

.timeline-item h4 {
  margin-bottom: 0.15rem;
}

.timeline-item .company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-item ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== ANIMATION ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section,
.hero,
.service-card,
.calc-card,
.profile-header,
.contact-box,
.history-panel {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}


.section:nth-of-type(1),
.hero {
  animation-delay: 0.1s;
}

.section:nth-of-type(2) {
  animation-delay: 0.15s;
}

.section:nth-of-type(3) {
  animation-delay: 0.2s;
}

.section:nth-of-type(4) {
  animation-delay: 0.25s;
}

.section:nth-of-type(5) {
  animation-delay: 0.3s;
}

.section:nth-of-type(6) {
  animation-delay: 0.35s;
}

/* Light theme overrides when body has .light-theme */
body.light-theme {
  --bg-dark: #f7f9fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f6fb;
  --border: rgba(15, 23, 42, 0.06);
  --primary: #1d4ed8;
  --primary-hover: #2563eb;
  --primary-light: #3b82f6;
  --accent: #2563eb;
  --text: #0b1220;
  --text-muted: #475569;
  --text-dim: #6b7280;
  --shadow: 0 12px 30px rgba(16,24,40,0.06);
}

/* subtle animated gradient overlay for hero */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -20% -30% -20%;
  background: radial-gradient(closest-side at 10% 20%, rgba(255,69,96,0.06), transparent 10%),
              radial-gradient(closest-side at 90% 80%, rgba(59,130,246,0.04), transparent 12%);
  z-index: 0;
  animation: floatBackground 12s ease-in-out infinite;
}

@keyframes floatBackground {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* History sidebar */
.history-sidebar {
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  height: fit-content;
  position: sticky;
  top: 100px;
  align-self: start;
}

.history-header { display:flex; justify-content:space-between; align-items:center; gap:0.5rem; margin-bottom:0.5rem; }
.history-sidebar-list { max-height: 60vh; overflow: auto; display:flex; flex-direction:column; gap:0.5rem; }
.history-item { padding:0.5rem; border-radius:8px; background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); border:1px solid var(--border); }
.history-item .time { font-size:0.75rem; color:var(--text-dim); margin-top:0.4rem; }

/* Theme toggle button near contact */
.theme-toggle-wrap { display:flex; gap:0.5rem; align-items:center; justify-content:center; margin-top:0.75rem; }
.theme-toggle { display:inline-flex; align-items:center; gap:0.5rem; padding:0.45rem 0.8rem; border-radius:999px; border:1px solid var(--border); background:var(--bg-card); cursor:pointer; }

/* small polish: animated service icons */
.service-card .icon { position:relative; }
.service-card .icon::after { content:''; position:absolute; inset:-6px; border-radius:12px; background:linear-gradient(90deg, rgba(255,255,255,0.02), transparent); opacity:0; transition:opacity 0.25s; }
.service-card:hover .icon::after { opacity:1; transform: translateY(-4px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-sidebar {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .history-sidebar { display: none; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 2.5rem 0;
  }
}
