/* base.css */

.preload * {
  transition: none !important;
}

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

body {
  width: 80vw;
  max-width: 1200px;

  margin: 0 auto;
  padding: var(--spacing-sm) 0;

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

  font-family: sans-serif;
}

main {
  min-height: 90vh;
  margin: auto;
  padding: var(--spacing-sm) 0;
}

section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

.writing-card {
  padding: var(--spacing-sm);
  background: linear-gradient(to top left, silver, white, silver);
  border: 2px solid gray;
  border-radius: 4px;
  box-shadow:
    2px 2px 6px 2px rgba(64, 64, 64, 0.75),
    -2px -2px 6px 2px rgba(64, 64, 64, 0.75);
  text-align: justify;
}

h3 {
  text-align: center;
}

.logo {
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  font-size: 2em;
  opacity: 0.75;
}

.logo::before {
  content: var(--logo-text);
}


.floating-image {
  float: right;

  top: 15px;

  margin-right: 5%;
  margin-bottom: 5%;

  width: 50%;
  height: auto;
}

/* ---------- Header ---------- */

header {
  position: relative;

  overflow: visible;

  height: clamp(5vh, 150px, 60vh);

  padding: 0.5rem 0.5rem 0;

  background: url(/assets/images/hero-image.webp);
  border: 2px solid gray;
  border-radius: 4px;
}

header>img {
  position: absolute;
  bottom: 5%;
  left: 5%;

  height: 50%;
}

header .shadow-clip {
  position: absolute;
  top: -10px;
  left: -14px;
  z-index: -1;

  overflow: hidden;

  width: calc(100% + 28px);
  height: calc(100% + 12px);

  border-radius: inherit;

  pointer-events: none;
}

header .shadow-pane {
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  top: 8px;

  border-radius: inherit;

  box-shadow:
    inset 0 -4px 6px -2px rgba(0, 0, 0, 1),
    0 0 6px 2px black;
}

/* ---------- Navbar ---------- */

.navbar {
  position: absolute;
  right: 5%;
  bottom: 0;

  display: flex;
  gap: var(--spacing-xs);

  padding: 0.5rem 0.5rem 0;

  background-color: rgb(from var(--page-background-color) r g b / 25%);
  border: 2px solid gray;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

.navbar>a {
  position: relative;

  padding: var(--spacing-xs) var(--spacing-sm);

  border: 2px solid transparent;
  border-bottom: 1px solid var(--background-color);
  border-radius: 12px 12px 0 0;
  color: var(--color-primary);

  text-decoration: none;

  transition:
    background-color var(--animation-duration),
    border var(--animation-duration),
    border-radius var(--animation-duration);
}

.tab-fill {
  position: absolute;
  bottom: -2px;
  left: 0;

  width: 100%;
  height: 2px;

  background-color: var(--page-background-color);
  opacity: 0;

  transition: opacity var(--animation-duration);
}

.navbar .active>.tab-fill,
.navbar>a:hover>.tab-fill {
  opacity: 1;
}

/* Hover + Active */

.navbar>a:is(:hover, .active) {
  background-color: var(--page-background-color);
  border: 2px solid gray;
  border-bottom: 1px solid var(--background-color);
  border-radius: 12px 12px 0 0;
}

.hamburger {
  display: none;
}

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

footer {
  padding: 1rem;

  border: 2px solid gray;

  position: relative;
}

footer .shadow-clip {
  position: absolute;
  top: -6px;
  left: -14px;
  z-index: -1;

  overflow: hidden;

  width: calc(100% + 28px);
  height: calc(100% + 12px);

  border-radius: inherit;

  pointer-events: none;
}

footer .shadow-pane {
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  top: 8px;

  border-radius: inherit;

  box-shadow:
    inset 0 -4px 6px -2px rgba(0, 0, 0, 1),
    0 0 6px 2px black;
}

.container {
  display: flex;
  justify-content: space-between;
}

.stack {
  display: flex;
  flex-direction: column;
}