/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= VARIABLES ================= */
:root {
  --primary: #4f8cff;
  --primary-dark: #3b6fcc;
  --accent: #7b5cff;

  --bg-dark: #0a0e1a;
  --bg-card: #151a2e;
  --bg-card-hover: #1a1f35;

  --border: #1f2537;
  --border-hover: #4f8cff;

  --text-primary: #ffffff;
  --text-secondary: #cbd5f5;
  --text-muted: #8b95c0;

  --shadow-soft: rgba(0, 0, 0, 0.25);
  --shadow: rgba(0, 0, 0, 0.45);
  --shadow-strong: rgba(0, 0, 0, 0.6);

  --glow: rgba(79, 140, 255, 0.18);
}

/* ================= BASE ================= */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ================= BACKGROUND GLOW ================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(79,140,255,0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(79,140,255,0.05), transparent 50%);
  z-index: 0;
  pointer-events: none;
}

/* ================= LAYOUT ================= */
.wrapper {
  max-width: 1200px;
  margin: auto;
  padding: 120px 24px 60px;
  position: relative;
  z-index: 1;
}

/* ================= SCROLL PROGRESS ================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 2000;
  transform-origin: left;
  transition: width 0.1s ease;
}

/* ================= NAV ================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10,14,26,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.nav-content {
  max-width: 1200px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease, letter-spacing 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
  letter-spacing: 0.4px;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ================= HEADER ================= */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  margin-bottom: 120px;
}

.name {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.4px;
  background: linear-gradient(135deg, #ffffff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  transition: transform 0.25s ease, text-shadow 0.3s ease;
}

.name:hover {
  transform: translateY(-3px) scale(1.02);
  text-shadow:
    0 0 14px rgba(79,140,255,0.7),
    0 0 32px rgba(79,140,255,0.45);
}

.name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 3px;
  background: var(--primary);
  transition: width 0.35s ease;
}

.name:hover::after {
  width: 100%;
}

.tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ================= STATS ================= */
.stats {
  display: flex;
  gap: 16px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--primary);
}

/* ================= BUTTONS ================= */
.cta-buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 22px var(--glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ================= SOCIAL ================= */
.social-links {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.social-link {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 28px var(--glow);
}

/* ================= PHOTO (UPGRADED HOVER) ================= */
.photo-card {
  width: 280px;
  height: 280px;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow:
    0 18px 40px var(--shadow-soft),
    0 40px 80px var(--shadow-strong);
  transition: all 0.4s ease;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.photo-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.photo-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 30px 70px rgba(79,140,255,0.45),
    0 60px 120px rgba(0,0,0,0.7);
}


/* ================= SECTIONS ================= */
.section {
  margin-bottom: 120px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.section:nth-of-type(1) { animation-delay: 0.1s; }
.section:nth-of-type(2) { animation-delay: 0.2s; }
.section:nth-of-type(3) { animation-delay: 0.3s; }
.section:nth-of-type(4) { animation-delay: 0.4s; }
.section:nth-of-type(5) { animation-delay: 0.5s; }
.section:nth-of-type(6) { animation-delay: 0.6s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= SECTION HEADER ================= */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ================= GRID & CARDS ================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.35s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.35),
    0 0 0 1px rgba(79,140,255,0.15);
}

.card h3 {
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ================= TAG ================= */
.tech {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(79,140,255,0.4);
  background: rgba(79,140,255,0.08);
  font-weight: 500;
}

/* ================= SKILLS ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.skill-category {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(79, 140, 255, 0.06),
    var(--bg-card)
  );
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px 32px;
  transition: all 0.35s ease;
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.7;
}

.skill-category:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  background: linear-gradient(
    180deg,
    rgba(79, 140, 255, 0.12),
    var(--bg-card-hover)
  );
  box-shadow:
    0 14px 34px var(--shadow),
    0 30px 60px rgba(0,0,0,0.6);
}

.skill-category h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 7px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.skill-tag:hover {
  background: rgba(79,140,255,0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ================= CONTACT ================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
  transition: all 0.25s ease;
}

.contact-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.contact-icon {
  color: var(--primary);
}

.contact-info h4 {
  font-size: 14px;
  color: var(--text-muted);
}

.contact-info p {
  color: var(--text-secondary);
}

/* ================= FOOTER ================= */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(79,140,255,0.5);
}

.footer-links a:hover::after {
  width: 100%;
}

/* ================= ACCESSIBILITY ================= */
a:focus-visible {
  outline: 2px dashed var(--primary);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .photo-card {
    margin: auto;
  }

  .name {
    font-size: 40px;
  }

  .cta-buttons,
  .social-links,
  .stats {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 32px;
  }

  .btn {
    width: 100%;
  }
}
