/* =========================
   Base & Theme
   ========================= */
:root {
  --accent: #004c99;
  --accent-hover: #002b5c;
  --divider: #e5e5e5;
  --divider-mid: #999999;
  --divider-strong: #002b5c;
  --text: #000000;
  --bg: #ffffff;

  /* Layout widths */
  --wrap-max: 1200px;
  --sidebar-w: 480px;          /* wide right column */

  /* Fine-grained spacing */
  --col-gap: 8px;              /* space between columns (divider → sidebar) */
  --pad-main-right: 22px;      /* space between main text and divider */
  --pad-sidebar-left: 10px;    /* internal sidebar padding on the left */

  /* Header rhythm */
  --stack-gap: 0.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* Links (global) */
a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}
a:hover,
a:focus {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* =========================
   Shell
   ========================= */
.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0.75rem;
}

/* =========================
   Header / Hero
   ========================= */
.site-header {
  padding: 0.75rem 0 0.15rem;
  margin: 0;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero__media img {
  max-width: 140px;
  height: auto;
  border-radius: 50%;
}

.hero__text { flex: 1; }

.site-title {
  font-size: 2rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.site-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  line-height: 1;
  margin: 0 0 var(--stack-gap) 0;
}
.site-subtitle svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Contact links — vertical stack */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  margin-top: 0;
}

/* Chips */
.contact-links a,
.chip { text-decoration: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.15;
}
.chip .chip__text { text-decoration: none; }
.chip:hover .chip__text,
.chip:focus .chip__text {
  color: var(--accent);
  text-decoration: underline;
}
.chip svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: fill 120ms ease, stroke 120ms ease, color 120ms ease;
}
.chip:hover svg,
.chip:focus svg {
  fill: var(--accent);
  stroke: none;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto; padding: 0.5rem;
  background: #000; color: #fff; z-index: 1000;
}

/* =========================
   Two-Column Layout
   ========================= */
.site-main {
  padding: 0.15rem 0 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--col-gap);               /* this is the visual gap you pointed out */
  align-items: start;
}

/* Left column with divider */
.main-col {
  padding-right: var(--pad-main-right);
  border-right: 2px solid var(--divider-strong);
}

.sidebar {
  padding-left: var(--pad-sidebar-left);
}

/* Stack on small screens */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .main-col {
    border-right: none;
    padding-right: 0;
  }
  .sidebar {
    padding-left: 0;
  }
}

/* Flow spacing */
.flow > * + * { margin-top: 0.6rem; }

/* Headings / Section Titles */
h2, .card__title {
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.4rem 0 0.5rem;
}

/* Sections */
.card {
  padding: 0.8rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--divider);
}
.card:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.card__header { margin-bottom: 0.2rem; }
.card__body { margin-top: 0.2rem; }

/* Prose */
.prose p { line-height: 1.7; }
.prose p + p { margin-top: 1em; }

/* =========================
   Lists
   ========================= */
.pub-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.pub + .pub { margin-top: 0.8rem; }

/* =========================
   Book Covers
   ========================= */
.covers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.covers .cover {
  flex: 0 0 auto;
  width: 200px;
  height: 300px;
  border: 1px solid #000;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.covers .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   Media Blocks & Videos
   ========================= */
.media-block img {
  max-width: 100%;
  height: auto;
  display: block;
}

.video {
  width: 100%;
  margin: 1rem 0;
}
.video iframe {
  width: 100%;
  height: 430px;
  border: none;
  display: block;
}

/* =========================
   Sidebar (LinkedIn)
   ========================= */
.sidebar .card:first-of-type {
  margin-top: 0;
  border-top: none;
}

/* LinkedIn block styling */
.linkedin-posts {
  background: #f9f9f9;
  padding: 0.5rem;
  /* Pull the block to the sidebar edge so only the column gap remains */
  margin-left: calc(var(--pad-sidebar-left) * -1);
  width: calc(100% + var(--pad-sidebar-left));
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.04);
}

@media (max-width: 860px) {
  .linkedin-posts {
    margin-left: 0;
    width: 100%;
  }
}

.linkedin-posts iframe {
  width: 100%;
  border: none;
  display: block;
  height: 620px;
  margin-bottom: 1rem;
}

/* Divider between LinkedIn posts */
.linkedin-posts iframe + iframe {
  border-top: 1px solid var(--divider-mid);
  padding-top: 1rem;
}

/* =========================
   Footer
   ========================= */
.site-footer {
  border-top: 1px solid var(--divider);
  margin-top: 2rem;
  padding: 1rem 0 0.9rem;
  text-align: center;
  font-size: 0.8rem;
  color: #555;
}
.site-footer a { color: var(--accent); }
