/* ==========================================================================
   PREMIUM LIGHT THEME - CLEAN & PROFESSIONAL UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Variables --- */
:root {
  /* Colors - Pure Black Theme */
  --bg-page: #050505;
  /* Deep Black */
  --bg-card: #111111;
  /* Off Black */
  --bg-nav: rgba(5, 5, 5, 0.85);

  --primary: #3b82f6;
  /* Blue 500 */
  --primary-hover: #60a5fa;
  /* Blue 400 */
  --secondary: #06b6d4;
  /* Cyan 500 */
  --accent: #a855f7;
  /* Purple 500 */

  --text-main: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --border-light: #222222;
  /* Very dark border */

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Layout */
  --header-height: 4.5rem;
  --z-fixed: 100;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* --- Utility Classes --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-bordered {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section__title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.section__title span {
  color: var(--primary);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

/* --- Header & Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.nav__logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
}

.nav__logo-accent {
  color: var(--secondary);
}

.nav__menu {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  gap: 2rem;
}

.nav__btns {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__contact-btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.nav__toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: color 0.3s;
}

.nav__toggle-icon {
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-main);
}

.nav__toggle:hover {
  color: var(--secondary);
}

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav__link:hover,
.active-link {
  color: var(--secondary);
  position: relative;
}

.active-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero__title-intro {
  color: var(--text-muted);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
}

.hero__title-name {
  color: var(--secondary);
  font-size: clamp(3rem, 7vw, 4.5rem);
}

.hero__subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero__subtitle-text {
  color: var(--accent);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

.hero__desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero__desc-text {
  color: var(--text-muted);
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Social Buttons Explicitly in Hero */
.hero__socials {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero__img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Circular Profile Photo Constraint */
.hero__img-container {
  width: clamp(200px, 60vw, 400px);
  height: clamp(200px, 60vw, 400px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--secondary);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
  background: var(--border-light);
}

.hero__img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.35);
}

/* --- About Section --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about__text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* --- Skills Grid Section --- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1rem;
  text-align: center;
}

.skill-item i {
  font-size: 3rem;
  color: var(--primary);
}

.skill-item span {
  font-weight: 600;
  color: var(--text-main);
}

/* --- Projects Section --- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-header i.bx-folder {
  font-size: 2.5rem;
  color: var(--primary);
}

/* Explicit GitHub Symbol in Projects */
.github-link {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.github-link:hover {
  color: var(--text-main);
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.project-desc {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.project-language {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-language span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary);
}

/* --- Certification Section --- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  background: #0e121a;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 10;
}

.cert-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(168, 85, 247, 0.2);
  border-color: var(--accent);
}

.cert-card:hover::before {
  opacity: 1;
}

.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cert-card:hover .cert-img {
  transform: scale(1.08);
}

/* --- Let's Connect (Contact) Section --- */
.contact-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-intro-card {
  background-color: var(--bg-card);
  padding: 2rem;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-intro-title {
  font-size: 1.35rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.contact-intro-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 500;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-page);
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.3s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: var(--bg-card);
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}

.footer__logo {
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
}

.footer__socials-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer__social-btn {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Responsive --- */
@media screen and (max-width: 968px) {
  .hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero__container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .hero__desc {
    margin: 0 auto 1.5rem auto;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__socials {
    justify-content: center;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .header {
    position: sticky;
    top: 0;
    height: auto;
    min-height: var(--header-height);
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav__logo,
  .nav__btns {
    height: var(--header-height);
    display: flex;
    align-items: center;
  }

  .nav__menu {
    position: static;
    width: 100%;
    order: 3;
    background-color: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    /* Push down animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .nav__menu.show-menu {
    max-height: 400px;
    opacity: 1;
    padding: 1rem 0 2rem 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    row-gap: 1.5rem;
  }

  .nav__toggle {
    display: block;
  }

  .nav__contact-btn {
    display: none;
    /* Hide to prevent crowding on small mobile, rely on toggle */
  }

  .skills__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1440px) {
  html {
    font-size: 110%;
  }

  .container {
    max-width: 1300px;
  }
}

@media screen and (max-width: 576px) {
  .hero__title {
    font-size: 2.5rem;
  }

  .skills__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    justify-content: center;
  }

  .skill-item {
    padding: 1rem 0.2rem;
  }

  .skill-item i {
    font-size: 1.8rem;
  }

  .skill-item span {
    font-size: 0.75rem;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .section {
    padding: 4rem 0 2rem;
  }
}

/* Reveal Animation Base */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Beautiful Animated Text Gradient --- */
.gradient-animated-text {
  background: linear-gradient(to right,
      var(--secondary) 20%,
      var(--accent) 40%,
      var(--secondary) 60%,
      var(--primary) 80%);
  background-size: 200% auto;
  color: #000;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* --- Submission Popup Modal --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--bg-card);
  padding: 1.8rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2001;
  max-width: 280px;
  width: 90%;
}

.popup-overlay.active .popup-content {
  transform: translateY(0);
  opacity: 1;
}

.popup-icon {
  width: 50px;
  height: 50px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;
  border: 2px solid var(--secondary);
  opacity: 0;
  transform: scale(0.8);
}

.popup-overlay.active .popup-icon {
  animation: successFadeIn 0.5s ease forwards;
  animation-delay: 0.1s;
}

@keyframes successFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  }
}

.popup-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
