@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Outfit:wght@400;500;600;700;800&display=swap");

/* Theme */
:root {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: rgba(255,255,255,.72);
  --surface-solid: #fff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #ede9fe;
  --accent: #06b6d4;
  --border: rgba(15,23,42,.1);
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --shadow-hover: 0 20px 45px rgba(15,23,42,.14);
  --nav-bg: rgba(248,250,252,.75);
  --code-font: "DM Mono", monospace;
  --main-font: "Outfit", sans-serif;
}

body.dark-mode {
  --bg: #080b14;
  --bg-secondary: #0f1420;
  --surface: rgba(20,27,40,.72);
  --surface-solid: #131a27;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --primary: #a78bfa;
  --primary-dark: #8b5cf6;
  --primary-light: rgba(167,139,250,.12);
  --accent: #22d3ee;
  --border: rgba(255,255,255,.09);
  --shadow: 0 10px 35px rgba(0,0,0,.28);
  --shadow-hover: 0 25px 55px rgba(0,0,0,.45);
  --nav-bg: rgba(8,11,20,.75);
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--main-font);
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 100px; }

/* Background */
.background-blur {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .12;
  pointer-events: none;
  z-index: -1;
}
.blur-one { background: var(--primary); top: -180px; left: -180px; }
.blur-two { background: var(--accent); bottom: -200px; right: -150px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg,var(--primary),var(--accent));
  z-index: 2000;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 22px 0;
  transition: padding .3s ease, background .3s ease, border .3s ease;
}
nav.sticky {
  padding: 13px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.navbar {
  width: min(1120px,90%);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 1.7rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--primary); }

.menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-size: .95rem;
  font-weight: 600;
  transition: color .25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .25s ease;
}
.nav-link:hover,.nav-link.active { color: var(--text); }
.nav-link.active::after,.nav-link:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 15px; }
.theme-toggle,.menu-btn {
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .25s ease, background .25s ease;
}
.theme-toggle:hover,.menu-btn:hover { transform: translateY(-2px); }
.menu-btn,.mobile-theme { display: none; }

/* General */
.section { padding: 120px 0; }
.content { width: min(1120px,90%); margin: auto; }
.section-heading { margin-bottom: 65px; max-width: 680px; }
.section-label {
  font-family: var(--code-font);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
}
.section-label span { color: var(--accent); }
.section-heading h2,.contact-wrapper h2 {
  font-size: clamp(2.3rem,5vw,4rem);
  line-height: 1.08;
  letter-spacing: -2px;
}
.section-heading h2 span,.contact-wrapper h2 span { color: var(--primary); }

/* Buttons */
.btn {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(124,58,237,.25);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
}

/* Home */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}
.home-content {
  width: min(1120px,90%);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr .85fr;
  gap: 80px;
  align-items: center;
}
.availability {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: .85rem;
  margin-bottom: 22px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.12);
}
.greeting {
  font-family: var(--code-font);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.profile-text h1 {
  font-size: clamp(4rem,9vw,7.5rem);
  line-height: .88;
  letter-spacing: -5px;
  margin-bottom: 25px;
}
.profile-text h1 span { color: var(--primary); }
.profile-text h2 {
  font-size: clamp(1.4rem,3vw,2rem);
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.profile-text h2 span { color: var(--text); }
.profile-description {
  max-width: 590px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}
.profile-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.profile-socials { display: flex; gap: 12px; margin-top: 30px; }
.profile-socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  transition: transform .25s ease, color .25s ease, border-color .25s ease;
}
.profile-socials a:hover {
  transform: translateY(-4px);
  color: var(--primary);
  border-color: var(--primary);
}

/* Hero Visual */
.profile-visual {
  position: relative;
  width: min(400px,100%);
  aspect-ratio: 1;
  justify-self: end;
  display: grid;
  place-items: center;
}
.profile-image-wrapper {
  position: relative;
  width: 75%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(135deg,var(--primary),var(--accent));
  box-shadow: 0 25px 70px rgba(124,58,237,.25);
  z-index: 2;
}
.profile-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--bg);
}
.profile-orbit {
  position: absolute;
  border: 1px dashed var(--border);
  border-radius: 50%;
}
.orbit-one { width: 90%; height: 90%; animation: spin 20s linear infinite; }
.orbit-two { width: 110%; height: 110%; animation: spin-reverse 30s linear infinite; }

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow);
  font-size: .8rem;
  font-weight: 600;
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}
.floating-card i { color: var(--primary); }
.card-java { top: 8%; left: -8%; }
.card-code { bottom: 8%; right: -5%; animation-delay: 1s; }
.card-database { top: 50%; right: -15%; animation-delay: 2s; }

/* About */
.about { background: var(--bg-secondary); }
.about-details {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 90px;
  align-items: center;
}
.about-image-container { position: relative; max-width: 380px; }
.about-image-container img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 20px;
  position: relative;
  z-index: 2;
}
.about-image-border {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: 20px;
  top: 18px;
  left: 18px;
  z-index: 1;
}
.about-content p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 18px;
}
.about-content strong { color: var(--text); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  margin: 35px 0;
}
.stat-card {
  padding: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.stat-number {
  display: block;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 5px;
}
.stat-text {
  color: var(--text-secondary);
  font-size: .78rem;
  line-height: 1.4;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--primary);
  font-weight: 600;
}
.text-link i { transition: transform .25s ease; }
.text-link:hover i { transform: translateX(5px); }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 16px;
}
.skill-card {
  min-height: 110px;
  padding: 28px 22px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
.skill-card img,.skill-icon {
  width: 48px;
  height: 48px;
  font-size: 44px;
  margin-bottom: 24px;
}
.spring-icon { color: #6db33f; }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 7px; }
.skill-card p { color: var(--text-secondary); font-size: .85rem; }

/* Projects */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
}
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 65px;
  white-space: nowrap;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}

.project-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.project-number {
  display: block;
  margin-bottom: 18px;
  color: var(--primary);
  font-family: var(--code-font);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.project-info { padding: 0; }

.project-info h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.project-info h3 span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 500;
}

.project-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

.project-features {
  margin-top: 20px;
}

.project-features strong {
  display: block;
  margin-bottom: 10px;
  font-size: .8rem;
  color: var(--text-primary);
}

.project-features ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.8;
}

.project-features li::marker {
  color: var(--primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.project-tags span {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--code-font);
  font-size: .65rem;
}

.project-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--primary);
  font-family: var(--code-font);
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s ease;
}

.project-link:hover {
  transform: translateX(5px);
}
/* Contact */
.contact { background: var(--bg-secondary); }
.contact-wrapper {
  max-width: 850px;
  padding: 80px 40px;
  text-align: center;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg,var(--surface-solid),var(--primary-light));
  box-shadow: var(--shadow);
}
.contact-description {
  max-width: 590px;
  margin: 25px auto;
  color: var(--text-secondary);
  line-height: 1.8;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: clamp(1rem,3vw,1.35rem);
  font-weight: 600;
  margin-top: 12px;
  word-break: break-all;
}
.contact-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 35px;
}
.contact-socials a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  transition: transform .25s ease, color .25s ease;
}
.contact-socials a:hover { transform: translateY(-5px); color: var(--primary); }

/* Footer */
footer {
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: .85rem;
}
footer span { color: var(--primary); }
.copyright { margin-top: 6px; font-size: .75rem; }

/* Scroll Top */
.scroll-button {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(124,58,237,.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 999;
}
.scroll-button.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Animations */
.reveal,.reveal-left,.reveal-right,.reveal-zoom {
  opacity: 0;
  transition: opacity .8s ease, transform .8s ease;
}
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-zoom { transform: scale(.9); }
.reveal.active,.reveal-left.active,.reveal-right.active,.reveal-zoom.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Responsive */
@media (max-width:1000px) {
  .home-content { gap: 40px; }
  .about-details { gap: 55px; }
  .project-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width:800px) {
  .section { padding: 90px 0; }
  .home { padding-top: 110px; }
  .home-content { grid-template-columns: 1fr; }
  .profile-visual {
    justify-self: center;
    width: min(370px,85vw);
    order: -1;
  }
  .profile-text { text-align: center; }
  .availability,.profile-buttons,.profile-socials {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  .profile-description {
    margin-left: auto;
    margin-right: auto;
  }
  .about-details { grid-template-columns: 1fr; }
  .about-image-container { margin: auto; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card {
    max-width: 550px;
    width: 100%;
    margin: auto;
  }
  .projects-header { display: block; }
  .github-link { margin-bottom: 35px; }

  .desktop-toggle { display: none; }
  .menu-btn {
    display: grid;
    position: relative;
    z-index: 1002;
  }
  .menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(340px,85%);
    height: 100vh;
    background: var(--surface-solid);
    border-left: 1px solid var(--border);
    padding: 100px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    box-shadow: var(--shadow-hover);
    transition: right .35s ease;
    z-index: 1001;
  }
  .menu.active { right: 0; }
  .nav-link { font-size: 1.25rem; }
  .mobile-theme {
    display: block;
    margin-top: 15px;
  }
}

@media (max-width:550px) {
  .navbar,.content,.home-content { width: 88%; }
  .profile-text h1 { letter-spacing: -3px; }
  .section-heading { margin-bottom: 45px; }
  .about-stats { grid-template-columns: 1fr; }
  .contact-wrapper {
    padding: 55px 20px;
    border-radius: 20px;
  }
  .floating-card {
    padding: 8px 10px;
    font-size: .68rem;
  }
  .card-java { left: -2%; }
  .card-database { right: -5%; }
  .scroll-button {
    width: 42px;
    height: 42px;
    right: 15px;
    bottom: 15px;
  }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}