/* === General body & container === */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #ffffff;
    color: #222;
    line-height: 1.6;

    display: flex;              /* enables flexible layout */
    flex-direction: column;     /* stack elements vertically */
    min-height: 100vh;          /* full viewport height */
}

.container {
    flex: 1;                 /* pushes footer down */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;          /* center horizontally only */
    padding: 20px;
}

/* === Header === */
header {
    display: flex;                  /* enables horizontal layout */
    justify-content: space-between; /* title left, nav right */
    align-items: center;            /* vertically center title and nav */
    background-color: #ffffff;
    padding: 20px;
    border-bottom: 2px solid #ddd;
}

header h1 {
    font-size: 2.2em;
    margin: 0;
    font-weight: 400;   /* lighter base weight */
    color: #777;        /* gray title */
}

/* Highlight "Small Data" */
header h1 .emphasis {
    font-weight: 700;
    color: #111;        /* darker gray / near black */
}

header .tagline {
    display: none;      /* remove tagline */
}

nav {
    display: flex;
    align-items: center;   /* vertically align all links */
    gap: 8px;              /* spacing between items */
}

/* Normal nav links */
nav > a {
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 0;
    display: inline-block;
    line-height: normal;
}

nav a:hover {
    background-color: #eee;
    color: #222;
}

/* === Dropdown for Projects menu === */
.dropdown {
    position: relative;
    display: inline-block;   /* match other links */
}

/* Drop button styling (matches other nav links exactly) */
.dropbtn {
    padding: 8px 16px;
    color: #333;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 0;
    text-decoration: none;
    display: inline-block;  /* important: same as other links */
    line-height: normal;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 160px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1;
}

/* Individual dropdown links */
.dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:hover {
    background-color: #eee;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* === Section headings === */
h2 {
    margin-top: 40px;
    font-size: 22px;
}

/* === Paragraphs and lists === */
p, ul {
    line-height: 1.6;
}

/* === Buttons (like GitHub link) === */
.button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 16px;
    text-decoration: none;
    background-color: #4a90e2;
    color: white;
    border-radius: 0; /* square buttons */
    transition: background 0.2s;
}

.button:hover {
    background-color: #357ABD;
}

/* === Footer === */
footer {
    width: 100%; /* full width */
    text-align: center;
    background-color: #222; /* dark background */
    color: #eee;
    padding: 20px 0;
    border-top: 2px solid #444;
    position: relative; /* ensures it stays below content */
    bottom: 0;
    left: 0;
}

/* === Sections spacing === */
section {
    margin-bottom: 30px;
}

/* === Section heading === */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
}

.section-link {
    color: #666;
    text-decoration: none;
    font-size: 0.95em;
}

.section-link:hover {
    color: #222;
}

/* === Insights === */
.insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.insight-card {
    padding: 18px 20px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.insight-card h3 {
    margin: 4px 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.insight-card h3 a {
    color: #222;
    text-decoration: none;
}

.insight-card h3 a:hover {
    text-decoration: underline;
}

.insight-meta {
    font-size: 0.9em;
    color: #777;
}

.insight-card p {
    margin: 0;
    color: #555;
}

.article-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.article-description {
    font-style: italic;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.article-text p {
    margin-bottom: 25px;
    line-height: 2;
    text-indent: 40px;
}

section a {
    color: #222;
    text-decoration: none;
}

section a:visited {
    color: #222;
}

section a:hover {
    color: #8b0000;
}

section a:active {
    color: #5f0000;
}

.article-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.article-date {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #777;
}

.back-button {
    padding: 6px 12px;
    border: 1px solid #bbb;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-button:hover {
    background-color: #f3f3f3;
    color: #222;
}

.article-image {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 20px auto 20px auto;
}

span[title] {
    border-bottom: 1px dotted #777;
    cursor: help;
}

span[title]:hover {
    color: #8b0000;
}

.citation-tooltip {
    position: relative;
}

.citation-year {
    color: #8b0000;
}

.citation-tooltip:hover .citation-year {
    color: #5f0000;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 500px;
    background-color: #f3f3f3;
    color: #333;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: opacity 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.citation-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.site-title-link {
    color: inherit;
    text-decoration: none;
}

.site-title-link:hover {
    color: inherit;
}

/* =========================
   Article cards
========================= */

#projects {
  margin-top: 3rem;
}

.article-card {
  display: flex;
  gap: 1.2rem;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 850px;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.article-card img {
  width: 220px;
  height: 160px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.article-card-content {
  padding: 1rem 1.2rem 1rem 0;
}

.article-date {
  margin: 0 0 0.4rem 0;
  font-size: 0.9rem;
  color: #777;
}

.article-card h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.35rem;
}

.article-description {
  margin: 0;
  color: #444;
  line-height: 1.5;
}

.article-image-large {
    max-width: 420px;
}