/* ==========================================================================
   Amit Panta Portfolio — Theme
   Modern dark-first design with an electric accent + light mode.
   Built on top of Bootstrap 5 (CSS variables override Bootstrap tokens).
   ========================================================================== */

:root {
  --accent: #6c5ce7;            /* electric violet */
  --accent-2: #00d2ff;          /* cyan */
  --accent-grad: linear-gradient(135deg, #6c5ce7 0%, #00d2ff 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.55);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---- Dark theme (default) ------------------------------------------------ */
[data-theme="dark"] {
  --bg: #0b0d17;
  --bg-soft: #12152370;
  --surface: #151827;
  --surface-2: #1c2030;
  --border: #262a3d;
  --text: #e8eaf2;
  --muted: #9aa0b5;
  --nav-bg: rgba(11,13,23,.72);
}

/* ---- Light theme --------------------------------------------------------- */
[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --border: #e3e7f0;
  --text: #1a1d2b;
  --muted: #5b6178;
  --nav-bg: rgba(255,255,255,.8);
}

* { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

h1,h2,h3,h4,h5,h6 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

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

.text-muted-2 { color: var(--muted) !important; }

/* Decorative background glow */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at 12% 8%, rgba(108,92,231,.18), transparent 45%),
    radial-gradient(700px circle at 88% 18%, rgba(0,210,255,.12), transparent 45%);
}

/* ---- Navbar -------------------------------------------------------------- */
.navbar.glass {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-brand { font-weight: 900; font-size: 1.4rem; }
.brand-gradient { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.navbar .nav-link { color: var(--text) !important; font-weight: 600; padding: .5rem 1rem !important; border-radius: 8px; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--accent-2) !important; }

/* Theme toggle */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); transition: var(--transition);
}
.theme-toggle:hover { transform: rotate(20deg); border-color: var(--accent); }

/* ---- Buttons ------------------------------------------------------------- */
.btn-accent {
  background: var(--accent-grad); color: #fff; border: none;
  font-weight: 700; padding: .7rem 1.6rem; border-radius: 50px;
  box-shadow: 0 10px 30px -10px rgba(108,92,231,.6); transition: var(--transition);
}
.btn-accent:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 16px 40px -12px rgba(108,92,231,.75); }
.btn-outline-accent {
  border: 1.5px solid var(--accent); color: var(--text);
  font-weight: 700; padding: .65rem 1.5rem; border-radius: 50px; transition: var(--transition);
}
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

/* ---- Cards / surfaces ---------------------------------------------------- */
.surface, .card-glass {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: var(--transition);
}
.card-glass:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }

.section { padding: 96px 0; }
.section-tag {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: .5rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.divider { width: 70px; height: 4px; background: var(--accent-grad); border-radius: 4px; margin: 0 auto 1rem; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 140px 0 90px; position: relative; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 540px; }
.hero-img-wrap { position: relative; }
.hero-img-wrap img { border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-blob { position: absolute; inset: -10% -10% auto auto; width: 70%; aspect-ratio: 1; background: var(--accent-grad); filter: blur(70px); opacity: .35; border-radius: 50%; z-index: -1; }

/* ---- Stats --------------------------------------------------------------- */
.stat { text-align: center; }
.stat .num { font-size: 2.6rem; font-weight: 900; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { color: var(--muted); font-weight: 600; }

/* ---- Skill bars ---------------------------------------------------------- */
.skill-row { margin-bottom: 1.3rem; }
.skill-row .d-flex { margin-bottom: .35rem; font-weight: 600; }
.progress { height: 9px; background: var(--surface-2); border-radius: 50px; overflow: hidden; }
.progress-bar { background: var(--accent-grad); border-radius: 50px; transition: width 1.4s ease; }

/* ---- Badges / chips ------------------------------------------------------ */
.chip {
  display: inline-block; padding: .3rem .8rem; border-radius: 50px; font-size: .78rem;
  font-weight: 600; background: var(--surface-2); color: var(--accent-2);
  border: 1px solid var(--border); margin: .15rem;
}

/* ---- Project / blog cards ------------------------------------------------ */
.media-card { overflow: hidden; }
.media-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.media-card:hover .thumb img { transform: scale(1.07); }
.media-card .body { padding: 1.25rem 1.4rem 1.5rem; }

/* ---- Timeline ------------------------------------------------------------ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ""; position: absolute; left: -31px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 0 4px var(--bg); }
.timeline-item .date { color: var(--accent-2); font-weight: 700; font-size: .85rem; }

/* ---- Forms --------------------------------------------------------------- */
.form-control, .form-select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
}
.form-control:focus, .form-select:focus {
  background: var(--surface-2); color: var(--text);
  border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(108,92,231,.25);
}
.form-control::placeholder { color: var(--muted); }
label.form-label { font-weight: 600; }

/* ---- Footer -------------------------------------------------------------- */
footer.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 64px 0 28px; }
footer .social a {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); margin-right: .4rem; transition: var(--transition);
}
footer .social a:hover { background: var(--accent-grad); color: #fff; transform: translateY(-3px); }

/* ---- Utilities ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.rating i { color: #ffb400; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--text); }

/* Prose for blog articles */
.prose { font-size: 1.08rem; }
.prose h2 { margin: 2rem 0 1rem; font-size: 1.7rem; }
.prose h3 { margin: 1.6rem 0 .8rem; font-size: 1.35rem; }
.prose p { margin-bottom: 1.2rem; }
.prose img { max-width: 100%; border-radius: var(--radius-sm); }
.prose ul, .prose ol { margin-bottom: 1.2rem; padding-left: 1.4rem; }
.prose blockquote { border-left: 4px solid var(--accent); padding-left: 1rem; color: var(--muted); font-style: italic; }
.prose code { background: var(--surface-2); padding: .15rem .4rem; border-radius: 6px; }

/* Table of contents */
.toc { position: sticky; top: 90px; }
.toc a { color: var(--muted); display: block; padding: .25rem 0; font-size: .92rem; }
.toc a:hover { color: var(--accent-2); }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; place-items: center; z-index: 2000; padding: 2rem; }
.lightbox-overlay.open { display: grid; }
.lightbox-overlay img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: 24px; right: 30px; font-size: 2.2rem; color: #fff; cursor: pointer; }

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero { padding: 110px 0 60px; }
}
