/* =========================================
   BASE & RESET
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #070709;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', Arial, sans-serif;
}

body {
  background: #070709;
  color: #f8fafc;
  cursor: none;
  overflow-x: hidden;
  position: relative;
}

/* Glowing Background Orbs */
body::before, body::after {
  content: '';
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
body::before {
  background: #38bdf8;
  top: -20vh;
  left: -20vw;
}
body::after {
  background: #818cf8;
  bottom: -20vh;
  right: -20vw;
}

/* =========================================
   HEADER & NAV
========================================= */
header {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  padding: 15px 10%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.3rem;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: white;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

#theme-toggle {
  background: none;
  border: 2px solid #38bdf8;
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

#theme-toggle:hover {
  background: #38bdf8;
  color: #000;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    background: #020617;
    margin-top: 10px;
  }

  .nav-links li { margin: 15px 0; }

  .nav-links.active { display: flex; }
}

/* =========================================
   HERO
========================================= */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -1px;
}

.hero span {
  color: #38bdf8;
}

#typed-name {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(15px, 2.5vw, 20px);
  color: #94a3b8;
  margin-top: 12px;
  min-height: 30px;
}

.hero-btns {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.hero-btns button {
  padding: 13px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

#btn-projects {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  color: #fff;
  border: none;
  box-shadow: 0 10px 20px -10px rgba(56, 189, 248, 0.5);
}

#btn-resume {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#btn-resume:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.05);
}

#btn-projects:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(56, 189, 248, 0.8);
}

/* =========================================
   SECTIONS (general)
========================================= */
section {
  padding: 80px 10%;
  text-align: center;
  transition: all 0.3s ease;
}

section:hover {
  background: rgba(56, 189, 248, 0.02);
}

section h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, transparent);
  margin: 8px auto 0;
  border-radius: 2px;
}

/* =========================================
   ABOUT
========================================= */
.about-text {
  max-width: 600px;
  margin: 20px auto 0;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.8;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.hero-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
  transition: 0.4s;
  margin-top: 20px;
  animation: float 6s ease-in-out infinite;
}

.hero-image img:hover {
  animation-play-state: paused;
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 0 60px rgba(56, 189, 248, 0.4);
  border-color: #38bdf8;
}

/* =========================================
   SKILLS
========================================= */
.skills-container,
.concept-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
  gap: 12px;
}

.skill,
.concept {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 13px 22px;
  border-radius: 12px;
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill:hover,
.concept:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

/* =========================================
   EXPERIENCE
========================================= */
.experience-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 40px auto 0;
  text-align: left;
}

.experience-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
}

.experience-card:hover {
  transform: translateY(-5px);
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.exp-title {
  font-size: 20px;
  color: #e2e8f0;
}

.exp-date {
  font-size: 14px;
  color: #38bdf8;
  font-weight: 500;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.exp-company {
  font-size: 15px;
  color: #94a3b8;
  margin-bottom: 15px;
  font-weight: 500;
}

.exp-desc {
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.6;
}

.exp-list {
  list-style: disc;
  padding-left: 20px;
  font-size: 14.5px;
  color: #cbd5e1;
  line-height: 1.6;
}

.exp-list li {
  margin-bottom: 6px;
}

/* =========================================
   PROJECTS
========================================= */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 28px 22px;
  width: 270px;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-10px);
  background: #0f172a;
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.3);
  border-color: rgba(56, 189, 248, 0.5);
}

.card-icon {
  font-size: 32px;
  color: #38bdf8;
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e2e8f0;
  transition: color 0.3s;
}

.project-card:hover h3 {
  color: #38bdf8;
}

.project-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 18px;
}

.card-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.25s ease;
}

.card-btn:hover {
  background: #38bdf8;
  color: #0f172a;
  transform: translateY(-2px);
}

.card-btn-live {
  background: rgba(129, 140, 248, 0.12);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.3);
}

.card-btn-live:hover {
  background: #818cf8;
  color: #fff;
}

/* keyboard focus for project cards */
.project-card:focus {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
}

/* =========================================
   CONTACT
========================================= */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #1e293b;
  border-radius: 10px;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid rgba(56, 189, 248, 0.15);
  transition: all 0.3s ease;
  min-width: 200px;
}

.contact-item i {
  font-size: 20px;
  color: #38bdf8;
}

.contact-item:hover {
  background: #38bdf8;
  color: #0f172a;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.4);
  border-color: #38bdf8;
}

.contact-item:hover i {
  color: #0f172a;
}

.social-icons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 22px;
  color: #e2e8f0;
  background: #1e293b;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.35s ease;
  text-decoration: none;
}

.social-icons a:hover {
  color: #0f172a;
  background: #38bdf8;
  transform: translateY(-6px) scale(1.15);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
  border-color: #38bdf8;
}

/* =========================================
   FOOTER
========================================= */
footer {
  background: #020617;
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 14px;
  border-top: 1px solid rgba(56, 189, 248, 0.08);
}

/* =========================================
   CUSTOM CURSOR
========================================= */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #fff;
  mix-blend-mode: difference;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
  z-index: 9998;
}

/* =========================================
   BACK TO TOP BUTTON
========================================= */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #7dd3fc;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.6);
}

/* =========================================
   SCROLL REVEAL ANIMATIONS
========================================= */
.reveal,
.reveal-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =========================================
   LIGHT MODE
========================================= */
.light-mode {
  background: #f8fafc;
  color: #0f172a;
}

.light-mode header {
  background: rgba(241, 245, 249, 0.9);
  border-bottom-color: rgba(56, 189, 248, 0.2);
}

.light-mode .project-card,
.light-mode .experience-card {
  background: #f1f5f9;
  border-color: rgba(56, 189, 248, 0.2);
}

.light-mode .project-card:hover,
.light-mode .experience-card:hover {
  background: #e2e8f0;
}

.light-mode .project-card h3,
.light-mode .exp-title {
  color: #1e293b;
}

.light-mode .project-card p,
.light-mode .exp-company,
.light-mode .exp-desc,
.light-mode .exp-list {
  color: #475569;
}

.light-mode .skill,
.light-mode .concept {
  background: #e2e8f0;
  color: #1e293b;
  border-color: rgba(56, 189, 248, 0.3);
}

.light-mode .contact-item {
  background: #f1f5f9;
  color: #1e293b;
  border-color: rgba(56, 189, 248, 0.2);
}

.light-mode .social-icons a {
  background: #e2e8f0;
  color: #1e293b;
}

.light-mode footer {
  background: #f1f5f9;
  color: #475569;
}

.light-mode .nav-links a {
  color: #475569;
}

.light-mode .about-text {
  color: #475569;
}

.light-mode .hero-subtitle {
  color: #475569;
}

.light-mode #btn-resume {
  color: #0369a1;
  border-color: #0369a1;
}

.light-mode #btn-resume:hover {
  background: #0369a1;
  color: white;
}