/* =========================
   VARIABLES (DESIGN SYSTEM)
========================= */
:root {
  /* grid spacing */
  --grid-gap-desktop: 24px;
  --grid-gap-tablet: 20px;
  --grid-gap-mobile: 16px;

  /* layout */
  --header-padding: 20px;
  --header-height: 56px;

  /* colors */
  --color-text: #111;
  --color-background: #fff;
  --color-link-hover: #111;

  /* z-index */
  --z-header: 1000;
  --z-project-info: 900;

  /* responsive gap */
  --current-gap: var(--grid-gap-desktop);
}

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

html,
body {
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  background: var(--color-background);
  color: var(--color-text);
}

/* =========================
   LINKS
========================= */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--color-link-hover);
  opacity: 0.7;
}

/* =========================
   GLOBAL LAYOUT
========================= */
.header,
.page {
  padding-left: var(--current-gap);
  padding-right: var(--current-gap);
}

.page {
  padding-top: var(--header-height);
  padding-bottom: var(--current-gap);
}

/* =========================
   HEADER
========================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  background: var(--color-background);

  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--header-padding);
  padding-bottom: var(--header-padding);
}

.logo-link {
  color: inherit;
  text-decoration: none;
}

.logo {
  font-size: 14px;
  font-weight: 500;
}

/* =========================
   NAV
========================= */
.nav a {
  font-size: 14px;
  position: relative;
  padding-bottom: 2px;
}

.nav a + a {
  margin-left: 16px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-text);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* =========================
   GRID — DESKTOP
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--grid-gap-desktop);
  row-gap: var(--grid-gap-desktop);
}

.item {
  display: flex;
  flex-direction: column;
}

.item-link {
  display: block;
}

.item img {
  width: 100%;
  display: block;
}

/* =========================
   ABOUT
========================= */
.about-text,
.about-section p {
  font-size: 14px;
  line-height: 1.5;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-container {
  display: flex;
  gap: var(--grid-gap-desktop);
  margin-top: var(--grid-gap-desktop);
}

.about-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap-desktop);
}

.about-media {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap-desktop);
}

@media (min-width: 1025px) {
  .about-info {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: var(--grid-gap-desktop);
    width: 30%;
    z-index: var(--z-project-info);
  }

  .about-media {
    margin-left: calc(30% + var(--grid-gap-desktop));
  }
}

/* =========================
   PROJECT DETAIL
========================= */
.project-container {
  display: flex;
  gap: var(--grid-gap-desktop);
  margin-top: var(--grid-gap-desktop);
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap-desktop);
}

.project-name {
  font-size: 24px;
  font-weight: 400;
}

.project-description,
.project-meta p,
.project-credits p {
  font-size: 14px;
  line-height: 1.5;
}

.project-meta,
.project-credits {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-media {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap-desktop);
}

@media (min-width: 1025px) {
  .project-info {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: var(--grid-gap-desktop);
    width: 25%;
    z-index: var(--z-project-info);
  }

  .project-media {
    margin-left: calc(30% + var(--grid-gap-desktop));
  }
}

/* =========================
   MEDIA
========================= */
.media-item {
  width: 100%;
}

.media-item img {
  width: 100%;
  display: block;
}

.media-item.video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.media-item.three-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap-desktop);
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
  :root {
    --current-gap: var(--grid-gap-tablet);
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--current-gap);
    row-gap: var(--current-gap);
  }

  .about-container,
  .project-container {
    flex-direction: column;
  }

  .about-info,
  .project-info {
    position: static;
    width: auto;
  }

  .about-media,
  .project-media {
    margin-left: 0;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 640px) {
  :root {
    --current-gap: var(--grid-gap-mobile);
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-item.three-images {
    grid-template-columns: 1fr;
  }
}

























