@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url("monolisa.css");
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* Go Home link styling for main and post pages */
.go-home-link {
  text-align: center;
  margin: -1.2rem 0 1.1rem 0;
}
.go-home-link a {
  color: var(--accent-color);
  font-size: 1rem;
  text-decoration: underline;
}

.go-home-link a:hover {
  color: var(--code-foreground);
}


:root {
  --background-color: oklch(93% 0.075 70);
  --accent-color: oklch(25% 0.2 305);
  --text-color: black;
  --link-color: oklch(from var(--accent-color) 0.5 c 260);
  --code-background: oklch(from var(--accent-color) l 0.1 h);
  --code-foreground: oklch(from var(--accent-color) calc(l + 0.6) 0.1 h) !important;
  font-size: 18px;

  @media (min-width: 1250px) {
    font-size: 26px;
  }
}

[data-theme="dark"] {
  --background-color: #121212;
  --text-color: #e0e6f0;
  --accent-color: #60a5fa;
  --link-color: #60a5fa;
}

html {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
  background-color: var(--background-color);
}


body {
  margin: 0;
  width: 100%;
  height: 100%;
  color: var(--text-color);
  font-family: 'Rubik', sans-serif;
}

/* JetBrains Mono for digits in .mono-digits */

.mono-digits {
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}


time, .mono-date {
  font-family: 'MonoLisa', 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

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

  &:visited {
    color: oklch(from var(--link-color) l c calc(h + 50));
  }

  text-underline-offset: 0.15lh;
  text-decoration-thickness: 0.1lh;

  &:hover,
  &:focus {
    text-decoration-thickness: 0.15lh;

    &:active {
      text-decoration-thickness: 0.2lh;
    }
  }
}

main.page,
article.post {
  margin: 0 auto;
  max-width: 1320px;
  padding: 0rem 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: justify;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-align: center;
  color: var(--accent-color);
}

p {
  line-height: 1.5rem;
  margin: 1.5rem 0;
}

/* Theme Switch Styling */

.theme-switch-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 30px;
    background-color: oklch(93% 0.075 70 / 0.7);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-time);
}

[data-theme="dark"] .theme-switch-container {
    background-color: oklch(28.5% 0.032 264 / 0.7); /* oklch of #232b36, 70% opacity */
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 48px;
}

.theme-switch input {
  display: none;
}

.slider {
      /*background-color: var(--profileBorderColor);*/
    background-color: oklch(35% 0.07 50 / 0.2);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}


input:checked + .slider {
  background-color: #60a5fa;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.theme-switch-container .icon {
  margin: 0 8px;
  font-size: 18px;
  color: #e0e6f0;
}

/* Apply transitions for theme changes */
body, a, h1, h2, h3, h4, h5, h6, .theme-switch-container .icon {
  transition: color var(--transition-time), background-color var(--transition-time), 
              border-color var(--transition-time), box-shadow var(--transition-time);
}
