:root {
  --bg: #f5f7fb;
  --bg-soft: #e9edf7;
  --text: #172033;
  --text-muted: #4d5b78;
  --card: #ffffff;
  --line: #cfd8ea;
  --primary: #1d4ed8;
  --primary-2: #2563eb;
  --accent: #0f766e;
  --glow: rgba(37, 99, 235, 0.22);
}

[data-bs-theme="dark"] {
  --bg: #0f1626;
  --bg-soft: #1a2236;
  --text: #f2f6ff;
  --text-muted: #bcc8df;
  --card: #1f2a40;
  --line: #344560;
  --primary: #60a5fa;
  --primary-2: #93c5fd;
  --accent: #2dd4bf;
  --glow: rgba(96, 165, 250, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 30%),
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 30%),
    linear-gradient(150deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
  overflow-x: clip;
  cursor: default;
}

h1,
h2,
h3,
.navbar-brand {
  font-family: "Sora", sans-serif;
}

.bg-decoration {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.bg-decoration-1 {
  background: color-mix(in srgb, var(--primary) 70%, #ffffff);
  top: -7rem;
  left: -6rem;
}

.bg-decoration-2 {
  background: color-mix(in srgb, var(--accent) 72%, #ffffff);
  right: -8rem;
  bottom: 6rem;
}

.nav-glass {
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  backdrop-filter: blur(10px);
}

.navbar-brand,
.nav-link {
  color: var(--text) !important;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary-2) !important;
}

.navbar-toggler {
  border-color: var(--line);
}

.navbar-toggler-icon {
  filter: contrast(1.3);
}

.btn-theme {
  border: 1px solid var(--line);
  color: var(--text);
  background: color-mix(in srgb, var(--card) 92%, transparent);
}

.btn-resume {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #000000));
  color: #ffffff;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, #000);
}

.btn-resume:hover,
.btn-resume:focus {
  color: #ffffff;
}

.hero-section {
  padding-top: 7.5rem;
  padding-bottom: 1.6rem;
  min-height: auto;
}

.hero-mini {
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
}

.logo-text {
  letter-spacing: 0.08em;
  font-weight: 700;
}

.glass-card,
.content-card,
.project-card,
.skill-chip {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 1rem;
}

.glass-card,
.content-card,
.project-card {
  padding: 1.15rem;
  box-shadow: 0 16px 34px rgba(0, 25, 51, 0.12);
}

.highlight-item {
  padding: 0.75rem 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  color: var(--text-muted);
}

.highlight-item:last-child {
  border-bottom: 0;
}

.section-space {
  padding-top: 2.2rem;
  padding-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  margin-bottom: 0.95rem;
}

.timeline-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.skill-chip {
  text-align: center;
  font-weight: 600;
  padding: 1.1rem 0.5rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.skill-chip:hover {
  transform: translateY(-4px);
}

.skill-python:hover {
  background: linear-gradient(130deg, #2f3b52, #4b5c78);
  color: #fff;
  border-color: #61749a;
  box-shadow: 0 10px 18px rgba(75, 92, 120, 0.45);
}

.skill-html:hover {
  background: linear-gradient(130deg, #ef6c00, #ff9800);
  color: #fff;
  border-color: #ff9800;
  box-shadow: 0 10px 18px rgba(255, 152, 0, 0.45);
}

.skill-css:hover {
  background: linear-gradient(130deg, #1565c0, #1e88e5);
  color: #fff;
  border-color: #42a5f5;
  box-shadow: 0 10px 18px rgba(30, 136, 229, 0.45);
}

.skill-js:hover {
  background: linear-gradient(130deg, #f9a825, #fdd835);
  color: #1a1a1a;
  border-color: #fdd835;
  box-shadow: 0 10px 18px rgba(253, 216, 53, 0.45);
}

.skill-react:hover {
  background: linear-gradient(130deg, #2e7d32, #43a047);
  color: #fff;
  border-color: #66bb6a;
  box-shadow: 0 10px 18px rgba(67, 160, 71, 0.45);
}

.skill-sql:hover {
  background: linear-gradient(130deg, #616161, #8e8e8e);
  color: #fff;
  border-color: #9e9e9e;
  box-shadow: 0 10px 18px rgba(117, 117, 117, 0.45);
}

.project-index {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.form-control,
textarea {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent) !important;
  background: color-mix(in srgb, var(--card) 95%, transparent) !important;
  color: var(--text) !important;
}

.form-control:focus,
textarea:focus {
  border-color: var(--primary-2) !important;
  box-shadow: 0 0 0 0.25rem var(--glow) !important;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: color-mix(in srgb, var(--primary) 85%, black);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--primary) 85%, black);
  --bs-btn-active-bg: color-mix(in srgb, var(--primary) 78%, black);
  --bs-btn-active-border-color: color-mix(in srgb, var(--primary) 78%, black);
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
}

[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: var(--primary-2);
  --bs-btn-border-color: var(--primary-2);
  --bs-btn-hover-bg: var(--primary-2);
  --bs-btn-hover-border-color: var(--primary-2);
  --bs-btn-hover-color: #0b1322;
}

.btn,
a,
button,
.float-btn {
  cursor: pointer;
}

.social-links {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.social-btn {
  width: min(280px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.social-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.mini-contact-card {
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 0.8rem;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  min-height: 100%;
  text-align: center;
}

.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--primary) 40%, #000), 0 14px 20px rgba(0, 0, 0, 0.2);
}

.btn-3d:hover {
  transform: translateY(-2px);
}

.btn-3d:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--primary) 38%, #000), 0 7px 14px rgba(0, 0, 0, 0.2);
}

.float-btn {
  position: fixed;
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  z-index: 1100;
  transition: transform 0.2s ease, opacity 0.2s ease;
  max-width: calc(100vw - 0.7rem);
}

.float-btn:hover {
  transform: translateY(-2px);
}

.icon-btn {
  width: 3.1rem;
  height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.22rem;
  line-height: 1;
}

.chat-btn {
  bottom: 5.25rem;
  background: linear-gradient(130deg, #0f766e, #0d9488);
}

.theme-float {
  bottom: 9.3rem;
  background: linear-gradient(130deg, #1d4ed8, #2563eb);
  color: #fff;
}

.top-btn {
  bottom: 1.25rem;
  background: linear-gradient(130deg, #374151, #1f2937);
  display: none;
}

.top-btn.show {
  display: inline-block;
}

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.face-wrap {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  padding: 0.4rem;
  background: color-mix(in srgb, var(--card) 86%, transparent);
}

.profile-face {
  width: 100%;
  height: 330px;
  object-fit: cover;
  object-position: center;
  border-radius: 0.8rem;
  display: block;
}

.face-note {
  color: var(--text-muted);
  text-align: center;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .lead,
[data-bs-theme="dark"] .section-title,
[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .small {
  color: var(--text) !important;
}

[data-bs-theme="dark"] .highlight-item,
[data-bs-theme="dark"] .face-note,
[data-bs-theme="dark"] .timeline-item p {
  color: var(--text-muted) !important;
}

[data-bs-theme="light"] p,
[data-bs-theme="light"] li,
[data-bs-theme="light"] label,
[data-bs-theme="light"] .small {
  color: var(--text-muted);
}

[data-bs-theme="dark"] .nav-glass,
[data-bs-theme="dark"] .glass-card,
[data-bs-theme="dark"] .content-card,
[data-bs-theme="dark"] .project-card,
[data-bs-theme="dark"] .skill-chip,
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .chat-btn,
[data-bs-theme="dark"] .theme-float,
[data-bs-theme="dark"] .top-btn,
[data-bs-theme="dark"] .btn-resume,
[data-bs-theme="dark"] .logo-pill,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] textarea {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 6.5rem;
    padding-bottom: 1.2rem;
  }
}

@media (max-width: 575.98px) {
  html,
  body {
    overflow-x: hidden;
  }

  .navbar,
  .navbar .container,
  .navbar-collapse,
  main,
  section {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .float-btn {
    right: 0.2rem;
    width: 2.55rem;
    height: 2.55rem;
    font-size: 0.98rem;
  }

  .chat-btn {
    bottom: 4.85rem;
  }

  .theme-float {
    bottom: 8.45rem;
  }

  .profile-face {
    height: 280px;
  }

  .social-btn {
    width: 100%;
    max-width: 100%;
  }
}
