
/* ==========================================
   MEGAN SWITZER — SHARED STYLESHEET
   White / blush / typewriter edition
   ========================================== */

/* 1. COLOURS AND TYPOGRAPHY */

:root {
  --paper: #ffffff;
  --ink: #202020;
  --muted: #656565;
  --line: #989898;
  --pink: #f4becd;
  --pink-light: #ffe2eb;
  --sage: #d7dfd2;
  --sage-text: #647966;

  --mono: "Courier New", Courier, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

/* 2. GLOBAL */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);

  background-image:
    radial-gradient(
      ellipse 42% 28% at 0% 0%,
      rgba(249, 174, 195, 0.51),
      transparent 100%
    ),
    radial-gradient(
      ellipse 40% 30% at 100% 0%,
      rgba(249, 181, 202, 0.53),
      transparent 100%
    ),
    radial-gradient(
      ellipse 39% 34% at 0% 100%,
      rgba(250, 193, 210, 0.45),
      transparent 100%
    ),
    radial-gradient(
      ellipse 43% 34% at 100% 100%,
      rgba(249, 175, 200, 0.52),
      transparent 100%
    );

  background-repeat: no-repeat;
  background-attachment: fixed;

  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

a:hover {
  color: #86546a;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--pink);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid #b35d7f;
  outline-offset: 3px;
}

/* 3. SITE CONTAINER */

.site {
  width: min(100% - 72px, 1330px);
  margin: 0 auto;
}

/* 4. HEADER AND NAVIGATION */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;

  min-height: 105px;
  padding: 25px 0 20px;

  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(23px, 2.1vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(15px, 2.7vw, 43px);
}

.top-nav a {
  display: inline-block;
  position: relative;
  padding: 2px 1px;

  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(13px, 1.25vw, 18px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
}

.top-nav a::before {
  display: none;
}

.top-nav a[aria-current="page"] {
  background: var(--pink);
}

.top-nav a:hover {
  background: var(--pink-light);
  color: var(--ink);
}

/* 5. SHARED PAGE HEADINGS */

.portfolio-main {
  padding: 65px 0 50px;
}

.page-heading {
  margin: 0 0 36px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.page-heading h1,
.page-main h1 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
}

.page-subtitle {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--mono);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}

/* 6. FOOTERS */

.site-footer,
.page-footer {
  display: block;
  margin: 30px 0 0;
  padding: 15px 0 35px;

  border-top: 1px solid var(--line);

  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

/* ==========================================
   7. HOMEPAGE
   ========================================== */

.home-layout {
  padding: 65px 0 90px;
}

/* Upper row */

.home-upper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 335px;
  align-items: start;
  gap: 8%;
  min-height: 0;
}

/* About */

.home-about {
  width: min(100%, 390px);
  min-height: 0;
  height: auto;

  padding: 28px 34px 32px;

  border: 1px solid #777;
  border-radius: 40px;

  background: rgba(255,255,255,0.20);
}

.home-about h1 {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.1;
}

.home-about p {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}

/* Vertical menu */

.folder-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;

  width: 100%;
  max-width: 335px;
  margin-left: auto;
}

.folder-link {
  display: flex;
  align-items: center;
  gap: 20px;

  min-height: 56px;
  padding: 9px 20px;

  border: 1px solid #777;
  border-radius: 11px;

  background: rgba(255,255,255,0.25);

  font-family: var(--mono);
  font-size: 17px;
  text-decoration: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.folder-link:hover {
  background: rgba(244,190,205,0.30);
  border-color: #bb8296;
  color: var(--ink);
}

/* Small CSS-drawn folder icon */

.folder-symbol {
  display: inline-block;
  position: relative;
  flex: 0 0 30px;

  width: 30px;
  height: 22px;
  margin-top: 4px;

  border: 1.4px solid currentColor;
  border-radius: 2px 3px 3px 3px;

  font-size: 0;
}

.folder-symbol::before {
  content: "";
  position: absolute;

  top: -6px;
  left: -1.4px;

  width: 13px;
  height: 6px;

  border: 1.4px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;

  background: #fff8fa;
}

/* Lower row */

.home-lower {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: start;
  column-gap: 90px;

  padding: 30px 0 0 10%;
}

/* Three photographs */

.photo-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  max-width: 290px;
}

.stack-photo {
  margin: 0;
}

.stack-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 2.48 / 1;
  object-fit: cover;
  border: 1px solid #888;
}

/* Quote and guestbook */

.home-right-lower {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
  padding-top: 18px;
}

.home-quote {
  margin: 0;
  padding: 14px 17px;

  border: 1px solid #999;
  background: rgba(255,255,255,0.25);

  font-family: var(--mono);
  font-size: clamp(13px, 1.12vw, 16px);
  font-style: normal;
  line-height: 1.55;
}

.home-guestbook {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 185px;
  padding: 20px;

  border: 1px solid #777;
  border-radius: 17px;

  background: rgba(255,238,244,0.55);

  color: var(--ink);
  text-align: center;
  text-decoration: none;

  transition: background-color 0.2s ease;
}

.home-guestbook:hover {
  color: var(--ink);
  background: rgba(244,190,205,0.40);
}

.home-guestbook img {
  display: block;
  width: 43px;
  height: 43px;
  margin-bottom: 7px;
  image-rendering: pixelated;
}

.guestbook-title {
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.35;
}

.guestbook-subtitle {
  display: block;
  margin-top: 7px;
  font-size: clamp(11px, 1.1vw, 14px);
  line-height: 1.5;
}

/* ==========================================
   8. WRITING — TWO-COLUMN INDEX
   ========================================== */

.writing-main {
  padding-top: 70px;
}

.writing-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  min-height: 195px;
  margin-bottom: 30px;
}

.writing-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.2vw, 43px);
  font-weight: 400;
  line-height: 1.2;
}

.writing-intro p {
  margin: 0;
  font-size: 15px;
}

.writing-index {
  width: 100%;
}

.writing-table-head,
.writing-row {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  column-gap: 30px;
}

.writing-table-head {
  padding: 8px 3px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);

  font-size: 15px;
}

.writing-row {
  align-items: baseline;
  padding: 13px 3px;

  border-bottom: 1px dotted #8a8a8a;
  font-size: 15px;
  line-height: 1.6;
}

.writing-row:last-child {
  border-bottom: 1px solid var(--line);
}

.writing-row a {
  display: inline;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.writing-row a:hover {
  background: var(--pink-light);
  color: var(--ink);
}

.writing-row p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Compatibility with older Writing markup */

.writing-list {
  width: 100%;
}

.writing-entry {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
  align-items: center;

  padding: 14px 0;
  border-bottom: 1px dotted var(--line);
}

.writing-thumbnail {
  display: block;
  width: 105px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.writing-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.writing-entry h2 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 400;
}

.writing-entry h2 a {
  text-decoration: underline;
}

.entry-type,
.writing-publication {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* ==========================================
   9. FILM / VIDEO
   ========================================== */

.film-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px 32px;

  padding-top: 15px;
}

.film-item {
  margin: 0;
  min-width: 0;
}

.film-item a {
  color: var(--ink);
}

.film-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1.7;
  object-fit: cover;

  background: #f4eff1;
  border: 1px solid #aaa;

  transition: opacity 0.2s ease;
}

.film-item img:hover {
  opacity: 0.82;
}

.film-item figcaption {
  padding-top: 10px;
}

.film-title {
  display: block;
  font-size: 14px;
  font-style: normal;
}

.film-year {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

/* ==========================================
   10. CV
   ========================================== */

.cv-heading {
  margin-bottom: 22px;
}

.cv-heading h1 {
  font-size: 38px;
}

.cv-section {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 30px;

  padding: 25px 0 30px;

  border-top: 1px dotted var(--line);

  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
}

.cv-section h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}

.cv-entry {
  margin-bottom: 22px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 22px;
}

.cv-entry h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 400;
}

.cv-entry h3 em {
  font-style: normal;
}

.cv-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.cv-entry p,
.cv-section > div > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.cv-entry ul {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
}

.cv-entry li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
}

.cv-entry li::before {
  content: "—";
  position: absolute;
  left: 0;
}

/* ==========================================
   11. GUEST BOOK — EXISTING FUNCTIONAL CLASSES
   ========================================== */

.page-main {
  max-width: 850px;
  padding: 55px 0 80px;
}

.page-main h1 {
  margin-bottom: 15px;
}

.lede,
.guestbook-intro {
  max-width: 650px;
  margin: 20px 0 35px;
  font-size: 15px;
  line-height: 1.6;
}

/* Macintosh-inspired window retained */

.mac-window {
  border: 1px solid #555;
  background: rgba(255,255,255,0.45);
}

.window-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  min-height: 37px;
  padding: 5px 12px;

  border-bottom: 1px solid #555;
  font-size: 17px;
}

.window-title::before,
.window-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Generic and multimedia forms */

.guest-form,
.guestbook-form {
  display: grid;
  gap: 22px;
  padding: 30px;
}

.field,
.guestbook-field {
  display: grid;
  gap: 8px;
}

.guestbook-field label {
  font-size: 14px;
}

.field input,
.field textarea,
.guestbook-field input[type="text"],
.guestbook-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;

  border: 1px solid #888;
  border-radius: 0;

  background: rgba(255,255,255,0.75);
  color: var(--ink);

  font-family: var(--mono);
  font-size: 14px;
}

.field textarea,
.guestbook-field textarea {
  min-height: 135px;
  resize: vertical;
}

.pink-button {
  justify-self: start;
  padding: 10px 17px;

  border: 1px solid #555;
  background: var(--pink-light);
  color: var(--ink);

  font-family: var(--mono);
  font-size: 14px;
}

.pink-button:hover {
  background: var(--pink);
}

.status {
  min-height: 24px;
  font-size: 13px;
}

/* Guest Book upload */

.guestbook-upload {
  padding: 20px;
  border: 1px dashed #999;
  background: rgba(255,255,255,0.45);
}

.guestbook-upload input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}

.guestbook-upload input::file-selector-button {
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid #777;
  background: var(--pink-light);
  font-family: var(--mono);
  cursor: pointer;
}

.guestbook-file-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Attachment preview */

.attachment-preview {
  padding: 18px;
  border: 1px solid #aaa;
  background: rgba(255,255,255,0.55);
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-filename {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.guestbook-preview-image {
  display: block;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.guestbook-preview-audio {
  display: block;
  width: 100%;
  max-width: 420px;
}

.attachment-document {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Form footer */

.guestbook-form-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.guestbook-moderation-note {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.guestbook-form .pink-button {
  flex-shrink: 0;
}

.guestbook-form .status {
  margin: 0;
}

/* Archive headings */

.archive,
.guestbook-archive {
  margin-top: 65px;
}

.archive h2,
.guestbook-archive-heading h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
}

.guestbook-archive-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;

  padding-bottom: 12px;
  border-bottom: 1px solid #888;
}

.guestbook-archive-heading span {
  color: var(--muted);
  font-size: 12px;
}

.guestbook-empty {
  margin-top: 25px;
  color: var(--muted);
  font-size: 14px;
}

/* Archive entries */

.entry,
#guestbook-entries .entry {
  padding: 25px 0 29px;
  border-bottom: 1px dotted #aaa;
}

.entry-head,
#guestbook-entries .entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 12px;
}


#guestbook-entries .entry-head strong {
  font-size: 15px;
  font-weight: 700;
}

#guestbook-entries .guestbook-archive-image {
  display: block;
  width: auto;
  max-width: min(100%, 320px);
  max-height: 280px;
  height: auto;
  object-fit: contain;
}


#guestbook-entries .entry-head .muted {
  color: var(--muted);
  font-size: 12px;
}

.entry p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#guestbook-entries .guestbook-entry-message {
  max-width: 650px;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.notice {
  padding: 14px;
  border: 1px dashed #aaa;
  font-size: 13px;
}

.back-link {
  display: inline-block;
  margin-top: 30px;
}

/* Archive attachments */

.guestbook-entry-attachment,
#guestbook-entries .guestbook-entry-attachment {
  margin-top: 17px;
}

#guestbook-entries .attachment-filename {
  display: none;
}

.guestbook-archive-image,
#guestbook-entries .guestbook-archive-image {
  display: block;
  width: auto;
  max-width: min(100%, 440px);
  max-height: 420px;
  height: auto;
  object-fit: contain;
}

.guestbook-archive-audio,
#guestbook-entries .guestbook-archive-audio {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-top: 9px;
}

.guestbook-document-link,
#guestbook-entries .guestbook-document-link {
  display: inline-block;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guestbook-document-link:hover {
  color: #86546a;
}

/* ==========================================
   12. RESPONSIVE — TABLET
   ========================================== */

@media (max-width: 950px) {

  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .home-upper {
    grid-template-columns: 1fr 310px;
    gap: 30px;
    min-height: 0;
  }

  .home-about {
    min-height: 0;
  }

  .home-lower {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 35px;
    padding: 45px 0 0 5%;
  }

  .home-right-lower {
    gap: 24px;
  }

  .film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================
   13. RESPONSIVE — MOBILE
   ========================================== */

@media (max-width: 650px) {

  body {
    background-attachment: scroll;
  }

  .site {
    width: calc(100% - 36px);
  }

  .masthead {
    min-height: 0;
    padding: 25px 0 17px;
  }

  .brand {
    font-size: 25px;
  }

  .top-nav {
    gap: 10px 16px;
  }

  .top-nav a {
    font-size: 13px;
  }

  .home-layout {
    padding: 35px 0 60px;
  }

  .home-upper {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-about {
    width: 100%;
    min-height: 0;
    padding: 27px;
    border-radius: 34px;
  }

  .home-about h1 {
    font-size: 29px;
  }

  .home-about p {
    font-size: 13px;
  }

  .folder-menu {
    max-width: none;
    gap: 9px;
  }

  .folder-link {
    min-height: 48px;
    padding: 8px 15px;
    font-size: 15px;
  }

  .folder-symbol {
    transform: scale(0.8);
    transform-origin: left center;
    margin-right: -5px;
  }

  .home-lower {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 35px 0 0 6%;
  }

  .photo-stack {
    width: 100%;
    max-width: 290px;
    gap: 9px;
  }

  .home-right-lower {
    width: 100%;
    gap: 18px;
    padding-top: 0;
  }

  .home-quote {
    font-size: 13px;
  }

  .home-guestbook {
    min-height: 150px;
  }

  .guestbook-title {
    font-size: 25px;
  }

  .guestbook-subtitle {
    font-size: 12px;
  }

  .writing-main {
    padding-top: 45px;
  }

  .writing-intro {
    min-height: 125px;
  }

  .writing-intro h1 {
    font-size: 31px;
  }

  .writing-intro p {
    font-size: 13px;
  }

  .writing-table-head,
  .writing-row {
    grid-template-columns:
      minmax(0, 42%)
      minmax(0, 1fr);
    gap: 15px;
  }

  .writing-table-head,
  .writing-row {
    font-size: 12px;
  }

  .writing-row {
    padding: 12px 0;
  }

  .cv-section {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .cv-entry-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .cv-date {
    white-space: normal;
  }

  .guestbook-form,
  .guest-form {
    padding: 18px;
    gap: 19px;
  }

  .guestbook-form-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .guestbook-upload {
    padding: 13px;
  }

  #guestbook-entries .entry-head {
    align-items: flex-start;
  }

  #guestbook-entries .entry-head .muted {
    font-size: 11px;
  }

  #guestbook-entries .guestbook-entry-message {
    font-size: 14px;
  }
}

/* ==========================================
   14. VERY NARROW MOBILE
   ========================================== */

@media (max-width: 390px) {

  .home-about {
    padding: 22px;
  }

  .home-lower {
    gap: 12px;
  }

  .writing-table-head,
  .writing-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .writing-table-head span:last-child {
    display: none;
  }

  .writing-row p {
    color: var(--muted);
  }
}

/* HOMEPAGE LAYOUT CORRECTION */

.rose-area,
.rose-image {
  display: none;
}

.home-lower {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  gap: 65px;
  padding: 30px 0 0 10%;
}

.photo-stack {
  width: 100%;
  max-width: 290px;
}

.home-right-lower {
  grid-column: 2;
  width: 100%;
  max-width: 440px;
  padding-top: 18px;
}

/* TABLET */

@media (max-width: 950px) {
  .home-lower {
    grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
    gap: 30px;
    padding: 35px 0 0 4%;
  }
}

/* MOBILE */

@media (max-width: 650px) {
  .home-lower {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 35px 0 0 6%;
  }

  .home-right-lower {
    width: 100%;
    max-width: none;
    padding-top: 0;
  }
}

/* ==========================================
   CV — PORTAL-INSPIRED INDEX
   ========================================== */

.cv-portal {
  padding: 65px 0 85px;
  font-family: var(--mono);
  color: var(--ink);
}

/* INTRO */

.cv-portal-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  min-height: 205px;
}

.cv-portal-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.2;
}

.cv-portal-intro p {
  max-width: 570px;
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.cv-portal-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;

  padding-top: 6px;

  color: var(--muted);
  font-size: 12px;
}

.cv-portal-meta a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* FOUR-COLUMN INDEX */

.cv-index-head,
.cv-index-row {
  display: grid;
  grid-template-columns:
    minmax(0, 15%)
    minmax(0, 42%)
    minmax(0, 28%)
    minmax(0, 15%);
}

.cv-index-head {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);

  color: var(--muted);
  font-size: 12px;
}

.cv-index-head span,
.cv-index-row > * {
  min-width: 0;
  padding-right: 20px;
}

/* SECTION TITLES */

.cv-index-section {
  margin: 0;
  padding: 0;
}

.cv-index-section > h2 {
  margin: 0;
  padding: 30px 0 10px;

  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ENTRIES */

.cv-index-row {
  padding: 15px 0 17px;
  border-bottom: 1px dotted #a7a7a7;

  font-size: 13px;
  line-height: 1.55;
}

.cv-category {
  color: #ae6580;
  font-size: 12px;
}

.cv-index-title h3 {
  margin: 0 0 5px;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.cv-index-title p {
  max-width: 480px;
  margin: 0 0 6px;

  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

.cv-index-title p:last-child {
  margin-bottom: 0;
}

.cv-index-title em {
  font-style: italic;
}

.cv-context {
  color: #555;
  font-size: 12px;
  line-height: 1.6;
}

.cv-period {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
}

/* END OF INDEX */

.cv-portal-end {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: 42px;
  padding: 12px 0;

  border-top: 1px solid var(--line);

  color: var(--muted);
  font-size: 12px;
}

.cv-portal-end a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* SUBTLE HOVER TREATMENT */

.cv-index-row:hover {
  background: rgba(255, 226, 235, 0.22);
}

/* TABLET */

@media (max-width: 850px) {

  .cv-index-head,
  .cv-index-row {
    grid-template-columns:
      minmax(0, 19%)
      minmax(0, 43%)
      minmax(0, 25%)
      minmax(0, 13%);
  }

  .cv-index-head span,
  .cv-index-row > * {
    padding-right: 12px;
  }

  .cv-period {
    font-size: 11px;
    white-space: normal;
  }
}

/* MOBILE */

@media (max-width: 650px) {

  .cv-portal {
    padding: 40px 0 65px;
  }

  .cv-portal-intro {
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    margin-bottom: 55px;
  }

  .cv-portal-intro h1 {
    font-size: 30px;
  }

  .cv-portal-intro p {
    font-size: 13px;
  }

  .cv-portal-meta {
    align-items: flex-start;
  }

  .cv-index-head {
    display: none;
  }

  .cv-index-section > h2 {
    padding: 25px 0 12px;
    border-top: 1px solid var(--line);
  }

  .cv-index-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 15px;
    padding: 15px 0;
  }

  .cv-category {
    grid-column: 1;
    grid-row: 1;
  }

  .cv-period {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .cv-index-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cv-context {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-top: 3px;
  }

  .cv-index-row > * {
    padding-right: 0;
  }

  .cv-portal-end {
    margin-top: 35px;
  }
}

/* CV — HELVETICA NEUE */

.cv-portal {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.cv-portal h1,
.cv-portal h2,
.cv-portal h3,
.cv-portal p,
.cv-portal span,
.cv-portal a,
.cv-portal time {
  font-family: inherit;
}

/* Slightly stronger text */

.cv-index-title h3 {
  font-weight: 500;
}

.cv-index-title p {
  color: #444;
  font-weight: 400;
}

.cv-context {
  color: #444;
}

.cv-category {
  color: #a65c78;
  font-weight: 500;
}

/* Hide top navigation on homepage only */

.homepage .top-nav {
  display: none;
}

/* CV — CLICKABLE PROJECT TITLES */

.cv-index-title h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #b5b5b5;
  text-underline-offset: 3px;
}

.cv-index-title h3 a:hover {
  color: #a65c78;
  text-decoration-color: #a65c78;
}

/* Homepage name — bold */

.homepage .brand {
  font-weight: 500;
}


/* HOMEPAGE — FOUR SHADES OF DUSTY ROSE */

.homepage .folder-link:nth-child(1) {
  --folder-color: #ffe0eb;
}

.homepage .folder-link:nth-child(2) {
  --folder-color: #facfe3;
}

.homepage .folder-link:nth-child(3) {
  --folder-color: #cf88af;
}

.homepage .folder-link:nth-child(4) {
  --folder-color: #bd638e;
}

/* Apply colour to the original folder icons */

.homepage .folder-symbol,
.homepage .folder-symbol::before {
  background-color: var(--folder-color);
}



/* HOMEPAGE — PIXEL STITCH BORDERS */

.masthead {
  position: relative;
  border-bottom: none;
  padding-bottom: 28px;
}

.masthead::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 9px;

  background:
    repeating-linear-gradient(
      90deg,
      #ca8cb9 0 4px,
      transparent 4px 24px
    ) 0 0 / 100% 4px no-repeat,

    repeating-linear-gradient(
      90deg,
      transparent 0 5px,
      #360b35 5px 9px,
      transparent 9px 24px
    ) 0 5px / 100% 4px no-repeat;
}

/* MATCHING FOOTER */

.site-footer {
  position: relative;
  border-top: none;
  padding-top: 25px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 9px;

  background:
    repeating-linear-gradient(
      90deg,
      #270319 0 4px,
      transparent 4px 24px
    ) 0 0 / 100% 4px no-repeat,

    repeating-linear-gradient(
      90deg,
      transparent 0 5px,
      #cc98b4 5px 9px,
      transparent 9px 24px
    ) 0 5px / 100% 4px no-repeat;
}


/* HOMEPAGE — LARGER SITE NAME */

.homepage .brand {
  font-size: 39px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.15;
}

@media (max-width: 600px) {
  .homepage .brand {
    font-size: 30px;
    letter-spacing: -0.5px;
  }
}


/* SLIGHTLY HEAVIER TYPOGRAPHY */

body {
  font-weight: 500;
}


/* SUBTLE TYPOGRAPHY REFINEMENT */

body {
  -webkit-text-stroke: 0.15px currentColor;
}
