/* ===================== RESET & BASE ===================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --blue: #2563eb;
  --dark: #111111;
  --mid: #555555;
  --light: #f8f8f8;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
}

/* ===================== SCROLL PROGRESS ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--blue);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ===================== SCROLL TO TOP ===================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--blue);
}

/* ===================== HEADER & NAV ===================== */
header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 20px 8%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

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

.logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
}

nav ul {
  display: flex;
  gap: 35px;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--blue);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* ===================== HAMBURGER ===================== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================== MOBILE OVERLAY ===================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-overlay ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.mobile-overlay ul li a {
  text-decoration: none;
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
  transition: color var(--transition);
}

.mobile-overlay ul li a:hover {
  color: var(--blue);
}

/* ===================== SCROLL ANIMATIONS ===================== */
.fade-up,
.fade-left,
.fade-right {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}

.fade-up {
  transform: translateY(40px);
}
.fade-left {
  transform: translateX(-40px);
}
.fade-right {
  transform: translateX(40px);
}

.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ===================== HERO ===================== */
.hero {
  min-height: 90vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 8%;
  gap: 50px;
}

.hero-content {
  max-width: 650px;
}

.greeting {
  font-size: 20px;
  color: var(--mid);
}

.hero h1 {
  font-size: 55px;
  line-height: 1.2;
  margin: 10px 0;
}

.hero h2 {
  color: var(--blue);
  font-size: 28px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cursor {
  color: var(--blue);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
  line-height: 1;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.description {
  margin-top: 20px;
  color: var(--mid);
  line-height: 1.7;
  font-size: 17px;
}

.buttons {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  display: inline-block;
}

.primary {
  background: var(--dark);
  color: var(--white);
}

.primary:hover {
  background: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.secondary {
  border: 2px solid var(--dark);
  color: var(--dark);
}

.secondary:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
}

.highlights {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.card {
  background: var(--light);
  padding: 20px 24px;
  border-radius: 15px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.card p {
  color: #666;
  font-size: 14px;
}

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

.image-ring {
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #93c5fd);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.25);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(37, 99, 235, 0);
  }
}

.image-container {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  overflow: hidden;
  background: #eee;
  border: 5px solid var(--white);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  bottom: 20px;
  left: -50px;
  background: var(--white);
  padding: 12px 22px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  animation: float 3s ease-in-out infinite;
  white-space: nowrap;
}

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

.check-icon {
  width: 26px;
  height: 26px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #16a34a;
}

/* ===================== ABOUT ===================== */
.about {
  padding: 100px 8%;
  background: var(--light);
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.about-text {
  max-width: 580px;
}

.section-label {
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.about-text h2 {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--mid);
  line-height: 1.8;
  font-size: 16px;
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.about-card {
  width: 300px;
  padding: 22px 24px;
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
}

.about-card-icon {
  width: 42px;
  height: 42px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
}

.about-card h3 {
  font-size: 16px;
  margin-bottom: 5px;
}
.about-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* ===================== SERVICES ===================== */
.services {
  padding: 100px 8%;
}

.services-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.services-header h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}

.services-header p {
  color: #666;
  line-height: 1.7;
}

.service-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--light);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: #dbeafe;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
}

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

.service-card:hover .icon {
  color: var(--blue);
}

.icon {
  color: var(--dark);
  margin-bottom: 20px;
  transition: color var(--transition);
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.service-card > p {
  color: var(--mid);
  line-height: 1.7;
  font-size: 15px;
}

.service-card ul {
  margin-top: 18px;
  padding-left: 18px;
}
.service-card li {
  margin-bottom: 8px;
  color: #444;
  font-size: 14px;
}

/* ===================== SKILLS ===================== */
.skills {
  padding: 100px 8%;
  background: var(--light);
}

.skills-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.skills-header h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}
.skills-header p {
  color: #666;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.skill-box {
  background: var(--white);
  padding: 25px 28px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.skill-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.skill-label h3 {
  font-size: 16px;
}

.skill-pct {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.skill-bar {
  background: #e5e7eb;
  height: 10px;
  border-radius: 20px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--dark), #374151);
  border-radius: 20px;
  transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.tech-stack {
  margin-top: 60px;
  text-align: center;
}
.tech-stack h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tags span {
  background: var(--white);
  padding: 9px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 14px;
  cursor: default;
  transition: all var(--transition);
}

.tags span:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  transform: translateY(-2px);
}

/* ===================== EXPERIENCE ===================== */
.experience {
  padding: 100px 8%;
}

.experience-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.experience-header h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}
.experience-header p {
  color: #666;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 2px;
  background: var(--border);
  top: 0;
  bottom: 0;
  left: 18px;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding-left: 58px;
  transition: transform var(--transition);
}

.timeline-item:hover {
  transform: translateX(6px);
}

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 22px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border: 3px solid var(--dark);
  border-radius: 50%;
  transition: background var(--transition), border-color var(--transition),
    transform var(--transition);
  z-index: 1;
}

.timeline-item:hover .timeline-dot {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.2);
}

.timeline-content {
  background: var(--light);
  padding: 24px 28px;
  border-radius: 15px;
  border-left: 3px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-item:hover .timeline-content {
  border-left-color: var(--blue);
  box-shadow: var(--shadow);
}

.timeline-content span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.timeline-content h3 {
  margin-top: 8px;
  font-size: 20px;
}
.timeline-content h4 {
  color: var(--mid);
  margin: 4px 0 12px;
  font-weight: 500;
}
.timeline-content p {
  color: #666;
  line-height: 1.7;
  font-size: 15px;
}

/* ===================== PROJECTS ===================== */
.projects {
  padding: 100px 8%;
  background: var(--light);
}

.projects-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.projects-header h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}
.projects-header p {
  color: #666;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--white);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #dbeafe;
}

.project-icon {
  width: 54px;
  height: 54px;
  background: #eff6ff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: 20px;
  transition: background var(--transition), color var(--transition);
}

.project-card:hover .project-icon {
  background: var(--blue);
  color: var(--white);
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.role {
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  display: block;
}

.project-card > p {
  color: var(--mid);
  line-height: 1.7;
  font-size: 15px;
}

.technology {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.technology span {
  background: var(--light);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #444;
  border: 1px solid var(--border);
}

/* ===================== CERTIFICATIONS ===================== */
.certifications {
  padding: 100px 8%;
}

.cert-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.cert-header h2 {
  font-size: 38px;
  margin: 8px 0 14px;
}
.cert-header p {
  color: #666;
}

.cert-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cert-card {
  background: var(--light);
  padding: 30px;
  border-radius: 18px;
  text-align: center;
  border: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: #dbeafe;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.1);
}

.cert-icon {
  width: 58px;
  height: 58px;
  background: #eff6ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin: 0 auto 16px;
  transition: background var(--transition), color var(--transition);
}

.cert-card:hover .cert-icon {
  background: var(--blue);
  color: var(--white);
}

.cert-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.cert-card p {
  color: var(--mid);
  font-size: 14px;
}

.cert-card span {
  display: inline-block;
  margin-top: 14px;
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  background: #eff6ff;
  padding: 4px 14px;
  border-radius: 20px;
}

/* ===================== CONTACT ===================== */
.contact {
  padding: 100px 8%;
  background: var(--light);
}

.contact-container {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  align-items: flex-start;
}

.contact-text {
  max-width: 520px;
}

.contact-text h2 {
  font-size: 40px;
  margin: 8px 0 18px;
  line-height: 1.2;
}

.contact-text > p {
  color: var(--mid);
  line-height: 1.8;
  font-size: 15px;
}

.contact-info {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-icon {
  width: 38px;
  height: 38px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.contact-info-item strong {
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}
.contact-info-item p {
  color: var(--mid);
  font-size: 14px;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: 20px;
  width: 420px;
  flex-shrink: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  background: #fafafa;
  color: var(--dark);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--white);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.form-error {
  display: block;
  font-size: 12px;
  color: #dc2626;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-error.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-form input.invalid,
.contact-form textarea.invalid {
  border-color: #dc2626;
}

.contact-form button {
  width: 100%;
  padding: 14px;
  border: none;
  background: var(--dark);
  color: var(--white);
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
}

.contact-form button:hover:not(:disabled) {
  background: var(--blue);
  transform: translateY(-2px);
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-success {
  margin-top: 16px;
  background: #dcfce7;
  color: #15803d;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hidden {
  display: none !important;
}

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 24px;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .service-container,
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .cert-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  nav ul.nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 40px 6%;
  }

  .hero h1 {
    font-size: 38px;
  }
  .hero h2 {
    justify-content: center;
  }
  .highlights {
    justify-content: center;
  }
  .buttons {
    justify-content: center;
  }
  .image-container {
    width: 260px;
    height: 260px;
  }

  .floating-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: -20px;
    animation: none;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-card {
    width: 100%;
  }
  .about-cards {
    width: 100%;
  }

  .service-container,
  .projects-container,
  .skills-container,
  .cert-container {
    grid-template-columns: 1fr;
  }

  .contact-container {
    flex-direction: column;
  }
  .contact-form {
    width: 100%;
  }
  .contact-text {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  header {
    padding: 16px 5%;
  }

  .hero,
  .about,
  .services,
  .skills,
  .experience,
  .projects,
  .certifications,
  .contact {
    padding: 70px 5%;
  }
}