/* ==========================================================================
   notes_style.css  —  standalone stylesheet for notes.html
   The :root block below MIRRORS the design tokens in style.css so the Notes
   page is decoupled from the (portfolio-heavy) main stylesheet. If you change
   a token in style.css, mirror it here to keep the two in sync.
   ========================================================================== */

::-webkit-scrollbar { display: none; }

::selection {
  background: rgba(225, 10, 0, 1.00);
  color: black;
}
a::selection {
  background: rgba(0, 0, 0, 1);
  color: red;
}

:root {
  /* colours (theme-switched in notes_script.js, same keys as the main site) */
  --text-color: white;
  --dark-modeBkg: black;
  --red: red;
  --shadow-color: rgba(0, 0, 0, 0.7);

  /* spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-section: clamp(2.5rem, 6vw, 6rem);

  /* shared column + gutter => symmetric margins at every width */
  --content-max: 1100px;
  --gutter: clamp(1rem, 4vw, 4rem);

  /* type scale (fluid, self-limiting) */
  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);   /* body  */
  --step-1: clamp(1.25rem, 1rem + 1vw, 2rem);       /* h3    */
  --step-2: clamp(1.8rem, 1.2rem + 2.5vw, 3.5rem);  /* h2/h1 */
  --step-3: clamp(2.4rem, 1.5rem + 5vw, 5.5rem);    /* hero  */
    scrollbar-width: none; /* Firefox */
}

#scroll-progress {
      position: fixed;
      top: 0;
      left: 0;
      height: 4px;
      width: 0%;
      background: red;
      z-index: 9999;         
      transition: width 0.05s linear;
}

* { box-sizing: border-box; }
*
.content {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

.content:not(.tooltip) {
  width: min(var(--content-max), 100% - 2 * var(--space-3));
  padding-block: var(--space-4);
  margin-block: var(--space-3);
  border-radius: 18px;
  background: linear-gradient( 180deg,
    color-mix(in srgb, var(--text-color) 10%, transparent),
    color-mix(in srgb, var(--text-color) 4%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--text-color) 16%, transparent);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 color-mix(in srgb, var(--text-color) 22%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}

.content h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--step-2);
  color: var(--text-color);
  line-height: 1.2;
}

.content h2 {

  font-size: var(--step-1);
  margin: var(--space-4) 0 var(--space-2);
  color: var(--text-color);

}

.content h3 {

  font-size: var(--step-1);
  margin: var(--space-3) 0 var(--space-1);
  color: color-mix(in srgb, var(--text-color) 85%, transparent);

}
 
.content p  {
  
  margin: 0 0 var(--space-2);
}
.content a {

  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid currentColor;

}

.content a:hover {

  color: rgba(177, 0, 0, 0.773);

}
 
.content ul, .content ol { padding-left: 1.4em; margin: 0 0 var(--space-2); }

.content li { 

  margin: 0.25em 0;

}
 
.content blockquote {

  margin: var(--space-3) 0;
  padding: 0.4em 1em;
  border-left: 3px solid var(--red);
  color: color-mix(in srgb, var(--text-color) 75%, transparent);

}
 
.content code {

  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--text-color) 12%, transparent);
  padding: 0.15em 0.4em;
  border-radius: 5px;

}

.content pre {

  overflow-x: auto;
  padding: var(--space-2);
  border-radius: 10px;
  background: color-mix(in srgb, var(--text-color) 10%, transparent);

}

.content pre code {

  background: none; padding: 0;

}
 
/* small caption line under the title, e.g. "Physics · June 2026" */
.article-meta {
  
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-color) 55%, transparent);
  margin: 0 0 var(--space-3);

}
 
/* let wide display math and TikZ figures scroll instead of overflowing */
mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }
.content svg { display: block; margin: var(--space-3) auto; max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--text-color);
  background-color: var(--dark-modeBkg);
  /* same faint fixed glows as the portfolio so the frosted panel has
     something to blur */
  background-image:
    radial-gradient(55vw 55vw at 12% 8%,  rgba(225, 10, 0, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at 88% 35%, rgba(90, 110, 160, 0.08), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* scroll progress bar — identical to the portfolio */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: red;
  z-index: 9999;
  transition: width 0.05s linear;
}

/* ------ header --- */
.notes-header {

  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-5) var(--gutter) var(--space-3);
  text-align: center;
  position: relative;

}

.back-link {

  display: inline-block;
  margin-bottom: var(--space-4);
  color: var(--red);
  text-decoration: none;
  font-size: var(--step-1);
  transition: color 0.3s ease, transform 0.3s ease;

}

.back-link:hover {

  color: rgba(177, 0, 0, 0.773);
  transform: translateX(-3px);

}

.back-link::before {

  content: "";
  position: absolute;
  top: -7.5%;
  left: -6px;
  width: calc(100% + 12px);
  height: 115%;
  border-radius: 10px;
  background: #F5EDED;
  transform: scale(0);
  opacity: 0;
  z-index: -1;
  transition: transform 0.7s ease, opacity 0.7s ease;

}

.back-link:hover::before {

  transform: scale(1);
  opacity: 1;

}

/* pin it top-left on wider screens, leave it centred-above on phones*/
@media only screen and (min-width: 700px) {
  .notes-header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-5) var(--gutter) var(--space-3);
  text-align: center;
  position: relative; 

}
  
  .back-link {
    position: absolute;
    left: var(--gutter);
    top: var(--space-3);
    margin-bottom: 0;
  }
}

.notes-header h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--step-2);
  color: var(--text-color);
}

.notes-tagline {
  max-width: 60ch;
  margin: 0 auto;
  font-size: var(--step-0);
  line-height: 1.6;
  color: color-mix(in srgb, var(--text-color) 75%, transparent);
}

/*--- topic bar --- */
.topic-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1) var(--space-2);
  max-width: var(--content-max);
  margin: var(--space-4) auto var(--space-3);
  padding-inline: var(--gutter);
}

.topic-pill {
  font-family: inherit;
  font-size: var(--step-0);
  cursor: pointer;
  color: var(--text-color);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--text-color) 28%, transparent);
  border-radius: 999px;
  padding: 0.4em 1.1em;
  transition: color 0.25s ease, border-color 0.25s ease,
              background-color 0.25s ease, transform 0.15s ease;
}
.topic-pill:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateY(-1px);
}
.topic-pill.active {
  color: black;
  background: var(--red);
  border-color: var(--red);
}
.topic-pill:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* -------------------------------------------------------- entry panel --- */
.notes-list {
  width: min(var(--content-max), 100% - 2 * var(--space-3));
  margin: var(--space-3) auto var(--space-5);
  padding: var(--space-4) clamp(var(--space-3), 4vw, var(--space-5));
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--text-color) 10%, transparent),
    color-mix(in srgb, var(--text-color) 4%,  transparent)
  );
  border: 1px solid color-mix(in srgb, var(--text-color) 16%, transparent);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 color-mix(in srgb, var(--text-color) 22%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}

.note-entry {
  text-align: left;
  padding: var(--space-3) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--text-color) 12%, transparent);
  /* staggered fade-in on (re)render; --i is set per item in JS */
  opacity: 0;
  animation: noteFade 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.note-entry:last-child { border-bottom: 0; }

@keyframes noteFade {
  from { opacity: 0; filter: blur(5px); transform: translateY(6px); }
  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
}

.note-title {
  display: inline-block;
  font-size: var(--step-1);
  line-height: 1.25;
  color: var(--red);
  text-decoration: none;
  transition: color 0.25s ease;
}
.note-title:hover { color: rgba(177, 0, 0, 0.773); }

.note-desc {
  margin: var(--space-1) 0 0.6rem;
  font-size: var(--step-0);
  line-height: 1.55;
  color: color-mix(in srgb, var(--text-color) 82%, transparent);
}

.note-tags {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-color) 55%, transparent);
}

/* empty state */
.notes-empty {
  text-align: center;
  padding: var(--space-4) 0;
  color: color-mix(in srgb, var(--text-color) 60%, transparent);
}

/****SLIDER****/
.switch {
  position: absolute;
  top: var(--space-3);
  right: var(--gutter);
  padding: 0;
  display: inline-block;
  width: 42px;
  height: 15px;
  visibility: hidden;
}

.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 3.5px;
  width: 100%;
  height: 100%;
  transition: 0.4s;
  
}
.slider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 10%;
  top: 1.5px;
  left: 4px;
  transition: 0.4s;
}

/* Tooltip */
.slider::after {
  content: attr(data-tooltip);
  position: absolute;
  background-color: var(--text-color);
  color: red;
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 12px;
  left: auto;
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease-in-out;
}

/* Show tooltip on hover */
.slider:hover::after {
  opacity: 1;
  visibility: visible;
}
/* Phone part */
@media only screen and (max-width: 467px) {
  .switch {
    position: fixed;
    top: 3%;
    right: 10%;
    width: 10px;
    height: 8px;
  }
 
  .slider {
  border-radius: 2.5px;

}
  .slider::before {
    width: 15px;
    height: 15px;
    border-radius: 8%;
    top: 3px;
    left: 4px;
  }
  .slider::after {
    padding: 2.5px 4px;
    border-radius: 2.5px;
    font-size: 10px;
    left: 50%;
    right: auto;
    top: auto;
    bottom: -120%;
    transform: translateX(-50%);
    /* background stays var(--text-color) from the base rule */

  }
}

/* --- footer --- */
hr {
  border: 1px solid var(--text-color);
  max-width: var(--content-max);
  margin-inline: auto;
}
.footer-content {
  text-align: center;
  padding: var(--space-3) var(--gutter) var(--space-4);
}
.footer-content p { color: color-mix(in srgb, var(--text-color) 70%, transparent); }
.footer-content a { color: var(--red); text-decoration: none; }
.footer-content a:hover { text-decoration: underline; }

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .note-entry { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}



