/* Table of contents
------------------------------------------------------------

0. Reset
1. Fonts
2. Variables
3. Global
4. Spacing
5. Layout
6. Header
7. Sections

*/

/* 0. Reset
---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:where(body,
  h1, h2, h3, h4, h5, h6,
  p,
  ul, ol,
  dl, dd,
  blockquote,
  figure,
  hr,
  pre) {
  margin: 0;
}

:where(ul, ol)[role='list'] {
  list-style: none;
  padding: 0;
}

iframe,
img,
picture {
  display: block;
  max-inline-size: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 1. Fonts
---------------------------------------------------------- */

@font-face {
  font-display: swap;
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/manrope-v20-latin-300.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/manrope-v20-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/manrope-v20-latin-700.woff2') format('woff2');
}

/* 2. Variables
---------------------------------------------------------- */
:root {
  --accent: #133f86;
  --bg-primary: #f9fbfb;
  --bg-secondary: #f3f4f6;
  --text-primary: #101828;
}

/* 3. Global
---------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.8816rem + 0.5263vw, 1.25rem);
  line-height: 1.6;
  min-block-size: 100svh;
}

a:not([class]) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;

  &:hover {
    text-underline-offset: 3px;
  }
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.5263rem + 2.1053vw, 3rem);
}

h2 {
  font-size: clamp(1.875rem, 1.6974rem + 0.7895vw, 2.25rem);
}

h3 {
  font-size: clamp(1.5rem, 1.3224rem + 0.7895vw, 1.875rem);
}

h4 {
  font-size: clamp(1.25rem, 1.1908rem + 0.2632vw, 1.375rem);
}

/* 4. Spacing
---------------------------------------------------------- */

.block {
  padding-block: clamp(3rem, 0.6316rem + 10.5263vw, 8rem);
}

.flow>*+* {
  margin-block-start: var(--flow-space, 1.5rem);
}

/* 5. Layout
---------------------------------------------------------- */

.container {
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: var(--cols, 1fr);
  gap: 2.25rem;
  align-items: var(--col-align, start);

  @media(width > 767px) {

    &[data-cols="2"] {
      --cols: 1fr 2fr;
    }
  }
}

/* 6. Header
---------------------------------------------------------- */

.page-header {
  padding-block: 1.25rem;

  & .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;

    @media (width < 767px) {
      flex-direction: column;
    }
  }
}

.logo img {
  height: 32px;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;

  & a {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;

    &:hover {
      color: var(--accent);
    }
  }
}

/* 7. Sections
---------------------------------------------------------- */

.hero {

  & hgroup {
    max-inline-size: 48rem;
    margin-inline: auto;
    text-align: center;
  }

  & h1 {
    font-size: clamp(2.25rem, 1.4211rem + 3.6842vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
  }

  & p {
    font-size: clamp(1.125rem, 0.8289rem + 1.3158vw, 1.75rem);
    line-height: 1.5;
  }
}

.work {
  background-color: var(--bg-secondary);
}

.projects {
  --flow-space: 3rem;

  & a {
    color: var(--text-primary);
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;

    &:hover {
      transform: scale(1.02);
    }
  }

  & img {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 1rem;
    margin-block-end: 1rem;
  }

  & h3 {
    margin-block-end: 0.5rem;
  }
}