/* General styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #eee;
  color: #333;
}

/* No global link color override here — keep site defaults except where scoped below. */

/* Scoped link color for the publications page only */
.publications main a:link, .publications main a:visited {
  color: #0000EE; /* browser-default blue for publication references */
  text-decoration: underline;
}
.publications main a:hover, .publications main a:focus {
  color: #0000CC;
  text-decoration: underline;
}

/* Keep TOC and footer using the site's default colors (not the publications blue) */
.toc a { color: #666; text-decoration: none; }
.toc a:hover { color: #0078D7; }
footer a { color: #333; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Centered content box */
main {
  /* allow main to expand to the right column (TOC) */
  max-width: none; 
  margin: 20px 0 20px 80px;
  background: transparent; 
  padding: 20px;
  box-shadow: none; 
  text-align: left; 
  width: auto;
  max-width: calc(100% - 320px); 
}

/* Header */
header {
  background: transparent; 
  padding: 20px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.logo-container {
  display: flex;
  flex-direction: column;     
  align-items: flex-start;     
  justify-content: flex-start; 
  gap: 0;                      
  padding: 0 0 0 80px;       
}

.logo-container img {
  height: 80px;              
  width: auto;
  margin: 0;
  display: block;              
}
.logo-text h1 {
  margin: 0;
  font-size: 2em;
  color: #000; /* black text */
}
.logo-text p {
  margin: 0; 
  font-style: italic;
  color: #000; /* black text */
}
.logo-tagline {
  margin: 0;                    
  line-height: 1.15;     
  color: #000;
}
.logo-text { display: inline-block; vertical-align: middle; }

/* Navigation */
nav {
  background: transparent; 
  border-bottom: 2px solid rgba(0,0,0,0.06); 
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0 20px 0 80px; 
  display: flex;
  justify-content: flex-start; 
}
nav ul li {
  margin: 0 12px 0 0;
}
nav ul li a {
  display: block;
  padding: 12px 18px 10px; 
  color: #333; /* default nav link color */
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  border-bottom: 3px solid transparent;
  transition: color 150ms ease, border-bottom-color 150ms ease, background 150ms ease;
}
/* Hover and focus show accent color and a bottom line */
/* Hover and focus show accent color and a bottom line */
nav ul li a:hover,
nav ul li a:focus {
  color: #0078D7; /* blue accent */
  border-bottom-color: #0078D7;
}
/* Active/current page styling (persistent) */
nav ul li a.active {
  color: #0078D7;
  border-bottom-color: #0078D7;
}

/* Section headings */
h2 {
  border-bottom: 2px solid #444;
  padding-bottom: 5px;
  margin-top: 30px;
  color: #444;
  font-size: 1.6em; /* make h2 more prominent and consistent across pages */
  font-weight: 700;
}

/* Subsection headings (align with body text and match visual weight) */
h3 {
  margin: 18px 0 8px 0;
  color: #333;
  font-size: 1.05em;
  font-weight: 700;
}

/* INCAR parameters – black background, green text */
.incar-block {
  background: transparent; /* don't stand out from the page */
  color: #00ff00;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 12px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.95em;
  white-space: pre-wrap;
  border-radius: 4px;
  overflow-x: auto;
}

/* Input files – blue theme */
.input-block {
  background: transparent;
  border: 1px solid rgba(30,144,255,0.12);
  padding: 12px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.95em;
  white-space: pre-wrap;
  border-radius: 4px;
  overflow-x: auto;
}

/* Output files / folder content – green theme */
.output-block {
  background: transparent;
  border: 1px solid rgba(34,139,34,0.08);
  padding: 12px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.95em;
  white-space: pre-wrap;
  border-radius: 4px;
  overflow-x: auto;
}

/* Command-line instructions – dark terminal style */
.command-box {
  background: #1e1e1e; /* keep dark terminal feel */
  color: #d4d4d4;
  border: 1px solid rgba(0,0,0,0.2);
  padding: 12px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.95em;
  white-space: pre-wrap;
  border-radius: 4px;
  overflow-x: auto;
}

/* Copy button for code/command blocks */
.code-copy-wrap {
  position: relative;
}
.code-copy-wrap pre {
  margin: 0; /* remove extra gap inside wrapper */
}
.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.9);
  color: #333;
  border-radius: 6px;
  cursor: pointer;
}
.copy-btn:hover {
  background: #f0f0f0;
}
.copy-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.code-copy-wrap .command-box .copy-btn {
  background: rgba(30,30,30,0.9);
  color: #d4d4d4;
  border-color: rgba(255,255,255,0.18);
}
.copy-btn.copied {
  background: #e6ffed;
  color: #22863a;
  border-color: #a6d6a6;
}

/* Sample output data (numerical results, tables) – light gray */
.code-block {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 12px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.9em;
  white-space: pre-wrap;
  border-radius: 4px;
  overflow-x: auto;
}

/* Images */
.center-img {
  display: block;
  margin: 10px auto;
  max-width: 100%;
}

/* Add spacing between inline images in the main content */
main img {
  margin: 14px 18px 18px 0; /* top right bottom left - increased spacing */
  vertical-align: middle;
  display: inline-block;
}

/* Figure block layout: stack images vertically (one per row) and keep caption spacing */
.figure-block {
  display: block;
  margin-bottom: 18px; /* keep some space below the figure block */
}
.figure-block .image-description {
  width: 100%;
  margin-bottom: 18px; /* spacing between stacked figures */
}
.figure-block .image-description img {
  display: block; /* ensure no inline whitespace */
  margin: 0 0 8px 0; /* spacing between image and caption */
  max-width: 100%;
  height: auto;
}
.figure-block .image-description p {
  margin: 0; /* remove default paragraph margins that create extra gap */
  padding-top: 4px;
  color: #333;
  font-size: 0.95em;
}

@media (max-width: 700px) {
  .figure-block { margin-bottom: 12px; }
  .figure-block .image-description { margin-bottom: 12px; }
}

/* If images are intended to be centered use .center-img which keeps auto margins */
.center-img { margin: 20px auto; }

/* Make VASP and ABINIT logos the same visual height and increase gap */
/* Target the two logos and normalize their height */
main img[src$="vasp.jpg"],
main img[src$="images/vasp.jpg"],
main img[src$="/images/vasp.jpg"],
main img[src$="abinit.png"],
main img[src$="images/abinit.png"],
main img[src$="/images/abinit.png"],
main img[src$="/abinit.png"] {
  height: 120px; /* set a consistent height */
  width: auto;
}
/* Add an extra large gap after the VASP logo */
main img[src$="vasp.jpg"],
main img[src$="images/vasp.jpg"],
main img[src$="/images/vasp.jpg"] {
  margin-right: 48px;
}



/* Footer */
footer {
  text-align: center;
  background: #f4f4f4;
  padding: 15px 20px;
  font-size: 0.9em;
  color: #555;
  border-top: 1px solid #ccc;
}
footer a {
  color: #333;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* Structured footer for links and contact */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 12px;
}
.site-footer .left-links a {
  margin-right: 14px;
  color: #333;
}
.site-footer .right-links {
  text-align: right;
}
.site-footer .right-links a {
  margin-left: 12px;
}

/* Center links for footer (license, changelog, acknowledgements) */
.site-footer .center-links {
  flex: 1 1 auto; /* expand to fill the middle */
  text-align: center;
  font-size: 0.95em;
}
.site-footer .center-links a {
  color: #333;
  text-decoration: none;
  margin: 0 8px;
}
.site-footer .center-links a:hover {
  text-decoration: underline;
  color: #0078D7;
}
.site-footer .center-links span {
  color: #333;
  text-decoration: none;
  margin: 0 8px;
}
.site-footer .center-links .sep {
  color: rgba(0,0,0,0.18);
  margin: 0 6px;
}

@media (max-width: 700px) {
  .site-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .site-footer .left-links,
  .site-footer .right-links,
  .site-footer .center-links {
    width: 100%;
    display: block;
  }
  .site-footer .right-links { text-align: center; }
}

/* Table of contents (right-side) */
.content-columns {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.content-columns main {
  flex: 1 1 auto;
}
.toc {
  position: static; /* flow with the document */
  width: 220px; /* narrower, lightweight list */
  max-height: none;
  overflow: visible;
  padding: 4px 8px;
  background: transparent; /* minimal */
  border: none;
  box-shadow: none;
  font-size: 0.9em;
  color: #666;
}
.toc h3 {
  margin: 0 0 6px 0;
  font-size: 0.85em;
  color: #999;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block; /* ensure TOC is vertical, override generic nav ul */
}
.toc li {
  margin: 6px 0;
  display: block; /* each item on its own line */
}
.toc a {
  color: #666;
  text-decoration: none;
  transition: color 120ms ease, padding-left 120ms ease;
  display: block;
  padding: 2px 0;
}
.toc a:hover {
  color: #0078D7;
}
.toc a.active {
  color: #0078D7;
  font-weight: 600;
}
.toc ul ul { /* nested lists (h3) */
  margin-top: 6px;
  margin-left: 8px;
}
.toc li .toc-h3 { /* h3 links smaller */
  font-size: 0.88em;
  color: #666;
}

/* subtle scrollbar styling for modern browsers */
.toc::-webkit-scrollbar { width: 10px; }
.toc::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); border-radius: 6px; }

/* Responsive: hide TOC on narrow screens and use full-width main */
@media (max-width: 900px) {
  .toc { display: none; }
  main { margin: 20px; }
  .content-columns { display: block; }
}

/* Larger, more readable table style for important data (use class `big-table`) */
.big-table {
  width: 92%;
  max-width: 1100px;
  margin: 12px 0 24px 0;
  font-size: 1.05rem; /* slightly larger text */
  border-collapse: collapse;
  background: #fff; /* make table stand out */
}
.big-table th,
.big-table td {
  padding: 12px 14px; /* larger cells */
  border: 1px solid rgba(0,0,0,0.12);
  text-align: left;
  vertical-align: middle;
}
.big-table thead th {
  background: #f7f7f7;
  font-weight: 700;
}
.big-table tbody td:first-child {
  font-weight: 700; /* emphasize atom names */
}

@media (max-width: 900px) {
  .big-table { width: 100%; font-size: 0.95rem; }
  .big-table th, .big-table td { padding: 10px 8px; }
}
