/* ==========================================================
   THEME TOKENS
   Chrome (header, background, panels, text) reads these vars.
   Content colors (.item-*, .type-*) stay vivid and untouched
   by theme so they keep popping against a calm surface.
   ========================================================== */
:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-alt: #edeade;
  --text: #201f1c;
  --text-muted: #6f6a5e;
  --border: rgba(28, 24, 14, 0.14);
  --shadow: rgba(28, 24, 14, 0.16);
  --accent: #201f1c;
  --accent-soft: rgba(28, 24, 14, 0.06);
  --link: hotpink;

  --radius: 0.7em;
  --font-heading: "Fredoka", sans-serif;
  --font-body: "Nunito", sans-serif;

  /* organic "artist shag" blob shapes — smooth but irregular */
  --blob-a: 63% 37% 54% 46% / 43% 41% 59% 57%;
  --blob-b: 42% 58% 40% 60% / 58% 45% 55% 42%;
  --blob-c: 39% 61% 58% 42% / 53% 56% 44% 47%;
  --blob-d: 55% 45% 62% 38% / 48% 60% 40% 52%;
  --blob-e: 34% 66% 63% 37% / 38% 53% 47% 62%;
  --blob-f: 20% 36% 20% 27% / 46% 54% 53% 47%;
}

/* Dark, low-glare */
[data-theme="ink"] {
  --bg: #17161a;
  --surface: #201f24;
  --surface-alt: #29282f;
  --text: #f1efe9;
  --text-muted: #a8a49b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.6);
  --accent: #f1efe9;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --link: #b39ddb;
}

/* Warm paper, minimal shadow */
[data-theme="paper"] {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-alt: #f1efe6;
  --text: #2b2b28;
  --text-muted: #7a766a;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: rgba(0, 0, 0, 0.08);
  --accent: #2b2b28;
  --accent-soft: rgba(0, 0, 0, 0.04);
  --link: #1d6fa5;
}

/* Cool slate, a little more contrast */
[data-theme="slate"] {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-alt: #dfe4e9;
  --text: #1b2530;
  --text-muted: #5b6a78;
  --border: rgba(20, 30, 40, 0.15);
  --shadow: rgba(20, 30, 40, 0.18);
  --accent: #1b2530;
  --accent-soft: rgba(20, 30, 40, 0.06);
  --link: #2c6e8f;
}


/* ==========================================================
   BASE LAYOUT
   ========================================================== */
html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#app > .columns {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 1px;
  background-color: var(--border);
}

#app > .columns > .column {
  flex: 1;
  background-color: var(--surface);
  padding: 1em;
}

.column .header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.column .header h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  margin: 0;
}

.column .header a {
  font-size: 0.85em;
  color: var(--link);
}

a {
  color: var(--link);
}

/* ==========================================================
   HEADER / NAV
   ========================================================== */
#header {
  position: relative;
  background-color: var(--surface);
  padding-bottom: 22px;
}

/* one smooth swoop instead of a flat border */
#header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background-color: var(--surface-alt);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%2022'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20Q100,22%20200,0%20L200,22%20L0,22%20Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%2022'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20Q100,22%20200,0%20L200,22%20L0,22%20Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.link-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4em;
  padding: 0.6em 1em;
  flex-wrap: wrap;
}

/* the GalaxyKate logogram: home link */
.link-bar .logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1em;
  color: var(--text);
  text-decoration: none;
  margin-right: 0.6em;
}

.link-bar .logo:hover {
  color: var(--link);
}

.link-bar .link {
  border-radius: var(--blob-c);
  padding: 0.3em 0.9em;
  border: 1px solid var(--border);
  color: var(--text);
  /* background-color: var(--surface-alt); */
  font-size: 0.9em;
  transition: border-radius 0.25s ease, transform 0.15s ease;
}

.link-bar .link:nth-child(3n+1) { border-radius: var(--blob-a); }
.link-bar .link:nth-child(3n+2) { 
  position: relative;
  top: 3px;
  border-radius: var(--blob-c); }
.link-bar .link:nth-child(3n)   {
   top: 2px;
  border-radius: var(--blob-d); }

.link-bar .link:hover {
  background-color: var(--accent-soft);
  border-radius: var(--blob-b);
  transform: translateY(-1px);
}

/* Theme switcher */
.theme-switcher {
  display: flex;
  gap: 0.3em;
  margin-left: auto;
}

.theme-switcher button {
  width: 1.4em;
  height: 1.4em;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
}

.theme-switcher button.active {
  border-color: var(--link);
}

.theme-switcher button[data-swatch="default"] { background: #f6f4ee; }
.theme-switcher button[data-swatch="ink"] { background: #201f24; }
.theme-switcher button[data-swatch="paper"] { background: #fbfaf6; }
.theme-switcher button[data-swatch="slate"] { background: #dfe4e9; }


/* ==========================================================
   SPLASH
   ========================================================== */
.splash {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 1.5em;
  padding: 2em 1.5em;

  background-color: var(--surface-alt);
}

.splash {
  position: relative;
  padding-bottom: 4em;
}

.splash img {
  border-radius: var(--blob-a);
  box-shadow: 0 3px 10px var(--shadow);
  transition: border-radius 0.4s ease;
}

.splash img:hover {
  border-radius: var(--blob-b);
}

/* one big smooth swoop dividing splash from content */
.splash::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background-color: var(--surface);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%2044'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20Q100,44%20200,0%20L200,44%20L0,44%20Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%2044'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20Q100,44%20200,0%20L200,44%20L0,44%20Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.splash .section.about {
  max-width: 34em;
  flex: 1 1 auto;
}

.splash .section.pic,
.splash .section.quotes {
  flex: 0 1 auto;
}

.splash .hello {
  color: var(--text-muted);
}

.splash .about h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
}

.splash .about h4 {
  margin: 0 0 0.6em;
  color: var(--text-muted);
  font-weight: 500;
}

.splash .about p {
  margin: 0.5em 0;
}

.splash .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-top: 1em;
}

.splash .cta {
  display: inline-block;
  padding: 0.45em 1.2em;
  border-radius: var(--blob-b);
  background-color: var(--link);
  color: var(--surface);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  box-shadow: 1px 2px 4px var(--shadow);
  transition: border-radius 0.25s ease, transform 0.15s ease;
}

.splash .cta:hover {
  border-radius: var(--blob-d);
  transform: translateY(-2px);
}

.splash .cta.secondary {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.splash .section.quotes {
  max-width: 24em;
  font-size: 0.9em;
}

.splash .quote {
  font-style: italic;
  color: var(--text-muted);
}

.splash .source {
  font-size: 0.85em;
  color: var(--text-muted);
  text-align: right;
}


/* ==========================================================
   BROWSE PAGE / CONTROLS
   ========================================================== */
.page-title {
  font-family: var(--font-heading);
  font-weight: 500;
  margin: 0.5em 0.8em 0.3em;
}

.widget > .controls {
  padding: 0.6em 0.8em;
  background-color: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.controls .tag-set {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
}

/* filter chips need to be tappable, unlike the tiny in-tile tags */
.controls .tag.chip {
  font-size: 0.78em;
  cursor: pointer;
  background-color: var(--surface);
}

/* must outrank the .controls background above, or active chips
   render their pale text on a pale background */
.controls .tag.chip.active {
  background-color: var(--link);
  color: var(--surface);
}

.controls .clear-filters {
  font-family: var(--font-body);
  font-size: 0.78em;
  padding: 0.2em 0.7em;
  border: 1px solid var(--border);
  border-radius: var(--blob-e);
  background-color: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.controls .clear-filters:hover {
  background-color: var(--accent-soft);
}


/* ==========================================================
   BLOG POST
   ========================================================== */
.blog-post {
  max-width: 44em;
  margin: 0 auto;
  padding: 1.5em 1.2em 3em;
  background-color: var(--surface);
  border-radius: var(--radius);
}

.blog-post .post-title {
  font-family: var(--font-heading);
  font-weight: 500;
  margin: 0.3em 0 0;
}

.blog-post > .date {
  font-style: italic;
  font-size: 0.85em;
  color: hotpink;
  margin-bottom: 1.5em;
}

.blog-post .post-content {
  line-height: 1.55;
}

.blog-post .post-content h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  margin: 1.4em 0 0.4em;
}

.blog-post .post-content p {
  margin: 0.7em 0;
}

.blog-post .post-content img {
  max-width: 100%;
}

/* the title doubles as the permalink — quiet until hovered */
.blog-post .post-title .permalink {
  color: var(--text);
  text-decoration: none;
}

.blog-post .post-title .permalink:hover {
  color: var(--link);
}

.item-tile .read-more {
  font-size: 0.85em;
}

/* Blog mode: every post in full, stacked newest-first */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  padding: 1em;
}

/* anchored scrolls shouldn't hide the title at the very top edge */
.blog-post {
  scroll-margin-top: 1em;
  box-shadow: 1px 1px 3px var(--shadow);
}


/* ==========================================================
   WIDGET / CONTENT TILES (chrome parts only — colors below
   stay independent of theme)
   ========================================================== */
.widget {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

.widget > .header {
  background-color: var(--surface-alt);
  color: var(--text);
  padding: 0.4em 1.6em 0.4em 0.8em;
  clip-path: polygon(0 0, 100% 0, 100% 60%, calc(100% - 1.2em) 100%, 0 100%);
}

.widget > .content {
  background-color: var(--surface);
}

.item-tile {
  box-sizing: border-box;
  width: 280px;
  max-width: 100%;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  /* vertical margin only: masonry's gutter handles horizontal spacing */
  margin: 0 0 15px 0;
  padding: 0.6em;
  position: relative;
  break-inside: avoid;
  background-color: var(--surface);
  box-shadow: 1px 1px 3px var(--shadow);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.item-tile .date {
  font-style: italic;
  font-size: 80%;
  color: hotpink;
}

.item-tile .date-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}



.item-tile .asset-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 0.2em 0.7em;
  margin-top: auto; /* pin links to the tile bottom */
  padding-top: 0.3em;
}

.item-tile .asset-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
}

.item-tile .asset-row svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor; /* follow the theme instead of hardcoded dark */
  opacity: 0.7;
}


.item-tile .title {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-weight: 500;
}

.item-tile-holder {
    background-color: var(--surface-alt);
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 4px 4px; /* room for tag chips + shadows */
}

/* On the landing page, cap each column so the page stays compact
   and the two lists scroll independently */
.columns .item-tile-holder {
  max-height: 78vh;
}

.item-tile .thumbnail-row {
  display: flex;
  justify-content: space-around;
  flex-direction: row;
}
.item-tile .thumbnail {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 3px);
}

.tag {
  border: none;
  margin: 0;
  padding: 0.00em 0.3em;
  /* margin: 0 0.1em; */
  display: inline-block;

  /* background-color: var(--accent-soft); */
  
  color: var(--text);
  font-size: 0.6em;
}

.tag.chip {
  padding: 0.15em 0.5em;
/* background-color: white; */
  border-radius: var(--blob-f);
  box-shadow: 1px 1px 2px  rgba(0, 0, 0, 0.4);
}

.tag.active {
  background-color: var(--link);
  color: var(--surface);
}

.tag-row {
  width: 100%;
  top: -.5em;
justify-content: right;
display: flex;
  flex-direction: row;
  position: absolute;
}

/* ==========================================================
   CONTENT TYPE COLORS — deliberately vivid & theme-independent
   ========================================================== */
.tag-zine     { background-color: hsl(99, 100%, 80%); }
.tag-report     { background-color: hsl(120, 100%, 80%); }
.tag-paper     { background-color: hsl(134, 100%, 80%); }
.tag-poster     { background-color: hsl(164, 100%, 80%); }
.tag-project     { background-color: hsl(40, 100%, 80%); }
.tag-patent      { background-color: hsl(290, 100%, 92%); }
.tag-press        { background-color: hsl(90, 100%, 80%); }
.tag-talk        { background-color: hsl(90, 100%, 80%); }
.tag-employment   { background-color: hsl(190, 100%, 80%); }
.tag-publications { background-color: hsl(90, 10%, 95%); }
.tag-contact      { background-color: hsl(30, 100%, 88%); }
.tag-blog      { background-color: hsl(30, 100%, 88%); }
.tag-dissertation      { background-color: hsl(312, 100%, 83%); }


/* ==========================================================
   MOBILE
   ========================================================== */
@media (max-width: 700px) {
  #app > .columns {
    flex-direction: column;
  }

  .splash {
    flex-direction: column;
    text-align: center;
    padding: 1.5em 1em 3.5em;
  }

  .splash .cta-row {
    justify-content: center;
  }

  /* the quote reads as decoration on small screens; keep it short */
  .splash .section.quotes {
    font-size: 0.85em;
  }

  .link-bar {
    justify-content: center;
  }

  .theme-switcher {
    margin-left: 0;
  }

  .item-tile {
    width: 100%;
  }

  /* stacked columns: shorter panes so both lists are discoverable */
  .columns .item-tile-holder {
    max-height: 60vh;
  }

  #app > .columns > .column {
    padding: 0.75em;
  }
}


/* Fun */
