:root {
  --bg-1: #03050d;
  --bg-2: #080d1d;
  --text-main: #f3f5f9;
  --text-soft: #d7d9df;
  --text-muted: #adb3c0;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  font-family: "Poppins", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px circle at 15% 20%, rgba(255, 255, 255, 0.14), transparent 40%),
    radial-gradient(1000px circle at 55% 50%, rgba(41, 73, 170, 0.12), transparent 55%),
    linear-gradient(100deg, var(--bg-1) 0%, var(--bg-2) 45%, #010204 100%);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 4% 14%, rgba(255, 255, 255, 0.09), transparent 25%),
    radial-gradient(circle at 28% 74%, rgba(33, 81, 255, 0.06), transparent 30%),
    radial-gradient(circle at 93% 80%, rgba(18, 42, 112, 0.1), transparent 28%);
  filter: blur(2px);
}

.site-header {
  width: min(950px, 82vw);
  margin: 0 auto;
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.3px;
  margin-left: -1rem;
}

.main-nav {
  display: flex;
  gap: 2.2rem;
}

.main-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 180ms ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.hero-wrapper {
  width: min(950px, 82vw);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2.5rem;
}

.hero-left {
  padding-left: 0.8rem;
}

.intro {
  font-size: clamp(1.3rem, 2.3vw, 2.6rem);
  color: var(--text-soft);
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.hero-left h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  line-height: 1.03;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.rotating-subtitle {
  position: relative;
  height: 2.5rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.subtitle {
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  color: var(--text-soft);
  position: absolute;
  margin: 0;
  animation: slideInUp 12s ease-in-out infinite;
  animation-fill-mode: both;
  width: 100%;
}

.subtitle:nth-child(1) {
  animation-delay: 0s;
}

.subtitle:nth-child(2) {
  animation-delay: 3s;
}

.subtitle:nth-child(3) {
  animation-delay: 6s;
}

.subtitle:nth-child(4) {
  animation-delay: 9s;
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(-50px);
    visibility: hidden;
  }
  1% {
    opacity: 1;
    transform: translateY(0px);
    visibility: visible;
  }
  23% {
    opacity: 1;
    transform: translateY(0px);
    visibility: visible;
  }
  25% {
    opacity: 0;
    transform: translateY(50px);
    visibility: hidden;
  }
  100% {
    opacity: 0;
    transform: translateY(50px);
    visibility: hidden;
  }
}

.scroll-indicator {
  margin-top: 4.8rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  text-decoration: none;
}

.mouse {
  width: 24px;
  height: 38px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.95);
  animation: wheel 1.7s infinite;
}

@keyframes wheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  60% {
    opacity: 0;
    transform: translateY(11px);
  }

  100% {
    opacity: 0;
    transform: translateY(11px);
  }
}

.hero-right {
  display: flex;
  justify-content: flex-end;
}

.image-card {
  width: min(420px, 100%);
  aspect-ratio: 1 / 1.12;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.45),
    0 10px 20px rgba(0, 0, 0, 0.35);
}

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

.about-section {
  width: 100%;
  padding: 8rem 0 7rem;
  min-height: 100vh;
}

.projects-section {
  width: 100%;
  padding: 4rem 0 7rem;
  min-height: 120vh;
}

.experience-section {
  width: 100%;
  padding: 0.4rem 0 6rem;
  background: #f8faff;
  margin-top: 1rem;
}

.certificates-section {
  width: 100%;
  padding: 5rem 0 7.5rem;
  background: #ffffff;
}

.section-shell {
  width: min(1000px, 85vw);
  margin: 0 auto;
}

.about-section .section-shell {
  width: min(950px, 82vw);
}

.projects-section .section-shell {
  width: min(950px, 82vw);
}

.experience-section .section-shell {
  width: min(950px, 82vw);
}

.certificates-section .section-shell {
  width: min(950px, 82vw);
}

.section-shell h2 {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-weight: 700;
  border-bottom: 3px solid rgba(255, 255, 255, 0.22);
  padding-bottom: 0.6rem;
  margin-bottom: 1.8rem;
}

.about-card {
  background: rgba(245, 247, 251, 0.97);
  color: #20242c;
  border-radius: 16px;
  padding: clamp(1.4rem, 2.6vw, 2.3rem);
  min-height: 550px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.2),
    0 16px 45px rgba(0, 0, 0, 0.18);
}

.about-card p {
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-card h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.9rem;
  font-size: clamp(0.95rem, 1.1vw, 1.25rem);
  color: #121723;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem 1.4rem;
}

.tech-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.tech-row {
  display: grid;
  gap: 1.2rem 1.4rem;
  justify-content: center;
}

.tech-row:first-child {
  grid-template-columns: repeat(8, minmax(86px, 1fr));
  width: min(1120px, 100%);
}

.tech-row:last-child {
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  width: min(840px, 100%);
}

.tool-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.tool-row {
  display: grid;
  gap: 1.2rem 1.4rem;
  justify-content: center;
}

.tool-row:first-child {
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  width: min(760px, 100%);
}

.tool-row:last-child {
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  width: min(460px, 100%);
}

.stack-item {
  min-width: 100px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: center;
  opacity: 0;
  transform: scale(0.72);
}

.about-section.animate-stacks .stack-item {
  animation: popIn 0.7s ease-out forwards;
}

.stack-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #2e3442;
}

.stack-item i {
  font-size: 1.7rem;
  line-height: 1;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  70% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.tech-row:first-child .stack-item:nth-child(1) { animation-delay: 0.05s; }
.tech-row:first-child .stack-item:nth-child(2) { animation-delay: 0.13s; }
.tech-row:first-child .stack-item:nth-child(3) { animation-delay: 0.21s; }
.tech-row:first-child .stack-item:nth-child(4) { animation-delay: 0.29s; }
.tech-row:first-child .stack-item:nth-child(5) { animation-delay: 0.37s; }
.tech-row:first-child .stack-item:nth-child(6) { animation-delay: 0.45s; }
.tech-row:first-child .stack-item:nth-child(7) { animation-delay: 0.53s; }
.tech-row:first-child .stack-item:nth-child(8) { animation-delay: 0.61s; }

.tech-row:last-child .stack-item:nth-child(1) { animation-delay: 0.69s; }
.tech-row:last-child .stack-item:nth-child(2) { animation-delay: 0.77s; }
.tech-row:last-child .stack-item:nth-child(3) { animation-delay: 0.85s; }
.tech-row:last-child .stack-item:nth-child(4) { animation-delay: 0.93s; }
.tech-row:last-child .stack-item:nth-child(5) { animation-delay: 1.01s; }
.tech-row:last-child .stack-item:nth-child(6) { animation-delay: 1.09s; }

.tool-row:first-child .stack-item:nth-child(1) { animation-delay: 1.2s; }
.tool-row:first-child .stack-item:nth-child(2) { animation-delay: 1.28s; }
.tool-row:first-child .stack-item:nth-child(3) { animation-delay: 1.36s; }
.tool-row:first-child .stack-item:nth-child(4) { animation-delay: 1.44s; }
.tool-row:first-child .stack-item:nth-child(5) { animation-delay: 1.52s; }

.tool-row:last-child .stack-item:nth-child(1) { animation-delay: 1.6s; }
.tool-row:last-child .stack-item:nth-child(2) { animation-delay: 1.68s; }
.tool-row:last-child .stack-item:nth-child(3) { animation-delay: 1.76s; }

.stack-item i.devicon-nextjs-plain,
.stack-item i.devicon-express-original,
.stack-item i.devicon-github-original,
.stack-item i.devicon-vercel-original {
  color: #0f1117;
}

.projects-slider {
  margin-top: 1.8rem;
  overflow: hidden;
}

.domain-title {
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  font-weight: 600;
  color: var(--text-soft);
}

.domain-block {
  margin-top: 2.8rem;
}

.experience-section h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.35rem;
  margin-left: 3rem;
  color: #080d1d;
  border-bottom: none;
  padding-bottom: 0;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
}

.certificates-section h2 {
  color: #171d2b;
  border-bottom: 3px solid #d4dbe9;
  margin-bottom: 1.8rem;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 520px));
  gap: 1.35rem;
  align-items: stretch;
  justify-content: center;
}

.certificate-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #dfe4ef;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14),
    0 20px 48px rgba(15, 23, 42, 0.16);
}

.certificate-image-wrap {
  min-height: 200px;
  background: #eef2f9;
}

.certificate-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.certificate-content {
  padding: clamp(0.85rem, 1.4vw, 1.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.certificate-content h3 {
  color: #171d2b;
  font-size: clamp(0.9rem, 1.1vw, 1.2rem);
  margin-bottom: 0.6rem;
}

.certificate-content p {
  color: #4a5468;
  line-height: 1.5;
  margin-bottom: 0.6rem;
  font-size: clamp(0.75rem, 0.85vw, 0.9rem);
}

.certificate-tags {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.certificate-tags span {
  background: #eef2f9;
  color: #30394b;
  border: 1px solid #d8e0ed;
  border-radius: 10px;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.experience-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  margin-top: 4rem;
}

.experience-viewport {
  overflow: hidden;
}

.experience-track {
  display: flex;
  transition: transform 0.65s ease;
}

.exp-nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(173, 200, 245, 0.45);
  background: rgba(4, 8, 18, 0.8);
  color: #e9f1ff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.exp-nav:hover {
  transform: translateY(-1px);
  background: rgba(9, 18, 38, 0.95);
}

.experience-card {
  flex: 0 0 100%;
  background: linear-gradient(135deg, #03050d 0%, #080d1d 58%, #101a34 100%);
  color: #f5f8ff;
  border-radius: 14px;
  min-height: 320px;
  padding: clamp(1rem, 1.8vw, 1.45rem);
  border: 1px solid rgba(180, 210, 255, 0.45);
  box-shadow:
    0 10px 22px rgba(9, 20, 46, 0.35),
    0 16px 40px rgba(12, 30, 74, 0.35);
}

.experience-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(219, 233, 255, 0.45);
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
}

.experience-head h3 {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 600;
}

.experience-head span {
  color: #dfeaff;
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  font-weight: 500;
}

.experience-card ul {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
}

.experience-card li {
  line-height: 1.6;
  font-size: clamp(0.85rem, 0.92vw, 0.98rem);
  color: #edf3ff;
}

.experience-logo {
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.experience-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.45rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ml-slider {
  margin-top: 1rem;
}

.ml-slide {
  flex: 0 0 100%;
}

.ml-actions {
  justify-content: center;
  transform: none;
}

.ml-project-card {
  min-height: 360px;
  grid-template-columns: 1fr 0.9fr;
}

.ml-content {
  align-items: center;
  text-align: center;
}

.ml-content h3 {
  width: 100%;
}

.ml-content p {
  width: 88%;
  text-align: justify;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.ml-image-wrap {
  background: #e7edf7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ml-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: contain;
  object-position: center;
}

.ml-slider {
  max-width: 100%;
}

.projects-track {
  display: flex;
  width: 100%;
  transition: transform 1.8s ease-in-out;
  will-change: transform;
}

.project-card {
  flex: 0 0 100%;
  background: rgba(245, 247, 251, 0.97);
  border-radius: 16px;
  overflow: hidden;
  min-height: 100px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.2),
    0 16px 45px rgba(0, 0, 0, 0.18);
}

.project-image-wrap {
  height: 100%;
  min-height: 100%;
  background: #d9e6f6;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.helix-image-wrap {
  overflow: hidden;
  position: relative;
}

.helix-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  transform: none;
}

.project-content {
  padding: clamp(1.2rem, 2vw, 2rem);
  color: #1d2330;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-content h3 {
  font-size: clamp(1rem, 1.3vw, 1.4rem);
  margin-bottom: 0.5rem;
  text-align: center;
}

.project-content p {
  line-height: 1.6;
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  color: #3b4150;
  text-align: justify;
  text-wrap: pretty;
  width: 86%;
  margin-inline: auto;
}

.project-tech {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.project-tech span {
  background: #eef1f7;
  color: #2d3341;
  border: 1px solid #d8deea;
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-actions {
  margin-top: 1.05rem;
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  font-weight: 600;
  font-size: 0.8rem;
  transition: transform 0.18s ease, opacity 0.18s ease;
  width: fit-content;
  margin: 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.btn-outline {
  border: 1px solid #cfd6e4;
  color: #1f2634;
  background: #ffffff;
}

.btn-solid {
  border: 1px solid #0f1117;
  color: #ffffff;
  background: #0f1117;
}

.btn i {
  font-size: 1rem;
}

@media (max-width: 1100px) {
  .main-nav a {
    font-size: 1.1rem;
  }

  .hero-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem 0 3.5rem;
    text-align: center;
    gap: 2rem;
  }

  .hero-left {
    padding-left: 0;
  }

  .scroll-indicator {
    justify-content: center;
    margin-top: 2.6rem;
  }

  .hero-right {
    justify-content: center;
  }

  .image-card {
    width: min(420px, 88vw);
  }

  .about-section {
    padding-top: 2.2rem;
    min-height: auto;
  }

  .projects-section {
    min-height: auto;
  }

  .experience-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-card {
    min-height: auto;
  }

  .tech-row:first-child,
  .tech-row:last-child {
    width: 100%;
    grid-template-columns: repeat(4, minmax(86px, 1fr));
  }

  .tool-row:first-child,
  .tool-row:last-child {
    width: 100%;
    grid-template-columns: repeat(4, minmax(86px, 1fr));
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .certificate-card {
    grid-template-columns: 1fr;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
  }

  .certificate-image-wrap {
    min-height: 250px;
  }

  .project-image-wrap {
    min-height: 260px;
  }

  .ml-actions {
    transform: translateX(0);
  }

  .ml-project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.2rem;
  }

  .brand {
    font-size: 1.6rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.95rem 1.2rem;
  }

  .main-nav a {
    font-size: 0.95rem;
  }

  .tech-row:first-child,
  .tech-row:last-child {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 1rem;
  }

  .tool-row:first-child,
  .tool-row:last-child {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 1rem;
  }
}

/* Footer Section */
.footer {
  background: #ffffff;
  padding: 0.6rem 5rem;
  margin-top: 0rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  text-align: center;
  border-radius: 0;
  box-shadow: none;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  color: #03050d;
}

.footer-heading {
  font-size: clamp(0.85rem, 2.2vw, 2rem);
  font-weight: 600;
  color: #03050d;
  margin-bottom: 0.8rem;
  margin-top: 0;
  letter-spacing: 0.5px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 0.8rem;

  padding: 0.9rem 1.4rem;

  color: #03050d;
  font-size: 0.95rem;
  font-weight: 700;
}

.copy-btn {
  background: none;
  border: none;
  color: #03050d;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.copy-btn:hover {
  transform: scale(1.15);
  opacity: 0.7;
}

.footer-socials {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.footer-socials a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8faff;
  border: 2px solid #03050d;
  border-radius: 50%;
  color: #03050d;
  font-size: 1.4rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-socials a:hover {
  background: #03050d;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.footer-credit {
  color: #03050d;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

.heart {
  color: #e74c3c;
  margin: 0 0.3rem;
  display: inline-block;
}
