/* =========================================================
   deryasatir.com

   This file controls how the page LOOKS.
   The words themselves live in index.html.

   The colours are all defined once, at the top, in the block
   below. Change a value there and it updates everywhere on
   the page at once. This is the part worth knowing.
   ========================================================= */

:root {

  --background:  #171021;   /* deep purple, almost black */
  --text:        #E9E4EF;   /* off-white, easier on the eye than pure white */
  --text-quiet:  #A79FB4;   /* the descriptor line and softer text */
  --name:        #E3D8F3;   /* very light purple, for the name only */
  --link:        #C3A8E4;   /* lavender (currently unused) */
  --link-line:   rgba(167, 159, 180, 0.45);  /* faint underline under bio links */
  --contact:     #8468A8;   /* deep lavender, used for contact links */
  --hairline:    #2E2338;   /* the faint dividing line above contact */

}


/* ---------- Foundations ---------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 2.5rem 1.5rem 4rem;

  background: var(--background);
  color: var(--text);

  /* Aptos if the visitor has it installed, otherwise Inter, which is
     very close to it. The rest are last-resort fallbacks. */
  font-family: Aptos, Inter, -apple-system, "Segoe UI",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 46rem;
  margin: 0 auto;
}


/* ---------- Name and descriptor ---------- */

.intro {
  margin-bottom: 1.4rem;
}

h1 {
  margin: 0;

  color: var(--name);                    /* very light purple */
  font-size: clamp(1.9rem, 8vw, 3rem);   /* grows with the screen width */
  font-weight: 500;
  letter-spacing: 0.05em;                /* capitals need room to breathe */
  line-height: 1.1;
}

.descriptor {
  margin: 0.6rem 0 0;

  color: var(--text-quiet);
  font-size: 1rem;
  letter-spacing: 0.01em;
}


/* ---------- Photo ---------- */

.portrait {
  margin: 0 0 2.75rem;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;          /* keeps the photo from being squashed */
}


/* ---------- Bio ---------- */

.bio {
  /* No width limit, so the text runs to exactly the same
     edges as the photo above it and narrows with it. */
  color: var(--text-quiet);   /* same grey-lilac as the descriptor line */
}

.bio p {
  margin: 0 0 1.15rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio em {
  font-style: italic;
}

/* Links inside the bio (festivals, films): same colour as the bio
   text, with a faint line underneath so readers can tell they're
   clickable. The line gets brighter when you point at it. */
.bio a {
  color: inherit;
  border-bottom-color: var(--link-line);
}

.bio a:hover,
.bio a:focus-visible {
  border-bottom-color: var(--text-quiet);
}

.bio a:focus-visible {
  outline-color: var(--text-quiet);
}


/* ---------- Contact ---------- */

.contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  text-align: center;    /* puts the contact links in the middle */
}

.contact ul {
  margin: 0;
  padding: 0;
  list-style: none;      /* removes the bullet points */
}

.contact li {
  margin-bottom: 0.5rem;
}

.contact li:last-child {
  margin-bottom: 0;
}

.contact .email {
  font-weight: 600;      /* only the email address is bold */
}

a {
  color: var(--contact);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

a:hover,
a:focus-visible {
  border-bottom-color: var(--contact);
}

a:focus-visible {
  outline: 2px solid var(--contact);
  outline-offset: 4px;
  border-radius: 1px;
}


/* ---------- Wider screens ---------- */
/* Everything above is written for a phone first.
   The rules below only apply once the screen is wide enough. */

@media (min-width: 40em) {

  body {
    padding: 5rem 2.5rem 6rem;
  }

  .intro {
    margin-bottom: 1.8rem;
  }

  .portrait {
    margin-bottom: 3.5rem;
  }

  .contact {
    margin-top: 4rem;
  }

}
