/*
  styles.css
  This file contains the styles for the HTML document.
*/

/* Global styles for the entire body */
body {
  font-family: 'Source Serif 4', serif;
  font-weight: 400;
  color: #f2f2f2; 
  font-size: 18px;
  line-height: 1.6;
  background-color: #000000;
  max-width: 720px;
  margin: auto;
  padding: 1.5rem 1rem;
}

/* Global Text Link Palette */
a:link, a:visited {
  text-decoration: none;
  color: #00e5ff; 
}

a:hover, a:active {
  text-decoration: none;
  color: #80f2ff; 
}

/* Headings */
h1 {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
  font-size: 3rem;
  color: #f0f0f0;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h2 {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
  font-size: 1.75rem;
  color: #f0f0f0;
}

h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
  font-size: 1.25rem;
  color: #f0f0f0;
}

/* Standard Lists */
ul {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  list-style-type: none;
  text-align: left;
  margin: 1rem 0;
  padding: 0;
}

/* Dropdown Menu Layout Overrides */
nav ul {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  text-align: center;
}

nav ul li {
  display: inline-block;
}

nav a {
  text-decoration: none;
  color: #f0f0f0;
  padding: 3px 10px;
}

/* Footer Navigation Buttons */
footer {
  text-align: center;
  color: #f0f0f0;
  margin-top: 3rem;
}

footer a:link, footer a:visited {
  display: inline-block; 
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 8px 24px;
  margin: 0.5rem 10px; /* Enhanced wrap margin for smaller displays */
  color: #f0f0f0 !important; 
  background-color: #111111; 
  border: 1px solid #444444; 
  border-radius: 4px; 
  position: relative;
  top: 0; 
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

footer a:hover {
  color: #ffffff !important;
  background-color: #222222;
  border-color: #666666;
}

footer a:active {
  top: 2px !important; 
}

/* Layout Utilities */
.tagline {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 400;
  text-align: center;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  line-height: 1.4;
}

.ref {
  padding-left: 20px;
  text-indent: -50px;
}

.main-content li {
  margin-bottom: 12px;
}

.centered-img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.center-table {
  margin-left: auto;
  margin-right: auto;
  width: 100%; /* Spans full horizontal limits safely */
  max-width: 560px;
  border-collapse: collapse;
}

.video-container {
  display: flex;
  justify-content: center;
  align-items: center; 
}

/* Side-by-Side Flex Splitter */
.container {
  display: flex;
  width: 100%;
}

.text-half {
  flex: 1 1 50%;
  padding: 0;
  background-color: #000;
  overflow-y: auto;
}

.image-half {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
}

.image-half img {
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
  object-position: top;
  display: block;
}

/* CV Layout Classes */
.cv {
  width: 100%;
  color: #f0f0f0;
}

.cv-section {
  margin-bottom: 2rem;
}

.cv-section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f0f0f0;
  border-bottom: 1px solid #444;
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
  text-align: left; /* Aligns cleaner above single-column stacks */
}

.cv-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr;
  padding: 0.3rem 0;
  gap: 0.5rem;
}

.cv-row.two-col {
  grid-template-columns: 2.5fr 1.5fr;
}

.cv-row.one-col {
  grid-template-columns: 1fr;
}

/* Evaluation Component Layout */
.eval-section {
  margin-bottom: 2.5rem;
}

.eval-section h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.eval-section p {
  margin: 0 0 0.75rem;
  color: #f0f0f0;
  font-size: 0.9rem;
}

.eval-grid {
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.eval-row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.6rem 0.75rem;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid #222;
}

.eval-row:last-child {
  border-bottom: none;
}

.eval-row.header {
  background: #161616; 
  font-size: 1.1rem;
  color: #ffffff;
}

.eval-score {
  text-align: right;
  white-space: nowrap;
  min-width: 2.5rem;
}

.eval-row.header .eval-score {
  font-weight: normal;
  text-align: center;
}

.event-info {
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Centered Top Level Submenu Dropdowns */
#centeredsubmenu {
  clear: both;
  float: left;
  margin: 0 0 1.5rem;
  padding: 0;
  width: 100%;
  z-index: 10;
  position: relative;
}

#centeredsubmenu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  float: right;
  position: relative;
  right: 50%;
}

#centeredsubmenu > ul > li {
  margin: 0 0 0 1px;
  padding: 0;
  float: left;
  position: relative;
  left: 50%;
  top: 1px;
}

#centeredsubmenu > ul > li a {
  display: block;
  margin: 0;
  padding: .6em 1em .4em;
  font-size: 1em;
  line-height: 1em;
  background: #111;
  text-decoration: none;
  color: #f0f0f0;
  border-bottom: 1px solid #000;
}

#centeredsubmenu > ul > li.active a {
  color: #f0f0f0;
  background: #222;
}

#centeredsubmenu > ul > li a:hover {
  background: #222;
  color: #f0f0f0;
  border-bottom: 1px solid #222;
}

#centeredsubmenu ul ul {
  display: none;
  position: absolute;
  top: 2em;
  left: 1em;
  width: 7em;
}

#centeredsubmenu ul ul li {
  float: none;
  clear: both;
  width: 100%;
}

#centeredsubmenu ul ul li a,
#centeredsubmenu ul li.active li a {
  font-size: .9em;
  font-weight: normal;
  background: #222;
  color: #f0f0f0;
  line-height: 1.4em;
  border-bottom: 1px solid #000;
}

#centeredsubmenu ul ul li a:hover,
#centeredsubmenu ul li.active ul li a:hover {
  background: #f0f0f0;
  color: #000;
}

#centeredsubmenu ul li:hover ul {
  display: block;
}

#menu-toggle {
  display: none;
  background: #000;
  color: #f0f0f0;
  border: 1px solid #f0f0f0;
  font-size: 1.3rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  margin: 0.5rem auto;
}

/* 
  =========================================
  DYNAMIC MOBILE DISPLAY MEDIA QUERY 
  =========================================
*/
@media (max-width: 640px) {
  body {
    font-size: 16px; /* Scales reading font slightly for narrow devices */
    padding: 0.8rem; /* Maximizes horizontal space */
  }

  h1 {
    font-size: 2rem; /* Keeps name headings contained cleanly on one line */
  }

  h2 {
    font-size: 1.4rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  /* Safely converts multi-column splits into an easy vertical scrolling stream */
  .cv-row, 
  .cv-row.two-col, 
  .cv-row.one-col {
    grid-template-columns: 1fr !important;
    gap: 0.15rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #222; /* Subtle divider for text blocks */
  }
  
  .cv-row:last-child {
    border-bottom: none;
  }

  /* Image & Split Handling Layout Flattening */
  .container {
    flex-direction: column;
    height: auto;
  }

  .text-half, .image-half {
    flex: 1 1 100%;
    width: 100%;
  }

  .image-half img {
    max-height: 40vh;
    margin: 1rem auto;
  }

  /* Ensures drop-down menus adapt vertically for finger targets */
  #centeredsubmenu ul {
    float: none;
    right: auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  #centeredsubmenu > ul > li {
    float: none;
    left: auto;
    margin: 2px;
  }

  #centeredsubmenu ul ul {
    position: static;
    width: 100%;
  }
}
