@font-face
{
  font-family: 'Bastliga-One';
  src: url('/fonts/bastliga-one.regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root
{
  /* Light Theme */
  --background: rgb(251, 248, 245);
  --background-vivid: white;
  /* 
  Original color:
  --background: rgb(250, 247, 244);
  
  Nice darker red color:
  --background: rgb(252, 238, 225); 
  */
  --card-paperwhite: rgb(251, 248, 245);
  --code-midgray: #ddd;
  --blockquote-gray: #f0f0f0;
  --border-gray: rgb(199, 199, 199);
  --text: #222;
  --text-hover-shiny: #4d7ba9;
  --text-mobile-menu: white;
  --closeButton-mobile-menu: white;
  --text-mobile-menu-hover: black;
  --background-mobile-menu: linear-gradient(135deg,
      rgba(170, 45, 0, 0.7),
      rgba(0, 98, 174, 0.7) 50%,
      rgba(83, 44, 173, 0.7) 100%
      );

  /* 
  I like this one, but too vibrant:
  --background-gradient: linear-gradient(135deg,
    #ff4500,
    #f7573a,
    #4169E1, 
    #0078C8,
    #6634C7,
    #4a209f
  ); 
  
  Not bad:
    --background-gradient: linear-gradient(135deg,
      #D63C00,
      #0078C8,
      #6634C7 
  );
  
  Not bad either:
  --background-gradient: linear-gradient(135deg,
  rgb(231, 90, 34),
  rgb(68, 142, 248)
  );
  
  Signature colors from AMG logo (ish):
  Blue: rgb(68, 142, 248);
  Red: rgb(231, 90, 34);
  
  Super close:
  --background-gradient: linear-gradient(135deg,
  rgb(236, 65, 49),
  rgb(250, 122, 63),
  rgb(224, 128, 69),
  rgb(82, 124, 207),
  rgb(21, 146, 218),
  rgb(107, 92, 205)
  );
  */
  
  --background-gradient: linear-gradient(135deg,
  rgb(246, 75, 59),
  rgb(255, 132, 73),
  rgb(92, 134, 217),
  rgb(31, 156, 228),
  rgb(117, 102, 215)
  );

  --background-gradient: linear-gradient(135deg,
    rgba(170, 45, 0, 0.2),
    rgba(0, 98, 174, 0.2) 50%,
    rgba(83, 44, 173, 0.2) 100%
    );
  --background-gradient: linear-gradient(135deg,
  rgba(255, 150, 118, 0.5),
  rgba(255, 255, 146, 0.5),
  rgba(184, 255, 255, 0.5),
  rgba(62, 255, 255, 0.5),
  rgba(234, 204, 255, 0.5)
);
--background-gradient: linear-gradient(135deg,
  rgba(214, 63, 53, 0.7),
  rgba(200, 100, 60, 0.70),
  rgba(63, 115, 218, 0.614),
  rgba(25, 140, 220, 0.70),
  rgba(90, 85, 200, 0.30)
);

--background-gradient: linear-gradient(135deg,
  rgba(235, 85, 75, 0.9),
  rgba(220, 125, 85, 0.9),
  rgba(131, 174, 255, 0.6),
  rgba(60, 165, 235, 0.9),
  rgba(130, 120, 225, 0.6)
);


  --button-background-mobile-menu: rgba(0, 0, 0, 0.4);
  --muted-gray: #666;
  --awesome-blue: rgba(0, 145, 255, 1);
  --awesome-orange: rgba(255, 68, 0, 1);
  --accent-blue: rgb(44, 118, 246);
  --accent-yellownote: #F2BA4B;

  --font-serif: "Charter", "Garamond";
  --font-sans-serif: ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Apple Color Emoji, Arial, sans-serif, Segoe UI Emoji, Segoe UI Symbol;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --border-radius: 10px;

  /* 24 looks good on computer, honestly on mobile too. 16 minimum on a lot of mobile sites and apple. */
  --padding: 24px;
  --padding-mobile: 16px;
  --padding-body: 3rem;

  /*
  Insta uses 935. Apple 980. Most ~900. Web search 652. Blogs 650 to 740. 
  8.5" Letter Paper is ~816.
  1200 max otherwise.
  576px is a good blog size for the SF pro text font.
  I settled on about 600px.
  */
  --max-width-article: 600px; /*  600 looks better tbh*/
  --max-width-main: 935px;
  /* TODO: Larger than 1200 max, include some cool art in margins. */

  /* Prevent font scaling in landscape while allowing user zoom */
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

:root.dark
{
  --background: rgb(18, 18, 18);
  --background-vivid: black;
  --text: #eaeaea;
  --text-mobile-menu: white;
  --background-mobile-menu: linear-gradient(135deg,
      rgba(157, 42, 0, 0.7),
      rgba(0, 92, 163, 0.7) 50%,
      rgba(82, 34, 151, 0.7) 100%);
      
  /*
  --background-gradient: linear-gradient(135deg,
    #6a2014,
    #322431,
    #3c2734,
    #242234,
    #1d3322,
    #261852
  );
--background-gradient: linear-gradient(135deg,
    #6a2014,
    #2e1721,
    #1a1a40,
    #2f1828,
    #1d342d,
    #1e143f,
    #1b1430
  );
    --background-gradient: linear-gradient(135deg,
    rgba(170, 45, 0, 0.2),
    rgba(0, 98, 174, 0.2) 50%,
    rgba(83, 44, 173, 0.2) 100%
    );
--background-gradient: linear-gradient(135deg,
  rgba(246, 75, 59, 0.5),
  rgba(255, 132, 73, 0.5),
  rgba(92, 134, 217, 0.5),
  rgba(31, 156, 228, 0.5),
  rgba(117, 102, 215, 0.5)
);
--background-gradient: linear-gradient(135deg,
  rgba(212, 64, 40, 0.5),
  rgba(92, 46, 66, 0.5),
  rgba(52, 52, 128, 0.5),
  rgba(94, 48, 80, 0.5),
  rgba(58, 104, 90, 0.5),
  rgba(60, 40, 126, 0.5),
  rgba(54, 40, 96, 0.5)
);
--background-gradient: linear-gradient(135deg,
  rgba(255, 160, 100, 0.2),
  rgba(230, 115, 165, 0.2),
  rgba(235, 120, 200, 0.2),
  rgba(130, 130, 255, 0.2),
  rgba(145, 255, 225, 0.2),
  rgba(150, 100, 255, 0.2),
  rgba(135, 100, 240, 0.2)
);
*/
--background-gradient: linear-gradient(135deg,
  rgba(128, 80, 50, 0.1),
  rgba(115, 57, 82, 0.1),
  rgba(118, 60, 100, 0.1),
  rgba(65, 65, 128, 0.1),
  rgba(72, 128, 112, 0.1),
  rgba(75, 50, 128, 0.1),
  rgba(68, 50, 120, 0.1)
);
--background-gradient: linear-gradient(135deg,
  rgba(255, 160, 100, 0.1),
  rgba(230, 115, 165, 0.1),
  rgba(235, 120, 200, 0.1),
  rgba(130, 130, 255, 0.1),
  rgba(145, 255, 225, 0.1),
  rgba(150, 100, 255, 0.1),
  rgba(135, 100, 240, 0.1)
);

  --button-background-mobile-menu: rgba(160, 160, 160, .5);
  --muted-gray: #999;
  --accent-blue: rgba(73, 152, 247, 1);
  --card-paperwhite: rgb(13, 13, 13);
  --code-midgray: #1c1c1c;
  --blockquote-gray: #2a2a2a;
  --border-gray: rgba(57, 57, 57, 1);
}

html
{
  background: black; /* force background to play nice in iOS */
}

.dark-toggle-btn
{
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  height: 24px;
  width: 24px;
}

.dark-toggle-btn svg
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  fill: var(--text);
}

/* Show sun icon in light mode */
:root .icon-sun
{
  opacity: 1;
  pointer-events: auto;
}

/* Show moon icon in dark mode */
:root.dark .icon-sun
{
  opacity: 0;
  pointer-events: none;
}

:root.dark .icon-moon
{
  opacity: 1;
  pointer-events: auto;
}

.icon-sun:hover,
.icon-moon:hover
{
  fill: var(--accent-yellownote);
}

*
{
  box-sizing: border-box;
}

body
{
  font-family: var(--font-sans-serif);
  background: var(--background-gradient);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.no-scroll
{
  overflow: hidden;
  position: fixed;
  width: 100%;
}

header
{
  text-align: left;
  margin-top: 1rem; /* Expose a bit of color from body */
}

header a
{
  color: var(--text);
}

header a:hover
{
  color: var(--accent-blue);
}

header hr
{
  max-width: var(--max-width-main);
}

pre,
code
{
  font-family: var(--font-mono);
  font-size: .9rem;
  background: var(--code-midgray);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
}

pre
{
  display: block;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

hr
{
  border-style: none;
  background-color: var(--border-gray);
  height: 1px;
}

article
{
  max-width: var(--max-width-article);
  margin: 0 auto;
}

article h1
{
  line-height: 1.2;
}

h1,
h2,
h3,
h4,
h5,
h6
{
  font-family: var(--font-serif);
  font-weight: 900;
}

h1
{
  font-size: 3.5rem;
  margin: 1rem 0;
}

/* link */
a
{
  color: var(--accent-blue);
  text-decoration: none;
}

/* quote */
q
{
  font-family: var(--font-serif);
  color: var(--muted-gray);
  font-style: italic;
  /* font-weight:300; */
}

ul p,
li p
{
  display: block;
  margin: 0;
}

a:hover
{
  border-color: var(--muted-gray);
}

img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 0.25em;   /* spacing between image and caption */
}

/* image caption */
img + em {
  color: var(--muted-gray);
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1;
  margin-top: 0;           /* reset default inline spacing */
}

video {
  width: 100%;
  max-width: 100vw;
  max-height: 100vh;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* image caption */
video+em
{
  color: var(--muted-gray);
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1;
}

svg
{
  fill: var(--text);
  display: inline-block;
  width: 2rem;
  height: auto;
}

button
{
  background: none;
  border: none;
  margin: none;
  /* margin-top: 1rem; */
  /* padding: 0.5rem 1rem; */
  /* font-size: 1rem; */
  cursor: pointer;
}

blockquote
{
  border-left: 4px solid var(--accent-blue);
  background: var(--blockquote-gray);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--muted-gray);
  font-style: italic;
}

table,
th,
td
{
  border: 1px solid var(--border-gray);
  border-collapse: collapse;
  padding: 0.75rem;
}


small
{
  color: var(--muted-gray);
  font-style: italic;
  font-size: 0.8rem;
}



main
{
  background: var(--background);
  padding: var(--padding-body);
  max-width: var(--max-width-main);
  width: 100%;
  margin: 0 auto;
  flex: auto;
  border-right: 1px solid var(--border-gray);
  border-left: 1px solid var(--border-gray);
}

footer
{
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-gray);
  
  /* Additions for body background experiments: */
  background: var(--background);
  max-width: var(--max-width-main);
  width: 100%;
  margin: 0 auto;
  /* padding: 0px var(--padding) var(--padding) var(--padding); */
  padding: 0px var(--padding-body) var(--padding-body) var(--padding-body);
  border-radius: 0px 0px var(--border-radius) var(--border-radius);
  
  margin-bottom: 1rem; /* Expose a bit of color from body */
  
  border-right: 1px solid var(--border-gray);
  border-left: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
}

footer a
{
  color: var(--accent-yellownote);
}

footer a:hover
{
  text-decoration: underline;
}

/* Apply to containers or text elements where wrapping is needed */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
div
{
  word-wrap: break-word;
  /* legacy */
  overflow-wrap: break-word;
  /* modern */
}

article img, 
article video 
{
  display: block;

  /* Uncomment this section to expand images beyond text like reader view in safari */
  /* max-width: var(--max-width-main);
  width: var(--max-width-main);
  margin-left: calc((var(--max-width-main) - 100%) / 2 * -1);
  margin-right: calc((var(--max-width-main) - 100%) / 2 * -1); */
  
  /* Use this section for classic width */
  max-width: var(--max-width-main);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* used for article nav bar */
.article-width
{
  max-width: var(--max-width-article);
  margin: 0 auto;
}


/* --------------- SIGNATURE ---------------- */

.signature
{
  font-family: 'Bastliga-One';
  font-size: 3rem;
  margin: 0;
}

.signature-large
{
  font-family: 'Bastliga-One';
  font-weight: normal;
  font-size: 6rem;
  margin: 0;
}

/* ------------------- DESKTOP NAV ------------------- */

.nav-container
{
  max-width: var(--max-width-main);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  /* Experimenting with coloring the body and main separate! */
  background: var(--background);
  padding: var(--padding-body) var(--padding-body) 0 var(--padding-body);
  border-radius: var(--border-radius) var(--border-radius) 0px 0px;
  
  border-top: 1px solid var(--border-gray);
  border-right: 1px solid var(--border-gray);
  border-left: 1px solid var(--border-gray);
}

.nav-logo
{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  gap: 1rem;
}

.nav-logo img
{
  display: block;
  width: auto;
  height: 40px;
  justify-content: center;
  border-radius: 0;
}

.nav-links
{
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a
{
  text-decoration: none;
  color: var(--text);
}

.nav-links p
{
  margin: 0;
}

.nav-links svg
{
  width: 24px;
  height: 24px;
}



/* ------------------- MOBILE MENU ------------------- */
/* Soap bubble V2 */
.mobile-menu
{
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;

  background-image: var(--background-mobile-menu);
  background-blend-mode: screen;
  background-size: 100% 100%;

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  /* animation: gradientShift 8s linear infinite; */

  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 2em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.menu-button
{
  display: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  z-index: 1001;
}

.menu-button svg
{
  width: 100%;
  height: 100%;
}

.menu-button line
{
  stroke: var(--text);
}

#closeIcon
{
  display: none;
}

#closeIcon line
{
  stroke: var(--closeButton-mobile-menu);
}

.menu-button circle
{
  fill: var(--button-background-mobile-menu);
}

.mobile-menu svg,
.mobile-menu .dark-toggle-btn
{
  display: flex;
  flex-shrink: 1;
  width: 36px;
  height: 36px;
  max-width: 36px;
  min-width: 24px;
  max-height: 36px;
  min-height: 24px;
}


#post-grid-container
{
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 800px;
  margin: 0;
}

.post-grid
{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

#post-row-container
{
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

.post-row
{
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 150px;
}

.post-row img
{
  width: 150px;
  height: auto;
  max-height: 150px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 4px;
  display: block;
}

.post-text
{
  flex: 1;
  /* Experimenting with card-style layout */
  /* padding: 0 1rem 1rem 1rem; */
}

.post-text h2
{
  margin: 0 0 0.3rem 0;
}

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

.post-text a:hover
{
  color: var(--muted-gray);
}

.post-text p,
small
{
  margin: 0.3rem 0;
  padding: 0;
}

.post-card
{
  /* background: var(--card-paperwhite);
  border-radius: var(--border-radius);
  border: 1px solid var(--text);
  padding: 1rem; */
}

.post-card img
{
  width: 100%;
  display: block;
  object-fit: cover;
  /* height: 160px; */
  max-height: 300px;
  margin-bottom: .8rem;
  
  /* Play with this if going for card-style layout */
  /* border-radius: var(--border-radius) var(--border-radius) 0px 0px; */
}

.post-nav
{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-gray);
  text-align: center;
}

.post-nav-prev
{
  text-align: left;
}

.post-nav-random
{
  text-align: center;
}

.post-nav-next
{
  text-align: right;
}

/* bottom of post links */
.post-nav a
{
  /* color: var(--muted-gray); */
  color: var(--accent-blue)
}

.post-nav a:hover
{
  /* color: var(--text-hover-shiny); */
  text-decoration: underline;
}

.post-date-author
{
  color: var(--muted-gray);
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 2rem;
}

.post-breadcrumbs
{
  color: var(--muted-gray);
  padding: 1rem 0;
  /* Add this margin if coloring the main content! */
  /* margin: 0 0 1rem 0; */
  font-size: 0.9em;
}

.post-breadcrumbs a
{
  font-weight: bold;
  color: var(--muted-gray);
}

.post-breadcrumbs a:hover
{
  text-decoration: underline;

}



.date-divider
{
  display: flex;
  align-items: center;
  width: 100%;
}

.date-divider hr
{
  flex: 1;
  border: none;
  margin: 0;
}

/* --- July 2025 --- */
.date-divider-label
{
  margin: 0 1.5rem;
}

.post-divider
{
  margin: 0;
}


#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

@media (max-width: 738px)
{
    h1
  {
    font-size: 2.5rem;
  }
}


/* @media (max-width: 738px) */
@media (max-width: 935px)
{

  /* ----------- MOBILE PADDING ----------- */
  body
  {
    background: var(--background);
    /* padding: var(--padding-mobile); */
  }

  main
  {
    padding: var(--padding-mobile);
    border: none;
  }
  
  .nav-container
  {
    /* Remove that top padding */
    padding: 0px var(--padding) 0px var(--padding);
    border: none;
  }
  footer
  {
    /* Remove that bottom padding */
    padding: 0px var(--padding) 0px var(--padding);
    border: none;
  }
    
  article img, article video {
    /* Uncomment this section for reader-view like sizing! */
    /* max-width: none;
    width: 100vw;
    margin-left: calc((100vw - 100%) / 2 * -1);
    margin-right: calc((100vw - 100%) / 2 * -1);
    border-radius: 0; */
    max-width: var(--max-width-main);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .signature-large
  {
    font-size: 4rem;
  }

  /* ----------- NAVIGATION ----------- */
  .nav-links
  {
    display: none;
  }

  .menu-button
  {
    display: block;
  }

  .mobile-menu.show
  {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu .menu-animatable
  {
    color: var(--text-mobile-menu);
    transform: translateX(50px);
    opacity: 0;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    font-weight: bold;
  }


  .dark-toggle-btn svg
  {
    fill: var(--text-mobile-menu);
  }

  .mobile-menu .menu-animatable:hover
  {
    color: var(--text-mobile-menu-hover);
  }

  .mobile-menu.show .menu-animatable
  {
    animation: slideIn 0.3s ease forwards;
  }

  .mobile-menu.show .menu-animatable:nth-child(1)
  {
    animation-delay: 0.05s;
  }

  .mobile-menu.show .menu-animatable:nth-child(2)
  {
    animation-delay: 0.10s;
  }

  .mobile-menu.show .menu-animatable:nth-child(3)
  {
    animation-delay: 0.15s;
  }

  .mobile-menu.show .menu-animatable:nth-child(4)
  {
    animation-delay: 0.20s;
  }

  .mobile-menu.show .menu-animatable:nth-child(5)
  {
    animation-delay: 0.25s;
  }

  .mobile-menu.show .menu-animatable:nth-child(6)
  {
    animation-delay: 0.30s;
  }

  @keyframes slideIn
  {
    to
    {
      transform: translateX(0);
      opacity: 1;
    }
  }
}

@keyframes fadeIn
{
  from
  {
    opacity: 0;
    transform: translateY(12px);
  }

  to
  {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animate background position for subtle color drift */
@keyframes gradientShift
{
  0%
  {
    background-position: 0% 50%;
  }

  50%
  {
    background-position: 100% 50%;
  }

  100%
  {
    background-position: 0% 50%;
  }
}