/* ===========================
   GLOBAL RESET & VARIABLES
=========================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

:root {
  --primary:   #00f5d4;
  --accent:    #6c63ff;
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #18181f;
  --card:      #1c1c26;
  --border:    rgba(255,255,255,0.07);
  --text:      #e8e8f0;
  --muted:     #888899;
  --font:      'Poppins', sans-serif;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: var(--primary);
  color: #000;
}

/* ===========================
   BACKGROUND GLOW ORBS
=========================== */

.blur-circle {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
.blur-circle.one {
  width: 480px; height: 480px;
  background: rgba(0,245,212,0.18);
  top: -150px; left: -150px;
}
.blur-circle.two {
  width: 420px; height: 420px;
  background: rgba(108,99,255,0.18);
  bottom: 0; right: -120px;
}
.blur-circle.three {
  width: 300px; height: 300px;
  background: rgba(0,245,212,0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ===========================
   TYPOGRAPHY HELPERS
=========================== */

.highlight {
  color: var(--primary);
}

/* ===========================
   NAVBAR / HEADER
=========================== */

#header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

#header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  transition: color 0.3s;
}
.logo-bracket {
  color: var(--primary);
}
.logo:hover { color: var(--primary); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 50px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.nav-link i {
  font-size: 13px;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,245,212,0.08);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
  border-radius: 50px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: scaleX(1);
}

.nav-link.active {
  background: rgba(0,245,212,0.12);
  font-weight: 600;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 4px;
  transition: all 0.35s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   PAGES SYSTEM
=========================== */

main {
  position: relative;
  z-index: 1;
}

.page {
  display: none;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.page.active {
  display: block;
}

/* ===========================
   COMMON SECTION HELPERS
=========================== */

.section-header {
  margin-bottom: 48px;
}
.section-header.centered { text-align: center; }

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px rgba(0,245,212,0.3);
}
.btn.primary:hover {
  background: #fff;
  box-shadow: 0 0 30px rgba(0,245,212,0.5);
  transform: translateY(-3px);
}

.btn.outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn.outline:hover {
  background: rgba(0,245,212,0.1);
  transform: translateY(-3px);
}

.btn.full-width { width: 100%; justify-content: center; }

/* ===========================
   HOME PAGE — HERO
=========================== */

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 80px 10% 60px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h) - 120px);
}

/* Greeting */
.greeting {
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Name */
.hero-name {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -2px;
}

/* Typing */
.hero-role {
  font-size: clamp(18px, 3vw, 26px);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 20px;
  min-height: 40px;
}

.cursor {
  animation: blink 0.8s infinite;
  font-weight: 300;
  opacity: 0.8;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Description */
.hero-desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
  margin-bottom: 32px;
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Stats */
.hero-stats {
  display: flex;
  gap: 32px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Hero image */
.hero-image {
  position: relative;
  flex-shrink: 0;
}

.image-ring {
  width: 320px;
  height: 320px;
  border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 4px;
  animation: morphBorder 8s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(0,245,212,0.25), 0 0 120px rgba(108,99,255,0.15);
}
@keyframes morphBorder {
  0%   { border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%; }
  33%  { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
  66%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%; }
}

.image-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Float badges */
.float-badge {
  position: absolute;
  padding: 8px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  background: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: floatBadge 3s ease-in-out infinite;
}
.badge-html { bottom: 20px; left: -30px;   animation-delay: 0s;   }
.badge-css  { top: 30px;    left: -20px;   animation-delay: 1s;   }
.badge-js   { top: 10px;    right: -20px;  animation-delay: 0.5s; }

@keyframes floatBadge {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-8px); }
}

/* Projects section (inside Home) */
.projects-section {
  padding: 40px 10% 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,245,212,0.25);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(0,245,212,0.08);
}

.project-icon {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-tags span {
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(0,245,212,0.1);
  border: 1px solid rgba(0,245,212,0.2);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  transition: gap 0.3s;
}
.project-link:hover { gap: 10px; }
.project-link.muted { color: var(--muted); }

/* ===========================
   ABOUT PAGE
=========================== */

.about-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 10% 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.about-img-wrapper {
  position: relative;
  display: inline-block;
}

.about-img-wrapper img {
  width: 100%;
  max-width: 380px;
  border-radius: 24px;
  border: 2px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: block;
}

.about-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--card);
  border: 1px solid rgba(0,245,212,0.3);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.about-badge i { color: var(--primary); font-size: 18px; }
.about-badge span { font-size: 13px; font-weight: 600; }

.about-text-col h3 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 16px;
}

.about-bio {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.about-info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.3s;
}
.info-card:hover { border-color: rgba(0,245,212,0.3); }

.info-card i {
  font-size: 18px;
  color: var(--primary);
  flex-shrink: 0;
}
.info-card strong {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.info-card span { font-size: 13px; font-weight: 500; }

.about-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ===========================
   SKILLS PAGE
=========================== */

.skills-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 10% 80px;
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.skill-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

/* Skill bars */
.skill-item {
  margin-bottom: 24px;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.skill-meta span:first-child i {
  color: var(--primary);
  margin-right: 6px;
}

.skill-meta span:last-child {
  color: var(--primary);
  font-weight: 700;
}

.progress {
  background: var(--bg3);
  height: 8px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
}

/* Tech grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tech-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: default;
}
.tech-card i { font-size: 28px; }
.tech-card:hover {
  border-color: rgba(0,245,212,0.3);
  transform: translateY(-4px);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.learning-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,245,212,0.06);
  border: 1px solid rgba(0,245,212,0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.learning-badge i { color: orange; font-size: 16px; }
.learning-badge strong { color: var(--primary); }

/* ===========================
   CONTACT PAGE
=========================== */

.contact-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 10% 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
}

.contact-info-col h3 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-info-col > p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(0,245,212,0.08);
  border: 1px solid rgba(0,245,212,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.3s;
}
.contact-detail-item:hover .contact-icon-wrap {
  background: var(--primary);
  color: #000;
}

.contact-detail-item strong {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.contact-detail-item a {
  color: var(--text);
  font-size: 14px;
  transition: color 0.3s;
}
.contact-detail-item a:hover { color: var(--primary); }

/* Contact Form */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  position: relative;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,245,212,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #444458;
}

.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  margin-top: 14px;
  text-align: center;
  justify-content: center;
}
.form-success.visible { display: flex; }
.form-success i { font-size: 18px; }

/* ===========================
   FOOTER
=========================== */

#footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 10% 36px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .footer-logo {
  font-size: 26px;
  display: inline-block;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 280px;
}

.footer-links h4,
.footer-social h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.3s, padding-left 0.3s;
  display: block;
}
.footer-links a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.footer-social-icons {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-social-icons a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  transition: all 0.3s;
}
.footer-social-icons a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,245,212,0.3);
}

.footer-availability {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76,175,80,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(76,175,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,175,80,0);   }
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 960px) {
  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    flex-direction: column;
    padding: 24px 20px;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
  }
  .nav-links.open { display: flex; }
  .nav-link { border-radius: 12px; }

  .hamburger { display: flex; }

  /* Hero */
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 40px 6% 48px;
    gap: 40px;
    min-height: auto;
  }
  .hero-buttons, .hero-stats { justify-content: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .image-ring { width: 240px; height: 240px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-img-wrapper { margin: 0 auto; }
  .about-info-cards { grid-template-columns: 1fr 1fr; }
  .about-cta { justify-content: center; }

  /* Skills */
  .skills-layout { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .skills-wrapper { overflow-x: hidden; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .about-info-cards { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-stats { gap: 20px; }
  .hero-name { letter-spacing: -1px; }
  .contact-form { padding: 24px 20px; }
}