/* ============================================================
   Settings — change these to restyle the whole site
   ============================================================ */
:root {
  /* Colors */
  --color-text: #111111;
  --color-page: #ECF2FF;      /* main background */
  --color-sidebar: #E5EDFB;   /* sidebar background */
  --color-border: #D9DBDF;    /* line between sidebar and main */

  /* Fonts */
  --font-display: "Futura-CondensedExtraBold", "Futura Condensed ExtraBold", "Futura", "Jost", system-ui, sans-serif;
  --font-body: "Futura-Medium", "Futura", "Jost", system-ui, sans-serif;

  /* Sizes */
  --name-size: 120px;
  --email-size: 26px;
  --body-size: 15px;

  /* Layout */
  --sidebar-width: 322px;
  --content-top: 250px;       /* where the sidebar list and bio start */
  --bio-width: 580px;
}

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

html,
body {
  margin: 0;
}

body {
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--body-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

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

a:hover {
  text-decoration: underline;
}

/* ============================================================
   Name + email
   ============================================================ */
.masthead {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.name {
  margin: 0;
  /* Pulls the letters flush into the top-left corner */
  margin-top: 12px;
  margin-left: -7px;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  font-size: var(--name-size);
  line-height: 84px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* "Home" link under the email (Other page) */
.home {
  display: block;
  width: fit-content;
  margin-top: 16px;
  margin-left: 16px;
  font-size: 18px;
  line-height: 24px;
  text-decoration: underline 2px;
  text-underline-position: from-font;
}

.email {
  display: inline-block;
  margin-top: 29px;
  margin-left: 16px;
  font-size: var(--email-size);
  line-height: 32px;
  letter-spacing: -0.005em;
  text-decoration: underline 3px;
  text-underline-position: from-font;
}

/* ============================================================
   Two-column layout
   ============================================================ */
.page {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  padding: var(--content-top) 32px 44px;
}

.sidebar ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar li {
  line-height: 22px;
}

.bio {
  max-width: calc(var(--bio-width) + 55px);
  padding: calc(var(--content-top) + 2px) 0 44px 55px;
}

.bio p {
  margin: 0 0 18px;
  line-height: 24px;
}

/* Current page in the sidebar */
.sidebar a[aria-current="page"] {
  text-decoration: underline;
}

/* Lists on /other and /writing */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  line-height: 24px;
}

.list a {
  text-decoration: underline;
  text-underline-position: from-font;
}

.list span {
  opacity: 0.6;
  margin-left: 8px;
}

.list:not(:has(li))::before {
  content: "Nothing here yet.";
  opacity: 0.6;
  line-height: 24px;
}

/* ============================================================
   Phones & small screens
   ============================================================ */
@media (max-width: 760px) {
  :root {
    --name-size: 72px;
    --email-size: 18px;
  }

  .masthead {
    position: static;
    padding-bottom: 32px;
  }

  .name {
    margin-top: 4px;
    margin-left: -4px;
    line-height: 58px;
    white-space: normal;
  }

  .email {
    margin-top: 16px;
    line-height: 24px;
    text-decoration-thickness: 2px;
  }

  .page {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
  }

  .sidebar {
    border-right: 0;
    border-top: 1px solid var(--color-border);
    padding: 32px 16px;
  }

  .sidebar:empty {
    display: none;
  }

  .bio {
    padding: 0 16px 32px;
  }
}
