:root {
  --font-heading: "Archivo Black", Tahoma, sans-serif;
  --font-body: Tahoma, Verdana, Geneva, sans-serif;

  --cool-1: #CCF4FA;
  --cool-2: #6FC9F7;
  --cool-3: #8FBADF;
  --cool-4: #5A9FF5;
  --cool-5: #1C80F6;
  --cool-6: #526FDE;
  --cool-7: #0D29B2;

  --lime-1: #BEF859;
  --lime-2: #D9F86B;

  --warm-1: #E4901C;
  --warm-2: #D26B60;
  --warm-3: #D26399;
  --warm-4: #827FCB;

  --neutral-white: #F6F9FA;
  --neutral-black: #111;

  --page-text: var(--neutral-black);
  --panel-border: var(--neutral-black);
  --panel-inner-border: var(--neutral-white);

  --content-fill: rgba(246, 249, 250, 0.90);
  --titlebar-fill: rgba(143, 186, 223, 0.55);

  --tab-inactive: rgba(58, 96, 150, 0.55);
  --tab-inactive-hover: rgba(90, 159, 245, 0.62);

  --bevel-raised: inset 2px 2px 0 rgba(255, 255, 255, 0.75),
                  inset -2px -2px 0 rgba(13, 41, 178, 0.30);
  --bevel-sunken: inset 2px 2px 0 rgba(13, 41, 178, 0.35),
                  inset -2px -2px 0 rgba(255, 255, 255, 0.45);

  --background-url: url('../backgrounds/dith4.png');
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-image: var(--background-url);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--page-text);

  image-rendering: pixelated;

  display: flex;
  align-items: center;
  justify-content: center;
}

.window {
  position: relative;
  z-index: 10;
  width: min(1120px, calc(100vw - 4rem));
  height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.titlebar {
  flex: 0 0 auto;
  margin-bottom: 0.9rem;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.page_logo {
  flex: 0 1 auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page_logo img {
  display: block;
  max-width: 100%;
  height: clamp(3.5rem, 11vw, 7rem);
  object-fit: contain;
  image-rendering: pixelated;
  cursor: pointer;
  transform-origin: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.page_logo img:hover {
  animation: logo-wiggle 1.1s ease-in-out;
}

@keyframes logo-wiggle {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-1.1deg); }
  55%  { transform: rotate(0.8deg); }
  80%  { transform: rotate(-0.4deg); }
  100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page_logo img:hover,
  .splash_logo:hover { animation: none; }
}

.tablist {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.tab {
  flex: 1 1 0;
  min-width: 130px;
  margin-right: -2px;
  padding: 0.7rem 0.5rem;
  font: inherit;
  font-weight: bold;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--page-text);
  cursor: pointer;

  background: var(--tab-inactive);
  border: 2px solid var(--panel-border);
  border-bottom: none;
  box-shadow: var(--bevel-sunken);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tab:last-child { margin-right: 0; }

.tab:hover {
  background: var(--tab-inactive-hover);
}

.tab:focus-visible {
  outline: 2px dashed var(--cool-7);
  outline-offset: -5px;
}

.tab.is-active {
  background: var(--content-fill);
  box-shadow: var(--bevel-raised);
  margin-bottom: -2px;
  position: relative;
  z-index: 3;
}

.content_panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;

  background: var(--content-fill);
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.content_panel {
  scrollbar-width: auto;
  scrollbar-color: var(--cool-4) var(--cool-1);
}
.content_panel::-webkit-scrollbar {
  width: 18px;
}
.content_panel::-webkit-scrollbar-track {
  background: var(--cool-1);
  border-left: 2px solid var(--panel-border);
}
.content_panel::-webkit-scrollbar-thumb {
  background: var(--cool-4);
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
}
.content_panel::-webkit-scrollbar-thumb:hover {
  background: var(--cool-5);
}

.panel[hidden] { display: none; }

.panel h2 {
  font-family: var(--font-heading);
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.panel p { margin: 0 0 1rem; }

.post_list,
.contact_list {
  margin: 0;
  padding-left: 1.2rem;
}
.post_list li,
.contact_list li { margin-bottom: 0.5rem; }

.panel a { color: var(--cool-7); }

.gallery_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.gallery_grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
  image-rendering: pixelated;
}

.section-header { margin: 1.5rem 0 1rem; }
.panel > .section-header:first-child,
.back-link + .section-header { margin-top: 0.25rem; }

.section-header h2 {
  font-family: var(--font-heading);
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.section-header__rule {
  display: block;
  height: 8px;
  background: var(--titlebar-fill);
  border-top: 3px solid var(--panel-border);
  border-bottom: 3px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 1.5rem;
}

@media (max-width: 720px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .tile-grid { grid-template-columns: 1fr; }
}

.tile {
  position: relative;
  width: 100%;
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
  background-color: var(--cool-3);
  background-size: cover;
  background-position: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.tile__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 20%,
    rgba(255, 255, 255, 0) 50%,
    rgba(13, 41, 178, 0.12) 100%);
}

.tile__caption {
  position: relative;
  width: 100%;
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.tile__title {
  font-weight: bold;
  line-height: 1.2;
  font-size: 1.05rem;
  color: #fff;
  -webkit-text-stroke: 1px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000,
    -1px  1px 0 #000, 1px  1px 0 #000;
}
.tile__date {
  position: absolute;
  top: 0.45rem;
  right: 0.65rem;
  font-size: 0.8rem;
  color: #fff;
  -webkit-text-stroke: 0.6px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000,
    -1px  1px 0 #000, 1px  1px 0 #000;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--bevel-raised), 0 7px 16px rgba(13, 41, 178, 0.32);
}
.tile:focus-visible {
  outline: 2px dashed var(--cool-7);
  outline-offset: 2px;
}

.tile--collection {}
.tile--project {}
.tile--post {}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  color: var(--cool-7);
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.placeholder { margin: 0 0 1rem; }

.detail-meta { margin: 0 0 1rem; opacity: 0.7; }
.post-body { margin: 0 0 1rem; padding-bottom: 3rem; }
.post-body > :first-child { margin-top: 0; }
.post-body h1, .post-body h2, .post-body h3 {
  font-family: var(--font-heading);
  margin: 1.4rem 0 0.5rem;
  line-height: 1.2;
}
.post-body p { margin: 0 0 0.9rem; }
.post-body ul, .post-body ol { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.3rem; }
.post-body a { font-weight: bold; }

.post-body img,
.post-body video,
.post-body iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}
.post-body code {
  font-family: monospace;
  background: var(--cool-1);
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--panel-border);
}
.post-body pre {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.9rem;
  overflow-x: auto;
  background: var(--cool-1);
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-sunken);
}
.post-body pre code { background: none; border: 0; padding: 0; }
.post-body blockquote {
  margin: 0 0 0.9rem;
  padding: 0.4rem 0.9rem;
  border-left: 4px solid var(--panel-border);
  opacity: 0.85;
}

#panel-home:not([hidden]) {
  display: flex;
  gap: 1.25rem;
  height: 100%;
  min-height: 0;
}
.about-avatar {
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
  background: var(--content-fill);
}
.about-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.about-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding-right: 0.6rem;
  padding-bottom: 4vh;
}
.about-content > .section-header:first-child { margin-top: 0.25rem; }
.about-content > :last-child { margin-bottom: 0; }

.about-avatar--inline { display: none; }

.about-content {
  scrollbar-width: auto;
  scrollbar-color: var(--cool-4) var(--cool-1);
}
.about-content::-webkit-scrollbar { width: 14px; }
.about-content::-webkit-scrollbar-track { background: var(--cool-1); }
.about-content::-webkit-scrollbar-thumb {
  background: var(--cool-4);
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
}
.about-content::-webkit-scrollbar-thumb:hover { background: var(--cool-5); }

.interest-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.interest-list li { margin-bottom: 0.4rem; }

.home-footer {
  margin: 1.25rem 0 0;
  padding-top: 0.75rem;
  border-top: 2px solid var(--panel-border);
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}
.home-footer a { font-weight: bold; }

.home-symbols {
  margin: 0.75rem 0 0;
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--cool-7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  user-select: none;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}
.activity-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 84px;
  padding: 0.45rem 0.65rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  border: 2px solid var(--panel-border);
  background-color: var(--cool-3);
  background-size: cover;
  background-position: center;
  box-shadow: var(--bevel-raised);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.activity-row:hover,
.activity-row:focus-visible {
  transform: translateX(3px);
  box-shadow: var(--bevel-raised), 0 4px 10px rgba(13, 41, 178, 0.28);
}
.activity-row:focus-visible {
  outline: 2px dashed var(--cool-7);
  outline-offset: 2px;
}

.activity-row__tag {
  position: absolute;
  top: 0.45rem;
  left: 0.65rem;
  font-weight: bold;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  color: var(--neutral-black);
  border: 1px solid var(--panel-border);
}
.activity-row__tag--project { background: var(--warm-3); }
.activity-row__tag--blog    { background: var(--warm-4); }
.activity-row__title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  -webkit-text-stroke: 1px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000,
    -1px  1px 0 #000, 1px  1px 0 #000;
}
.activity-row__date {
  position: absolute;
  top: 0.45rem;
  right: 0.65rem;
  font-size: 0.8rem;
  color: #fff;
  -webkit-text-stroke: 0.6px #000;
  paint-order: stroke fill;
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000,
    -1px  1px 0 #000, 1px  1px 0 #000;
}

@media (max-width: 720px) {
  #panel-home:not([hidden]) {
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;

    scrollbar-width: auto;
    scrollbar-color: var(--cool-4) var(--cool-1);
  }
  #panel-home::-webkit-scrollbar { width: 14px; }
  #panel-home::-webkit-scrollbar-track { background: var(--cool-1); }
  #panel-home::-webkit-scrollbar-thumb {
    background: var(--cool-4);
    border: 2px solid var(--panel-border);
    box-shadow: var(--bevel-raised);
  }
  #panel-home::-webkit-scrollbar-thumb:hover { background: var(--cool-5); }

  #panel-home > .about-avatar { display: none; }
  .about-avatar--inline {
    display: block;
    height: auto;
    width: 260px;
    max-width: 75%;
    aspect-ratio: 1 / 1;
    margin: 0.25rem auto 1.25rem;
  }
  .about-content {
    overflow: visible;
    padding-right: 0;
    padding-bottom: 2vh;
  }

  .activity-row:hover,
  .activity-row:focus-visible {
    transform: none;
  }
}
@media (max-width: 420px) {
  .about-avatar--inline { width: 220px; max-width: 80%; }
}

.settings-group {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--content-fill);
  border: 2px solid var(--panel-border);
  box-shadow: var(--bevel-raised);
}
.settings-group__title {
  font-family: var(--font-heading);
  margin: 0 0 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.settings-toggle,
.settings-radio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  font-weight: bold;
  cursor: pointer;
}
.settings-toggle input,
.settings-radio input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--cool-5);
  cursor: pointer;
}

.flower_front {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: translateY(20vh);
  z-index: 1000;
  pointer-events: none;
  image-rendering: pixelated;
  transition: transform 350ms ease;
}

.daisy-zone {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 18vh;
  z-index: 1001;
}
.daisy-zone:hover ~ .flower_front {
  transform: translateY(calc(20vh + 34px));
}

:root.flowers-lowered body > .flower_front {
  transform: translateY(calc(20vh + 34px));
}
:root.flowers-off body > .flower_front,
:root.flowers-off body > .daisy-zone {
  display: none;
}

@media (max-width: 720px) {
  .flower_front { transform: translate(28vw, 30vh); }
  .daisy-zone:hover ~ .flower_front,
  :root.flowers-lowered body > .flower_front {
    transform: translate(28vw, calc(30vh + 34px));
  }
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  cursor: pointer;

  background-image: var(--background-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.splash[hidden] { display: none; }

.splash_logo {
  width: min(80vw, 760px);
  max-height: 60vh;
  object-fit: contain;
  image-rendering: pixelated;
  transform-origin: center;
}
.splash_logo:hover {
  animation: logo-wiggle 1.1s ease-in-out;
}

.splash_hint {
  display: block;
  width: min(40vw, 280px);
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  animation: splash-blink 1.2s steps(1, end) infinite;
}
@keyframes splash-blink { 50% { opacity: 0; } }
