/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  html {
    font-size: 1.2em;
  }
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
@font-face {
  font-display: block;
  font-family: BlendaScript;
  font-style: normal;
  font-weight: bold;
  src: url('fonts/Blenda Script.otf') format('opentype');
}

:root {
  --animation-time: 200ms;
  --color-a: rgb(240 96 96);
  --color-b: rgb(242 235 191);
  --color-c: rgb(243 181 98);
  --column-count: 1;
  --content-background: rgb(60 53 13);
  --highlight-color: rgb(140 190 178);
  --light-shadow-color: rgba(92 75 81 / 0.4);
  --logo-height: 130px;
  --shadow-color: rgb(92 75 81);
  --tab-backdrop: rgba(242 235 191 / 0.8);
  --text-color: rgb(92 75 81);
}

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

body {
  background-color: var(--color-b);
  display: flex;
  font-family: Futura, 'Trebuchet MS', Arial, sans-serif;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures contextual;
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  padding: 10px;
  width: 100vw;
}

.wrapper {
  background-color: var(--content-background);
  background-image: linear-gradient(to bottom, var(--color-a), var(--color-a) 33%, var(--color-b) 33%, var(--color-b) 64%, var(--color-c) 64%);
  background-size: 100% var(--logo-height);
  background-repeat: no-repeat;
  border: 5px solid var(--color-a);
  border-top-left-radius: 50px;
  color: var(--text-color);
  flex-grow: 1;
  overflow: hidden;
  padding-bottom: 3rem;
  position: relative;
}

.header {
  text-align: center;
}

.logo {
  height: var(--logo-height);
  padding: calc(var(--logo-height) / 10);
  width: auto;
}

.content {
  display: grid;
  grid-template-columns: repeat(var(--column-count), 1fr);
  gap: 1rem;
  grid-auto-rows: minmax(100px, auto);
  padding: 1rem;
}

.project {
  border: 5px solid var(--color-b);
  border-top-left-radius: 50px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project h1 {
  background-color: var(--color-a);
  color: var(--highlight-color);
  font-family: BlendaScript, 'Brush Script MT', cursive;
  font-size: 2.5rem;
  font-variant-numeric: lining-nums;
  line-height: 1.2;
  margin: 0;
  padding: 0.5rem 1rem;
  text-align: right;
  text-shadow: -5px 0 var(--shadow-color), 2px 0 var(--shadow-color), 0 2px var(--shadow-color), 0 -2px var(--shadow-color);
  text-wrap: balance;
}

@supports (-webkit-text-stroke: 1.25px var(--shadow-color)) {
  .project h1 {
    text-shadow: -5px 0 var(--shadow-color), -5px 0.6px var(--shadow-color), -5px -0.6px var(--shadow-color);
    text-stroke: 1.25px var(--shadow-color);
    -webkit-text-stroke: 1.25px var(--shadow-color);
  }
}

.project h2 {
  background-color: transparent;
  color: var(--color-b);
  font-variant-numeric: lining-nums;
  line-height: 1.2;
  margin: 0;
  padding: 0.5rem 1rem;
  text-align: right;
  text-wrap: balance;
}

.project .description {
  background-color: var(--color-c);
  flex-grow: 1;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
}

.project .links {
  height: 3rem;
  text-align: right;
}

.project .links a {
  color: var(--color-b);
  display: inline-block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background-color var(--animation-time) ease-in-out, color var(--animation-time) ease-in-out;
}

.project .links a path {
  fill: var(--color-b);
  transition: fill var(--animation-time) ease-in-out;
}

.project .links a:hover {
  background-color: var(--color-b);
  color: var(--color-a);
}

.project .links a:hover path {
  fill: var(--color-a);
}

.link-logo svg {
  height: 2rem;
  width: auto;
}

.about {
  max-width: 450px;
  position: absolute;
  right: 0;
  text-align: right;
  top: 100%;
  transition: top var(--animation-time) ease-in-out;
  width: calc(100% - 0.5rem);
}

.about h3 {
  background-color: var(--color-b);
  border-left: 5px solid var(--color-a);
  border-top: 5px solid var(--color-a);
  border-top-left-radius: 50px;
  color: var(--highlight-color);
  cursor: pointer;
  display: inline-block;
  font-family: BlendaScript, 'Brush Script MT', cursive;
  font-size: 1.5rem;
  letter-spacing: 2px;
  margin: 0 0 5px;
  padding: 0.35rem 1rem 0.35rem 2rem;
  text-shadow: -3px 0 var(--shadow-color), 1px 0 var(--shadow-color), 0 1px var(--shadow-color), 0 -1px var(--shadow-color);
  transition: background-color var(--animation-time) ease-in-out;
}

.about h3:hover,
.about.visible h3 {
  background-color: var(--color-a);
}

.about .about-content {
  backdrop-filter: blur(5px);
  background-color: var(--tab-backdrop);
  border-left: 5px solid var(--color-a);
  border-top-left-radius: 50px;
  border-top: 5px solid var(--color-a);
  margin-top: -5px;
  padding: 0.5rem 1rem;
}

.about p + .about p {
  margin: 0.5rem 0;
}

@media (min-width: 800px) {
  :root {
    --column-count: 2;
  }
}
@media (min-width: 1500px) {
  :root {
    --column-count: 3;
  }
}
@media (min-width: 2200px) {
  :root {
    --column-count: 4;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

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

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
