/* === Portfolio Theme — built on Bootstrap 5 === */
:root {
  --bg: #0b1220;
  --bg-alt: #0f1729;
  --panel: #131c30;
  --panel-2: #1a2540;
  --text: #e7ecf5;
  --muted: #97a2b7;
  --line: #1f2a44;
  --primary: #5b8def;
  --primary-2: #7aa2ff;
  --accent: #7c5cff;
  --good: #4ec9b0;
  --wa: #25d366;
  --wa-dark: #128c7e;
  --grad: linear-gradient(135deg, #5b8def 0%, #7c5cff 100%);
  --grad-soft: linear-gradient(135deg, rgba(91, 141, 239, 0.15), rgba(124, 92, 255, 0.15));
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1140px;
}

[data-bs-theme="light"] {
  --bg: #f7f9fc;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f4fb;
  --text: #1a2030;
  --muted: #5a6479;
  --line: #e3e8f2;
  --primary: #3a6ee0;
  --primary-2: #5b8def;
  --accent: #6a48e0;
  --shadow: 0 6px 24px rgba(40, 60, 110, 0.10);
  --shadow-lg: 0 16px 50px rgba(40, 60, 110, 0.18);
  --grad-soft: linear-gradient(135deg, rgba(91, 141, 239, 0.10), rgba(124, 92, 255, 0.10));
}

/* Override Bootstrap tokens so they match our palette */
[data-bs-theme="dark"] {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-secondary-bg: var(--panel-2);
  --bs-tertiary-bg: var(--panel);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-2);
  --bs-emphasis-color: var(--text);
  --bs-heading-color: var(--text);
  --bs-form-control-bg: var(--panel-2);
  --bs-form-control-color: var(--text);
}
[data-bs-theme="light"] {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-secondary-bg: var(--panel-2);
  --bs-tertiary-bg: var(--panel);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-2);
  --bs-emphasis-color: var(--text);
  --bs-heading-color: var(--text);
  --bs-form-control-bg: var(--panel-2);
  --bs-form-control-color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
section { scroll-margin-top: 80px; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }

button { font: inherit; cursor: pointer; }

/* === Navbar === */
.app-navbar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
  padding-top: 12px;
  padding-bottom: 12px;
}
.app-navbar.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.app-navbar .navbar-brand {
  color: var(--text);
  font-weight: 700;
}
.app-navbar .navbar-brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: white;
  display: grid; place-items: center;
  font-size: 14px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.brand-name { font-size: 15px; }

.app-navbar .navbar-toggler {
  border: 1px solid var(--line);
  padding: 6px 8px;
  color: var(--text);
}
.app-navbar .navbar-toggler:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
[data-bs-theme="dark"] .app-navbar .navbar-toggler-icon,
[data-bs-theme="light"] .app-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e7ecf5' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.app-navbar .nav-link {
  color: var(--muted);
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 8px;
  margin: 2px 0;
  transition: all 0.2s ease;
}
.app-navbar .nav-link:hover { color: var(--text); background: var(--panel); }
.app-navbar .nav-link.active { color: var(--primary); background: var(--grad-soft); }

.btn-icon {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  display: inline-grid; place-items: center;
  font-size: 16px;
  transition: all 0.2s ease;
  padding: 0;
}
.btn-icon:hover { border-color: var(--primary); transform: translateY(-1px); }

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 0 80px;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(91, 141, 239, 0.18) 0%, transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(124, 92, 255, 0.18) 0%, transparent 60%),
    radial-gradient(60% 60% at 50% 90%, rgba(78, 201, 176, 0.10) 0%, transparent 60%);
  z-index: -1;
}
[data-bs-theme="light"] .hero-bg {
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(91, 141, 239, 0.10) 0%, transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(124, 92, 255, 0.10) 0%, transparent 60%);
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.hero-name {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 20px;
}
.hero-tagline {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 560px;
}
.hero-meta { color: var(--muted); font-size: 14px; }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-item svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.meta-item a { color: var(--muted); }
.meta-item a:hover { color: var(--primary); }

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.avatar {
  position: relative;
  width: 140px; height: 140px;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  color: white;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  box-shadow: 0 10px 30px rgba(91, 141, 239, 0.4);
}
.avatar-ring {
  position: absolute; inset: -6px;
  border: 2px dashed color-mix(in srgb, var(--primary) 60%, transparent);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stat-box {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--line);
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.2s ease; flex-shrink: 0; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary-grad {
  background: var(--grad);
  color: white;
  box-shadow: 0 6px 20px rgba(91, 141, 239, 0.3);
}
.btn-primary-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(91, 141, 239, 0.45);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--panel); border-color: var(--primary); color: var(--text); }
.btn-wa {
  background: linear-gradient(135deg, var(--wa) 0%, var(--wa-dark) 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}
.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  color: white;
}
.btn-mail {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-mail:hover { border-color: var(--primary); background: var(--grad-soft); color: var(--text); }

.wa-link { color: var(--good); }
.wa-link:hover { color: var(--wa-dark); }

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(135deg, var(--wa) 0%, var(--wa-dark) 100%);
  color: white !important;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 1080;
  transition: all 0.25s ease;
  animation: waPulse 2.4s ease-in-out infinite;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
  color: white !important;
}
.wa-float svg { width: 24px; height: 24px; flex-shrink: 0; }
.wa-float-label { white-space: nowrap; }

@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { animation: none; }
}

/* === Sections === */
.section {
  padding: 100px 0;
  position: relative;
}
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 60px; }
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  margin: 8px 0 16px;
  letter-spacing: -0.02em;
}
.section-sub { color: var(--muted); font-size: 17px; margin: 0; }

/* === App card (base for all cards) === */
.app-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.card-title { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.card-text { color: var(--muted); margin: 0; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.info-list li:last-child { border-bottom: 0; }
.info-list strong { color: var(--muted); font-weight: 600; min-width: 90px; }
.info-list span { color: var(--text); text-align: right; word-break: break-word; }
.info-list a { color: var(--primary); }

.highlight-icon { font-size: 32px; margin-bottom: 12px; }
.highlight-card h4 { margin: 0 0 8px; font-size: 17px; }
.highlight-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* === Skills === */
.skill-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.2s ease;
}
.skill-chip:hover {
  border-color: var(--primary);
  background: var(--grad-soft);
  transform: translateY(-2px);
}
.skill-chip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 12px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), transparent);
}
.t-item { position: relative; padding-bottom: 36px; }
.t-marker { position: absolute; left: -34px; top: 8px; }
.t-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px var(--bg);
}
.t-card:hover { border-color: var(--primary); }
.t-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.t-role { font-size: 19px; font-weight: 700; margin: 0; }
.t-period {
  font-size: 13px;
  color: var(--primary);
  background: var(--grad-soft);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
}
.t-company { color: var(--muted); font-size: 15px; margin: 6px 0 10px; font-weight: 500; }
.t-meta { font-size: 13px; color: var(--muted); }
.t-meta .badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
}
.t-bullets {
  margin: 0; padding-left: 20px;
  color: var(--muted);
  font-size: 14.5px;
}
.t-bullets li { margin-bottom: 8px; }

/* === Education === */
.edu-icon {
  font-size: 48px;
  width: 80px; height: 80px;
  background: var(--grad-soft);
  border-radius: var(--radius);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.edu-body h3 { margin: 0 0 6px; font-size: 19px; }
.edu-degree { color: var(--primary); font-weight: 600; font-size: 15px; }
.edu-period { color: var(--muted); font-size: 14px; }

/* === Contact form === */
.contact-form .form-label {
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  width: 100%;
  margin-bottom: 0;
}
.contact-form .form-control {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form .form-control:focus {
  background: var(--panel-2);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.contact-form .btn { align-self: flex-start; }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.success { color: var(--good); }
.form-msg.error { color: #ff5c5c; }

/* === Footer === */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}

/* === Back to top === */
.back-top {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: white;
  border: 0;
  font-size: 18px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 1070;
}
.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover { transform: translateY(-3px); }

/* === Reveal animations === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.js-failsafe .reveal,
.no-js .reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .avatar-ring { animation: none; }
}

/* === Mobile tweaks === */
@media (max-width: 991.98px) {
  .hero { padding: 100px 0 60px; min-height: auto; }
  .section { padding: 70px 0; }
}

@media (max-width: 767.98px) {
  .hero { padding: 90px 0 50px; }
  .hero-tagline { font-size: 15px; }
  .hero-card { padding: 22px; }
  .avatar { width: 110px; height: 110px; }
  .avatar-inner { font-size: 44px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10.5px; }
  .stat-box { padding: 12px 8px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
  .app-card { padding: 22px; }
  .t-card { padding: 20px; }
  .t-role { font-size: 17px; }
  .skill-chip { padding: 10px 16px; font-size: 13px; }
  .wa-float {
    padding: 12px;
    bottom: 18px;
    right: 18px;
  }
  .wa-float-label { display: none; }
  .wa-float svg { width: 26px; height: 26px; }
  .back-top { width: 40px; height: 40px; bottom: 80px; left: 18px; }
  .info-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .info-list strong { min-width: 0; }
  .info-list span { text-align: left; }
}

@media (max-width: 575.98px) {
  .hero-name { font-size: 2rem; }
  .hero-title { font-size: 1rem; }
  .brand-name { display: none; }
  .hero-meta { gap: 12px; font-size: 13px; }
  .meta-item { width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .edu-card { flex-direction: column; text-align: center; }
}
