/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #FAFAFA;
  color: #2D2D2D;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =============================================
   UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1A1A1A;
  margin-bottom: 3rem;
  text-align: center;
}

.section__title--light {
  color: #FAFAFA;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.navbar--scrolled {
  background-color: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  padding: 0.6rem 0;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.02em;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #555;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #1A1A1A;
  transition: width 0.3s ease;
}

.navbar__link:hover,
.navbar__link--active {
  color: #1A1A1A;
}

.navbar__link:hover::after,
.navbar__link--active::after {
  width: 100%;
}

/* Hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 1001;
}

.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #1A1A1A;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  background-color: #FAFAFA;
}

.hero__greeting {
  font-size: 1rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero__role {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: #666;
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border: 2px solid #1A1A1A;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hero__cta:hover {
  background-color: #1A1A1A;
  color: #FAFAFA;
}

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid #AAA;
  border-bottom: 2px solid #AAA;
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
  50%      { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  background-color: #fff;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

.about__photo-wrapper {
  position: relative;
}

.about__photo {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background-color: #E8E8E8;
  margin: 0 auto;
}

.about__text p {
  margin-bottom: 1rem;
  color: #444;
  font-size: 0.95rem;
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background-color: #F3F4F6;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #555;
  border: 1px solid #E5E7EB;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.skill-pill:hover {
  background-color: #1A1A1A;
  color: #FAFAFA;
  border-color: #1A1A1A;
}

/* =============================================
   BACKGROUND / TIMELINE
   ============================================= */
.background {
  background-color: #FAFAFA;
}

.timeline {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.6rem;
  width: 2px;
  background-color: #E0E0E0;
}

.timeline__block {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline__block:last-child {
  margin-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: calc(-1.9rem - 6px);
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #FAFAFA;
  z-index: 1;
}

.timeline__marker--work {
  background-color: #1A1A1A;
  box-shadow: 0 0 0 3px #1A1A1A;
}

.timeline__marker--edu {
  background-color: #6B7280;
  box-shadow: 0 0 0 3px #6B7280;
}

.timeline__content {
  background-color: #fff;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #F0F0F0;
  transition: box-shadow 0.3s ease;
}

.timeline__content:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.timeline__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.timeline__badge--work {
  background-color: #1A1A1A;
  color: #FAFAFA;
}

.timeline__badge--edu {
  background-color: #E5E7EB;
  color: #555;
}

.timeline__date {
  display: block;
  font-size: 0.8rem;
  color: #999;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 0.2rem;
}

.timeline__subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: #777;
  margin-bottom: 0.75rem;
}

.timeline__content p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.timeline__highlight {
  font-weight: 600;
  color: #333 !important;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.timeline__tags span {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: #F3F4F6;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #666;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects {
  background-color: #fff;
}

.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* --- Project Card (compact preview) --- */
.project-card {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto;
  align-items: center;
  background-color: #FAFAFA;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ECECEC;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.project-card__media {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background-color: #E8E8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card__image,
.project-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  padding: 2rem;
}

.project-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-card__description {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.project-card__tags span {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background-color: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #555;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card__tags span:hover {
  background-color: #1A1A1A;
  color: #FAFAFA;
  border-color: #1A1A1A;
}

/* --- "Read more" toggle button --- */
.project-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1A1A1A;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
}

.project-card__toggle svg {
  transition: transform 0.4s ease;
}

.project-card__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.project-card__toggle:hover {
  color: #555;
}

/* --- Expandable detail section --- */
.project-detail {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-detail--open {
  /* max-height set by JS to match scrollHeight */
}

.project-detail__inner {
  padding: 0 2.5rem 2.5rem;
  border-top: 1px solid #E5E7EB;
}

.project-detail__section {
  margin-top: 1.75rem;
}

.project-detail__section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.project-detail__section p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

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

.project-detail__section li {
  position: relative;
  font-size: 0.88rem;
  color: #555;
  line-height: 1.75;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-detail__section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background-color: #1A1A1A;
  border-radius: 50%;
}

.project-detail__section li strong {
  color: #1A1A1A;
}

/* --- Gallery inside detail --- */
.project-detail__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.75rem;
}

.project-detail__gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background-color: #E8E8E8;
}

.project-detail__gallery img.project-detail__gallery-full {
  aspect-ratio: auto;
  object-fit: contain;
  padding: 1.5rem 0;
  background-color: #FAFAFA;
}

/* =============================================
   COURSEWORK
   ============================================= */
.coursework {
  background-color: #FAFAFA;
}

/* Text-only card variant (no media panel) */
.project-card--text-only {
  grid-template-columns: 1fr;
}

.project-card__subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  margin-bottom: 1rem;
}

.project-card__inline-link {
  color: #1A1A1A;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

.project-card__inline-link:hover {
  color: #555;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background-color: #1A1A1A;
  color: #D1D5DB;
  padding: 5rem 0 2rem;
}

.footer__content {
  text-align: center;
  margin-bottom: 3rem;
}

.footer__text {
  font-size: 1rem;
  color: #9CA3AF;
  margin-bottom: 2rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #D1D5DB;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: #FAFAFA;
}

.footer__link svg {
  flex-shrink: 0;
}

.footer__bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: #666;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }

  .section__title {
    font-size: 1.65rem;
    margin-bottom: 2rem;
  }

  /* Navbar mobile */
  .navbar__toggle {
    display: flex;
  }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: right 0.4s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.08);
  }

  .navbar__menu--open {
    right: 0;
  }

  .navbar__link {
    font-size: 1.1rem;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__photo {
    max-width: 240px;
    margin-bottom: 1rem;
  }

  .about__skills {
    justify-content: center;
  }

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

  .project-card__media {
    min-height: 200px;
  }

  .project-card__body {
    padding: 1.5rem;
  }

  .project-detail__inner {
    padding: 0 1.5rem 1.5rem;
  }

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

  /* Footer */
  .footer__links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* Mobile small */
@media (max-width: 480px) {
  .hero__name {
    font-size: 2.2rem;
  }

  .hero__role {
    font-size: 0.95rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline__marker {
    left: calc(-1.4rem - 6px);
  }

  .timeline__content {
    padding: 1.25rem;
  }

  .project-detail__inner {
    padding: 0 1rem 1rem;
  }
}
