/* ====== Typography ====== */
body {
  font-family: "Merriweather", Georgia, serif;
  background: #fafafa;
  color: #222;
  margin: 0;
  padding: 0;
  line-height: 1.75;
  min-height: 120vh;
}

h1, h2, h3 {
  font-weight: 700;
  color: #111;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ====== Layout ====== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Sidebar */
.sidebar {
  margin-bottom: 40px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 30px;
}

.sidebar img {
  width: 200px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.sidebar .name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
  color: inherit;
  text-decoration: none;
}

.sidebar .name a {
  color: #111;
  text-decoration: none;
}

.sidebar .name a:hover {
  text-decoration: underline;
}

.sidebar .title {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

/* Desktop two-column layout */
@media (min-width: 900px) {
  .container {
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 20px;
    align-items: start;
    min-height: 100vh;
  }

  .sidebar {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    border-right: 1px solid #ddd;
    padding-right: 14px;
    position: sticky;
    top: 30px;
    align-self: start;
  }
}

/* Navigation */
.navbar {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  font-size: 16px;
}

.navbar a {
  font-weight: 500;
}

.navbar a.active {
  border-bottom: 2px solid #111;
  padding-bottom: 4px;
}

/* Section spacing */
section {
  margin-bottom: 60px;
}

/* Teaching entry (old layout — still used for philosophy) */
.teaching-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 20px;
  margin-bottom: 18px;
}

.teaching-entry .term {
  font-weight: 600;
  color: #444;
  font-size: 14px;
  white-space: nowrap;
  width: 110px;
}

.teaching-entry .course {
  font-size: 15px;
  line-height: 1.5;
}

.teaching-entry .details {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

/* Contacts */
.contacts {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.contacts div {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}

.contacts i {
  font-size: 13px;
  color: #555;
  margin-right: 6px;
}

.contacts a {
  color: #333;
  text-decoration: none;
}

.contacts a:hover {
  text-decoration: underline;
}

/* ====== Daria-style teaching table ====== */
.teaching-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 20px;
}

.teaching-table th {
  text-align: left;
  font-weight: 600;
  padding: 6px 8px 6px 0;
  border-bottom: 2px solid #ccc;
  color: #444;
  font-size: 12.5px;
}

.teaching-table td {
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid #e5e5e5;
  color: #333;
  vertical-align: top;
}

.teaching-table tr:last-child td {
  border-bottom: none;
}

.teaching-table td:first-child,
.teaching-table th:first-child {
  width: 140px;
  white-space: nowrap;
}

.teaching-table th,
.teaching-table td {
  border-right: 1px solid #ddd;
}

.teaching-table th:last-child,
.teaching-table td:last-child {
  border-right: none;
}

.hanging-indent {
  padding-left: 1.5em;
  text-indent: -1.5em;
  margin-bottom: 0.8em;
  line-height: 1.45;
}

/* Subsection indentation (Relevant Papers) */
.research-block .sub-block {
  border-left: 3px solid #e0e0e0;
}

/* Media */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1000px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}

.media-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e2e2e2;
  background: white;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.media-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.media-card-content {
  padding: 20px 24px;
  background: #f9fbfd;
}

.media-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: #17364a;
  color: #d6ebff;
}

.media-card h3 {
  margin: 0 0 14px;
  font-size: 1.8rem;
  line-height: 1.3;
}

.media-card p {
  margin: 0 0 18px;
  line-height: 1.7;
  color: #4f5b66;
}

.media-meta {
  font-size: 0.95rem;
  color: #6b7785;
  margin-bottom: 16px;
}

.media-link {
  font-weight: 700;
  color: #17364a;
}
