@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root {
  --bg: #1E252B;
  --header-bar: #151B1F;
  --card: #2F3A40;
  --text: #E8F0F2;
  --text-muted: #D5E0E4;
  --accent: #2ED6A1;
  --accent-hover: #1BB484;
  --accent2: #FF6B6B;
  --container-w: 960px;
}

html,
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* PAGE TRANSITION */
body {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded {
  opacity: 1;
}

/* HEADER */
.topbar {
  background: var(--header-bar);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.topbar .inner {
  width: var(--container-w);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.topbar nav {
  display: flex;
  gap: 24px;
}

.topbar a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.topbar a:hover,
.topbar a.active {
  color: var(--accent);
  opacity: 1;
}

.contact-btn {
  cursor: pointer;
  transition: color 0.3s ease;
}

.contact-btn:hover {
  color: var(--accent);
}

/* PAGE CONTAINER */
.page {
  max-width: var(--container-w);
  margin: 60px auto 100px;
  padding: 0 20px;
}

/* HERO HOMEPAGE */
.hero-heading {
  font-weight: 800;
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 60px;
  text-align: center;
}

.hero-heading .hero-sub {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 18px;
}

@keyframes waveAnimation {
  0% {
    color: inherit;
    transform: translateY(0);
  }
  50% {
    color: var(--accent);
    transform: translateY(-4px);
  }
  100% {
    color: inherit;
    transform: translateY(0);
  }
}

.hover-letter {
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
  cursor: default;
  animation: waveAnimation 0.25s ease;
  animation-fill-mode: backwards;
}

.hover-letter:hover {
  color: var(--accent);
  transform: translateY(-4px);
}

.hover-letter:nth-child(1) { animation-delay: 1.00s; }
.hover-letter:nth-child(2) { animation-delay: 1.25s; }
.hover-letter:nth-child(3) { animation-delay: 1.50s; }
.hover-letter:nth-child(4) { animation-delay: 1.75s; }
.hover-letter:nth-child(5) { animation-delay: 2.00s; }
.hover-letter:nth-child(6) { animation-delay: 2.25s; }
.hover-letter:nth-child(7) { animation-delay: 2.50s; }
.hover-letter:nth-child(8) { animation-delay: 2.75s; }
.hover-letter:nth-child(9) { animation-delay: 3.00s; }
.hover-letter:nth-child(10) { animation-delay: 3.25s; }
.hover-letter:nth-child(11) { animation-delay: 3.50s; }
.hover-letter:nth-child(12) { animation-delay: 3.75s; }
.hover-letter:nth-child(13) { animation-delay: 4.00s; }
.hover-letter:nth-child(14) { animation-delay: 4.25s; }

/* INTRO / ABOUT SECTION */
.intro-card {
  width: 100%;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.intro-photo {
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  position: relative;
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(70%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.intro-card:hover .intro-photo img {
  transform: scale(1.03);
}

.intro-text {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-text h2 {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.intro-text p {
  margin: 0 0 16px 0;
  font-size: 15px;
  color: var(--text-muted);
}

.intro-text p:last-child {
  margin-bottom: 0;
}

/* PROJECT GRID */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* PROJECT CARD */
.proj {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: var(--card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.proj:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.proj a {
  display: block;
  position: relative;
}

.proj img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.proj::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.proj:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.proj:hover::after {
  opacity: 1;
}

.meta {
  padding: 20px;
  background: var(--card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: var(--text);
  font-weight: 700;
}

.meta small {
  opacity: 0.7;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}


/* PROJECT PAGE SIBLINGS */
.hero-image {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

.project-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}


.project-description h2 {
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 16px;
  font-weight: 700;
}

.project-description h3 {
  color: var(--text);
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 700;
}

.project-description p {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 16px;
}

.project-description p:last-of-type {
  margin-bottom: 0;
}

.project-contribution {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  height: fit-content;
}

.project-contribution h2 {
  color: var(--text);
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.project-contribution p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.project-contribution ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-contribution li {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
}

.project-contribution li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  font-size: 16px;
}

/* GALLERY */
.project-gallery {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  filter: grayscale(80%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.project-gallery img:hover {
  transform: scale(1.03);
  filter: grayscale(0%);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--accent);
}


/* FOOTER */
.footer {
  margin-top: 100px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--header-bar);
}

.footer .inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
  padding-bottom: 24px;
}

.footer h3 {
  margin: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
}

.bottom-links {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9FB0B7;
}

.bottom-links-left,
.bottom-links-right {
  display: flex;
  gap: 24px;
}

.bottom-links a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.bottom-links a:hover {
  color: var(--accent);
}

/* CONTACT MODAL */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 150;
}

.contact-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.contact-box {
  background: var(--card);
  padding: 48px;
  border-radius: 20px;
  width: 340px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.contact-modal.open .contact-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.contact-box h2 {
  margin-top: 0;
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 800;
}

.contact-box p {
  margin: 16px 0;
}

.contact-box a {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 24px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-box a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}


/* RESPONSIVE */
@media (max-width: 768px) {
  .intro-card {
    grid-template-columns: 1fr;
  }

  .intro-photo {
    min-height: 220px;
  }

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

  .hero-heading {
    font-size: 32px;
  }

  .project-details {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .bottom-links {
    flex-direction: column;
    gap: 16px;
  }

  .hero-image {
    height: 250px;
  }
}