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

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

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

body {
  font-family: "Poppins", sans-serif;
  background: #f7f9fc;
  color: #172033;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(90%, 1120px);
  margin: 0 auto;
}


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

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e8edf5;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-container {
  width: min(90%, 1120px);
  min-height: 76px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  color: #101828;
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.04em;
}

.logo span {
  color: #2563eb;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: #667085;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;

  width: 0;
  height: 2px;

  background: #2563eb;
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: #101828;
}

.nav-links a:hover::after {
  width: 100%;
}


/* =========================================================
   HERO
========================================================= */

header {
  position: relative;
  min-height: calc(100vh - 76px);
  overflow: hidden;

  display: flex;
  align-items: center;

  background:
    radial-gradient(
      circle at 75% 30%,
      rgba(37, 99, 235, 0.18),
      transparent 30%
    ),
    linear-gradient(135deg, #08111f 0%, #0b1830 55%, #0d2250 100%);

  color: #ffffff;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  background-size: 55px 55px;
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;

  width: 430px;
  height: 430px;

  right: -160px;
  bottom: -180px;

  border-radius: 50%;
  background: rgba(37, 99, 235, 0.14);
  filter: blur(20px);
}

.hero-content {
  position: relative;
  z-index: 2;

  max-width: 850px;
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.hero-label,
.section-label {
  margin-bottom: 1rem;

  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.2em;
}

header .hero-label {
  color: #60a5fa;
}

header h1 {
  max-width: 800px;

  margin-bottom: 1.4rem;

  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

header h1 span {
  color: #60a5fa;
}

.subtitle {
  max-width: 720px;

  margin-bottom: 2.2rem;

  color: #c7d2e3;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.85;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;
  padding: 0.8rem 1.5rem;

  border-radius: 10px;

  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.btn {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
}

.btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-2px);
}

.btn-outline {
  color: #e7eefb;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;

  margin-top: 2rem;

  color: #8fa3c1;
  font-size: 0.85rem;
}

.hero-links a {
  text-decoration: none;
  transition: color 0.25s ease;
}

.hero-links a:hover {
  color: #60a5fa;
}

.hero-links span {
  color: #34445d;
}


/* =========================================================
   SHARED SECTIONS
========================================================= */

.section {
  padding: 7rem 0;
}

.section-label {
  text-align: center;
}

.section-title {
  margin-bottom: 1rem;

  color: #101828;
  text-align: center;

  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.section-description {
  max-width: 620px;
  margin: 0 auto 3.5rem;

  color: #667085;
  text-align: center;

  font-size: 0.98rem;
  line-height: 1.8;
}


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

.about {
  background: #ffffff;
}

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 5rem;

  max-width: 960px;
  margin: 3.5rem auto 0;
}

.about-image {
  position: relative;
}

.about-image::before {
  content: "";
  position: absolute;

  inset: 16px -16px -16px 16px;

  border: 2px solid #dbe7ff;
  border-radius: 24px;

  z-index: 0;
}

.about-image img {
  position: relative;
  z-index: 1;

  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;

  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(16, 24, 40, 0.12);
}

.about-text p {
  margin-bottom: 1.2rem;
  color: #5d6678;
  font-size: 0.96rem;
}

.about-text strong {
  color: #101828;
}

.text-link {
  display: inline-block;
  margin-top: 0.5rem;

  color: #2563eb;
  font-weight: 600;
  text-decoration: none;

  transition: transform 0.25s ease;
}

.text-link:hover {
  transform: translateX(4px);
}


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

.skills {
  background: #f7f9fc;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;

  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  min-height: 78px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1rem;

  background: #ffffff;
  border: 1px solid #e5eaf2;
  border-radius: 12px;

  color: #344054;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;

  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.035);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-4px);

  color: #2563eb;
  border-color: #bfd2ff;

  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}


/* =========================================================
   PROJECTS
========================================================= */

.projects {
  background: #ffffff;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;

  margin-top: 3.5rem;
}

/* Trackr AI occupies the full left side */
.project-grid .project-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* Business Website */
.project-grid .project-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

/* BabyShopHub */
.project-grid .project-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.project-card {
  position: relative;

  display: flex;
  flex-direction: column;

  padding: 2rem;

  background: #f9fafb;
  border: 1px solid #e6eaf0;
  border-radius: 18px;

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #c8d7f5;
  box-shadow: 0 20px 45px rgba(16, 24, 40, 0.09);
}

.featured-project {
  background:
    linear-gradient(
      145deg,
      rgba(37, 99, 235, 0.06),
      rgba(255, 255, 255, 0.7)
    ),
    #f9fafb;

  border-color: #cfdcff;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  margin-bottom: 2rem;
}

.project-number {
  color: #98a2b3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.project-status {
  padding: 0.38rem 0.65rem;

  border: 1px solid #bfdbfe;
  border-radius: 7px;

  background: #eff6ff;

  color: #2563eb;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.secondary-status {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.project-card h3 {
  margin-bottom: 0.3rem;

  color: #101828;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.project-type {
  margin-bottom: 1.5rem;

  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 600;
}

.project-description {
  margin-bottom: 1rem;

  color: #667085;
  font-size: 0.9rem;
  line-height: 1.75;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;

  margin-top: 1rem;
}

.project-tech span {
  padding: 0.4rem 0.7rem;

  background: #ffffff;
  border: 1px solid #e4e9f0;
  border-radius: 7px;

  color: #667085;
  font-size: 0.7rem;
  font-weight: 600;
}

.project-links {
  margin-top: auto;
  padding-top: 2rem;
}

.project-btn {
  display: inline-flex;
  align-items: center;

  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;

  transition: transform 0.25s ease;
}

.project-btn:hover {
  transform: translateX(4px);
}


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

.contact {
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.16),
      transparent 32%
    ),
    #08111f;

  color: #ffffff;
}

.contact::after {
  content: "";
  position: absolute;

  width: 380px;
  height: 380px;

  right: -140px;
  bottom: -200px;

  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
}

.contact-container {
  position: relative;
  z-index: 2;

  max-width: 760px;
  text-align: center;
}

.contact .section-label {
  color: #60a5fa;
}

.contact .section-title {
  color: #ffffff;
}

.contact-description {
  max-width: 620px;
  margin: 1.2rem auto 2.2rem;

  color: #aab8cd;
  font-size: 0.96rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact-links a {
  padding: 0.75rem 1.25rem;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;

  background: rgba(255, 255, 255, 0.04);

  color: #e6edf7;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.contact-links a:hover {
  transform: translateY(-2px);

  background: #2563eb;
  border-color: #2563eb;
}


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

footer {
  background: #050b14;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  min-height: 90px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  color: #718096;
  font-size: 0.78rem;
}

.footer-content a {
  color: #8fa3c1;
  text-decoration: none;

  transition: color 0.25s ease;
}

.footer-content a:hover {
  color: #60a5fa;
}


/* =========================================================
   ANIMATIONS
========================================================= */

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 0.8s 0.2s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  .about-content {
    grid-template-columns: 230px 1fr;
    gap: 3rem;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* Return all projects to a normal vertical layout */
  .project-grid .project-card:nth-child(1),
  .project-grid .project-card:nth-child(2),
  .project-grid .project-card:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  html {
    scroll-padding-top: 120px;
  }

  .nav-container {
    min-height: auto;

    flex-direction: column;
    justify-content: center;

    gap: 0.7rem;
    padding: 0.9rem 0;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav-links {
    width: 100%;

    justify-content: center;
    flex-wrap: wrap;

    gap: 0.55rem 1rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .nav-links a::after {
    display: none;
  }


  /* HERO */

  header {
    min-height: auto;
  }

  .hero-content {
    padding-top: 6rem;
    padding-bottom: 6rem;
    text-align: center;
  }

  .hero-label {
    text-align: center;
  }

  header h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .header-buttons {
    justify-content: center;
  }

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


  /* SECTIONS */

  .section {
    padding: 5rem 0;
  }

  .section-title {
    font-size: 2rem;
  }


  /* ABOUT */

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image {
    width: min(75%, 280px);
    margin: 0 auto;
  }

  .about-text {
    text-align: center;
  }


  /* SKILLS */

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }


  /* PROJECTS */

  .project-card {
    padding: 1.5rem;
  }


  /* FOOTER */

  .footer-content {
    flex-direction: column;
    justify-content: center;

    padding: 1.5rem 0;
    text-align: center;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

  .container {
    width: 92%;
  }

  .nav-links {
    gap: 0.45rem 0.8rem;
  }

  .nav-links a {
    font-size: 0.7rem;
  }

  header h1 {
    font-size: 2.6rem;
  }

  .header-buttons {
    flex-direction: column;
  }

  .btn,
  .btn-outline {
    width: 100%;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .skill-card {
    min-height: 68px;
    padding: 0.8rem;
    font-size: 0.78rem;
  }

  .project-top {
    align-items: flex-start;
  }

  .project-status {
    font-size: 0.56rem;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-links a {
    width: 100%;
  }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}

/* =========================================================
   MOBILE NAVIGATION
========================================================= */

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;

  background: transparent;
  border: none;
  cursor: pointer;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 23px;
  height: 2px;

  background: #101828;
  border-radius: 10px;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}


/* Hamburger becomes X when opened */

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


@media (max-width: 700px) {

  html {
    scroll-padding-top: 76px;
  }

  .nav-container {
    position: relative;

    min-height: 70px;
    padding: 0;

    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;

    top: 70px;
    left: 0;

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 0;

    background: rgba(255, 255, 255, 0.98);

    border: 1px solid #e8edf5;
    border-top: none;
    border-radius: 0 0 14px 14px;

    box-shadow: 0 15px 30px rgba(16, 24, 40, 0.1);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-10px);

    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;

    width: 100%;
    padding: 1rem 1.2rem;

    color: #344054;

    font-size: 0.85rem;
    font-weight: 500;

    text-align: left;

    border-bottom: 1px solid #eef1f5;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a:hover {
    color: #2563eb;
    background: #f7f9fc;
  }

  .nav-links a::after {
    display: none;
  }
}

/* =========================================================
   PROJECT PREVIEW
========================================================= */

.project-preview {
  position: relative;
  width: 100%;
  height: 380px;

  margin-bottom: 1.8rem;

  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e1e7ef;

  background: #07150d;
}

.project-preview img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: top;

  transition: transform 0.45s ease;
}

.trackr-preview img {
  object-fit: contain;
  object-position: center 15%;
  background: #001b0d;
}

.preview-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(3, 12, 8, 0.7);

  opacity: 0;

  transition: opacity 0.3s ease;
}

.preview-overlay a {
  padding: 0.75rem 1.1rem;

  background: #ffffff;
  border-radius: 8px;

  color: #101828;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;

  transform: translateY(8px);

  transition: transform 0.3s ease;
}

.project-preview:hover img {
  transform: scale(1.035);
}

.project-preview:hover .preview-overlay {
  opacity: 1;
}

.project-preview:hover .preview-overlay a {
  transform: translateY(0);
}


/* Mobile project preview */

@media (max-width: 700px) {

  .project-preview {
    height: 250px;
  }

  /* No hover on most phones, so keep image unobstructed */
  .preview-overlay {
    display: none;
  }

}

/* =========================================================
   PROJECT IN DEVELOPMENT
========================================================= */

.development-status {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.project-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;

  margin-top: auto;
  padding-top: 2rem;

  color: #667085;
  font-size: 0.78rem;
  font-weight: 500;
}

.progress-dot {
  width: 8px;
  height: 8px;

  background: #f59e0b;
  border-radius: 50%;

  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);

  animation: projectPulse 2s infinite;
}

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

  50% {
    opacity: 0.45;
  }
}

/* Active navigation section */

.nav-links a.active-link {
  color: #2563eb;
}

.nav-links a.active-link::after {
  width: 100%;
}

@media (max-width: 700px) {
  .nav-links a.active-link {
    color: #2563eb;
    background: #f5f8ff;
  }
}

/* Nevida Digitals project preview */
.nevida-preview {
  height: 220px;
}

.nevida-preview img {
  object-fit: cover;
  object-position: top;
}