/* ==================================================================
   1. CUSTOM ACCENT COLOR OVERRIDE
   Material's palette only ships preset accent colors. We override the
   underlying CSS custom properties directly to get our exact brand
   color (#5E81AC) in both light and dark schemes.
   ================================================================== */
:root {
  --md-accent-fg-color: #5E81AC;
  --md-accent-fg-color--transparent: #5E81AC1a;
  --brand-accent: #5E81AC;
  --brand-accent-soft: #5E81AC26;
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #10151c;
  --md-default-bg-color: #0d1117;
  --md-default-fg-color: #e6edf3;
  --md-accent-fg-color: #5E81AC;
}

[data-md-color-scheme="default"] {
  --md-accent-fg-color: #5E81AC;
}

.md-typeset a {
  color: var(--brand-accent);
}

.md-typeset .md-button--primary {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
}

.md-typeset .md-button--primary:hover {
  background-color: #4c6d94;
  border-color: #4c6d94;
}

/* ==================================================================
   1B. GLOBAL BACKGROUND ATMOSPHERE
   A very low-opacity gradient wash across the top of every page, plus
   a faint dot-grid texture. Scoped separately per color scheme because
   the same opacity reads very differently on dark vs. light.
   Uses background-attachment: fixed on the body so it doesn't repeat
   or tile awkwardly as content scrolls.
   ================================================================== */
[data-md-color-scheme="slate"] .md-container {
  background-image:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(94, 129, 172, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% -5%, rgba(143, 188, 208, 0.14) 0%, transparent 60%),
    radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: top, top, top;
}

[data-md-color-scheme="default"] .md-container {
  background-image:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(94, 129, 172, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% -5%, rgba(143, 188, 208, 0.10) 0%, transparent 60%),
    radial-gradient(circle, rgba(15, 20, 30, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: top, top, top;
}

/* ==================================================================
   2. HERO SECTION
   ================================================================== */
.hero-wrapper {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* Decorative blurred glow orbs — fill the dead space either side of
   the centered hero title on wide screens. Two different hues
   (brand accent + a cooler frost tone) for visual depth, positioned
   asymmetrically so it doesn't look like a mirrored template. */
.hero-wrapper::before,
.hero-wrapper::after {
  content: "";
  position: absolute;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  animation: hero-float 12s ease-in-out infinite;
}

.hero-wrapper::before {
  top: -8rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(94, 129, 172, 0.45) 0%, transparent 70%);
  animation-delay: 0s;
}

.hero-wrapper::after {
  top: -4rem;
  right: -14rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(143, 188, 208, 0.35) 0%, transparent 70%);
  animation-delay: -6s;
}

[data-md-color-scheme="default"] .hero-wrapper::before {
  background: radial-gradient(circle, rgba(94, 129, 172, 0.28) 0%, transparent 70%);
}

[data-md-color-scheme="default"] .hero-wrapper::after {
  background: radial-gradient(circle, rgba(143, 188, 208, 0.22) 0%, transparent 70%);
}

@keyframes hero-float {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(1.5rem, 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrapper::before,
  .hero-wrapper::after {
    animation: none;
  }
}

.hero {
  text-align: center;
  padding: 5rem 1.5rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--md-default-fg-color) 0%, var(--brand-accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--md-default-fg-color--light);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons .md-button {
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-buttons .md-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--brand-accent-soft);
}

/* ==================================================================
   3. HOMEPAGE SEARCH BAR (visual trigger for Material's real search)
   ================================================================== */
.hero-search-wrapper {
  display: flex;
  justify-content: center;
  padding: 0 1.5rem 4rem;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 640px;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--md-code-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-search:hover,
.hero-search:focus-visible {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px var(--brand-accent-soft);
  transform: translateY(-1px);
  outline: none;
}

.hero-search-icon {
  font-size: 1.3rem;
  color: var(--brand-accent);
  display: flex;
}

.hero-search-icon svg {
  fill: var(--brand-accent);
  width: 1.3rem;
  height: 1.3rem;
}

.hero-search-text {
  flex: 1;
  text-align: left;
  color: var(--md-default-fg-color--light);
  font-size: 0.95rem;
}

.hero-search-kbd {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--md-default-fg-color--light);
}

/* ==================================================================
   4. SOFTWARE CARDS (Material native grid cards, enhanced)
   ================================================================== */
.software-grid.grid.cards {
  margin-top: 1.5rem;
}

.software-grid.grid.cards > ul > li,
.software-grid.grid.cards > .grid > li {
  border-radius: 16px;
  background: var(--md-code-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.software-grid.grid.cards > ul > li:hover,
.software-grid.grid.cards > .grid > li:hover {
  transform: translateY(-6px);
  border-color: var(--brand-accent);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--brand-accent-soft);
}

.software-icon svg {
  transition: transform 0.25s ease, fill 0.25s ease;
  fill: var(--brand-accent);
}

.software-grid.grid.cards > ul > li:hover .software-icon svg,
.software-grid.grid.cards > .grid > li:hover .software-icon svg {
  transform: scale(1.15);
}

.software-grid.grid.cards > ul > li a,
.software-grid.grid.cards > .grid > li a {
  color: var(--brand-accent);
  font-weight: 600;
}

/* ==================================================================
   5. FEATURED TUTORIAL CARDS
   Left-aligned, article-style cards — distinct from the centered
   software cards to preserve visual hierarchy on the page.
   ================================================================== */
.tutorial-grid.grid.cards {
  margin-top: 1.5rem;
}

.tutorial-grid.grid.cards > ul > li,
.tutorial-grid.grid.cards > .grid > li {
  text-align: left;
  border-radius: 16px;
  background: var(--md-code-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.tutorial-grid.grid.cards > ul > li:hover,
.tutorial-grid.grid.cards > .grid > li:hover {
  transform: translateY(-6px);
  border-color: var(--brand-accent);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--brand-accent-soft);
}

.tutorial-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: var(--brand-accent);
  margin-bottom: 0.5rem;
  transition: transform 0.25s ease;
}

.tutorial-grid.grid.cards > ul > li:hover .tutorial-icon svg,
.tutorial-grid.grid.cards > .grid > li:hover .tutorial-icon svg {
  transform: scale(1.15);
}

.tutorial-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 0.5rem;
}

.tutorial-grid.grid.cards > ul > li p:last-of-type,
.tutorial-grid.grid.cards > .grid > li p:last-of-type {
  margin-top: 0.75rem;
}

.tutorial-grid.grid.cards > ul > li a,
.tutorial-grid.grid.cards > .grid > li a {
  color: var(--brand-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==================================================================
   6. RESEARCH AREA TILES
   Calmer, topic-tag style tiles: gradient background + expanding
   bottom accent bar on hover, distinct from cards above.
   ================================================================== */
.research-grid.grid.cards {
  margin-top: 1.5rem;
}

.research-grid.grid.cards > ul > li,
.research-grid.grid.cards > .grid > li {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 16px;
  padding: 2rem 1.5rem 1.75rem;
  background: linear-gradient(
    160deg,
    var(--md-code-bg-color) 0%,
    var(--brand-accent-soft) 180%
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.research-grid.grid.cards > ul > li::after,
.research-grid.grid.cards > .grid > li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  background: var(--brand-accent);
  transition: width 0.3s ease;
}

.research-grid.grid.cards > ul > li:hover,
.research-grid.grid.cards > .grid > li:hover {
  transform: translateY(-4px);
  border-color: var(--brand-accent);
}

.research-grid.grid.cards > ul > li:hover::after,
.research-grid.grid.cards > .grid > li:hover::after {
  width: 100%;
}

.research-icon svg {
  width: 2rem;
  height: 2rem;
  fill: var(--brand-accent);
  margin-bottom: 0.75rem;
}

.research-grid.grid.cards > ul > li a,
.research-grid.grid.cards > .grid > li a {
  color: var(--brand-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==================================================================
   7. RESOURCE TILES
   Compact, icon + label utility links — lightest card style on the
   page, deliberately no description text.
   ================================================================== */
.resource-grid.grid.cards {
  margin-top: 1.5rem;
}

.resource-grid.grid.cards > ul,
.resource-grid.grid.cards > .grid {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.resource-grid.grid.cards > ul > li,
.resource-grid.grid.cards > .grid > li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--md-code-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.resource-grid.grid.cards > ul > li:hover,
.resource-grid.grid.cards > .grid > li:hover {
  transform: translateY(-3px);
  background: var(--brand-accent-soft);
  border-color: var(--brand-accent);
}

.resource-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: var(--brand-accent);
  flex-shrink: 0;
}

.resource-grid.grid.cards > ul > li p,
.resource-grid.grid.cards > .grid > li p {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
  flex: 1;
}

.resource-grid.grid.cards > ul > li a,
.resource-grid.grid.cards > .grid > li a {
  color: var(--brand-accent);
  display: flex;
  align-items: center;
}

.resource-grid.grid.cards > ul > li a svg,
.resource-grid.grid.cards > .grid > li a svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--brand-accent);
  transition: transform 0.2s ease;
}

.resource-grid.grid.cards > ul > li:hover a svg,
.resource-grid.grid.cards > .grid > li:hover a svg {
  transform: translateX(3px);
}

/* ==================================================================
   8. LATEST PUBLICATIONS (simple modern list, no cards)
   ================================================================== */
.publication-list {
  max-width: 820px;
  margin: 1.5rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.publication-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.publication-item:hover {
  background: var(--brand-accent-soft);
  padding-left: 0.9rem;
}

.publication-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: var(--md-default-fg-color--light);
  margin-top: 0.2rem;
  flex-shrink: 0;
  transition: fill 0.2s ease;
}

.publication-item:hover .publication-icon svg {
  fill: var(--brand-accent);
}

.publication-content {
  flex: 1;
}

.publication-content p:first-child {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  line-height: 1.4;
}

.publication-content p:first-child a {
  color: var(--md-default-fg-color);
  font-weight: 600;
}

.publication-item:hover .publication-content p:first-child a {
  color: var(--brand-accent);
}

.publication-meta {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
}

.publication-viewall {
  text-align: center;
  margin-top: 2rem;
}

.publication-viewall .md-button {
  border-radius: 10px;
  font-weight: 600;
}

/* ==================================================================
   9. FOOTER COLUMNS
   Custom 4-column info block injected via overrides/partials/footer.html.
   Sits above Material's native copyright/social row.
   ================================================================== */
.ctc-footer-columns {
  background-color: var(--md-footer-bg-color, #10151c);
  padding: 3rem 0 2rem;
}

.ctc-footer-columns__inner {
  display: grid;

  /* TheoChem | Developed By | Last Updated | Newsletter */
  grid-template-columns: 300px 170px 170px 360px;
  column-gap: 6rem;
  margin-left: 9.5rem;
  max-width: 70rem;      /* was 61rem */
  padding: 0 2rem;
  align-items: start;
}

.ctc-footer-columns__inner > .ctc-footer-col:first-child .ctc-footer-col__text {
    font-size: 0.70rem;
    line-height: 1.8;
    max-width: 300px;
}

.ctc-footer-col__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin: 0 0 0.75rem;
}

.ctc-footer-col__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.ctc-footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ctc-footer-col__list li {
  margin-bottom: 0.5rem;
  margin-top: -0.50rem;
}

.ctc-footer-col__list a {
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ctc-footer-col__list a:hover {
  color: var(--brand-accent);
}

.ctc-footer-newsletter {
    align-self: start;
    justify-self: end;
}

/* ==================================================================
   10. RESPONSIVE ADJUSTMENTS
   ================================================================== */
@media screen and (max-width: 44.9375em) {
  .hero {
    padding: 3rem 1rem 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  /* On mobile there's no "empty side space" to fill — full-width
     content already fills the viewport. Shrink and pull the orbs
     mostly off-screen so they read as a soft top glow instead of
     a distracting blob, and can never cause horizontal scrolling. */
  .hero-wrapper::before,
  .hero-wrapper::after {
    width: 18rem;
    height: 18rem;
    filter: blur(60px);
  }

  .hero-wrapper::before {
    top: -6rem;
    left: -8rem;
  }

  .hero-wrapper::after {
    top: -3rem;
    right: -9rem;
    width: 15rem;
    height: 15rem;
  }

  .ctc-footer-columns__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media screen and (max-width: 30em) {
  .ctc-footer-columns__inner {
    grid-template-columns: 1fr;
  }



}


/* Background only in dark mode */
body[data-md-color-scheme="slate"] {
    background-image: url("/assets/images/bg-color.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Remove background in light mode */
body[data-md-color-scheme="default"] {
    background-image: none;
}




/* ==================================================================
   11. FILTERABLE TABLES
   Styling for the per-column filter row injected by extra.js into
   Wrap the table in `<div class="filterable" markdown="1">...</div>`
   (attr_list does not attach classes to tables directly).
   ================================================================== */
.filterable table .filter-row th {
  padding: 0.4rem 0.5rem;
  background: var(--md-code-bg-color);
}

.filterable table .filter-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
}

.filterable table .filter-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent-soft);
}

.filterable table .filter-input::placeholder {
  color: var(--md-default-fg-color--lighter);
}





/* ==========================================================
   TABLE TOOLBAR
========================================================== */

.table-toolbar{
    margin-bottom:1rem;
}

.table-search{
    width:100%;
    padding:0.7rem 1rem;
    margin-bottom:1rem;
    border-radius:8px;
    border:1px solid rgba(255,255,255,.15);
    background:var(--md-default-bg-color);
    color:var(--md-default-fg-color);
    font:inherit;
}

.table-search:focus{
    outline:none;
    border-color:var(--brand-accent);
    box-shadow:0 0 0 3px var(--brand-accent-soft);
}

.filter-chips{
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
}

.filter-chip{

    cursor:pointer;

    padding:.45rem .9rem;

    border-radius:999px;

    border:1px solid rgba(255,255,255,.12);

    background:var(--md-code-bg-color);

    color:var(--md-default-fg-color);

    transition:.2s;

    font-size:.8rem;
}

.filter-chip:hover{

    border-color:var(--brand-accent);

}

.filter-chip.active{

    background:var(--brand-accent);

    color:white;

}



/* ===========================================================
   TABLE TOOLBAR
===========================================================*/

.table-toolbar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:1rem;

    margin-bottom:1rem;

    position:relative;

}


.table-search{

    width:220px;      /* Try 220–300px */

    flex:none;

    height:56px;

    padding:.55rem .85rem;

    font-size:.60rem;

    border-radius:8px;

    border:1px solid rgba(255,255,255,.12);

    background:var(--md-default-bg-color);

    color:var(--md-default-fg-color);

    font:inherit;

}


.table-search:focus{

    outline:none;

    border-color:var(--brand-accent);

    box-shadow:0 0 0 3px var(--brand-accent-soft);

}

.filter-button{

    width:42px;

    height:42px;

    border:none;

    cursor:pointer;

    border-radius:8px;

    display:flex;

    align-items:center;

    justify-content:center;

    background:var(--md-code-bg-color);

    color:var(--md-default-fg-color);

    transition:.2s;

}

.filter-button:hover{

    background:var(--brand-accent-soft);

}

#filter-menu{

    position:absolute;

    top:52px;

    right:0;

    width:270px;

    max-height:420px;

    overflow:auto;

    padding:1rem;

    border-radius:12px;

    background:var(--md-default-bg-color);

    border:1px solid rgba(255,255,255,.1);

    box-shadow:0 12px 35px rgba(0,0,0,.35);

    display:none;

    z-index:999;

}

#filter-menu.open{

    display:block;

}

#filter-menu h4{

    margin:.25rem 0 .6rem;

    font-size:.82rem;

    color:var(--brand-accent);

}

.filter-option{

    display:block;

    margin:.35rem 0;

    cursor:pointer;

}

.filter-option input{

    margin-right:.45rem;

}

#filter-menu hr{

    margin:1rem 0;

}

#reset-filters{

    width:100%;

    margin-top:1rem;

    padding:.55rem;

    border:none;

    border-radius:8px;

    cursor:pointer;

    background:var(--brand-accent);

    color:white;

}




.filter-option{

    display:flex;

    align-items:center;

    gap:.45rem;

    font-size:.60rem;

    margin:.25rem 0;

}



.newsletter-section{

    width:420px;
    padding:20px 22px;

    border-radius:12px;

    background:rgb(39,42,49);

}

.newsletter-section h2 {
  font-size: 0.90rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin: 0 0 0.75rem;



}

.newsletter-section p {
    margin: 0 0 1rem;
    font-size: 0.80rem;
    line-height: 1.6;
    color: var(--md-default-fg-color--light);
}

.newsletter-form{

    display:flex;
    align-items:center;

}

.newsletter-form input{

    padding:7px 10px;
    font-size:0.85rem;
    width: 260px;
}

.newsletter-form button{

    padding:7px 14px;

    border:none;

    background:#1976d2;
    color:white;
    font-size:0.85rem;
    font-weight:600;

    border-radius:0 6px 6px 0;

    cursor:pointer;

}


.newsletter-message {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #7cb342;
}





