/* ===============================
   THEME VARIABLES
================================ */

/* DARK (default) */
:root {
    --bg-main: #0f0f10;
    --bg-soft: #18181b;
    --bg-mark: #2a2a2e;

    --text-main: #e5e5e5;
    --text-soft: #d4d4d8;
    --text-muted: #a1a1aa;

    --border-accent: #a1a1aa;
}

/* LIGHT */
body.light {
    --bg-main: #fbfcfd;
    --bg-soft: #f1f5f9;
    --bg-mark: #fff2a8;

    --text-main: #222;
    --text-soft: #444;
    --text-muted: #555;

    --border-accent: #d1d5db;
}
body {
    margin: 0;
    font-family: Bahnschrift, Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

.article-container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}
.article-hero img {
    width: 100%;
    /* max-height:600px; */
    border-radius: 10px;
}
figure img{
    width:100%;
}

/* Dark mode image treatment */
body:not(.light) .article-hero img {
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.85;
}

/* Light mode = full color */
body.light .article-hero img {
    filter: none;
    opacity: 1;
}

.article-hero figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}
.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-main);
}

.article-content h2 {
    margin-top: 30px;
    font-size: 1.6rem;
    border-left: 4px solid var(--border-accent);
    padding-left: 10px;
    color: var(--text-main);
}

.article-content p {
    margin-top: 15px;
}
blockquote {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-soft);
    border-left: 5px solid var(--border-accent);
    font-style: italic;
    color: var(--text-soft);
}

blockquote span {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: var(--text-muted);
}
mark {
    background: var(--bg-mark);
    color: var(--text-main);
    padding: 0 4px;
}
.closing {
    font-weight: bold;
    text-align: center;
    margin-top: 40px;
    color: var(--text-main);
}
.icon img,
svg.icon {
    filter: grayscale(100%);
}
body.light .icon img,
body.light svg.icon {
    filter: none;
    opacity: 1;
}

@font-face {
    font-family: Ahom;
    src: url(../fonts/ahom.woff);
}

.ahom{
    font-family: Ahom;
    font-size: 32px;
    font-weight: normal;
    display: block;
    margin-top: -12px;
}

.manuscript{
    font-family: Manuscript;
    font-size: 32px;
    font-weight: normal;
}

.unicode{
    font-size:17px;
}

td img{
    cursor:pointer;
    width:40px;
}

    /* ===============================
   ARTICLE TABLES
================================ */

.table-wrap {
    overflow-x: auto;
    margin: 30px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.95rem;
}

/* Header */
.article-content thead {
    background: var(--bg-soft);
}

.article-content th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
}

/* Cells */
.article-content td {
    padding: 12px 16px;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

/* Last row fix */
.article-content tr:last-child td {
    border-bottom: none;
}

/* Row hover (subtle) */
.article-content tbody tr:hover {
    background: var(--bg-soft);
}

/* Caption */
.article-content caption {
    caption-side: bottom;
    padding-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: left;
}


/* ===== GRID ===== */
/* ===== FOR ARTICLES PAGE ===== */

.container{
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 20px 0;
}

.top h2{
    font-family: "Segoe UI", "SegoeUI", sans-serif;
    margin-bottom: 29px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}

/* ===== CARD ===== */
.card {
  background: var(--card);
  border: 1px solid var(--bg-mark);
  border-radius: 16px;
  overflow: hidden;
  transition: .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: #3b82f6;
}

/* ===== IMAGE WRAPPER ===== */
.card-img {
  position: relative;
  height: 180px;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* gradient so text area blends in dark + light */
.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      transparent 40%,
      var(--card) 100%
    );
}

/* ===== CATEGORY BADGE ===== */
.cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: .6px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* ===== BODY ===== */
.card-body {
  padding: 12px 14px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.read {
  margin-top: 10px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
}


