/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --color-text: #1a1a1a;
  --color-heading: #6b6b6b;
  --color-accent: #5e6c85;
  --color-accent-dark: #393e5b;
  --color-divider: #a7a9ac;
  --color-band: #f1f2f2;
  --color-bg: #ffffff;
  --page-pad-x: 40px;
  --page-pad-y: 28px;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* ---------- Layout shell: fit one screen ---------- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--page-pad-y) var(--page-pad-x);
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 4fr 4fr 2fr; /* 2-4-4-2 grid */
  gap: 40px;
}

/* ---------- Identity column (2) ---------- */
/* bleeds to the page edges and stretches full height (grid default),
   the column gap keeps it clear of the text columns */
.identity {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  background: var(--color-band);
  margin: calc(-1 * var(--page-pad-y)) 0 0 calc(-1 * var(--page-pad-x));
  padding: var(--page-pad-y) 24px var(--page-pad-y) var(--page-pad-x);
}
.identity__logo {
  width: 100%;
  max-width: 150px;
  margin-bottom: 20px;
}
.contact__email {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-accent);
  word-break: break-word;
}
.contact__social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}
.contact__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--color-accent);
}
.contact__social a:hover {
  color: var(--color-accent-dark);
}
.contact__social svg {
  width: 18px;
  height: 18px;
}

/* ---------- Main column (4 + 4) ---------- */
.main {
  grid-column: 2 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.headline {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
}
.headline__role {
  font-weight: 300;
}

.bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.bio p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.bio h2 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}
.bio a {
  font-weight: 400;
}

.divider {
  border: none;
  border-top: 2px solid var(--color-divider);
  margin: auto 0 12px;
}
.home-link {
  display: block;
  width: 70px;
  margin-left: auto;
}

/* ---------- Photo column (2) ---------- */
/* each shot is framed to 16:9 instead of stretching to fill the
   column's full height, and the stack is centered in the space */
.gallery {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}
.gallery picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Responsive: tablet ----------
   The 4-column grid needs real width to stay readable, and the
   one-screen-fit rule only makes sense once there's enough horizontal
   room for two text columns; below 1100px both are dropped in favor
   of a reflow (identity + photo strip on top, bio below, scrollable). */
@media (max-width: 1100px) {
  html,
  body {
    height: auto;
  }
  .page {
    min-height: auto;
    padding: 32px 32px 40px;
  }
  .layout {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
  }
  .identity {
    order: 1;
    flex: 1 1 260px;
    margin: 0;
    padding: 24px;
  }
  .main {
    order: 3;
    flex: 1 1 100%;
  }
  .gallery {
    order: 2;
    flex: 1 1 260px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ---------- Responsive: phone (single column) ---------- */
@media (max-width: 700px) {
  .page {
    padding: 28px 20px 40px;
  }
  .layout {
    display: block;
  }
  .identity {
    max-width: 200px;
    background: none;
    margin: 0 auto 24px;
    padding: 0;
  }
  .headline {
    text-align: center;
    margin-top: 8px;
  }
  .bio {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .bio p,
  .bio h2 {
    font-size: 16px;
  }
  .home-link {
    margin: 0 auto;
  }
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 32px;
  }
}
