/* ========== GLOBAL ========== */
:root {
  --bg: #000000;
  --bg-alt: #050505;
  --surface: #0c0c0c;
  --border: #1c1c1c;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --cyan: #00e5ff;
  --violet: #7c3aed;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
h1, h2, h3 { color: #fff; line-height: 1.2; }
p { color: var(--muted); }
section { padding: 100px 8%; position: relative; }
section.alt { background: var(--bg-alt); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.title { text-align: center; font-size: clamp(30px, 4vw, 40px); margin-bottom: 12px; }
.title span { color: var(--cyan); }
.section-subtitle { text-align: center; max-width: 560px; margin: 0 auto 50px; }

/* ========== NAVBAR ========== */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  z-index: 1100;
}

header {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
header.scrolled { background: rgba(0, 0, 0, 0.92); border-bottom-color: var(--border); }

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

.logo { font-size: 24px; font-weight: 700; color: #fff; }
.logo span { color: var(--cyan); }

nav { display: flex; gap: 30px; }
nav a { color: #ccc; font-size: 15px; position: relative; padding: 4px 0; transition: color 0.3s; }
nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--cyan); transition: width 0.3s;
}
nav a:hover, nav a.active { color: var(--cyan); }
nav a:hover::after, nav a.active::after { width: 100%; }

.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

/* ========== HERO ========== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: space-between; gap: 60px;
  padding-top: 120px;
  background:
    radial-gradient(circle at 80% 30%, rgba(0, 229, 255, 0.10), transparent 32%),
    radial-gradient(circle at 15% 80%, rgba(124, 58, 237, 0.09), transparent 32%),
    var(--bg);
}

.hero-text { max-width: 620px; animation: fadeUp 0.9s ease both; }
.hello { color: var(--cyan); font-size: 20px; margin-bottom: 6px; }
.hero-text h1 { font-size: clamp(46px, 7vw, 80px); margin-bottom: 10px; }
.hero-text h1 span {
  background: linear-gradient(90deg, var(--cyan), #8b5cf6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text h2 { font-size: 26px; font-weight: 500; color: #ddd; min-height: 42px; margin-bottom: 18px; }
.cursor { color: var(--cyan); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.hero-description { font-size: 17px; max-width: 560px; margin-bottom: 30px; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 28px; border-radius: 30px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #fff; font: 600 15px "Poppins", sans-serif; border: 0; cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 0 24px rgba(0, 229, 255, 0.45), 0 0 40px rgba(124, 58, 237, 0.3); }
.secondary-btn { background: transparent; border: 1.5px solid var(--cyan); box-shadow: none; color: var(--cyan); }
.secondary-btn:hover { background: var(--cyan); color: #000; }

.social-icons { display: flex; gap: 14px; margin-top: 30px; }
.social-icons a {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: #fff;
  transition: 0.3s;
}
.social-icons a:hover { background: var(--cyan); color: #000; transform: translateY(-4px); box-shadow: 0 0 20px rgba(0, 229, 255, 0.5); }

.hero-image { position: relative; width: 320px; height: 320px; flex-shrink: 0; animation: float 5s ease-in-out infinite; }
.circle-bg {
  position: absolute; inset: -18px; border-radius: 50%;
  border: 1.5px dashed rgba(0, 229, 255, 0.35);
  animation: spin 24s linear infinite;
}
.hero-image img, .avatar-fallback {
  position: relative; width: 320px; height: 320px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--cyan);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.35), 0 0 70px rgba(124, 58, 237, 0.2);
}
.avatar-fallback { background: var(--surface); align-items: center; justify-content: center; font-size: 80px; font-weight: 700; color: var(--cyan); }

.floating-card {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 500; color: #fff;
  background: rgba(12, 12, 12, 0.92); border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.floating-card i { color: var(--cyan); }
.card-one { top: 12%; left: -50px; }
.card-two { bottom: 10%; right: -40px; }

/* ========== ABOUT ========== */
.about-container {
  max-width: 1000px; margin: 50px auto 0;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: center;
}
.about-image {
  aspect-ratio: 1; max-width: 300px; margin: auto; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 100px; color: var(--cyan);
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.08);
}
.about-content h3 { font-size: 26px; margin-bottom: 16px; }
.about-content p { margin-bottom: 14px; }
.about-boxes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.about-boxes div {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 14px;
}
.about-boxes i { color: var(--cyan); }

/* ========== SKILLS ========== */
.cards { max-width: 1100px; margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.card {
  padding: 30px 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card i { font-size: 40px; color: var(--cyan); margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 2px; }
.card p { font-size: 14px; }
.card:hover { transform: translateY(-8px); border-color: var(--cyan); box-shadow: 0 0 24px rgba(0, 229, 255, 0.15); }

/* ========== PROJECTS ========== */
.project-container { max-width: 1150px; margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; }
.project {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project::before {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--cyan), #8b5cf6); transition: left 0.5s;
}
.project:hover::before { left: 0; }
.project:hover { transform: translateY(-8px); border-color: #333; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8); }
.project-icon {
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; font-size: 22px; color: var(--cyan); margin-bottom: 18px;
  background: rgba(0, 229, 255, 0.08); border: 1px solid rgba(0, 229, 255, 0.25);
}
.project h3 { font-size: 21px; margin-bottom: 10px; }
.project p { margin-bottom: 18px; flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tags span { font-size: 12px; padding: 4px 12px; border-radius: 20px; color: var(--cyan); border: 1px solid rgba(0, 229, 255, 0.3); }
.project-link { color: var(--cyan); font-weight: 600; }
.project-link i { transition: transform 0.3s; }
.project-link:hover i { transform: translateX(5px); }

/* ========== EDUCATION ========== */
.education-box {
  max-width: 800px; margin: 40px auto 0; display: flex; gap: 24px; align-items: flex-start;
  padding: 30px; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--cyan); border-radius: 14px;
}
.education-icon { font-size: 34px; color: var(--cyan); }
.education-box h3 { margin-bottom: 8px; }
.education-status {
  display: inline-block; margin-top: 14px; padding: 4px 14px; border-radius: 20px;
  font-size: 13px; color: var(--cyan); background: rgba(0, 229, 255, 0.08); border: 1px solid rgba(0, 229, 255, 0.3);
}

/* ========== CONTACT ========== */
#contact { background: radial-gradient(circle at center, rgba(0, 229, 255, 0.06), transparent 45%), var(--bg); }
.contact-container { max-width: 1000px; margin: auto; display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.contact-info h3 { font-size: 26px; margin-bottom: 12px; }
.contact-info p { margin-bottom: 24px; }
.contact-item { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: #ccc; word-break: break-word; }
.contact-item i {
  width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--cyan); background: var(--surface); border: 1px solid var(--border);
}
.contact-item a:hover { color: var(--cyan); }

form { display: flex; flex-direction: column; gap: 16px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, textarea {
  width: 100%; padding: 14px 18px; font: 400 15px "Poppins", sans-serif; color: #fff;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
input::placeholder, textarea::placeholder { color: #777; }
input:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); }
textarea { min-height: 150px; resize: vertical; }
form .btn { align-self: flex-start; }
.form-status { font-size: 14px; color: var(--cyan); min-height: 22px; }

/* ========== FOOTER & BACK TO TOP ========== */
footer { padding: 26px; text-align: center; background: #000; border-top: 1px solid var(--border); }
footer p { font-size: 14px; color: #777; }

.top-btn {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--cyan); color: #000;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: 0.35s;
}
.top-btn.show { opacity: 1; pointer-events: auto; transform: none; }
.top-btn:hover { box-shadow: 0 0 20px rgba(0, 229, 255, 0.6); }

/* ========== ANIMATION ========== */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--violet)); border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .about-container, .contact-container { grid-template-columns: 1fr; }
  .about-image { max-width: 220px; font-size: 80px; }
}

@media (max-width: 768px) {
  section { padding: 80px 6%; }
  .nav-inner { padding: 14px 20px; }
  .menu-btn { display: block; }
  nav {
    position: absolute; top: 100%; left: 0; width: 100%;
    flex-direction: column; gap: 0; background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height 0.4s;
  }
  nav.open { max-height: 400px; }
  nav a { padding: 14px 24px; font-size: 16px; }
  nav a::after { display: none; }

  .hero { flex-direction: column-reverse; text-align: center; justify-content: center; gap: 50px; padding-top: 120px; }
  .hero-text h2 { font-size: 21px; }
  .hero-description { margin-inline: auto; font-size: 15px; }
  .hero-buttons, .social-icons { justify-content: center; }
  .hero-image, .hero-image img, .avatar-fallback { width: 230px; height: 230px; }
  .card-one { left: -30px; }
  .card-two { right: -30px; }
  .floating-card { font-size: 12px; padding: 8px 12px; }

  .education-box { flex-direction: column; }
  .input-row { grid-template-columns: 1fr; }
}