/* ----------------------------------------------------------------------------
  Additional CSS (supplements reset.css)
---------------------------------------------------------------------------- */

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Design-specific overrides */
li {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* ----------------------------------------------------------------------------
   Variables 
*---------------------------------------------------------------------------- */

:root {
  --width-max: 55rem;
  --width-min: 45rem;
  --padding-wide: 3rem;
  --padding-reg: 1.5rem;
  --padding-slim: 0.8rem;
  --gaps-wide: 2rem;
  --gaps-reg: 1.8rem;
  --gaps-slim: 0.5rem;

  --columns-max: 8;
  --columns-reg: 5;
  --columns-min: 1;

  --color-black: #000;
  --color-dark: #303030;
  --color-grey: #606060;
  --color-light: #909090;
  --color-white: #fff;
  --color-off-white: #f0f0f0;
  --color-primary: #00a171;
  --color-secondary: #c6dcdc;

  --color-background: var(--color-off-white);
  --color-text: var(--color-dark);
  --color-text-link: var(--color-grey);

  --ff-merriweather: "Merriweather", serif;

  --fw-reg: 385;
  --fw-b: 480;
  --fw-m: 560;
  --fw-l: 720;
  --fs-reg: 1rem;
  --fs-l: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-s: 0.65rem;
  --fs-xs: 0.5rem;

  --lh-s: 1rem;
  --lh-reg: 1.45rem;
  --lh-l: 1.75rem;
}

html {
  font-family: var(--ff-merriweather);
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 26px;
  font-weight: var(--fw-reg);
  line-height: var(--lh-reg);
  color: var(--color-text);
  background: var(--color-background);
  text-wrap: pretty;
}

body {
  max-width: var(--width-max);
  padding: var(--padding-reg);
  margin-inline: auto;
  font-size: 26px;
  font-weight: var(--fw-reg);
  line-height: var(--lh-reg);
}

p {
  margin-bottom: 0.8rem;
}

a {
  color: var(--color-primary);
  font-weight: var(--fw-b);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: var(--fw-l);
}

strong a {
  font-weight: var(--fw-l);
}

b {
  font-weight: var(--fw-b);
}

em {
  font-style: normal;
  font-weight: var(--fw-b);
}

section {
  margin-block: var(--padding-slim);
}

section:first-child {
  margin-top: 0;
}

section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

nav {
  margin: 0 0 var(--padding-reg) 0;
}

h2 {
  font-size: var(--fs-l);
  font-weight: var(--fw-m);
  color: var(--color-grey);
  border-bottom: 1px solid var(--color-grey);
}

/* ----------------------------------------------------------------------------
   Two-column layout system (intro and projects)
*---------------------------------------------------------------------------- */

#intro,
#projects li {
  display: flex;
  gap: var(--padding-reg);
}

/* Left column (photo/logos) */
#introPhoto,
#projects li .logos {
  flex-basis: 4rem;
  flex-grow: 1;
}

/* Right column (text/details) */
#introText,
#projects li .details {
  flex-basis: 16rem;
  flex-grow: 3;
}

/* ----------------------------------------------------------------------------
   Intro specific styles
*---------------------------------------------------------------------------- */

#introText h1,
#introText h2 {
  font-size: var(--fs-reg);
  font-weight: var(--fw-reg);
  font-style: normal;
  color: var(--color-dark);
  border-bottom: 0;
  margin: var(--gaps-slim) 0 var(--gaps-slim) 0;
  transform: translateX(-0.2rem);
}

#introText h1 > span,
#introText h2 > span {
  padding-inline: 0.2rem;
  background-color: var(--color-secondary);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

#intro figcaption {
  font-size: var(--fs-s);
  color: var(--color-light);
  line-height: var(--lh-s);
  margin-block: 0.3rem;
}

#introText .tagline {
  margin-bottom: 1rem;
}

#introText p:last-of-type {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
     Projects 
*---------------------------------------------------------------------------- */

#projects ul,
#links ul {
  margin: 0;
  padding: 0;
}

#projects #headingWrapper {
  display: flex;
  gap: var(--padding-reg);
}

#projects #headingWrapper div {
  flex-basis: 4rem;
  flex-grow: 1;
}

#projects #headingWrapper h2 {
  flex-basis: 16rem;
  flex-grow: 3;
}

#projects li .logos {
  padding-block: calc(var(--padding-reg) / 2);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#projects li .logos figure {
  flex-grow: 0;
}

#projects li .logos figure img {
  max-height: 1.6rem;
  margin: 0.2rem 0 0 auto;
  filter: brightness(100%) saturate(0%) opacity(0.3);
  transition: filter 0.3s;
}

#projects li:hover .logos figure img {
  filter: none;
}

#projects li .details {
  padding-block: calc(var(--padding-reg) / 2);
  border-bottom: 1px dashed var(--color-light);
}

#projects li:last-child .details {
  border: 0;
}

#projects li .details p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------------------
    Footer 
*---------------------------------------------------------------------------- */

#goodbye .highlightedText {
  transform: translateX(-0.2rem);
}

#goodbye .highlightedText > span {
  padding-inline: 0.2rem;
  background-color: var(--color-secondary);
}

/* ----------------------------------------------------------------------------
   Responsive layout 
   makes a one column layout instead of a two-column layout
   --width-max: 60rem;
   --width-min: 35rem;
---------------------------------------------------------------------------- */

@media screen and (min-width: 60rem) {
  body {
    max-width: var(--width-max);
    padding: var(--padding-wide);
  }
  #intro,
  #projects #headingWrapper,
  #projects li {
    gap: var(--gaps-wide);
  }
}

@media screen and (max-width: 35rem) {
  html {
    font-size: 22px;
  }

  body {
    padding-inline: var(--padding-slim);
    padding-block: var(--padding-reg);
    font-size: 22px;
  }

  #intro,
  #projects #headingWrapper,
  #projects li {
    gap: calc(var(--gaps-slim) / 2);
    flex-direction: column;
  }

  #intro #introPhoto {
    margin-bottom: calc(var(--gaps-slim) / 2);
  }

  #introText h1,
  #introText h2 {
    margin: var(--gaps-slim) 0;
  }

  #introText h2 {
    width: 90%;
  }

  #projects li:first-child {
    border-top: 1px dashed var(--color-light);
  }

  #projects #headingWrapper h2,
  #projects #headingWrapper div,
  #projects li .logos,
  #projects li .details {
    flex-basis: 0;
    flex-grow: 0;
  }

  #projects li .logos {
    padding: 0.8rem 0 0.25rem 0;
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
  }

  #projects li .logos figure img {
    margin: 0;
    /* filter: none; */
  }

  #projects li .details {
    padding-top: 0;
    /* padding-bottom: var(--gaps-slim); */
  }

  #introPhoto img {
    max-height: 4.5rem;
    border-radius: 0.45rem;
  }

  #introPhoto figcaption {
    display: none;
  }
}
