/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.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: #111;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * 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-family: 'Wonderful Branding';
  font-style: normal;
  font-weight: 400;
  src:
    url('./../fonts/Wonderful-Branding.woff') format('woff'),
    url('./../fonts/Wonderful-Branding.ttf') format('truetype');
}

body {
  background: #fff0ed;
  color: #444;
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
}

body, html {
  box-sizing: border-box;
  height: 100%;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: #444;
}

a:hover {
  color: #666;
  text-decoration: none;
}

a:focus {
  outline: 5px auto #333;
}

nav ul,
nav ul li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-nav img {
  display: inline-block;
  height: 24px;
}

/* Home Page Styles */

#page-home {
  background: white;
  height: 100%;
}

#welcome-photo {
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  position: absolute;
  right: 0;
  top: 0;
  width: 35vw;
}

#welcome {
  background: #fff0ed;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 30px;
  position: relative;
  text-align: right;
  width: 65vw;
}

#welcome .name {
  box-sizing: border-box;
  font-family: 'Wonderful Branding', serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  margin: 0 -10px 0 0;
  padding-left: 8px;
}

#welcome .summary {
  display: none;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  margin: 8px 0 0 0;
  text-align: right;
}

#welcome .summary-container {
  display: inline-block;
  max-width: 260px;
}

#welcome .site-nav {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  margin-top: 32px;
}

#welcome .personal-nav {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  margin-top: 32px;
  text-transform: uppercase;
}

#welcome .personal-nav ul li {
  display: inline-block;
}

#welcome .social-nav {
  line-height: 1;
  margin-top: 32px;
}

#welcome .social-nav ul li {
  display: inline-block;
  margin-left: 8px;
}

/* Content Page Styles */

.content-layout {
  text-align: center;
}

.content-layout .container {
  margin: 0 auto;
  max-width: 960px;
  text-align: left;
  width: 88%;
}

.site-header {
  margin: 0 0 32px;
  position: relative;
}

.site-header .container {
  border-bottom: 1px solid #ccc;
  display: flex;
  padding: 32px 0 0;
}

.site-header .site-logo {
  font-family: 'Wonderful Branding', serif;
  font-size: 16px;
  line-height: 2;
  margin: 0;
  position: relative;
  z-index: 1100;
}

.site-header .site-logo a {
  text-decoration: none;
}

#mobile-nav-trigger {
  background: url(/img/hamburger-menu.svg) 0 0 no-repeat;
  background-size: 100% 100%;
  display: block;
  height: 24px;
  margin-left: auto;
  margin-top: -1px;
  opacity: 0.68;
  position: relative;
  width: 24px;
  z-index: 1100;
}

.content-layout .site-nav {
  display: none;
  background: white;
  box-sizing: border-box;
  font-size: 28px;
  height: 100%;
  left: 0;
  margin-left: auto;
  padding: 88px 0 0;
  position: fixed;
  text-transform: uppercase;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.content-layout .site-nav a {
  text-decoration: none;
}

.content-layout .site-nav a.active,
.content-layout .site-nav a:hover {
  color: #b28982;
}

/* Dupes the container size constraints */
.content-layout .site-nav li {
  margin: 0 auto 4px;
  max-width: 960px;
  text-align: left;
  width: 88%;
}

.site-header.open .site-nav {
  display: block;
}

.site-header.open #mobile-nav-trigger {
  background-image: url(/img/x.svg);
}

.section-header {
  font-family: 'Playfair Display', sans-serif;
  padding: 48px 0 40px;
  text-align: center;
}

.section-header .section-name {
  font-family: 'Wonderful Branding', serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  margin: 0;
  position: relative;
}

.section-header .section-filter {
  margin: 8px auto 0;
  position: relative;
  text-shadow: 3px 3px 4px #fff0ed;
  width: 80%;
}

.section-header .section-filter .count {
  font-size: 12px;
}

.section-header .section-filter li {
  display: inline-block;
  margin: 8px;
  text-transform: uppercase;
}

.section-header .section-filter li a {
  color: #111;
  text-decoration: none;
}

.section-header .section-filter li a.active {
  color: #b28982;
}

.section-header .section-filter li a:hover {
  text-decoration: underline;
}

.portfolio-section .subcategory {
  margin-bottom: 48px;
}

.portfolio-section .subcategory-title {
  color: #b28982;
  font-family: 'Playfair Display', sans-serif;
  font-weight: normal;
  text-transform: uppercase;
}

.content-grid .card {
  display: block;
  margin: 0 0 32px;
  min-width: 0;
  text-decoration: none;
}

.content-grid .thumb {
  display: block;
  height: auto;
  margin: 0;
  width: 100%;
}

.content-grid .thumb-container {
  margin: 0 0 4px 0;
  position: relative;
}

.content-grid .thumb-container::after {
  background-color: #b28982;
  bottom: -4px;
  content: '';
  height: 4px;
  left: 0;
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.content-grid .card:hover .thumb-container::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.content-grid .title {
  color: #111;
  font-size: 14px;
  line-height: 1.2;
  font-weight: normal;
  margin: 8px 0 0;
}

.content-grid .description {
  font-size: 12px;
  margin: 4px 0 0;
}

.content-grid .source {
  color: #aaa;
  font-size: 10px;
  margin: 12px 0 0;
  text-transform: uppercase;
}

.site-footer {
  margin: 72px 0 0;
}

.site-footer .container {
  border-top: 1px solid #666;
  display: flex;
  padding: 16px 0 64px;
}

.site-footer .copy {
  font-size: 12px;
  margin: 0;
}

.site-footer .social-nav {
  margin-left: auto;
  margin-top: -8px;
}

.site-footer .social-nav li {
  display: inline-block;
  margin: 0 0 0 8px;
}

.site-footer .social-nav img {
  height: 16px;
}

/* About Page */
.about-bio .bio-pic {
  border-bottom: 3px solid #b28982;
  display: block;
  height: auto;
  margin: 0 0 24px;
  width: 100%;
}

.substack-signup {
  padding-top: 40px;
  text-align: center;
}

.substack-signup iframe {
  margin: 0 auto;
  max-width: 100%;
}

/* Contact Page */
.contact-form {
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
  width: 482px; /* Match the Substack form */
}

.contact-form .form-success {
  font-weight: bold;
}

.contact-form form {
  border-bottom: 1px solid #ccc;
  padding-bottom: 32px;
  text-align: left;
}

form legend {
  color: #b28982;
  font-family: 'Playfair Display', sans-serif;
  font-size: 1.17em; /* Match subcategory h3 */
  font-weight: normal;
  text-transform: uppercase;  
}

form label {
  display: block;
}

form input[type=email],
form input[type=text],
form textarea {
  box-sizing: border-box;
  width: 100%;
}

form textarea {
  min-height: 200px;
}

form .submit {
  text-align: center;
}

form .submit button {
  appearance: none;
  background: #b28982;
  border: none;
  border-radius: 3px;
  color: white;
  font-family: 'Playfair Display', sans-serif;
  padding: 8px 32px;
  text-transform: uppercase;
}

form .required label::after,
form .required-disclaimer::before {
  content: " * ";
  color: red;
}

form .required-disclaimer {
  color: #666;
  font-family: 'Playfair Display', sans-serif;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

form .error {
  color: red;
  display: block;
  font-size: 0.8rem;
  font-weight: bold;
  margin-top: 6px;
}

/* Phone landscape */
@media (min-width: 667px) {
  .content-grid {
    display: grid;
    gap: 40px 24px;
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid .card {
    margin: 0;
  }
}

/* Tablet Portrait */
@media (min-width: 820px) {
  #welcome .name {
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    margin: 0 -80px;
    padding-left: 16px;
  }
  
  #welcome .summary {
    display: block;
  }

  .site-header .container {
    border-bottom: 1px solid #444;
    display: flex;
    padding: 88px 0 0;
  }
  
  .site-header .site-logo {
    font-family: 'Wonderful Branding', serif;
    font-size: 16px;
    line-height: 1.3;
    margin: 0;
  }

  #mobile-nav-trigger {
    display: none;
  }

  .content-layout .site-nav {
    display: block;
    background: none;
    box-sizing: border-box;
    font-size: 12px;
    height: auto;
    left: auto;
    margin-left: auto;
    margin-top: -4px;
    padding: 0;
    position: relative;
    text-transform: uppercase;
    top: auto;
    width: auto;
  }

  .content-layout .site-nav li {
    display: inline-block;
    margin: 0 0 0 16px;
    max-width: 100%;
    width: auto;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .content-layout .container {
    margin: 0 auto;
    max-width: 960px;
    text-align: left;
    width: 80%;
  }

  .content-grid {
    gap: 40px 16px;
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ==========================================================================
   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
 */

.sr-only {
  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 .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.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
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. 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;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

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

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

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

