/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@700;900&display=swap');


/* Universal Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* CSS Custom Properties for Typography Scale */
:root {
  /* Typography Scale (Major Third - 1.25) */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Colors */
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #666;
  --color-text-muted: #999;
  --color-accent: #007bff;
  --color-border: #a4a4a4;
}

/* Basic Body Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  margin: 0;
  padding-top: 80px;
  font-weight: 400;
  overflow-x:hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: 900;
  margin-top: 0;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
}

h4 {
  font-size: var(--font-size-2xl);
  font-weight: 500;
}

h5 {
  font-size: var(--font-size-xl);
  font-weight: 500;
}

h6 {
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* Body Text */
p {
  margin: 0 0 var(--space-lg) 0;
  line-height: var(--line-height-relaxed);
}

/* Lead paragraph for articles */
.lead {
  font-size: var(--font-size-xl);
  font-weight: 300;
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
}

/* Small text */
small, .small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 0 0 var(--space-lg) 0;
  padding-left: var(--space-xl);
  line-height: var(--line-height-relaxed);
}

li {
  margin-bottom: var(--space-sm);
}

/* Blockquotes */
blockquote {
  margin: var(--space-2xl) 0;
  padding: var(--space-lg) var(--space-xl);
  border-left: 4px solid var(--color-border);
  background-color: #fafafa;
  font-style: italic;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 0.875em;
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  background-color: #f8f8f8;
  border-radius: 6px;
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.25rem;  /* 36px on mobile */
    --font-size-4xl: 1.875rem; /* 30px on mobile */
    --font-size-3xl: 1.5rem;   /* 24px on mobile */
  }
  
  body {
    font-size: var(--font-size-sm);
  }
  
  h1, h2, h3, h4, h5, h6 {
    margin-top: var(--space-xl);
  }
}

/* Sticky Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.header .logo {
  font-family: 'Roboto Slab', serif;
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--color-text-primary);
}

.header .nav a {
  margin-left: var(--space-lg);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: var(--font-size-base);
  transition: color 0.2s ease;
}

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

.header .nav a.active {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Main Content Area */
main {
  /* The hero section will be outside of main, so we remove the top margin 
     that would create a gap between it and the header. */
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  max-width: 1400px;
  
}

/* Article-specific spacing */
.article-body {
  width: 100%;
  padding: 0 var(--space-md);
  max-width: 100ch; /* Optimal reading width */
  margin: 0 auto;
}

.article-body h1 + .lead {
  margin-top: var(--space-xl);
}

article img,
article video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--space-2xl) 0;
}

article .cover-image {
  width: 100%;
  margin-bottom: var(--space-2xl);
}

/* Footer */
.footer {
  background-color: #f8f9fa;
  padding: var(--space-2xl) 0;
  text-align: center;
  margin-top: var(--space-4xl);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.3);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-socials a {
  display: inline-block;
  transition: transform 0.3s ease;
}

.footer-socials a:hover {
  transform: scale(1.1);
}

.footer-socials img {
  width: 24px;
  height: 24px;
}

/* Byline */
.byline {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.byline .avatar-container {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #eee;
  margin-right: 1rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.byline div {
  display: flex;
  flex-direction: column;
}

.byline strong {
  font-weight: 500;
}

.byline span {
  color: #666;
  font-size: 0.9rem;
}

/* Byline inside an article card */
.article-card-content .byline {
  margin-top: 1.5rem;
  margin-bottom: 0; /* Remove bottom margin */
}

.article-card-content .byline .avatar-container {
  width: 35px;
  height: 35px;
  margin-right: 0.75rem;
}

.article-card-content .byline strong {
  font-size: var(--font-size-sm);
}

.article-card-content .byline span {
  font-size: var(--font-size-xs);
}

/* Masonry Gallery */
.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.masonry-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.masonry-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.masonry-gallery a:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .masonry-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Lightbox */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 2rem;
}

.lightbox-content {
  padding-top:20px;
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background-color: #fff;
  border-radius: 8px;
  /* Remove padding to let the image and caption fill the space */
  padding-left:0px;
  padding-right:0px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Ensures caption doesn't spill out */
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh; /* Adjust max-height to make space for caption */
  display: block;
  /* The image will grow to fill available space */
  flex-grow: 1;
  object-fit: contain; /* Ensures the whole image is visible */
  min-height: 0; /* Important for flexbox sizing */
}

.lightbox-caption {
  padding: 1rem;
  margin:0px;
  background-color: #fff;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  /* Ensures caption is at the bottom */
  flex-shrink: 0;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}

/* Media Component */
.media {
  /* Use margin auto on left and right to center the block */
  margin: 2rem auto; 
  padding: 0 1rem;
  text-align: center;
  max-width: 100%;
}

/* Target media elements specifically within the .media component */
.media img,
.media video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%; /* Ensure it doesn't overflow its container */
}

.media figcaption {
  background-color: #f8f9fa;
  padding: 1rem;
  margin-top: -5px;
  display: inline-block;
  width: 100%;
  color: #666;
  font-size: 0.9rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Hero Section */
#fluid-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero {
  position: relative; /* Needed for the canvas positioning */
  /* Full width, no internal padding */
  width: 100%;
  padding: 4rem 2rem; /* Vertical and horizontal padding for spacing */
  min-height: 80vh;
  display: flex; /* Use flex to center the inner container */
  justify-content: center;
  align-items: center;
  background-color: #f1f1f1; /* Placeholder for the GLSL shader */
  border-bottom: 1px solid #aaaaaa;
}

.hero-inner-container {
  position: relative; /* Ensure content is on top of the canvas */
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 1400px; /* Match the main content width */

  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background-color: #fff; /* Inner container has its own background */
}

.hero-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 20px; /* Optional: round the corners of the image container */
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Corrected gradient: Fades from transparent on the left to black */
  mask-image: linear-gradient(to right, transparent 0%, black 30%);
}

.hero-content {
  padding: 2rem;
}

.hero-title {
  font-family: 'Roboto Slab', serif;
  font-size: var(--font-size-6xl);
  font-weight: 900;
  margin: 0;
}

.hero-subtitle {
  font-size: var(--font-size-2xl);
  font-weight: 300;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.hero-cta:hover {
  background-color: #0056b3;
  text-decoration: none;
}

.hero-socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-socials a {
  display: inline-block;
  transition: transform 0.3s ease;
}

.hero-socials a:hover {
  transform: scale(1.1);
}

.hero-socials img {
  width: 25px;
  height: 25px;
}

/* Articles Page */
.articles-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.recent-articles-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.article-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-list-item {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 2rem;
  background-color: #fff;
  transition: box-shadow 0.3s ease;
}

.article-list-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background-color: #f1f1f1;
}

.article-list-item-image {
  width: 300px;
}

.article-list-item-image img {
  width:100%;
  border-radius: 8px;
}

.article-list-item-content h3 {
  margin-top: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

/* Embed Container */
.embed-container {
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  max-width: 80%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Recent Articles Section */
.recent-articles {
  padding: 2rem 7rem;
  max-width: 1400px;
  margin: 0 auto;
}

.recent-articles h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.recent-articles ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.recent-articles li {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden; /* Ensures the image corners are rounded */
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.recent-articles li:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-content {
  padding: 1.5rem;
}

.recent-articles a {
  font-size: var(--font-size-xl);
  font-weight: 700;
  text-decoration: none;
}

.recent-articles h3 {
  margin-top: 0;
  font-size: var(--font-size-xl);
}

.recent-articles p {
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .hero-inner-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 2; /* Place content below the image on mobile */
  }

  .hero-image-container {
    order: 1; /* Place image on top on mobile */
  }

  .hero-image {
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    max-height: 50vh; /* Prevent image from being too tall on mobile */
  }
}

@media (max-width: 768px) {
  .article-list-item {
    flex-direction: column;
  }

  .article-list-item-image {
    width: 100%;
    height: 200px;
  }

  .article-list-item-image img {
    height: 100%;
    object-fit: cover;
  }

  .recent-articles {
    padding: 2rem 1rem; /* Reduce horizontal padding */
  }
}

/* Logo Scroller */
.logo-scroller {
  padding: 4rem 0;
  text-align: center;
}

.scroller-title {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.scroller-container {
  overflow: hidden;
  position: relative;
  background-image: linear-gradient(to bottom, #ffffff, rgb(27, 39, 59));
   
  background-color:#d8d8d8;
  padding: 2rem 0;
}

.scroller-container::before,
.scroller-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px; /* Reduced from 100px */
  z-index: 2;
}

.scroller-container::before {
  left: 0;
  /* background: linear-gradient(to right, rgb(85, 85, 85), transparent); */
}

hr {
    border: none; /* Removes the default border */
  height: 1px; /* Sets the desired thickness */
  background-color:rgb(27, 39, 59);
  margin-right:100px;
  margin-left:100px;
  margin-bottom:50px;
}

.scroller-container::after {
  right: 0;
  /* background: linear-gradient(to left, white, transparent); */
}

.scroller-inner {
  display: flex;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.scroller-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 0 1.5rem;
}

.scroller-content img {
  width: 130px; /* Set a fixed width for all logos */

  object-fit: contain; /* Ensure logos fit within the dimensions without distortion */

  padding: 0.5rem; /* Add some space around the logos */
  border-radius: 8px; /* Round the corners */
  transition: all 0.3s ease;
}

.scroller-content img:hover {
  transform: scale(1.1); /* Add a subtle hover effect */
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0056b3;
  color: #fff;
  text-decoration: none;
}

.view-all-articles-container {
  text-align: center;
  margin-top: 2rem;
}
