:root {
  --bg: #0f1724;
  --card: #0b1220;
  --text: #e6eef6;
  --muted: #9aa4b2;
  --accent: #06b6d4;
  --btntext: #042027;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1a1d23;
  --muted: #4a4f59;
  --btntext: #ffffff;
}

* {
  box-sizing: border-box;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 960px;
  margin: 32px auto;
  padding: 20px;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.avatar img {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.4);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

p.lead {
  margin: 6px 0 0;
  color: var(--muted);
}

nav {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Navigation Buttons ===== */
nav .btn {
  background: var(--accent);
  color: var(--btntext);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Glowing underline animation */
nav .btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.3s ease, left 0.3s ease;
}

nav .btn:hover::after {
  width: 100%;
  left: 0;
}

nav .btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* Download CV pulse */
.download-btn {
  animation: pulseGlow 3s infinite ease-in-out;
}

.download-btn:hover {
  transform: scale(1.08);
  border-radius: 10px;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 rgba(6,182,212,0); }
  50% { box-shadow: 0 0 15px rgba(6,182,212,0.5); }
  100% { box-shadow: 0 0 0 rgba(6,182,212,0); }
}

/* Toggle button */
.toggle {
  cursor: pointer;
  background: var(--card);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  font-size: 14px;
  transition: all 0.3s ease;
}

.toggle:hover {
  background: var(--accent);
  color: var(--btntext);
}

/* Layout grid */
.grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 25px;
  margin-top: 20px;
}

@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  .toggle {
    align-self: flex-end;
  }
}

/* Cards */
.card {
  background: var(--card);
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.3);
  margin-bottom: 25px;
  transition: all 0.4s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(6,182,212,0.2);
}

/* Typography */
h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

ul.clean {
  list-style: none;
  padding: 0;
  margin: 0;
}

li.item {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.03);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

/* Verify button */
.verify-btn {
  background: var(--accent);
  color: var(--btntext);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  margin-left: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.verify-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* Footer */
footer {
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Header slide animation */
.slide-header {
  opacity: 0;
  transform: translateY(-40px);
  animation: slideIn 1s ease forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-up animation for sections */
.fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fix for light mode visibility */
[data-theme="light"] .card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Back-to-top button */
#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--accent);
  color: var(--btntext);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6,182,212,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(6,182,212,0.6);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
