body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  color: #ffff;

}

/* Cursor */
/* Hide default cursor */
body {
  cursor: none;
}

/* The small main dot */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: #000;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* The trailing element */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: all 0.15s ease-out;
  z-index: 9998;
}


/* Grid background */
.grid-background {
  position: relative;
  min-height: 100vh; /* grows with content */
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Grid lines fixed behind everything */
.grid-background::before {
  content: "";
  position: fixed; /* ✅ fixed behind everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.6;
  pointer-events: none; /* allows clicks through */
  z-index: -1; /* behind all content */
}


.simple-navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 30px; font-family: 'Space Grotesk', sans-serif;
  position: sticky; top: 0; z-index: 1000; background: transparent;
}

.nav-left {
  font-weight: bold;
  font-size: 2rem;
  color: #555;
  /* light grey */
  display: flex;
  flex-direction: column;
  /* stack text vertically */
  line-height: 1.1;
  /* tighter spacing */
}

.nav-left .sub-text {
  font-weight: 400;
  /* lighter */
  font-size: 0.9rem;
  color: #777;
  /* slightly lighter grey */
  letter-spacing: 1px;
  margin-top: 2px;
}

.nav-right {
  list-style: none;
  display: flex;
  gap: 50px;
  margin: 0;
  padding: 0;
  font-size: 1.2rem;
  align-items: center;
  /* ensure vertical alignment */
}

.nav-right li {
  display: flex;
  /* ensures li wraps a tags correctly */
  align-items: center;
  display: inline-block;
  /* ensure li wraps the a */
}

.nav-right li a {
  display: inline-flex;
  /* inline-flex ensures padding works and hover/cursor works */
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  color: #555;
  transition: color 0.3s;
  cursor: pointer;
  /* ensure pointer shows */
}

.nav-right li a:hover {
  color: #000;
}

/* Button already has cursor pointer, ensure it is inline-flex too */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  border: none;
  outline: none;
  background-color: #151515;
  color: #eee;
  border-radius: 7px;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.button-span {
  color: #eeeeeeee;
}

.button:hover {
  background-color: #1a1a1a;
  /* very subtle darkening */
}

.button:hover .button-span {
  color: #fff;
  /* text slightly brighter */
}


@media (max-width: 768px) {
  body {
    cursor: auto; /* restore normal cursor */
  }

  .cursor-dot,
  .cursor-trail {
    display: none !important; /* hide custom cursor elements */
  }
}

.articles-section {
  padding: 50px;
  font-family: 'Space Grotesk', sans-serif;
  background: transparent; /* ✅ fully transparent */
}


.article-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #111;
  margin-bottom: 30px;
  text-align: center;
}

.articles-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.articles-table th, .articles-table td {
  padding: 18px 20px;
  text-align: center;
  font-size: 1.1rem;
  color: #444;
  border-bottom: 1px solid #ccc;
}

.articles-table th {
  background: #000;
  color: #fff;
}

.like-col i {
  cursor: pointer;
  font-size: 1.3rem;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.like-col i.liked {
  color: red;
  transform: scale(1.2);
}

.linkedin-btn {
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 6px;
  background: #0077B5; /* LinkedIn Blue */
  color: #fff;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.25s ease;
}

.linkedin-btn:hover {
  background: #005a87;
}

@media (max-width: 768px) {
  .articles-section {
    padding: 20px;
  }

  .articles-table {
    font-size: .9rem;
  }
}


/* Search Bar */
.search-bar {
  width: 90%;
  max-width: 450px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px 15px;
}

.search-bar input {
  width: 100%;
  border: none;
  font-size: 1rem;
  padding: 5px;
  background: transparent;
  outline: none;
  color: #222;
}

.search-bar i {
  font-size: 1.2rem;
  color: #444;
}

/* Responsive table */
@media (max-width: 650px) {
  .articles-table thead {
    display: none;
  }

  .articles-table tr {
    display: block;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
  }

  .articles-table td {
    display: flex;
    justify-content: space-between;
    text-align: right;
    padding: 14px 15px;
    border: none;
  }

  .articles-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #111;
    text-transform: uppercase;
  }

  .like-col {
    justify-content: space-between;
  }

  .linkedin-btn {
    width: 100%;
    justify-content: center;
  }
}


/* Search Bar */
.search-bar {
  width: 90%;
  max-width: 450px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px 15px;
}

.search-bar input {
  width: 100%;
  border: none;
  font-size: 1rem;
  padding: 5px;
  background: transparent;
  outline: none;
  color: #222;
}

.search-bar i {
  font-size: 1.2rem;
  color: #444;
}

/* Responsive table */
@media (max-width: 650px) {
  .articles-table thead {
    display: none;
  }

  .articles-table tr {
    display: block;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
  }

  .articles-table td {
    display: flex;
    justify-content: space-between;
    text-align: right;
    padding: 14px 15px;
    border: none;
  }

  .articles-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #111;
    text-transform: uppercase;
    text-align: left;
  }

  .like-col {
    justify-content: space-between;
  }

  .linkedin-btn {
    width: 30%;
    justify-content: center;
  }
}



/* Hamburger (hidden on desktop) */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 200; }
.hamburger span { width: 26px; height: 3px; background-color: #333; transition: .3s ease; }

/* Mobile menu */
@media (max-width: 768px) {
  .hamburger { display: flex; margin-right: 8%; }
  .nav-right {
    position: absolute; top: 70px; right: 0; width: 100%;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(6px);
    display: none; flex-direction: column; gap: 20px; padding: 20px 0;
    text-align: center; border-bottom: 1px solid rgba(0,0,0,0.1);
  }
  .nav-right.open { display: flex; }

  .simple-navbar {
    justify-content: space-between; padding: 15px 20px;
    position: fixed; width: 100%; top: 0; left: 0;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); z-index: 999;
  }

  /* Hamburger to X animation */
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Smaller button padding on mobile */
  .button { padding: 12px 8px; }

  /* restore native cursor on touch devices */
  body { cursor: auto; }
  .cursor-dot, .cursor-trail { display: none !important; }
}

@media (max-width: 768px) {
  body {
    cursor: auto; /* restore normal cursor */
  }

  .cursor-dot,
  .cursor-trail {
    display: none !important; /* hide custom cursor elements */
  }
}

/* --- Mobile scrolling fixes --- */
html, body {
  height: auto;          /* allow page to grow */
  min-height: 100%;
  overflow-y: auto;      /* show scrollbar when needed */
  -webkit-overflow-scrolling: touch; /* smooth iOS scroll */
}

.grid-background {
  min-height: 100vh;     /* full viewport height baseline */
  overflow: visible;     /* don't clip children */
}

/* If the mobile dropdown is tall, let it scroll independently */
@media (max-width: 768px) {
  .nav-right {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .article-title{
    margin-top: 5rem;
  }
}


  .home-link {
  text-decoration: none;
  color: inherit;  /* Inherits color from the surrounding text */
  font-weight: bold;  /* If you want it to stand out more */
}

.home-link:hover {
  text-decoration: underline;  /* Optional hover effect */
}
/* --- ARTICLE COUNTER --- */
.article-subtitle {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: #555;
  margin-top: -20px; /* Pulls it closer to the title */
  margin-bottom: 30px;
  font-weight: 700;
  letter-spacing: 1px;
}

#articleCount {
  color: #555; /* Make the number darker */
  padding-bottom: 2px;
}