:root{
  --bg:#0b0c10; --panel:#11131a; --text:#e9ecf1; --muted:#a9b0bf;
  --brand:#7c5cff; --border:rgba(255,255,255,.10);
  --radius:18px; --shadow:0 10px 30px rgba(0,0,0,.35);
  --max:1100px;
}

body{ 
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

  /*
  background:radial-gradient(1200px 600px at 20% 10%, rgba(124,92,255,.25), transparent 120%), var(--bg);
  color:var(--text);
  */
  /*
  background:
  radial-gradient(1000px 500px at 15% 15%, rgba(124, 92, 255, 0.2), transparent 40%),
  radial-gradient(1200px 600px at 85% 85%, rgba(0, 200, 255, 0.15), transparent 40%);
  */
  
  /**/
  /*background: radial-gradient(1200px 600px at 20% 10%, rgba(124, 92 ,255,.25), transparent 20%);*/
  background: radial-gradient(1200px 600px at 20% 10%, rgba(255, 0, 0,.25), transparent 20%);
  min-height: 100vh;
  /**/
}

body, html {
  margin: 0;
  padding: 0;
  /*background-color: #050a15; */
  background: transparent; 
  font-family: 'Inter', sans-serif;
  color: white;
}

.fcontainer{
  /*max-width:var(--max); */
  width: 100%;
  margin:0 auto; 
  /*padding: 50px 18px 50px 18px; */
  /*padding: 50px 18px 5px 18px; */
  padding: 18px 18px 5px 18px; 
  /*padding-top: 50px;*/
}

.hero{
  /*	
  padding-top:56px; 
  padding-bottom:24px; 
  */
}

.badge{ display:inline-block; padding:8px 12px; border:1px solid var(--border);
  border-radius:999px; color:var(--muted); background:rgba(255,255,255,.03);
}
h1{ font-size:clamp(28px, 4vw, 46px); margin:14px 0 10px; letter-spacing:-.02em; }
.lead{ color:var(--muted); max-width:70ch; font-size:1.08rem; line-height:1.6; }

.cta{ display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; }
.btn{ padding:12px 14px; border-radius:12px; border:1px solid var(--border);
  text-decoration:none; color:var(--text); background:rgba(255,255,255,.03);
}
.btn.primary{ background:var(--brand); border-color:transparent; }
.btn.ghost{ background:transparent; }

.grid-2{ 
  display:grid; 
  grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; 
  margin-top: 40px;
  margin-bottom: 2px;
}

@media (max-width: 860px){ .grid-2{ grid-template-columns:1fr; } }

.card{
  display:block;
  padding:0px; 
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border); 
  box-shadow:var(--shadow); 
  text-decoration:none;
}
.card h2{ margin:0 0 10px; font-size:1.2rem; }
.card ul{ margin:0px; padding-left:18px; color:var(--muted); }
.link{ display:inline-block; margin-top:12px; color:var(--text); opacity:.9; }

.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.section-head p{ margin:0; color:var(--muted); max-width:60ch; }

.snap-row{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(260px, 1fr);
  overflow-x:auto; gap:14px; scroll-snap-type:x mandatory; padding:12px 2px 2px;
}
.snap-card{ scroll-snap-align:start; padding:16px; border-radius:var(--radius);
  border:1px solid var(--border); background:rgba(255,255,255,.03);
}
.snap-row::-webkit-scrollbar{ height:10px; }

/* 2. The Background Image Layer */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /*  background-image: url('/static/images/gbg.png'); */
  background-image: url('/static/images/sky_bg1.jpg'); 
  background-size: cover;
  background-position: center bottom;
  z-index: -2; 
  /**/
}

/* 3. The Gradient Overlay (Crucial for readability) */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /**/
  background: linear-gradient(
    to bottom,
    rgba(5, 10, 21, 0.2) 0%,
    rgba(5, 10, 21, 0.8) 70%,
    rgba(5, 10, 21, 1) 100%
  );
  z-index: -1;
  /**/
}

/* 4. Content Container */
.content-wrapper {
  position: relative;
  z-index: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  min-height: 100vh; 
}

/* Optional: Make your header/footer slightly transparent to show the sky */
.header_container, .my_footer {
  /*background: rgba(5, 10, 21, 0.7); */
  /*backdrop-filter: blur(5px);*/
  
}

.hero-section {
  width: 95%;
  padding: 0px 18px;
  margin: 0px 18px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1.2; }
.hero-visual { 
  padding-top: 30px;
  flex: 0.6; 
  display: flex; 
  justify-content: center; 
}

.floating-dna {
  max-width: 80%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(124, 92, 255, 0.3));
  /*animation: float 6s ease-in-out infinite;*/
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* Responsive: Stack them on mobile */
@media (max-width: 860px) {
  .hero-content { flex-direction: column; text-align: center; }
  .cta { justify-content: center; }
}

.glass-card {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.3s ease, border 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.card-icon {
  margin-bottom: 15px;
  opacity: 0.8;
}

.side-icon-card {
  display: flex !important; /* Overrides default block display */
  align-items: center;
  justify-content: space-between;
  gap: 0px;
  text-align: left;
  /*padding: 24px !important;*/
  padding: 0px 0px 0px 24px !important;
}

.card-text-side {
  flex: 1.5; /* Gives more room to the text */
}

.card-text-side h2 {
  color: var(--brand);      /* Keeps your purple, or use #b19cd9 for a softer look */
  font-weight: 400;         /* This is the key for 'lightness' */
  font-size: 1.25rem;       /* Slightly larger but thinner */
  letter-spacing: 0.02em;   /* Gives a high-end scientific feel */
  /*margin-bottom: 15px;      /* Better breathing room above the list */
  opacity: 0.9;             /* Slightly dims it to blend better with the dark sky */
}

.card-text-side ul li {
  font-weight: 300;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--muted);
}

.card-icon-side {
  flex: 1.0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-icon-side img {
  width: 100%;
  max-width: 480px; /* Adjust size as needed */
  height: auto;
  opacity: 0.9;
  /* Adds a subtle glow to the icon itself */
  filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.2));
}

/* On very small mobile screens, stack them back to normal */
@media (max-width: 480px) {
  .side-icon-card { flex-direction: column-reverse; text-align: center; }
  .card-icon-side { margin-bottom: 20px; }
}

.about-mini-panel {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 0px;
  padding: 30px !important;
}

.about-brief {
  flex: 2;
}

.about-brief p {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0;
}

.about-fast-facts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border);
  padding-left: 30px;
}

.fact {
  display: flex;
  flex-direction: column;
}

.fact-label {
  font-size: 0.75rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

/* Responsive: Stack for tablet/mobile */
@media (max-width: 860px) {
  .about-mini-panel { flex-direction: column; align-items: flex-start; }
  .about-fast-facts { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; width: 100%; }
}

.project-hub-card {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 0px;
  min-height: 200px;
  padding-left: 34px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  box-shadow: 0 8px 24px rgba(8, 14, 26, 0.16);
  color: var(--text);
  transition: transform 0.3s ease;
}

.project-hub-card:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.project-hub-card:link,
.project-hub-card:visited,
.project-hub-card h2,
.project-hub-card p {
  color: var(--text);
}

.project-info {
  flex: 2;
}

.project-info h2 {
  font-size: 1.32rem;
  line-height: 1.25;
  margin-bottom: 10px;
}

.project-info p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(233, 236, 241, 0.92);
}

.project-preview {
  flex: 0.8;
  display: flex;
  justify-content: center;
}

.project-preview img {
  max-width: 130px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.2));
}

.project-detail-image {
    /*margin: 2rem 0;*/
    margin: 0.2rem 0;
    text-align: center;
}

.project-detail-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.image-caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.tech-stack {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tech-stack span {
  font-size: 0.76rem;
  letter-spacing: 0.2px;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(160, 138, 255, 0.28), rgba(124, 92, 255, 0.2));
  border: 1px solid rgba(170, 150, 255, 0.48);
  border-radius: 999px;
  color: #f5f0ff;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.skyline-map {
    /*height: 72px;*/
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
    opacity: 0.7; /* Keep it subtle so it doesn't fight with the main content */
}

.context-path {
    font-family: 'Courier New', Courier, monospace; /* Scientific/Terminal vibe */
    font-size: 0.85rem;
    color: #d6caff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(124, 92, 255, 0.25);
}

.white-paper {
  /*	
  background: white;
  color: black;
  padding: 10px;
  */
  background: #ffffff;
  color: #1a1a1a; /* Professional off-black */
  padding: 34px; /* tighter content frame for project detail pages */
  border-radius: 8px; /* Slight roundness for a modern feel */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Strong shadow to "lift" it off the space background */

  /*
  border-radius: 16px; 
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  */
  
  margin: 12px auto 24px; /* tighter vertical spacing on project pages */
  max-width: 900px; /* Optimal line-length for reading */
  border: 1px solid rgba(255, 255, 255, 0.1);
  /*overflow: hidden; /* Important: keeps the header color inside the round corners */
}

.white-paper-header {
    background: #f9f9fb; /* Subtle contrast from the white body */
    padding: 28px 34px 20px;
    border-bottom: 1px solid #edf0f2;
}

.white-paper-grid {
    display: grid;
    grid-template-columns: 1fr 280px; /* Main content + Sidebar */
    gap: 0; /* We use padding on children for cleaner lines */
}

.paper-main-content {
    /*padding: 24px 34px 30px;*/
    padding-left: 1.5%;
    line-height: 1.7;
}

.paragraph {
  padding-bottom: 15px;
}

.paper-sidebar {
    background: #fcfcfd;
    border-left: 1px solid #edf0f2;
    padding: 24px 22px;
}

/* Ensure headings inside the paper are dark */
.white-paper h1, 
.white-paper h2, 
.white-paper h3, 
.white-paper p {
    color: #1a1a1a; /* !important;*/
}

/* Make your Python code blocks pop against the white paper */
.white-paper pre {
    background: #1e1e1e !important; /* Keep code blocks dark for contrast */
    border-radius: 6px;
    padding: 20px;
}

.project-detail { padding: 14px 0 20px; }
.project-header { 
  margin-bottom: 10px; 
  border-bottom: 1px solid var(--border); 
  padding-bottom: 5px; 
}
.project-header h1 { font-size: 3rem; margin-top: 10px; }

.project-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 60px; 
}

.project-main section { margin-bottom: 40px; }
.project-main h3 { color: var(--brand); margin-bottom: 15px; }

.workflow-box { 
  padding: 0px; 
  border-radius: var(--radius); 
}

.bullets {
  padding-left: 10px;
}

.project-sidebar { 
    background: rgba(255,255,255,0.02); 
    padding: 25px; 
    border-radius: var(--radius); 
    height: fit-content;
    border: 1px solid var(--border);
}
.sidebar-block { margin-bottom: 25px; }
.sidebar-block h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

@media (max-width: 860px) {
    .project-grid { grid-template-columns: 1fr; }
    .project-header h1 { font-size: 2rem; }
}

/* When the lab-mode is active */
.project-light-mode .space-bg, 
.project-light-mode .bg-overlay {
    display: none; /* Kills the star background */
}

.project-light-mode {
    background-color: #f8f9fa; /* Light, clean gray/white */
    color: #1a1a1b; /* Dark text for high readability */
}

.project-light-mode .content-wrapper {
    background: white;
    box-shadow: 0 0 50px rgba(0,0,0,0.05);
}

/* Make sure your navigation/links adjust to the light background */
.project-light-mode .my_header a,
.project-light-mode h1,
.project-light-mode h2,
.project-light-mode p {
    color: #1a1a1b !important;
}

.project-light-mode .badge {
    background: #eee;
    color: #666;
    border-color: #ddd;
}

/* Services Hero Section */
.service-hero-section {
    padding-top: 50px;
    padding-bottom: 30px;
    text-align: center;
    max-width: 900px; /* Keep hero text from stretching too wide */
    margin-left: auto;
    margin-right: auto;
}

.general-hero-section {
    padding-top: 50px;
    padding-bottom: 30px;
}

.service-hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin: 15px 0;
    letter-spacing: -0.03em;
}

/* Services Grid */
.services-grid-section {
    padding: 0px 18px 0px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Responsive 3-column grid */
    gap: 20px;
    /*margin-top: 30px;*/
}

.service-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    /*align-items: center;*/
    align-items: stretch;
    /*text-align: center;*/
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand); /* Highlight on hover */
}

.service-card h3 {
    font-size: 1.3rem;
    margin: 0 0 10px;
    color: var(--text);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.5;
    text-align: left;
}

.service-head {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  column-gap: 14px;
  margin-bottom: 14px;
  width: 100%;
  /*border: 3px solid red;*/
}

.service-head h3 {
  margin: 0;
  text-align: left;
  line-height: 1.2;
  /*border: 3px solid yellow;*/
}

.service-icon {
  /*
  margin: 0;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  */
  /*border: 1px solid lime;*/
  
  width: 72px;
  height: 72px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;

}

.service-icon img {
  /*
  width: 68px;
  height: 68px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 15px rgba(124, 92, 255, 0.2));
  opacity: 0.95;
  */
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;

}

.service-stack {
  margin-top: auto; /* Pushes the stack to the bottom if cards have different text lengths */
  padding-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  /*justify-content: center;*/
  justify-content: flex-start;
}

.service-stack span {
  font-size: 0.72rem;
  letter-spacing: 0.03rem;
  padding: 3px 10px;
  /* Subtle glass background instead of heavy gradient */
  background: rgba(255, 255, 255, 0.04); 
  /* Thin, semi-transparent border */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px; /* Slightly squared off looks more "pro" than pills in some scientific contexts */
  color: var(--muted); /* Use your muted color to keep it secondary */
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;	
}

/* Call to Action Section (Reusing existing CTA styles) */
.cta-section {
    text-align: center;
    padding: 40px 18px 40px;
}
.cta-section h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 25px;
}

/*
.cta-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px; 
    padding: 24px;
    align-items: flex-start; 
}

.cta-sidebar p {
    margin: 0; 
    line-height: 1.5;
}
*/

.cta-sidebar p {
    margin-bottom: 20px; 
    display: block;
}

.cta-sidebar .btn {
    display: inline-block; /* Ensures padding/margins are respected */
    margin-top: 5px;
}

/* Ensure the badge-small is styled correctly if you use it in the cards */
.badge-small {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.75rem;
    margin-bottom: 10px;
}

/* Masonry Grid Logic */
.notes-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: min-content;
    gap: 20px;
    margin-top: 40px;
}

.note-card {
    display: flex;
    flex-direction: column;
    padding: 24px !important;
    transition: transform 0.3s ease;

    text-decoration: none;
    color: inherit; 
}

.note-card h3, .note-card p {
    text-decoration: none;
    color: var(--text); /* Uses your --text: #e9ecf1 variable */
}

.note-card .tag {
    text-decoration: none;
}

.note-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand) !important;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.note-date {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Category Tags */
[class^="tag-"] {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.tag-python { color: #4b8bbe; background: rgba(75, 139, 190, 0.1); }
.tag-bio { color: #45ba4b; background: rgba(69, 186, 75, 0.1); }
/*.tag-ds { color: #7c5cff; background: rgba(124, 92, 255, 0.1); }*/
.tag-ds { color: #c1becc; background: rgba(124, 92, 255, 0.1); }

/* Search Input */
.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    outline: none;
}
.glass-input:focus { border-color: var(--brand); }

code[class*="language-"], 
pre[class*="language-"] {
    background: #2d2d2d !important; /* Dark charcoal */
    color: #ccc; /* Light text */
}

.my_footer {
    /*margin-top: auto;*/ /* Pushes footer to bottom of content-wrapper */
    margin-top: 30px;
    /*padding: 10px 0 30px;*/
    /*padding: 50px 18px 5px 18px;*/
    padding: 18px 18px 5px 18px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px);
}

.footer_grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer_logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 15px;
}

.footer_bio {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer_col h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 20px;
}

.footer_links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer_links li {
    margin-bottom: 10px;
}

.footer_links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer_links a:hover {
    color: var(--brand);
}

.footer_bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.8rem;
}

/* The Pulse Indicator */
.status_indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.status_dot {
    width: 8px;
    height: 8px;
    background: #00ff88; /* Success Green */
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@media (max-width: 860px) {
    .footer_grid { grid-template-columns: 1fr; gap: 30px; }
}

/* 5. Glassmorphism for your Cards/Carousel items */
/*
.carousel-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
*/

/*backdrop-filter: blur(10px);*/ /* The "Glass" effect */

/* Notes can be more informal while keeping shared layout primitives */
.note-journal { padding: 14px 0 20px; }

.note-shell {
  background: rgba(255, 255, 255, 0.96);
  color: #1a1a1a;
  padding: 26px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  max-width: 980px;
  margin: 8px auto 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.note-shell-header {
  padding: 20px 24px 16px;
  background: linear-gradient(120deg, #f6f0ff, #eef7ff);
  border-bottom: 1px solid #e9ebf3;
  border-radius: 10px;
}

.note-shell-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
}

.note-journal .paper-main-content {
  padding: 24px 24px 30px;
}

.note-journal .paper-sidebar {
  background: #fbfcff;
  border-left: 1px solid #e9ebf3;
  padding: 24px 22px;
}

.note-theme-playful .note-shell-header {
  background: linear-gradient(120deg, #f3ebff, #eaf7ff);
}

/* Gallery-Specific Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    padding: 30px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    background: #fcfcfd; /* Matches your note sidebar for consistency */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #edf0f2;
}

/* This is the secret for the background colors */
.image-wrapper {
    background: #000; /* Default to black so your dark images look seamless */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    border-bottom: 1px solid #edf0f2;
}

/* If the block has a 'light-bg' class, override the black */
.gallery-item.light-bg .image-wrapper {
    background: #ffffff;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 20px;
}

.gallery-caption h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--brand) !important;
}

.gallery-caption p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444 !important;
    margin: 0;
}

/* About Manifesto Special Styles */
.about-manifesto {
    max-width: 800px; /* Slightly narrower for better reading rhythm */
    margin-top: 40px;
    margin-bottom: 60px;
}

.manifesto-header {
    /*text-align: center;*/
    /*padding: 40px 40px 20px;*/
    padding: 1.5% 1.5% 3.0%;
}

/*
.white-paper .manifesto-title {
    color: #2B63B7;
}
    */

h1.manifesto-title {
    color: #2B63B7;
}


.tsiolkovsky-quote {
    font-style: italic;
    font-size: 1.25rem;
    color: #444 !important;
    /*margin: 30px auto 10px;*/
    margin: 10px auto 10px;*/
    max-width: 600px;
    line-height: 1.5;
    position: relative;
}

.tsiolkovsky-quote cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 15px;
    color: var(--brand) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333 !important;
    border-bottom: 1px solid #eee;
    /*padding-bottom: 30px;*/
    /*margin-bottom: 30px;*/
}

.manifesto-visual {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

/* Ensure the status dot is visible on white paper */
.about-manifesto .status_indicator {
    color: #666;
    font-weight: 500;
}

.profile-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    text-align: left; /* Aligns text left to balance the image on the right */
}

.profile-image-container {
    flex: 0 0 120px; /* Fixed size for the photo */
}

.author-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Circular cut */
    object-fit: cover;
    border: 3px solid #f0f0f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    filter: grayscale(20%); /* Optional: a slight desaturation looks more "academic" */
}

.profile-text-container {
    flex: 1;
}

.manifesto-title.secondary {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666 !important;
    margin-top: 5px;
}

/* On Mobile: Stack them vertically and center everything */
@media (max-width: 600px) {
    .profile-flex {
        flex-direction: column;
        text-align: center;
    }
    .profile-image-container {
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .tsiolkovsky-quote { font-size: 1.1rem; }
    .white-paper-header { padding: 20px; }
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; padding: 15px; }
}

@media (max-width: 860px) {
  .note-shell-grid { grid-template-columns: 1fr; }
  .note-shell { padding: 14px; }
}
