/* Root */
:root {
  --white: #ffffff;
  --black: #000000;
  --grey: #777777;
  --header-bg: #113768;
  --body-bg: #001a33;
  --primary: #0598ce;
  --secondary: #113768;
  --link: #113768;
  --card-bg: #aaaaaa;
  --footer-bg: #113768;
}

:focus-visible {
  outline: var(--secondary) auto 1px;
}

/* Global */
body {
  background-color: var(--body-bg);
  margin: 0;
  min-width: 320px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
header,
.navbar,
.navbar a,
label {
  font-family: "Orbitron", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

main,
a,
p,
ul,
ol,
li,
input,
textarea,
figure,
figcaption,
footer {
  font-family: "Exo 2", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 1em;
}

h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.8em;
  color: var(--primary);
}

h2 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 1.5em;
  color: var(--primary);
}

h2 .material-symbols-outlined {
  font-size: 1.2em;
  vertical-align: bottom;
}

h3 {
  margin-top: 0;
}

figcaption {
  padding: 4px;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-inline-start: 20px;
}

a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  text-decoration: underline;
}

figure {
  margin: 0;
}

textarea {
  resize: none;
  border: 1px solid var(--grey);
  box-sizing: border-box;
}

input {
  border: 1px solid var(--grey);
  box-sizing: border-box;
}

button {
  cursor: pointer;
}

button:hover,
button:active,
button:focus {
  text-shadow: 0px 0px 1px var(--link);
}

button[type="submit"] {
  background-color: var(--primary);
  color: var(--black);
  border: 1px solid var(--link);
  text-decoration: none;
  border-radius: 4px;
  font-size: 1em;
  padding: 4px 12px;
}

button[type="reset"] {
  background-color: var(--white);
  color: var(--black);
  border: 1px solid var(--link);
  text-decoration: none;
  border-radius: 4px;
  font-size: 1em;
  padding: 4px 12px;
}

/* Layout */
header {
  overflow: hidden;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  text-align: center;
  color: var(--white);
  font-weight: 700;
}

.header-title {
  padding: 4px;
}

.navbar {
  display: flex;
  justify-content: center;
}

.navbar .material-symbols-outlined {
  font-size: 1.2em;
  vertical-align: text-top;
}

.navbar a {
  flex: 1 1 auto;
  color: var(--white);
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 400;
}

.navbar a:hover,
.navbar a:active,
.navbar a:focus {
  text-shadow: 1px 1px 0 var(--primary);
}

main {
  padding: 15px 15px 0 15px;
  margin: 0 8%;
}

.card {
  background-color: var(--card-bg);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 24px;
  border-top-left-radius: 24px;
  border-top-right-radius: 0;
  box-shadow: 4px 4px 0 var(--secondary);
  padding: 15px 20px;
  margin-bottom: 25px;
}

footer {
  background-color: var(--footer-bg);
  color: var(--white);
  font-size: 0.5em;
  padding: 5px;
  text-align: center;
}

#download-resume {
  position: fixed;
  bottom: 20px;
  left: 2px;
  color: var(--primary);
  border-radius: 50%;
  padding: 5px;
}

#download-resume .material-symbols-outlined {
  font-size: 1.8em;
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 2px;
  color: var(--primary);
  border-radius: 50%;
  padding: 5px;
}

#back-to-top .material-symbols-outlined {
  font-size: 1.8em;
}

/* About */
#about .card .content {
  display: flex;
}

#about-img {
  border: 4px solid var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 24px;
  border-top-left-radius: 24px;
  border-top-right-radius: 0;
  margin-right: 15px;
  width: 100px;
  height: 100px;
}

/* Projects */
#projects-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 6px;
}

.projects-item {
  flex: 1;
  border: 2px solid var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
  overflow: hidden;
  position: relative;
  min-width: 15vw;
}

.projects-item:hover,
.projects-item:active,
.projects-item:focus {
  opacity: 0.6;
}

.projects-item img {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  background-color: var(--black);
  color: var(--white);
  cursor: pointer;
  font-size: 0.8em;
}

#lightbox-bg {
  z-index: 1001;
  opacity: 0.8;
  background-color: var(--black);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

#lightbox {
  z-index: 1002;
  width: 100%;
  height: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  background-color: transparent;
}

#lightbox figure {
  position: relative;
}

#lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#lightbox-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  background-color: var(--black);
  color: var(--white);
  cursor: pointer;
}

/* Experience */
.experience-item {
  border: 2px solid var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
  padding: 10px;
  background-color: var(--white);
  position: relative;
  margin-bottom: 18px;
}

.experience-item:last-child {
  margin-bottom: 0;
}

.experience-item::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 20%;
  height: 20px;
  background-color: var(--secondary);
  width: 25px;
}

.experience-item:last-child::after {
  display: none;
}

.experience-item h3,
.experience-item h4,
.experience-item h5 {
  margin: 0;
}

.experience-item p {
  margin-top: 5px;
}

/* Education */
.education-item {
  border: 2px solid var(--secondary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
  padding: 10px;
  background-color: var(--white);
  position: relative;
  margin-bottom: 18px;
}

.education-item:last-child {
  margin-bottom: 0;
}

.education-item::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 20%;
  height: 20px;
  background-color: var(--secondary);
  width: 25px;
}

.education-item:last-child::after {
  display: none;
}

.education-item.current {
  background-color: var(--secondary);
}

.education-item h3,
.education-item h4,
.education-item h5 {
  margin: 0;
}

.education-item p {
  margin-top: 5px;
}

/* Contact */
.contact-row {
  margin-bottom: 5px;
  width: 100%;
}

.contact-row:last-child {
  margin-bottom: 0;
}

.contact-row label {
  display: block;
  font-size: 0.8em;
  font-weight: 700;
}

.contact-row input,
.contact-row textarea {
  width: 100%;
  font-size: 0.8em;
  padding: 2px 4px;
}
