/* Ported from the Angular portfolio's component styles plus the Bootstrap 4 defaults it relied on. */

:root {
  --text: #212529;
  --muted: rgba(0, 0, 0, 0.5);
  --light: #f8f9fa;
  --card: #f9f9f9;
  --accent: #3d85c6;
  --accent-dark: #356a9a;
  --link: #007bff;
  --border: rgba(0, 0, 0, 0.125);
  --border-strong: rgba(0, 0, 0, 0.25);
  --sidebar-width: 25%;
  --nav-height: 60px;
  --gradient: linear-gradient(141deg, #82f2ff 0%, #1fc8db 25%, #006ab1 160%, #03325c 175%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 10px);
}

body {
  margin: 0;
  font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* Navbar */

.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  background: var(--light);
  border-bottom: 1px solid #dee2e6;
}

.navbar ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar a {
  display: block;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  color: var(--muted);
}

.navbar a:hover {
  color: rgba(0, 0, 0, 0.7);
  background: #e2e6ea;
  text-decoration: none;
}

/* Sidebar (about me) */

#sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: calc(var(--nav-height) + 10px);
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.profile-pic {
  align-self: center;
  width: 200px;
  height: 200px;
  padding: 10px;
  border-radius: 150px;
}

#sidebar .about-name {
  align-self: center;
  width: 90%;
  padding: 5px 30px;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #dee2e6;
}

#sidebar .about-role {
  padding: 5px 30px;
  font-size: 1.5rem;
  text-align: center;
}

#sidebar .about-text {
  margin-bottom: 13px;
  padding: 5px 30px;
  text-align: center;
}

.list-group {
  display: flex;
  flex-direction: column;
}

.list-group a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: #495057;
  background: var(--light);
  border-top: 1px solid var(--border);
}

.list-group a:last-child {
  border-bottom: 1px solid var(--border);
}

.list-group a:hover {
  color: #495057;
  background: #e9ecef;
  text-decoration: none;
}

.icon {
  flex: none;
}

/* Main content */

#page-content {
  padding: 15px;
}

.section > h3,
.contact-container > h3 {
  padding: 20px;
  border-bottom: 2px solid var(--border-strong);
}

/* Projects */

.projects-container {
  padding: 0;
}

.project-info {
  padding: 20px;
  scroll-margin-top: calc(var(--nav-height) + 10px);
}

.project-info h4 {
  padding: 5px 10px;
}

.project-title {
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--accent);
}

.project-client {
  padding-left: 10px;
}

.project-content {
  display: flex;
  flex-direction: column;
}

.project-details {
  max-width: 100%;
}

.project-images {
  display: flex;
  flex-direction: column;
  margin: 10px;
}

.project-images > img {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0;
  align-self: center;
  background-color: var(--card);
  box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s;
}

.project-desc {
  padding: 10px;
  animation: reveal 0.2s ease-out;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
}

.project-tech {
  padding: 10px;
}

.tech-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.tech-container li {
  margin: 2px;
  padding: 5px;
  background: #fff;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
}

.show-details {
  display: block;
  margin: 50px 10px 10px;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-align: center;
  background: #fff;
  border: 4px solid lightgray;
  border-radius: 32px;
  transition: 0.2s;
}

.show-details:hover {
  filter: drop-shadow(0 4px 12px lightgray);
  transform: scale(1.05);
  text-decoration: none;
}

.show-details.htmx-request {
  opacity: 0.6;
  cursor: progress;
}

.more-btn {
  display: block;
  margin-top: 20px;
  padding: 0.5rem 1rem;
  color: #fff;
  text-align: center;
  background: var(--gradient);
  background-position: 100% 100%;
  background-size: 200% 100%;
  border-radius: 32px;
  filter: drop-shadow(0 2px 4px #03325c);
  transition: 0.3s;
}

.more-btn:hover {
  color: #fff;
  background-position: 0% 0%;
  filter: drop-shadow(0 4px 8px #1f90db);
  text-decoration: none;
  transform: scale(1.1);
}

/* Hobbies */

.hobbies-container {
  padding: 20px 20px 100px;
}

.hobbies-container h4 {
  padding: 10px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.album {
  display: flex;
  flex-direction: column;
}

.album > img {
  display: block;
  width: 80%;
  height: auto;
  margin: 10px 0;
  align-self: center;
  background-color: var(--card);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s;
}

.album > img:hover {
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.album > iframe {
  align-self: center;
  width: 80%;
  max-width: 552px;
  height: 175px;
  margin: 20px;
  border: 0;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

#digital-art .more-btn {
  margin: 10px;
}

/* Contact */

.contact-container {
  display: flex;
  flex-direction: column;
  margin-top: 60px;
  padding: 50px;
  background-color: var(--card);
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.5);
}

.contact-container > h3 {
  align-self: center;
  width: 70%;
  margin-bottom: 30px;
  text-align: center;
  border-bottom-width: 1px;
  border-bottom-color: var(--border);
}

.contact-container dl {
  margin: 0;
}

.contact-container dt {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
}

.contact-container dd {
  margin: 0 0 1rem;
}

.contact-container dd a {
  color: var(--accent-dark);
}

/* 404 */

.not-found {
  max-width: 40rem;
  margin: 20vh auto;
  padding: 0 1rem;
  text-align: center;
}

/* Desktop: fixed sidebar on the left, content on the right */

@media (min-width: 992px) {
  #sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 11;
    width: var(--sidebar-width);
    padding-top: 0;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    border-bottom: 0;
  }

  #sidebar .about-name {
    font-size: calc(1rem + 1vw);
  }

  #sidebar .about-role {
    font-size: calc(1rem + 0.6vw);
  }

  #sidebar .about-text {
    margin-bottom: 4vw;
    font-size: calc(0.5rem + 0.5vw);
  }

  #page-content {
    width: calc(100% - var(--sidebar-width));
    margin-top: var(--nav-height);
    margin-left: var(--sidebar-width);
    padding: 40px;
  }

  .projects-container {
    margin-top: 50px;
    border-left: 1px solid var(--border);
  }

  .project-content {
    flex-direction: row;
  }

  .project-details {
    width: 80%;
  }

  .project-tech {
    width: 20%;
  }

  .project-images,
  .album {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .project-images {
    margin: 0;
  }

  .project-images > img,
  .album > img {
    position: relative;
    width: auto;
    height: 20vh;
    margin: 10px;
    transform: scale(1);
    transition: 0.2s;
  }

  .project-images > img:hover,
  .album > img:hover {
    z-index: 3;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    cursor: zoom-in;
  }

  .project-images > img.active-img {
    z-index: 4;
    transform: scale(2.5);
    cursor: zoom-out;
  }

  .album > img.active-img {
    z-index: 4;
    transform: scale(3.5);
    cursor: zoom-out;
  }

  .album > iframe {
    width: auto;
    min-width: 400px;
    margin: 10px;
  }

  .more-btn {
    max-width: 30vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
