:root {
  --body-colour: #0d1117;
  --section-colour: #161b22;
  --nav-colour: #101820;
  --accent-colour: #3ea6ff;
  --accent-muted: #2d6fa3;
  --text-colour: #f1f1f1;
}

* {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-colour);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

body {
  max-width: 80%;
  margin: 0 auto;
  padding: 40px 20px;
  font-size: 1.1rem;
  background-color: var(--body-colour);
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: center;
}

.header {
  gap: 0;
}

section {
  width: 100%;
  max-width: 1200px;
  padding: 40px;
  background-color: var(--section-colour);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.section-title {
  color: var(--accent-colour);
  border-bottom: 2px solid var(--accent-colour);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 10px;
  background-color: var(--nav-colour);
  overflow: hidden;
  width: 80vw;
  margin: 20px auto 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.topnav a {
  flex: 1;
  text-align: center;
  color: var(--text-colour);
  text-decoration: none;
  font-size: 18px;
  padding: 14px 0;
  margin: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.topnav a:hover {
  background-color: rgba(62, 166, 255, 0.15);
  color: var(--accent-colour);
}

.topnav a.active {
  background-color: var(--accent-colour);
  color: #000;
}

.homepage-section {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  line-height: 2;
}

.header-name {
  grid-row: 1;
  grid-column: 1/4;
  font-size: 32px;
  align-content: center;
}

.header-text {
  grid-row: 2;
  grid-column: 1/4;
  font-size: 24px;
}

.header-photo {
  grid-row: 1/3;
  grid-column: 4/6;
}

.header-photo img {
  display: block;
  align-content: center;
  width: 80%;
  border-radius: 50%;
  margin: auto;
  opacity: 80%;
}

.skill-snapshot,
.projects,
.connect {
  margin-top: 30px;
}

#personal-info {
  text-align: center;
}

#personal-info h2 {
  font-size: 2.4rem;
  margin-bottom: 0.3em;
}

#personal-info h3 {
  font-weight: normal;
  margin-top: 0;
  font-size: 1.4rem;
}

#personal-info h4 {
  margin: 0.2em 0;
  font-size: 1.1rem;
}

#personal-info a {
  color: var(--accent-colour);
  text-decoration: none;
}

#personal-info a:hover {
  text-decoration: underline;
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.education-sub {
  background-color: #222831;
  padding: 20px;
  border-radius: 8px;
}

.skills ul,
.certificates ul {
  list-style-type: disc;
  padding-left: 25px;
  line-height: 1.6;
}

.experience,
.projects {
  width: 100%;
}

.experience h4,
.projects h4 {
  margin-bottom: 5px;
  margin-top: 20px;
  font-weight: bold;
}

.experience ul,
.projects ul {
  list-style-type: disc;
  padding-left: 25px;
  margin-top: 10px;
  line-height: 1.6;
}

@media (max-width: 800px) {
  body {
    padding: 30px 10px;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }
}

.brand {
  flex-basis: 100%;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  background-color: var(--nav-colour);
  width: 30vw;
  margin: 0 auto;
  padding: 12px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  color: var(--accent-colour);
  border-bottom: 2px solid var(--accent-colour);
  text-transform: uppercase;
}

video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 40%;
}

#vid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top,
      rgba(255, 255, 255, 0.0) 40%,
      #4aa8ff 110%);
  z-index: -1;
  pointer-events: none;
}

.title-card {
  font-size: 36px;
  text-align: left;
  align-self: flex-start;
  padding-top: 100px;
}

.title-card hr {
  height: 3px;
  background: var(--text-colour);
  border: 0;
  width: 110%;
  margin-left: -10px;
}

.title-card a {
  text-decoration: none;
  color: var(--accent-colour);
  transition: opacity 0.3s ease, color 0.3s ease;
}

.title-card a:hover {
  opacity: 0.7;
  color: var(--accent-muted);
}
