/* --- General CSS Rules --- */

@media (prefers-color-scheme: light) {
  :root {
    --text: #080808;
    --background: #f9fafa;
    --primary: #216697;
    --secondary: #b1bfc9;
    --accent: #729ebd;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f7f7f7;
    --background: #050606;
    --primary: #68adde;
    --secondary: #36444e;
    --accent: #4e6a7e;
  }
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Make the body at least as tall as the screen */
}

main {
  flex-grow: 1; /* Make the main content "grow" to fill empty space */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'DM Serif Text', serif;
}

h1 {
  color:var(--primary)
}

h2 {
  color:var(--accent)
}

/* Example: style collapsible abstracts for publications */

.pub-entry details.abstract summary {
  cursor: pointer;
  font-style: italic;
  color: #444;
}

.pub-entry details.abstract p {
  margin-left: 1em;
  margin-top: 0.4em;
}

.pub-entry {
  margin-bottom: 1.2em;
}

details.abstract summary {
  cursor: pointer;
  font-style: italic;
  color: #444;
}

details.abstract p {
  margin-left: 1em;
  margin-top: 0.4em;
}

.cv-entry {
  /* This adds space *between* each CV item */
  margin-bottom: 1.5rem; 
}

/* ... all your other styles ... */

.patlet-list dt {
  margin-top: 0.8em;
}

.patlet-list dd {
  margin-left: 1.5em;
  /* Indents the description */
  font-style: italic;
  color: #333;
}

.pattern-name {
  font-variant: small-caps;
}


/* Style the bibliography list */
ol.bib-list {
  list-style-type: none;
  /* Hide the default '1.' numbers */
  counter-reset: bib-counter;
  /* Create a custom counter */
  padding-left: 0;
}

ol.bib-list li {
  counter-increment: bib-counter;
  /* Add 1 to the counter for each list item */
  margin-bottom: 0.8em;
  /* Add some space between entries */

  /* Make room for our custom [X] number */
  position: relative;
  padding-left: 3em;
}

/* Create and style the new '[X]' number */
ol.bib-list li::before {
  content: '[' counter(bib-counter) ']';
  /* Display as [1], [2], etc. */
  font-weight: bold;

  /* Position it to the left of the text */
  position: absolute;
  left: 0;
  top: 0;

  /* Align numbers neatly, e.g., [9] and [10] */
  width: 2.5em;
  text-align: right;
  margin-right: 0.5em;
}





/* Styles for the obfuscated email code block */

.email-address>.email-part {
  display: none;
}

code.email-address {
  background-color: #f4f4f4;
  /* A light, subtle gray */
  padding: 3px 6px;
  /* A little bit of space inside */
  border-radius: 4px;
  /* Slightly rounded corners */
  font-family: monospace;
  /* Ensure it's monospaced */
  color: var(--primary);
  /* Optional: A common color for code */
}

@media (prefers-color-scheme: dark) {

  code.email-address {
    background-color: #2a2a2a;
    /* A dark gray background */
    color: var(--primary);
    /* A lighter, readable "code" color */
  }
}
/* --- Footer rules --- */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.footer-links a {
  text-decoration: none;
  font-size: 1.5rem; /* Makes icons larger */
  color: var(--accent); /* Uses your accent color */
  transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
  color: var(--text); /* Uses your main text color on hover */
}

/* Make sure all footer paragraphs look right */
.footer p,
.footer-copyright {
  margin-bottom: 1rem;
}

/* --- Styles Specific to the Printable CV Layout (Browser View) --- */

.printable-page {
    /* Styles that were on <main> tag */
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.print-header {
    /* Styles for the h1 and button container */
    display: flex; 
    justify-content: space-between; 
    align-items: center
}

.printable-content {
    /* Style for the content div (from printable.md) */
    /* REMOVED margin-bottom: 2rem to prevent double spacing */
    margin-bottom: 2rem;
}

/* Add the intended space between the content block and the first H2 */
.printable-page h2, .printable-h2 {
    /* This already sets space above the H2 */
    margin-top: 2.5rem;
}

/* --- Styles for CV List Header (layouts/cv/list.html) --- */

.cv-page-header {
    /* Enables the flexible layout */
    display: flex;
    /* Pushes h1 to the left and icon to the right */
    justify-content: space-between;
    /* Aligns items along their baseline (good for text/icon alignment) */
    align-items: center;
    /* Adds separation before the content starts */
}

.cv-print-link {
    /* Ensures the icon height aligns with the title text */
    line-height: 1;
}

.cv-print-link a {
    /* Ensures the link tag itself doesn't hide the color */
    color: inherit; 
    text-decoration: none; /* Removes any default underline */
    
    /* Subtle hover effect for polish */
    transition: opacity 0.2s ease-in-out;
}

.cv-print-link a:hover {
    opacity: 0.8;
}

/* --- THE CRUCIAL FIX: Target the icon (i) directly for size and color --- */
.cv-print-link a i {
    /* Use your defined primary color */
    color: var(--primary); 
    /* Set the icon size */
    font-size: 1.5rem; 
}

.generation-date {
    /* Subtle placement and style */
    text-align: right;
    font-size: 8pt;
    color: #666; /* Light gray */
    margin-top: 3em; /* Space it out from the content above */
    padding-top: 0.5em;
    border-top: 1px solid #ccc; /* A subtle separator line */
    page-break-before: auto; /* Ensure it doesn't force a break */
}

.print-contact-block span a{
  text-decoration: none;
  color: #080808
}
