/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* === Project-specific overrides moved from index.html === */
:root { --shadow: none; }
/* Header color variables (dark top bar) */
:root { --header-bg: #0b1220; --header-fg: #ffffff; }

/* Remove the colored square / background under the logo and any shadow */
.brand-badge {
  background: transparent !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* Logo image should have transparent background if the PNG provides it */
.brand-badge img { display: block; height: 32px; width: auto; background: transparent !important; }

/* Dark header background + light text for top bar */
header { background: var(--header-bg) !important; color: var(--header-fg) !important; }
/* Ensure nav links and language buttons are visible on dark background */
header nav a, header .brand-badge img, header .lang-btn, header .menu-toggle { color: var(--header-fg) !important; }
header nav a { opacity: 0.95; }
header .brand-badge img { filter: none; }

/* High-contrast active/hover state for header navigation (readable on dark bg) */
header nav a {
  color: var(--header-fg) !important;
  padding: 8px 10px; border-radius: 8px;
}
header nav a:hover,
header nav a:focus,
header nav a.active {
  background: rgba(255,255,255,0.12) !important; /* subtle light highlight */
  color: var(--header-fg) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06) inset;
}

/* Language buttons styling on dark header */
header .lang-btn{
  background: transparent; color: var(--header-fg); border: 1px solid rgba(255,255,255,0.06);
}
header .lang-btn:hover{ background: rgba(255,255,255,0.06); }
header .lang-btn[aria-pressed="true"]{ background: rgba(255,255,255,0.14); color: var(--header-fg); border-color: rgba(255,255,255,0.12); }

/* Mobile nav: ensure links are readable */
@media (max-width: 900px){
  nav ul li a{ color: var(--header-fg) !important; }
  nav { background: var(--header-bg); }
}

/* Remove borders and shadows from cards, lists, badges and buttons */
.card, .list li, .pub, .project, .badge, .btn, .brand-badge {
  box-shadow: none !important;
  border: none !important;
  background: var(--card) !important;
}

/* Separator limited to content width: add a thin rule at the top of sections but constrained by .container */
section + section .container::before {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  background: color-mix(in oklab, var(--border) 60%, transparent);
  margin-bottom: 18px; /* space between the rule and section content */
}

/* Ensure a bit of vertical spacing remains between sections */
section + section { padding-top: 10px; }

/* Teaching section: make single-column and format entries like publications */
/* Force the grid in the teaching section to a single column so content spans the container */
#vyucba .grid.cols-2 { grid-template-columns: 1fr !important; }
/* Make the teaching list use a grid with gaps similar to publications */
#vyucba .list { display: grid; gap: .9rem; padding: 0; }
/* Make each teaching entry visually similar to .pub */
#vyucba .list li {
  background: var(--card);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  list-style: none;
}

/* Tweak header to be very light (remove glow) while keeping slight contrast) */
header { box-shadow: none !important; }

/* Keep mobile nav divider for usability */
@media (max-width: 900px){
  nav { border-bottom: 1px solid var(--border); }
}

/* Ensure brand badge uses the header color and logo transparency is shown */
header .brand-badge {
  background: var(--header-bg) !important;
  box-shadow: none !important;
}
header .brand-badge img {
  background: transparent !important;
  display: block;
  height: auto;
  max-height: 44px;
}

/* End of project-specific overrides */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
