/* ===== Simple, clean styles for Isaac's page ===== */

:root {
  --bg: #fafafa;
  --text: #222;
  --muted: #666;
  --line: #ddd;
  --accent: #1a73e8;
  --green: #1e8e3e;
  --red: #d93025;
}

* {
  box-sizing: border-box;
}

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

/* header */
header {
  padding: 48px 20px 0;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 1px;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* nav bar */
nav {
  max-width: 1000px;
  margin: 24px auto 0;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--text);
}

/* the link for the page you're currently on */
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* layout */
main {
  /* Make this number bigger to fill more of the page,
     smaller for a tighter reading column. 720 = thin, 1000 = wide. */
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

section {
  margin-bottom: 40px;
}

h2 {
  font-size: 1.3rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

/* projects */
article {
  margin-bottom: 20px;
}

article h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--accent);
}

/* trading stats */
.stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 120px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -8px;
}

/* table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

td.pos { color: var(--green); font-weight: 600; }
td.neg { color: var(--red); font-weight: 600; }

/* footer */
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

/* small screens */
@media (max-width: 600px) {
  header h1 { font-size: 1.9rem; }
  .stat-num { font-size: 1.3rem; }
  th, td { font-size: 0.85rem; padding: 8px 4px; }
  nav a { padding: 8px 10px; font-size: 0.85rem; }
}

/* ===== Research article cards ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
 
.card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
 
.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
 
.card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--text);
}
 
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
 
.card .meta {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
 
/* ===== Article (single piece) reading view ===== */
.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 28px;
}
 
.article-body h3 {
  margin: 28px 0 8px;
  font-size: 1.1rem;
}
 
.article-body p,
.article-body ul {
  margin: 0 0 14px;
}
 
.article-body ul {
  padding-left: 22px;
}
 
.article-body code {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9rem;
}
 
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.9rem;
}
