/* ========================================
   John C. Gale — Academic Portfolio
   Shared Stylesheet
   ======================================== */

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
nav .name-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1a1a;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}
nav ul a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: #555;
  transition: color 0.2s;
}
nav ul a:hover,
nav ul a.active {
  color: #0066cc;
}

/* === MAIN CONTAINER === */
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 32px 80px;
}

/* === FOOTER === */
footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 32px 48px;
  border-top: 1px solid #e8e8e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #999;
}
footer a {
  color: #999;
  text-decoration: none;
}
footer a:hover { color: #0066cc; }

/* === SECTION LABEL === */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #0066cc;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
  margin-bottom: 24px;
  margin-top: 48px;
}
.section-label:first-of-type { margin-top: 0; }

/* === SUB-SECTION LABEL === */
.sub-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 8px;
}

/* === TWO-COLUMN ROW (date + detail) === */
.two-col {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 8px 0;
  font-size: 14.5px;
}
.yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
}
.detail { color: #333; }
.detail strong { font-weight: 600; }
.detail em { font-style: italic; color: #555; }

/* === BUTTONS === */
.btn {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}
.btn-primary { background: #1a1a1a; color: #fff; }
.btn-primary:hover { background: #0066cc; }
.btn-outline { background: #fff; color: #1a1a1a; border: 1px solid #ccc; }
.btn-outline:hover { border-color: #0066cc; color: #0066cc; }
.btn-blue { background: #0066cc; color: #fff; }
.btn-blue:hover { background: #0052a3; }

/* ========================================
   HOME PAGE
   ======================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero .subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #666;
  letter-spacing: 0.3px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.hero .bio p {
  font-size: 15.5px;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.75;
}
.hero .bio a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.hero .bio a:hover { border-bottom-color: #0066cc; }
.hero .headshot {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 4px;
}

/* Recent & Upcoming */
.event-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14.5px;
}
.event-row:last-child { border-bottom: none; }
.event-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
}
.event-detail { color: #333; }

/* ========================================
   CV PAGE
   ======================================== */
.cv-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8e8e8;
}
.cv-topbar h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.cv-topbar .actions { display: flex; gap: 12px; }

.cv-header { margin-bottom: 48px; }
.cv-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.cv-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #666;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.cv-contact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #888;
}
.cv-contact a { color: #0066cc; text-decoration: none; }

.inst-name {
  font-weight: 600;
  font-size: 15px;
  margin-top: 16px;
  margin-bottom: 4px;
}
.appt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 3px 0;
  font-size: 14.5px;
  color: #333;
}
.appt-yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
  text-align: right;
}

/* Papers (CV style) */
.paper {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.paper:last-child { border-bottom: none; }
.num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #0066cc;
  font-weight: 500;
  padding-top: 2px;
}
.paper .body { font-size: 14.5px; color: #333; line-height: 1.65; }
.paper .me { font-weight: 600; }
.paper .status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #0066cc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
}
.paper .links { margin-top: 4px; }
.paper .links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #0066cc;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   RESEARCH PAGE
   ======================================== */
.page-intro {
  font-size: 15.5px;
  color: #555;
  line-height: 1.75;
  margin-bottom: 40px;
}
.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.interest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.interest-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 14px;
  background: #f0f6ff;
  color: #0066cc;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.paper-card {
  background: #f9fafb;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.paper-card .paper-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 12px;
}
.paper-card .paper-status.review { background: #0066cc; }
.paper-card .paper-status.working { background: #6b7280; }
.paper-card .paper-status.prep { background: #9ca3af; }
.paper-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.paper-card .authors { font-size: 14px; color: #555; margin-bottom: 8px; }
.paper-card .authors .me { font-weight: 600; color: #1a1a1a; }
.paper-card .journal { font-size: 14px; color: #888; font-style: italic; }
.paper-card .abstract {
  font-size: 14px; color: #555; line-height: 1.65;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8e8e8;
}

.grant-card {
  background: #f9fafb;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.grant-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.grant-card .grant-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #0066cc;
  font-weight: 500;
  margin-bottom: 8px;
}
.grant-card p { font-size: 14px; color: #555; line-height: 1.65; }
.grant-card em { color: #888; }

.conf-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14.5px;
}
.conf-row:last-child { border-bottom: none; }
.conf-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
}
.conf-detail { color: #333; }
.conf-detail em { color: #666; }

/* ========================================
   TEACHING PAGE
   ======================================== */
.course-card {
  background: #f9fafb;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.course-card .course-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}
.course-card h3 { font-size: 17px; font-weight: 600; color: #1a1a1a; }
.course-card .institution {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #0066cc;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.course-card .course-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.course-card .course-details { font-size: 14px; color: #555; line-height: 1.7; }
.course-card .course-details strong { color: #333; }
.course-card .course-meta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8e8e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #888;
}
.course-card .rating { color: #0066cc; font-weight: 500; }

.dev-card {
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}
.dev-card:last-child { border-bottom: none; }
.dev-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.dev-card p { font-size: 14px; color: #555; line-height: 1.65; }

/* ========================================
   INDUSTRY PAGE
   ======================================== */
.role-card {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #f0f0f0;
}
.role-card:last-child { border-bottom: none; }
.role-card .role-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 4px;
}
.role-card h3 { font-size: 17px; font-weight: 600; }
.role-card .role-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}
.role-card .company { font-size: 15px; color: #555; margin-bottom: 12px; }
.role-card p { font-size: 14.5px; color: #444; line-height: 1.7; }

.prev-role {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14.5px;
}
.prev-role:last-child { border-bottom: none; }
.prev-role .role-title { color: #333; }
.prev-role .role-title strong { font-weight: 600; }
.prev-role .role-yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888;
  text-align: right;
}

.cta-box {
  background: #f9fafb;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 28px 32px;
  margin-top: 48px;
  text-align: center;
}
.cta-box h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.cta-box p { font-size: 14.5px; color: #555; margin-bottom: 16px; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 700px) {
  nav { padding: 0 20px; }
  nav ul { gap: 16px; }
  nav ul a { font-size: 11px; }
  main { padding: 100px 20px 60px; }
  .hero { grid-template-columns: 1fr; }
  .hero .headshot { width: 140px; height: 170px; order: -1; }
  .two-col { grid-template-columns: 1fr; gap: 4px; }
  .event-row { grid-template-columns: 1fr; gap: 4px; }
  .appt-row { grid-template-columns: 1fr; }
  .appt-yr { text-align: left; }
  .conf-row { grid-template-columns: 1fr; gap: 4px; }
  .prev-role { grid-template-columns: 1fr; }
  .prev-role .role-yr { text-align: left; }
  .course-card .course-header { flex-direction: column; gap: 4px; }
  .role-card .role-header { flex-direction: column; gap: 4px; }
}
