@charset "UTF-8";

/*
Theme Name: Johan Fowelin
Theme URI: https://www.johanfowelin.com
Author: Przemek Maczewski, Michal Niewitala, Henrik Mattsson
Author URI: https://www.henrikmattsson.com
Description: Custom theme for Johan Fowelin's website.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.5
Version: 2.0.0.rc2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: johanfowelin

Copyright: Content (c) Johan Fowelin 2013-2026 / Site Concept, Design & CSS (c) Henrik Mattsson 2013-2026
Project Team: Henrik Mattsson (concept development, site design, project management), Michal Niewitala (front-end development), Przemek Maczewski (WordPress development, DevOps)
*/

/* RESET */

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

html {
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
  box-sizing: border-box;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga', 'kern';
}

:where(body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol) {
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

:where(ul, ol) {
  padding-inline-start: 0;
  list-style-position: inside;
}

:where(img, picture) {
  max-width: 100%;
  height: auto;
  display: block;
}

:where(input, button, textarea, select) {
  font-family: inherit;
  font-size: inherit;
}

:where(textarea:not([rows])) {
  min-height: 10em;
}

:where(:target) {
  scroll-margin-block: 5ex;
}

/*
 * ELEMENTS
 */
:where(body) {
  font-family: var(--wp--preset--font-family--body);
  font-size: 1rem;
  line-height: 1.25;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-size: 1rem;
  font-weight: 700;
}

:where(a) {
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
  text-decoration-thickness: 0.0625em;
  text-underline-offset: 0.125em;
}

:where(a:focus-visible) {
  text-decoration-line: underline;
}

@media (hover: hover) {
  :where(a:hover) {
    text-decoration-line: underline;
  }
}

/*
 * LAYOUT
 */
.site-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 320px));
  grid-template-rows: auto 1fr;
  column-gap: var(--wp--preset--spacing--40);
  row-gap: 1.25em;
  row-gap: 1lh;
  justify-content: center;
  max-width: calc(
    var(--wp--style--global--content-size) + 2 * var(--wp--preset--spacing--40)
  );
  margin-inline: auto;
  padding-block: var(--wp--preset--spacing--30);
  padding-inline: var(--wp--preset--spacing--40);
}

@media (min-width: 760px) {
  .site-header {
    grid-column: 1;
    grid-row: 1;
  }

  .content-area {
    grid-column: 2 / -1;
    grid-row: 1 / span 2;
  }
}

.site-header {
  display: flex;
  flex-direction: column;
  row-gap: 1.25em;
  row-gap: 1lh;
}

.site-logo {
  font-weight: 700;
}

.site-logo:hover,
.site-logo:focus-visible {
  text-decoration-line: none;
}

.content-area {
  order: 1;
}

.content-area > * + * {
  margin-block-start: 1.25em;
  margin-block-start: 1lh;
}

/* 
 * NAVIGATION
 */
.menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.menu li + li::before {
  content: '/';
}

.menu li.current-cat > a {
  text-decoration-line: underline;
}

/*
 * UTILITIES
 */
.clickable {
  position: relative;
}
.clickable a::after {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 1;
}

.sep {
  margin-left: -0.25em;
}
