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

:root {
  --bg: #f5f5f7;
  --bg-dark: #0f1115;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --card: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.7);
  --accent: #0a84ff;
  --accent-soft: #dbe7ff;
  --shadow: 0 30px 70px rgba(15, 18, 26, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f5f5f7 0%, #eff2f7 55%, #e8edf5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px clamp(24px, 6vw, 90px) 110px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a {
  transition: color 0.2s ease;
}

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

.cta,
.primary,
.secondary {
  border: none;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cta,
.primary {
  background: #111318;
  color: #ffffff;
  box-shadow: 0 15px 40px rgba(12, 13, 16, 0.3);
}

.secondary {
  background: var(--glass);
  color: var(--text);
}

.cta:hover,
.primary:hover {
  transform: translateY(-2px) scale(1.02);
}

.secondary:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: center;
  animation: fadeUp 0.8s ease both;
}

.timeline {
  margin-top: 40px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.6vw, 3.8rem);
  line-height: 1.05;
  margin: 12px 0 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 24px;
  flex-wrap: wrap;
}

.badge-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.badge-row img {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(10, 20, 40, 0.15));
}

.stats {
  display: flex;
  gap: 32px;
}

.stats h3 {
  font-size: 1.6rem;
  margin: 0 0 4px;
}

.stats p {
  margin: 0;
  color: var(--muted);
}

.hero-photo {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffffff 0%, #eff4ff 55%, #e5ecf7 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.skills-marquee {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  opacity: 0.28;
  z-index: 1;
}

.marquee-row {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.marquee-row span {
  padding: 6px 0;
}

.row-1 {
  animation: marquee 20s linear infinite;
}

.row-2 {
  animation: marquee 24s linear infinite reverse;
}

.row-3 {
  animation: marquee 22s linear infinite;
}

.row-4 {
  animation: marquee 26s linear infinite reverse;
}

.row-5 {
  animation: marquee 19s linear infinite;
}

.row-6 {
  animation: marquee 28s linear infinite reverse;
}

.row-7 {
  animation: marquee 24s linear infinite;
}

.photo-frame {
  position: relative;
  z-index: 2;
  width: min(320px, 70vw);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 18, 24, 0.25);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 32px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 420px;
}

.timeline-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 80px 60px;
  padding: 24px 0 64px;
  max-width: 980px;
  margin: 0 auto;
}

.timeline-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 132, 255, 0.4) 20%, rgba(10, 132, 255, 0.4) 80%, transparent 100%);
  transform: translateX(-50%);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 26px;
}

.timeline-card,
.project-card {
  padding: 28px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

.timeline-card {
  position: relative;
  cursor: default;
  transform: scale(0.9);
  opacity: 0.7;
  min-height: 240px;
}

.timeline-card.is-active {
  transform: scale(1.05);
  opacity: 1;
  box-shadow: 0 32px 80px rgba(10, 20, 40, 0.2);
}

.timeline-card.left {
  grid-column: 1;
  grid-row: var(--row);
  margin-right: 24px;
}

.timeline-card.right {
  grid-column: 2;
  grid-row: var(--row);
  margin-left: 24px;
}

.timeline-grid .timeline-card::before {
  content: "";
  position: absolute;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.18);
}

.timeline-grid .timeline-card.left::before {
  right: -36px;
}

.timeline-grid .timeline-card.right::before {
  left: -36px;
}

.timeline-card h3,
.project-card h3 {
  margin: 0 0 8px;
}

.timeline-card p,
.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-details {
  display: none;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-details li {
  margin-bottom: 8px;
}

.timeline-card.is-expanded .timeline-details {
  display: block;
}

.timeline-card.is-expanded .timeline-summary {
  display: none;
}

.timeline-card {
  cursor: pointer;
}

.timeline-card:hover {
  transform: scale(0.93);
}

.timeline-card.is-active {
  transform: scale(1.04);
}

.timeline-card.is-expanded {
  transform: scale(1.02);
  opacity: 1;
}
  display: block;
}

.timeline-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.projects {
  position: relative;
  margin-bottom: 110px;
}

.project-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(232, 239, 250, 0.9));
}

.project-card:hover {
  transform: scale(1.04);
}

.project-grid:hover .project-card:not(:hover) {
  transform: scale(0.94);
  opacity: 0.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, #0f1115 0%, #151923 50%, #0f1115 100%);
  color: #f6f7fb;
}

.contact a {
  color: #f6f7fb;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.6);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  padding: 36px;
  border-radius: var(--radius-lg);
  width: min(520px, 90vw);
  box-shadow: var(--shadow);
  position: relative;
  animation: fadeUp 0.35s ease;
}

.project-detail {
  display: grid;
  gap: 32px;
}

.project-hero {
  padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, #ffffff 0%, #eef2f8 50%, #e2e8f3 100%);
  box-shadow: var(--shadow);
}

.project-body {
  display: grid;
  gap: 24px;
}

.project-body .timeline-card::before {
  display: none;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(10, 132, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(10, 132, 255, 0.3);
}

.gallery {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.gallery h3 {
  margin: 0;
  font-size: 1.3rem;
}

.gallery-viewport {
  overflow: hidden;
  padding: 12px 0;
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.gallery.marquee .gallery-track {
  animation: gallerySlide 26s linear infinite;
}

.gallery-item {
  width: 220px;
  min-width: 220px;
  display: grid;
  gap: 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(10, 20, 40, 0.18);
  transform: translateY(var(--offset, 0px));
}

.gallery-item img {
  width: 100%;
  height: 160px;
  border-radius: 14px;
  object-fit: contain;
  background: #ffffff;
}

.gallery-item figcaption {
  display: none;
}

.gallery.static .gallery-track {
  flex-wrap: wrap;
  width: 100%;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes gallerySlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-left: 18px;
    max-width: 100%;
  }

  .timeline-grid::before {
    left: 12px;
  }

  .timeline-card.left,
  .timeline-card.right {
    grid-column: 1;
    margin: 0 0 0 24px;
  }

  .timeline-grid .timeline-card.left::before,
  .timeline-grid .timeline-card.right::before {
    left: -33px;
    right: auto;
  }

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

  .gallery-item {
    width: 180px;
    min-width: 180px;
  }

  .gallery-item img {
    height: 140px;
  }

  .contact {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
