/* =============================================
   SITE COLORS - edit these to customize!
   ============================================= */
:root {
  --site-bg: url("images/ML.jpg");
  /* solid color alternative: --site-bg: #FFE1C6; */

  --post-bg: #E4E4E4;
  --post-text: #000000;
  --post-header-text: #000000;
  --border-color: #000000;
  --border-shadow: #000000;

  --sidebar-text: #ffffff;
  --sidebar-bg: url("images/Fabric.jpg");
  --sidebar-button-bg: rgba(48, 48, 48, 0.3);
  --sidebar-button-hover: rgba(48, 48, 48, 0.7);
  --sidebar-button-text: #9b9b9b;
  --sidebar-button-text-hover: #ffffff;
  --sidebar-border-color: #9b9b9b;

  --pinned-text: #000000;
  --pinned-bg: #e4e4e4;

  --button-bg: #ffffff;
  --button-bg-hover: #FFE1C6;
  --button-bg-selected: #ffffff;
  --button-text: #000000;
  --button-border-color: #DA587E;

  --selected-bg: #bde0ff;
  --selected-text: #5244c8;
}

/* =============================================
   FONTS
   ============================================= */
@font-face {
  font-family: 'Lucida Grande';
  src: url('/Lucida/Lucida Grande Regular.ttf');
}
@font-face {
  font-family: 'Lucida Grande';
  src: url('/Lucida/Lucida Grande Regular.ttf');
  font-weight: bold;
}

/* =============================================
   BASE / RESET
   ============================================= */
html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  scrollbar-color: #ffffff;
  scrollbar-width: thin;
}

::selection {
  background: var(--selected-bg);
  color: var(--selected-text);
}

body {
  font-family: 'Lucida Grande', Lucida, sans-serif;
  font-size: 16px;
  margin: 0;
  background: var(--site-bg);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--post-text);
  line-height: 1.6em;
}

h1, nav, .pinned summary {
  font-family: 'Lucida Grande', Lucida, sans-serif;
  font-weight: bold;
}

details > summary,
#tag-filters label {
  cursor: pointer;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.center { text-align: center; }
.small-text { font-size: smaller; }
.no-border { border: none; padding: 0; }
.mobile-only { display: none; }
.pc-only { display: block; }

.flex {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

/* =============================================
   LAYOUT
   ============================================= */
#container {
  max-width: 1200px;
  margin: auto;
}

main {
  width: 600px;
  position: absolute;
  left: 45%;
  transform: translateX(-50%);
  margin: 0;
  padding-top: 4.5em;
}


/* =============================================
   STATUS BAR
   ============================================= */
#status {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 101; /* above sidebar (99) and footer (100) */
  background: var(--pinned-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: 0.5em 1em;

  font-size: small;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-x: auto;
  white-space: nowrap;
  padding-right: 3em;
}

.status-apple {
  font-size: 1.2em;
  margin-right: 0.5em;
  opacity: 0.8;
}

#status ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5em;
}

#status li { padding: 0; }

#status li:nth-child(odd) {
  font-weight: bold;
  color: var(--post-header-text);
}

#status li:nth-child(even) {
  color: var(--post-text);
}

#status li a { color: var(--post-text); }
#status li a:hover { text-decoration: none; }


/* =============================================
   SIDEBAR
   ============================================= */
#sidebar {
  position: fixed;
  right: 0;
  left: auto;
  width: 240px;
  height: 100%;
  padding: 2em 1em;
  padding-top: 3em;
  background: var(--sidebar-bg);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  text-align: center;
  color: var(--sidebar-text);
  border-inline: 0px dashed var(--sidebar-border-color);
  outline: 4px solid var(--sidebar-bg);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 99;
}

.inset-box {
  margin-inline: auto;
  padding: .6em 1em;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  text-align: center;
  width: 100%;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.1);
}

#sidebar h1 {
  margin-block: .5em;
}

#sidebar a {
  color: var(--sidebar-text);
}

#sidebar h1 a {
  font-size: 1em;
}

#sidebar h1 a,
#sidebar a:hover {
  text-decoration: none;
}

#icon { margin: auto; }
#icon img {
  display: block;
  border-radius: 50%;
  max-width: 200px;
  margin: 0 auto;
}

#icon a img {
  outline: 2px solid var(--sidebar-bg);
  transition: .2s;
}
#icon a img:hover {
  outline: 2px solid var(--sidebar-text);
  outline-offset: 4px;
}

#profile p {
  margin-block: .3em;
  line-height: 1.5em;
}

/* =============================================
   SIDEBAR NAV BUTTONS
   ============================================= */
#sidebar nav {
  margin-block: 1.5em;
}

#sidebar nav li.spacer {
  height: 50px;
}

#sidebar nav ul {
  margin-inline: -1em;
  width: auto;
  margin-top: 0;
  margin-bottom: 1em;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#sidebar nav li a {
  width: 100%;
  display: block;
  background: linear-gradient(to bottom, rgba(64, 66, 74, 0.05), rgba(0, 0, 0, 0.4));
  color: var(--sidebar-button-text);
  font-weight: bold;
  border-radius: 0px;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.5),
    0 -2px 0 rgba(0, 0, 0, 1),
    0 1px 0 rgba(0, 0, 0, 1),
    0 4px 4px rgba(0, 0, 0, 0.3);
  outline: none;
  transition: .2s;
  text-decoration: none;
  padding: .2em 1em;
  text-align: left;
}

#sidebar nav li a:visited {
  color: var(--sidebar-text);
  list-style-type: none;
}

#sidebar nav li a:hover {
  background: linear-gradient(to bottom, rgba(64, 66, 74, 0.15), rgba(0, 0, 0, 0.7));
  color: var(--sidebar-button-text-hover);
  outline: none;
}

/* Alt button style - no drop shadow, bottom border only */
#sidebar nav li a.alt {
  background: rgba(255, 255, 255, 0);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.6),
    0 2px 0 rgba(255, 255, 255, 0.2);
    text-color: #000000;
}

#sidebar nav li a.alt:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(255, 255, 255, 0.4);
}


/* =============================================
   SIDEBAR TOGGLE
   ============================================= */
#sidebar-toggle {
  position: fixed;
  top: 0.35em;
  right: 0.75em;
  z-index: 200;
  background: transparent;
  border: none;
  color: var(--post-text);
  font-size: 1.2em;
  cursor: pointer;
  padding: 0.2em 0.4em;
  line-height: 1;
}

#sidebar-toggle:hover {
  opacity: 0.7;
}

/* Desktop: slide out to the right */
#sidebar {
  transition: transform 0.3s ease;
}

#sidebar.hidden {
  transform: translateX(100%);
}

/* Mobile: collapse height so content slides up */
@media only screen and (max-width: 800px) {
  #sidebar {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }

  #sidebar.hidden {
    max-height: 0;
    padding: 0;
    transform: none;
  }
}


/* =============================================
   PINNED SECTIONS (tag filters)
   ============================================= */
.pinned {
  background: var(--pinned-bg);
  font-size: smaller;
  padding: .5em;
  border-radius: 1em;
  margin: 1em 0;
  border: 2px solid var(--border-color);
  outline: 2px solid var(--post-bg);
  box-shadow: 2px 2px 6px var(--border-shadow);
}

.pinned summary {
  color: #000000;
  font-size: 1.5em;
  font-weight: bold;
  border-bottom: 0px dashed var(--border-color);
  margin: .5em;
}

.pinned time {
  font-family: 'Lucida Grande', Lucida, sans-serif;
  float: right;
  font-weight: normal;
  font-size: small;
}

/* =============================================
   POSTS
   ============================================= */
.post {
  position: relative;
  padding-top: 40px;
  background: var(--post-bg);
  color: var(--post-text);
  border-radius: 1rem;
  padding-left: .8rem;
  padding-right: .8rem;
  padding-bottom: .2rem;
  margin-bottom: 4em;
  box-shadow: 2px 2px 6px var(--border-shadow);
  min-width: 100%;
}

.post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, #E8E8E8, #B4B5B5);
  border-radius: 1rem 1rem 0 0;
}

.post img { max-width: 100%; }
.post div + img { margin-top: 1em; }

.post-header {
  position: relative;
  z-index: 1;
  color: var(--post-header-text);
  font-weight: bold;
  padding: .5rem 0;
  border-bottom: 0.5px solid var(--border-color);
}

.post time {
  float: right;
  font-weight: normal;
  font-size: smaller;
  margin: .2em;
}

.post a { color: var(--post-text); }
.post a:hover { text-decoration: none; }

 /* .post li {
list-style-image: url("images/star.png"); 
}
*/

/* =============================================
   TRAFFIC LIGHTS
   ============================================= */
.traffic-lights {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  display: flex;
  gap: 6px;
  align-items: center;
  padding-left: 12px;
  z-index: 3;
}

.tl-red, .tl-yellow, .tl-green {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.6),
    inset 0 -2px 3px rgba(0,0,0,0.3),
    0 0 0 1px rgba(0,0,0,0.2),
    inset 0 0 6px rgba(0,0,0,0.2);
}

.tl-red {
  background: radial-gradient(circle at 40% 35%, #ff9e9e, #e01208);
}

.tl-yellow {
  background: radial-gradient(circle at 40% 35%, #ffe084, #c98000);
}

.tl-green {
  background: radial-gradient(circle at 40% 35%, #8eff8e, #149214);
}

.tl-link {
  cursor: pointer;
  text-decoration: none;
}

/* =============================================
   READ MORE
   ============================================= */
.readmore {
  margin-bottom: 1em;
}

.readmore summary {
  font-weight: bold;
  color: var(--post-header-text);
  list-style-type: none;
}

.readmore[open] > summary { display: none; }

.readmore[open] {
  border-top: 0px dashed var(--button-bg);
  padding-top: 1em;
}

/* =============================================
   TAGS
   ============================================= */
.tags {
  display: none;
  border-top: 0px dashed var(--border-color);
  padding: .4em 0;
}

.tags a { color: var(--post-text); }
.tags span { color: var(--post-header-text); }

.tags a, .tags span {
  font-size: small;
  padding: .2em .5em;
  border-radius: 1em;
  text-decoration: none;
}

.tags a:hover {
  background: var(--button-bg);
  text-decoration: underline;
}

/* =============================================
   TAG FILTERS
   ============================================= */
.tagged:has(input:checked) article { display: none; }

.tagged:has(#all:checked) article,
.tagged:has(#intro:checked) article[class~="intro"],
.tagged:has(#personal:checked) article[class~="personal"],
.tagged:has(#secret:checked) article[class~="secret"],
.tagged:has(#art:checked) article[class~="art"] {
  display: inline-block;
}

#tag-filters label {
  background: var(--button-bg);
  border: 1px solid var(--button-border-color);
  border-radius: .5em;
  display: inline-block;
  margin-left: .5em;
  margin-block: .3em;
  padding: 0 .8em 0 .1em;
}

#tag-filters label:hover {
  background: var(--button-bg-hover);
  text-decoration: underline;
}

#tag-filters label:has(input:checked) {
  background: var(--button-bg-selected);
  color: var(--button-text);
  text-decoration: underline;
  font-weight: bold;
}

#tag-filters label:has(input:checked):hover {
  background: var(--button-bg-hover);
  text-decoration: none;
}

#tag-filters input { appearance: none; }

/* =============================================
   FOOTER
   ============================================= */
#page-nav a { color: var(--sidebar-text); }
#page-nav a:hover { text-decoration: none; }

footer {
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  position: fixed;
  right: 0;
  left: auto;
  bottom: 4px;
  width: 236px;
  font-size: small;
  opacity: 60%;
  text-align: center;
  z-index: 100;
}

/* =============================================
   MOBILE
   ============================================= */
@media only screen and (max-width: 800px) {
  .mobile-only { display: block; }
  .pc-only { display: none; }

  #container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
  }

  #sidebar, main {
    position: static;
    left: auto;
    transform: none;
    margin-inline: 0em;
    width: auto;
  }

  #sidebar {
    border-inline: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    padding: 1em;
    padding-bottom: 0;
    text-align: center;
  }

  #icon {
    display: flex;
    justify-content: center;
    max-width: 40%;
  }

  #icon img {
    max-width: 100%;
    margin-right: 0;
  }

  #sidebar nav { margin-block: .5em; }

  main {
    left: 0;
    margin-inline: auto;
    padding-top: 3em;
  }

  #profile { flex: 2; }
  #profile p {
    margin-block: 0;
    margin-left: 10px;
  }

  #bio {
    border: none;
    padding-block: 0;
  }

  #status ul {
    flex-wrap: wrap;
    gap: .5em;
  }

  footer {
    position: static;
    text-align: center;
    background: none;
    margin: 0;
    width: 100%;
    opacity: 100%;
  }
}