/* ==========================================================================
   Base styles - clean academic site
   ========================================================================== */

:root {
  --text-color: #212529;
  --text-muted: #6c757d;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --bg-color: #fff;
  --bg-subtle: #f8f9fa;
  --border-color: #dee2e6;
  --code-bg: #f5f5f5;
  --max-width: 800px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  margin: 0;
  padding: 2rem;
}

/* Container */
.content, #content, main, article {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Profile / Index page layout
   ========================================================================== */

.profile h1 {
  margin-top: 0;
}

.profile-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.profile-text {
  flex: 1;
}

.profile-photo {
  max-width: 250px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .profile-content {
    flex-direction: column-reverse;
  }
  .profile-photo {
    max-width: 100%;
  }
}

/* ==========================================================================
   Code blocks
   ========================================================================== */

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  line-height: 1.4;
}

pre code {
  padding: 0;
  background: none;
}

/* Org-mode src blocks */
.org-src-container {
  margin: 1rem 0;
}

/* ==========================================================================
   Syntax highlighting (GitHub-style light theme)
   ========================================================================== */

.highlight .c, .org-comment { color: #6a737d; font-style: italic; }  /* Comment */
.highlight .k, .org-keyword { color: #d73a49; font-weight: 600; }    /* Keyword */
.highlight .s, .org-string { color: #032f62; }                        /* String */
.highlight .m, .org-constant { color: #005cc5; }                      /* Number */
.highlight .nf, .org-function-name { color: #6f42c1; }               /* Function */
.highlight .nc, .org-type { color: #6f42c1; }                         /* Class */
.highlight .nb { color: #005cc5; }                                    /* Builtin */
.highlight .o, .highlight .p { color: #24292e; }                      /* Operator, Punctuation */

/* ==========================================================================
   Tables
   ========================================================================== */

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  font-weight: 600;
}

/* ==========================================================================
   Blockquotes
   ========================================================================== */

blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--border-color);
  color: var(--text-muted);
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Images
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Navigation (minimal)
   ========================================================================== */

nav {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

nav a {
  margin-right: 1.5rem;
}

/* ==========================================================================
   Embedded plots / figures
   ========================================================================== */

.plot {
  margin: 1.5rem 0;
}

.plot iframe {
  border: none;
  width: 100%;
}
details summary {
  cursor: pointer;
  font-weight: 500;
  padding: 0.5em 0;
}
details summary:hover {
  color: #555;
}
