:root {
  --bg: #fdfefe;
  --surface: #ffffff;
  --surface-muted: #f2f5f8;
  --text: #17212b;
  --muted: #5b6773;
  --accent: #748cab;
  --accent-strong: #293f5e;
  --line: #e1e6ea;
  --shadow: 0 18px 45px rgba(23, 33, 43, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(232, 238, 245, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.logo {
  font-weight: 800;
  letter-spacing: 0;
}

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

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

.detail-page {
  padding-bottom: 48px;
}

.detail-hero {
  width: min(1120px, calc(100% - 32px));
  margin: 48px auto 24px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.detail-hero p {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--muted);
}

.detail-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.detail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-card h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.detail-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.detail-list li + li {
  margin-top: 8px;
}

.detail-image-card img {
  display: block;
  width: 100%;
  max-height: 420px;
  margin-bottom: 14px;
  border-radius: 12px;
  object-fit: cover;
}

.detail-image-card p {
  margin: 0;
  color: var(--muted);
}

.video-section {
  display: grid;
  gap: 20px;
}

.video-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.video-card h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
}

.poster-frame {
  display: block;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  max-height: 900px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 36px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 72px 0;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero-content h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.hero-text {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 800;
}

.button.primary {
  background: var(--accent);
  color: white;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  color: var(--accent);
}

.button.secondary:hover {
  background: rgba(11, 107, 117, 0.08);
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-panel > div:not(.hero-image-card) {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-image-card {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-width: 340px;
  width: 100%;
  justify-self: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.hero-image-card img {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid white;
  box-shadow: 0 22px 55px rgba(23, 33, 43, 0.22);
}

.metric {
  display: block;
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.section.alt {
  width: 100%;
  padding-right: max(16px, calc((100% - 1120px) / 2));
  padding-left: max(16px, calc((100% - 1120px) / 2));
  background: var(--surface-muted);
}

.section-heading {
  margin-bottom: 32px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.about-carousel {
  margin-top: -8px;
}

.about-carousel-home {
  margin-top: 0;
}

.about-copy {
  color: var(--muted);
  font-size: 1.03rem;
}

.about-copy p {
  margin: 0 0 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-carousel,
.detail-carousel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.carousel-track {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 0;
  background: #fff;
}

.carousel-slide {
  display: none;
  height: min(380px, 50vw);
  max-height: 420px;
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 10px;
}

.carousel-slide.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90%;
  border-radius: 10px;
}

.carousel-slide video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90%;
  border-radius: 10px;
  background: #000;
}

.detail-carousel .carousel-slide video {
  max-height: min(440px, 55vw);
}

.about-carousel img,
.about-carousel video,
.detail-carousel img,
.detail-carousel video {
  border-radius: 10px;
}

.about-carousel-home .carousel-slide {
  height: min(460px, 56vw);
  max-height: 520px;
}

.about-layout-home {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1.08fr);
  gap: 34px;
}

.detail-carousel h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.skill-slide {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: min(440px, 55vw);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbfe 0%, #ecf2f7 100%);
}

.skill-slide h3 {
  margin: 0;
  font-size: 1.15rem;
}

.skill-slide p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.carousel-slide figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.carousel-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 1rem;
}

.carousel-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #c2cbd2;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.project-image {
  display: grid;
  min-height: 190px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(11, 107, 117, 0.14), rgba(218, 96, 64, 0.16)),
    #dfe8ea;
  color: var(--accent-strong);
  font-weight: 800;
}

.project-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.project-image-zoom {
  object-position: center 28%;
  transform: scale(1.08);
}

.card-content {
  padding: 22px;
}

.card-content p {
  margin: 0 0 18px;
  color: var(--muted);
}

.card-content a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 800;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fbfb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fbfb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.ongoing {
  border-color: rgba(40, 167, 69, 0.24);
  background: rgba(40, 167, 69, 0.12);
  color: #2f7d4f;
}

.status-pill.past {
  border-color: rgba(91, 103, 115, 0.24);
  background: rgba(91, 103, 115, 0.1);
  color: #5b6773;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.timeline-date {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.timeline-item p:last-child {
  margin: 0;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.skills-grid div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.contact {
  text-align: center;
}

.contact .section-heading {
  display: grid;
  justify-items: center;
}

.contact > p {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.contact-links a {
  min-width: 110px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 800;
}

.contact-links a:hover {
  background: rgba(11, 107, 117, 0.08);
}

.footer {
  padding: 26px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .carousel-slide img {
    height: min(320px, 70vw);
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 54px 0 72px;
  }

  .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-layout,
  .card-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section,
  .section.alt {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}
