:root {
  --color-text: #16161d;
  --color-bg: #ffffff;
  --color-muted: #16161d;
  --sidebar-width: 22%;
  --info-width: 26%;
  --gap: 2.5rem;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  opacity: 0.6;
}

p {
  margin: 0 0 1.5rem 0;
}

/* Layout */

.page {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--gap);
  max-width: 1800px;
  margin: 0 auto;
  padding: 2.5rem;
}

.sidebar {
  position: sticky;
  top: 2.5rem;
  align-self: start;
  height: fit-content;
}

.name a {
  text-decoration: none;
}

.role,
.contact {
  color: var(--color-muted);
}

/* Projects */

.projects {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.project {
  display: grid;
  grid-template-columns: var(--info-width) 1fr;
  gap: var(--gap);
}

.project-title a {
  text-decoration: none;
}

.project-title a.underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-title a:hover {
  opacity: 0.6;
}

.project-desc,
.project-awards {
  color: var(--color-muted);
}

.project-meta {
  margin-bottom: 1rem;
}

.project-gallery {
  position: relative;
  overflow: hidden;
  margin-left: 50px;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-track .project-image {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  min-width: 0;
  min-height: 0;
}

.project-gallery.wide .carousel-track .project-image {
  aspect-ratio: 1.6;
  object-fit: cover;
}

.project-image {
  width: 100%;
  height: 100%;
  display: block;
  min-height: 220px;
  background-color: #f0f0ee;
  border-radius: 2px;
  object-fit: cover;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.carousel-arrow svg {
  width: 14px;
  height: 14px;
  display: block;
}

.carousel-arrow:hover {
  background: #ffffff;
}

.carousel-prev {
  left: 16px;
}

.carousel-next {
  right: 16px;
}

/* Responsive */

@media (max-width: 900px) {
  :root {
    --gap: 1.5rem;
  }

  .page {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .sidebar {
    position: static;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
  }

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

  .project-gallery {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
  }
}
