/* ─── RESET & BASE ─── */

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

:root {
  --accent: #047857;
  --text: #000;
  --muted: #666;
  --border: #d4d4d4;
  --bg: #fff;
  --font: 'JetBrains Mono', monospace;
}

html {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

a.link {
  color: var(--accent);
  font-size: 0.85rem;
}

a.link::after {
  content: ' >>>';
  font-size: 0.65rem;
  opacity: 0.6;
}

/* ─── CONTAINER ─── */
.container {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* ─── HEADER ─── */
.header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.tagline {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* ─── PHOTO ─── */
.photo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin: 2rem auto;
  border-radius: 50%;
  border: none;
  opacity: 1;
  background: var(--bg);
}

.profile {
  text-align: center;
  margin-bottom: 1rem;
}

/* ─── BIO ─── */
.bio p {
  font-size: 0.85rem;
  line-height: 1.85;
  margin-bottom: 3rem;
  text-align: justify;
}

/* ─── LINKS ─── */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.link-arrow {
  font-size: 0.85rem;
  color: var(--accent);
}

.link-arrow::after {
  content: ' >>>';
  font-size: 0.65rem;
  opacity: 0.6;
}

/* ─── DIVIDER ─── */
.divider {
  margin: 3rem 0;
  color: #000;
  text-align: center;
}

/* ─── SECTION ─── */
.section {
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ─── NEWS ─── */
.news-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eee;
}

.news-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.news-entry[hidden] {
  display: none;
}

.news-images {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.news-images a {
  border-bottom: none;
}

.news-image {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.news-body {
  flex: 1 1 auto;
  min-width: 0;
}

.news-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  display: block;
}

.news-content {
  font-size: 0.82rem;
  line-height: 1.65;
}

.news-content p {
  margin: 0;
}

.news-content code {
  font-size: 0.78rem;
  background: #f4f4f4;
  padding: 0.1em 0.3em;
}

.news-content pre {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #f4f4f4;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.6;
  border: 1px solid #eee;
}

.news-content pre code {
  background: none;
  padding: 0;
}

.news-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: var(--muted);
}

.news-content ul, .news-content ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.news-content li {
  margin-bottom: 0.2rem;
}

.news-load-more {
  display: block;
  margin: 0.5rem 0 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
}

.news-load-more:hover {
  opacity: 0.6;
}

.news-load-more::after {
  content: ' >>>';
  font-size: 0.65rem;
  opacity: 0.6;
}

/* ─── TEACHING ─── */
.content-block {
  font-size: 0.82rem;
  line-height: 1.82;
}

.content-block p {
  margin-bottom: 0.4rem;
}

/* ─── THESIS ─── */
.theses-list {
  margin-top: 1rem;
}

.thesis-item {
  margin-bottom: 0.75rem;
}

.thesis-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.3rem 0;
  user-select: none;
}

.thesis-item summary::-webkit-details-marker {
  display: none;
}

.thesis-item summary::before {
  content: '>';
  font-weight: 600;
  color: var(--accent);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.thesis-item[open] summary::before {
  content: 'v';
}

.thesis-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.thesis-title {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.thesis-content {
  margin-top: 0.75rem;
  padding-left: 1rem;
  font-size: 0.82rem;
  line-height: 1.82;
  border-left: 2px solid #eee;
}

.thesis-content p {
  margin-bottom: 0.4rem;
}

/* ─── EMPTY ─── */
.empty {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* ─── FOOTER ─── */
.footer {
  margin-top: 4rem;
  padding-top: 1rem;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  border-top: 1px solid #eee;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  body {
    padding: 0 1.25rem;
  }
  .container {
    padding-top: 3rem;
  }
  .photo img {
    width: 120px;
    height: 120px;
  }
  .thesis-item summary {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}
