/* Classic 2000s Academic Website Stylesheet */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.6;
  color: #000;
  background: #ffffff;
  min-height: 100vh;
}

/* Main container */
.container {
  width: 100%;
  margin: 0;
  background: white;
}

/* Header styling */
header {
  background: linear-gradient(180deg, #2c5aa0 0%, #1e3a6f 100%);
  color: white;
  padding: 30px 20px;
  border-bottom: 3px solid #1a2f5a;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-content h1 {
  font-size: 36px;
  font-weight: normal;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.affiliation {
  font-size: 13px;
  line-height: 1.4;
}

.affiliation p {
  margin: 2px 0;
}

.last-modified {
  font-size: 11px;
  margin-top: 10px;
  font-style: italic;
  color: #d0d0d0;
}

/* Navigation bar */
.navbar {
  background: #f0f0f0;
  border-bottom: 2px solid #333;
  border-top: 1px solid #fff;
}

.navbar ul {
  list-style: none;
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar li {
  flex: 1;
  text-align: center;
  border-right: 1px solid #ccc;
}

.navbar li:last-child {
  border-right: none;
}

.navbar a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #1e3a6f;
  font-weight: bold;
  font-size: 13px;
  background: linear-gradient(180deg, #f8f8f8 0%, #e0e0e0 100%);
  transition: background 0.2s;
}

.navbar a:hover {
  background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
  text-decoration: underline;
}

/* Main content layout */
.main-content {
  display: flex;
  min-height: 500px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sidebar */
.sidebar {
  width: 200px;
  background: white;
  border-right: none;
  padding: 20px;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: none;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar h3 {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  font-weight: bold;
  border-bottom: none;
  padding-bottom: 0;
}

.link-list {
  list-style: none;
  padding-left: 5px;
}

.link-list li {
  margin: 5px 0;
  color: #333;
}

.link-list a {
  color: #0066cc;
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

.activity-log {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.5;
  background: white;
  padding: 5px;
  border: 1px solid #ddd;
}

.activity-log code {
  color: #006600;
  font-weight: bold;
}

/* Main content area */
.content {
  flex: 1;
  padding: 30px 20px 30px 40px;
  min-width: 0;
}

.content section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.content h2 {
  font-size: 20px;
  color: #1e3a6f;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid #2c5aa0;
}

.content h3 {
  font-size: 16px;
  color: #333;
  margin: 15px 0 10px 0;
}

.content h4 {
  font-size: 14px;
  color: #555;
  margin: 10px 0 5px 0;
}

.content p {
  margin: 10px 0;
  text-align: justify;
}

/* Education spotlight */
.education-highlight {
  background: #f4f8ff;
  border: 2px solid #2c5aa0;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.education-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 15px;
}

.graduation-tag {
  background: #1e3a6f;
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.education-tagline {
  font-style: italic;
  color: #1e3a6f;
  margin-top: 12px;
}

.education-highlights {
  margin: 12px 0 0 18px;
  list-style: square;
}

.education-highlights li {
  margin-bottom: 6px;
}

/* Links */
a {
  color: #0066cc;
  text-decoration: underline;
}

a:hover {
  color: #0052a3;
  background: #ffff99;
}

a:visited {
  color: #663399;
}

/* News box */
.news-box {
  background: #fffacd;
  border: 1px solid #daa520;
  padding: 10px;
  margin: 15px 0;
  font-size: 13px;
}

.news-box strong {
  color: #8b4513;
}

.news-box ul {
  margin: 5px 0 0 20px;
  padding: 0;
}

.news-box li {
  margin: 3px 0;
}

/* Project styling */
.project {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 15px;
  margin: 15px 0;
}

.project h3 {
  color: #1e3a6f;
  font-size: 15px;
  margin-bottom: 5px;
}

.project-meta {
  font-size: 12px;
  color: #666;
  margin: 5px 0;
}

/* Code samples */
.code-sample,
pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  background: #f4f4f4;
  border: 1px solid #ccc;
  padding: 10px;
  overflow-x: auto;
  margin: 10px 0;
}

/* Publication list */
.publication-list ol {
  margin: 10px 0 10px 30px;
}

.publication-list li {
  margin: 10px 0;
  line-height: 1.5;
}

.publication-list em {
  color: #555;
}

.tech-reports {
  list-style: square;
  margin-left: 30px;
}

.tech-reports li {
  margin: 5px 0;
}

/* Software grid */
.software-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.software-item {
  border: 1px solid #ccc;
  padding: 10px;
  background: #f9f9f9;
}

.software-item h4 {
  color: #1e3a6f;
  margin-bottom: 5px;
}

.software-item code {
  background: #e0e0e0;
  padding: 2px 5px;
  font-size: 11px;
  display: inline-block;
  margin: 3px 0;
  border: 1px solid #bbb;
}

.software-item p {
  font-size: 12px;
  margin: 5px 0;
}

/* CV actions */
.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 220px;
  text-align: center;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  border: 1px solid #1e3a6f;
  background: #f8f8f8;
  color: #1e3a6f;
  transition: transform 0.1s ease;
  cursor: pointer;
  border-radius: 4px;
}

.resume-link.primary {
  background: linear-gradient(180deg, #2c5aa0 0%, #1e3a6f 100%);
  color: white;
  border-color: #1e3a6f;
}

.resume-link.secondary {
  border-color: #666;
}

.resume-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.resume-link.is-loading {
  opacity: 0.65;
  transform: none;
  cursor: progress;
}

.cv-note {
  font-size: 12px;
  color: #555;
  margin: 5px 0 15px 0;
}

.cv-education {
  margin-left: 18px;
}

/* Resume viewer page */
body.resume-page {
  margin: 0;
  background: #fff;
  min-height: 100vh;
}

.resume-frame {
  width: 100%;
  height: 100vh;
  border: none;
}

.resume-frame p {
  text-align: center;
  font-size: 13px;
  margin-top: 20px;
}

/* Tables */
table {
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 13px;
}

td,
th {
  border: 1px solid #ccc;
  padding: 5px 10px;
  text-align: left;
}

th {
  background: #e0e0e0;
  font-weight: bold;
}

.skills-table {
  margin: 15px 0;
}

.skills-table table {
  width: 100%;
}

.skills-table td:first-child {
  width: 120px;
  background: #f5f5f5;
  font-weight: bold;
}

/* Contact section */
.contact-box {
  background: #f0f8ff;
  border: 1px solid #4682b4;
  padding: 15px;
  margin: 15px 0;
}

.contact-table {
  border: none;
  width: auto;
}

.contact-table td {
  border: none;
  padding: 3px 10px;
}

.contact-table td:first-child {
  font-weight: bold;
  color: #333;
}

/* PGP Key section */
.pgp-key {
  margin-top: 20px;
}

.pgp-key summary {
  cursor: pointer;
  color: #0066cc;
  text-decoration: underline;
  font-size: 13px;
}

.pgp-key pre {
  margin-top: 10px;
  font-size: 10px;
  max-height: 200px;
  overflow-y: auto;
}

/* Footer */
footer {
  background: #f0f0f0;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #666;
  border-top: 2px solid #333;
}

footer > * {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

footer hr {
  display: none;
}

footer p {
  margin: 3px 0;
}

footer small {
  color: #999;
}

/* Classic "under construction" gif placeholder */
.under-construction {
  background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') no-repeat center;
  padding: 20px;
  text-align: center;
  font-style: italic;
  color: #666;
}

/* Print styles */
@media print {

  .sidebar,
  .navbar {
    display: none;
  }

  .main-content {
    display: block;
  }

  .content {
    padding: 0;
  }

  a {
    color: black;
    text-decoration: none;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 10px;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main-content {
    padding: 0 15px;
  }

  .content {
    padding: 25px 15px 25px 30px;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 0;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 15px;
  }

  .content {
    padding: 20px 15px;
  }

  .navbar ul {
    flex-direction: column;
    padding: 0;
  }

  .navbar li {
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .software-grid {
    grid-template-columns: 1fr;
  }

  .education-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .resume-link {
    flex: 1 1 100%;
  }

  .header-content {
    padding: 0 10px;
  }

  .header-content h1 {
    font-size: 28px;
  }

  footer > * {
    padding: 0 10px;
  }
}
