/* Universal selector */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Element selectors */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #2d2d2d;
  background-color: #f5f5f5;
  line-height: 1.6;
}

header {
  background-color: #1a3a5c;
  color: #ffffff;
  padding: 2rem 1rem;
  text-align: center;
}

header img.headshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

nav {
  background-color: #24507a;
  padding: 0.75rem 1rem;
  text-align: center;
}

nav a {
  color: #cde0f2;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 600;
}

/* Pseudo-class selector */
nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

footer {
  background-color: #1a3a5c;
  color: #cde0f2;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

h2 {
  color: #1a3a5c;
  border-bottom: 2px solid #1a3a5c;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}

h3 {
  color: #24507a;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

caption {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a3a5c;
}

th, td {
  border: 1px solid #bbb;
  padding: 0.6rem 0.75rem;
  text-align: left;
}

th {
  background-color: #1a3a5c;
  color: #ffffff;
}

/* Class selector */
.highlight {
  background-color: #eaf2fb;
  padding: 1rem;
  border-left: 4px solid #1a3a5c;
  margin-bottom: 1rem;
}

.job-title {
  font-weight: 700;
  color: #24507a;
}

.date-range {
  font-style: italic;
  color: #666;
}

/* ID selector */
#current-date {
  background-color: #eaf2fb;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 1rem;
}

#page-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #cde0f2;
}

/* Descendant selector */
section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

/* List-style properties */
section ul li {
  list-style-type: square;
  margin-bottom: 0.3rem;
}

section ol li {
  margin-bottom: 0.3rem;
  margin-left: 1.5rem;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1.5rem 0;
}

select {
  padding: 0.4rem;
  border-radius: 4px;
  border: 1px solid #aaa;
  font-size: 1rem;
}

/* Skills two-column grid */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skills-column ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.skills-column ol li {
  margin-bottom: 0.3rem;
}

/* Responsive - Tablet and below */
@media (max-width: 768px) {
  header {
    padding: 1.5rem 0.75rem;
  }

  header img.headshot {
    width: 90px;
    height: 90px;
  }

  h1 {
    font-size: 1.6rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  nav a {
    margin: 0 0.5rem;
  }

  main {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }

  section {
    padding: 1rem;
  }

  /* Make tables scroll horizontally instead of overflowing */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive - Phone */
@media (max-width: 480px) {
  header img.headshot {
    width: 75px;
    height: 75px;
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  nav a {
    display: block;
    margin: 0.3rem 0;
  }

  th, td {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Contact form */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #1a3a5c;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
}

button[type="submit"] {
  background-color: #1a3a5c;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background-color: #24507a;
}

/* Inline logo for goals/references */
.inline-logo {
  height: 30px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* Responsive video container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Fixed audio player widget */
.audio-player {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: #1a3a5c;
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-size: 0.85rem;
  min-width: 200px;
}

.audio-player p {
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #ffffff;
}

.audio-player .audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-player button {
  background-color: #24507a;
  color: #ffffff;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.audio-player button:hover {
  background-color: #3670a8;
}

.audio-player input[type="range"] {
  width: 80px;
  cursor: pointer;
}
