/* Base — Tomas Wallin portfolio theme */
html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.15;
}

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

body,
html {
  color: #e2f0f0;
  background-color: #121212;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 16px;
}

body {
  min-width: 288px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.modal-active {
  overflow: hidden;
}

#app {
  padding: 16px;
}

@media (width >= 1200px) {
  #app {
    padding: 32px;
  }
}

.content-wrapper {
  margin: 0 auto;
}

@media only screen and (width >= 1200px) {
  .content-wrapper {
    max-width: 1168px;
  }
}

.content-wrapper .header-link {
  color: #8bc5bf;
  text-decoration: none;
}

.content-wrapper .header-link:hover {
  color: #b7dbd8;
}

.content-wrapper .header {
  z-index: 10;
  background-color: #121212;
  flex-direction: column;
  justify-content: space-between;
  margin: -16px -16px 16px;
  padding: 16px;
  display: flex;
  position: sticky;
  top: 0;
}

.content-wrapper .header::after {
  content: "";
  z-index: -1;
  background: #121212;
  width: 100vw;
  height: 100%;
  position: absolute;
  top: 0;
  left: calc(50% - 50vw);
}

@media (width >= 768px) {
  .content-wrapper .header {
    flex-direction: row;
    align-items: flex-start;
    margin: -32px -16px 16px;
    padding: 32px 16px 0;
  }
}

.content-wrapper .header h1 {
  color: #b7dbd8;
  margin: 0 0 16px;
  font-size: 2rem;
}

@media (width >= 768px) {
  .content-wrapper .header h1 {
    font-size: 3rem;
  }
}

.content-wrapper .header h1 small {
  margin-top: 4px;
  font-size: 1.125rem;
  font-weight: 400;
  display: block;
}

.content-wrapper .header .links {
  height: 42px;
  display: flex;
  align-items: center;
}

.content-wrapper .header .links .link {
  color: #e29ba7;
  flex-direction: column;
  align-items: center;
  margin-right: 16px;
  font-size: 2.8125rem;
  display: inline-flex;
  text-decoration: none;
}

@media (width >= 768px) {
  .content-wrapper .header .links .link {
    margin-left: 16px;
    margin-right: 0;
  }
}

.content-wrapper .header .links .link:hover {
  color: #f7e6e9;
}

.content-wrapper .header .links .link.resume {
  border: 2px solid;
  border-radius: 4px;
  flex-direction: row;
  padding: 11px;
  font-size: 18px;
  text-decoration: none;
}

.content-wrapper .header .links .link.resume .link-icon {
  margin-left: 8px;
}

.about-information {
  flex-direction: column;
  margin-bottom: 48px;
  display: flex;
}

@media (width >= 768px) {
  .about-information {
    flex-direction: row;
    align-items: center;
    margin-bottom: 24vh;
    padding-top: 32px;
  }
}

.about-information picture {
  margin: 0 auto;
}

.about-information .profile-image {
  filter: grayscale(60%);
  border: 4px solid #e29ba7;
  border-radius: 50%;
  width: 248px;
  min-width: 248px;
  height: 248px;
  object-fit: cover;
  margin: 0 auto 48px;
  display: block;
}

@media (width >= 768px) {
  .about-information .profile-image {
    margin-bottom: 0;
    margin-right: 48px;
  }
}

.about-information .about-text-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-information .about-text {
  color: #edc1c9;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.44;
}

@media (width >= 768px) {
  .about-information .about-text {
    font-size: 1.4rem;
    font-weight: 300;
  }
}

@media (width >= 1200px) {
  .about-information .about-text {
    font-size: 1.6rem;
  }
}

h2 {
  color: #8bc5bf;
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
}

@media (width >= 768px) {
  h2 {
    font-size: 2rem;
  }
}

.badge-list {
  flex-wrap: wrap;
  padding: 8px 12px 0;
  display: flex;
  margin: 0 0 32px;
  list-style: none;
}

@media (width >= 768px) {
  .badge-list {
    padding: 8px 24px 0;
  }
}

.badge-list .badge {
  color: #e29ba7;
  white-space: nowrap;
  border: 1px solid #e29ba7;
  border-radius: 8px;
  margin: 0 4px 16px;
  padding: 8px;
  font-size: 1.125rem;
  font-weight: 500;
  list-style: none;
}

.information-section {
  color: #121212;
  background: #b7dbd8;
  margin: 0 -16px;
  padding: 32px 16px;
  position: relative;
}

@media (width >= 768px) {
  .information-section {
    background: unset;
    margin: 0;
    padding: 32px 0;
  }

  .information-section::after {
    content: "";
    z-index: 0;
    background: #b7dbd8;
    width: 100vw;
    height: 100%;
    position: absolute;
    top: 0;
    left: calc(50% - 50vw);
  }
}

.information-section .information-section-background {
  width: 100%;
  height: inherit;
  position: relative;
  z-index: 1;
}

.information-section .information-header {
  color: #121212;
  z-index: 1;
  position: relative;
  margin: 0 0 16px;
  font-size: 1.5rem;
}

@media (width >= 768px) {
  .information-section .information-header {
    font-size: 2rem;
  }
}

.information-section .information-text {
  z-index: 1;
  padding: 0;
  font-size: 1rem;
  line-height: 1.44;
  position: relative;
  margin: 16px 0;
}

@media (width >= 768px) {
  .information-section .information-text {
    padding: 0 32px;
    font-size: 1.5rem;
  }
}

.information-section .contact-links {
  z-index: 1;
  position: relative;
  padding: 0;
  list-style: none;
  margin: 24px 0 0;
}

@media (width >= 768px) {
  .information-section .contact-links {
    padding: 0 32px;
  }
}

.information-section .contact-links li {
  margin-bottom: 8px;
}

.information-section .contact-links a {
  color: #121212;
  font-weight: 500;
}

.information-section .contact-links a:hover {
  color: #4d9c93;
}

.experience {
  flex-wrap: wrap;
  margin: 0 0 32px;
  display: flex;
  position: relative;
  align-items: stretch;
}

.experience-list .job-card {
  text-align: left;
  color: #fff;
  background-color: #232323;
  border: none;
  border-radius: 4px;
  width: 100%;
  margin: 8px 0;
  padding: 24px;
  font-size: 1rem;
  line-height: 1.44;
  display: inline-block;
}

.experience.portfolio-grid .job-card--interactive {
  justify-content: stretch;
  text-align: left;
  color: #fff;
  background-color: #232323;
  border: none;
  border-radius: 4px;
  width: 100%;
  min-height: 100%;
  margin: 8px 0;
  padding: 24px;
  font-size: 1rem;
  line-height: 1.44;
  display: inline-block;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.experience.portfolio-grid .job-card--interactive:hover {
  cursor: pointer;
}

.experience.portfolio-grid .job-card--interactive:hover .clickable-card-header {
  color: #f7e6e9;
}

.experience.portfolio-grid .job-card--interactive:hover .job-card-video iframe,
.experience.portfolio-grid .job-card--interactive:hover .job-card-video video,
.experience.portfolio-grid .job-card--interactive:hover .job-card-video img {
  filter: grayscale(0);
}

@media (width >= 768px) {
  .experience.portfolio-grid .job-card--interactive,
  .experience.experience-list .job-card {
    width: calc(50% - 16px);
    margin: 8px;
    font-size: 1.125rem;
  }
}

.experience .job-card h3 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}

@media (width >= 768px) {
  .experience .job-card h3 {
    font-size: 1.5rem;
  }
}

.experience .job-card h3 small {
  color: #e2f0f0;
  font-weight: 400;
  display: block;
  margin-top: 4px;
}

.experience .job-card p {
  margin: 8px 0 0;
}

.experience.portfolio-grid .job-card-video {
  aspect-ratio: 16 / 9;
  min-height: 160px;
  background-color: #252525;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  width: calc(100% + 48px);
  margin: -24px 0 0 -24px;
  display: block;
  position: relative;
  overflow: hidden;
}

.experience.portfolio-grid .job-card-video iframe,
.experience.portfolio-grid .job-card-video video,
.experience.portfolio-grid .job-card-video img {
  filter: grayscale(0.5);
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
  transition: filter 0.2s ease;
  position: absolute;
  inset: 0;
}

.experience.portfolio-grid .job-card-video iframe {
  pointer-events: none;
}

.clickable-card-header:not(small) {
  color: #e29ba7;
  flex-wrap: wrap;
  align-items: center;
  display: flex;
  transition: color 0.2s ease;
}

.clickable-card-header:not(small) .clickable-header-icon {
  margin-left: auto;
}

.clickable-card-header:not(small) small {
  width: 100%;
}

.video-additional-info {
  background-color: #1e1e1ecc;
  margin-bottom: -52px;
  margin-left: -16px;
  margin-right: -32px;
  padding: 12px 24px;
  font-size: 0.875rem;
  display: flex;
  position: relative;
  top: -50px;
  left: -8px;
}

.video-additional-info .icon {
  margin-right: 4px;
}

.video-additional-info > div {
  margin-right: 16px;
  display: flex;
  align-items: center;
}

.content {
  animation: show 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  opacity: 1;
  position: relative;
}

.url-link {
  color: #e29ba7;
  display: inline-block;
}

.url-link:hover {
  color: #f7e6e9;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  outline: 0;
  width: 1px;
  height: 1px;
  margin: -1px 0 0 -1px;
  padding: 0;
  font-size: 1px;
  line-height: 1px;
  display: block;
  position: absolute;
  overflow: hidden;
}

p {
  margin: 16px 0;
}

:focus {
  outline: none;
  position: relative;
}

:focus::before {
  content: "";
  border: 2px solid #b7dbd8;
  border-radius: 4px;
  margin: -4px -6px;
  padding: 4px 6px;
  position: absolute;
  inset: 0;
}

@keyframes show {
  from {
    opacity: 0.9;
  }

  to {
    opacity: 1;
  }
}

/* Project modal — case-study detail view */
.modal-overlay {
  background: rgba(18, 18, 18, 0.94);
  z-index: 100;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  display: none;
  position: fixed;
  inset: 0;
  overflow-y: auto;
}

.modal-overlay.is-open {
  display: flex;
  animation: modal-fade-in 0.28s ease;
}

.modal {
  background: #1a1a1a;
  border-radius: 4px;
  width: 100%;
  max-width: 920px;
  margin: 24px auto;
  padding: 56px 20px 40px;
  position: relative;
  animation: modal-rise 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (width >= 768px) {
  .modal {
    padding: 64px 40px 56px;
    margin: 40px auto;
  }
}

.modal-close {
  color: #e29ba7;
  background: #121212;
  border: 1px solid #e29ba7;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: inherit;
}

.modal-close span[aria-hidden="true"] {
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.modal-close:hover {
  color: #f7e6e9;
  border-color: #f7e6e9;
}

.project-detail {
  width: 100%;
}

.project-detail-hero {
  background: #252525;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 0 24px;
  aspect-ratio: 16 / 9;
}

.project-detail-hero-media,
.project-detail-hero img,
.project-detail-hero video,
.project-detail-hero iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.project-detail-hero iframe {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 100%;
}

.project-detail-header {
  margin-bottom: 32px;
}

.project-detail-title {
  color: #e29ba7;
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
}

@media (width >= 768px) {
  .project-detail-title {
    font-size: 2.25rem;
  }
}

.project-detail-role {
  color: #e2f0f0;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 400;
}

.project-detail-section {
  margin: 0 0 36px;
}

.project-detail-section h3 {
  color: #8bc5bf;
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
}

.project-detail-section h4 {
  color: #edc1c9;
  margin: 20px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.project-detail-section p {
  color: #e2f0f0;
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.55;
}

@media (width >= 768px) {
  .project-detail-section p {
    font-size: 1.0625rem;
  }
}

.project-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-info-list li {
  color: #e2f0f0;
  margin: 0 0 8px;
  line-height: 1.5;
  font-size: 1rem;
}

.project-info-label {
  color: #edc1c9;
  font-weight: 600;
}

.project-info-value {
  color: #e2f0f0;
}

.project-responsibilities {
  margin: 0 0 8px;
  padding-left: 1.25rem;
  color: #e2f0f0;
}

.project-responsibilities li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.project-highlight {
  margin-bottom: 16px;
}

.project-highlight h4 {
  margin-top: 0;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-tech-badge {
  color: #e29ba7;
  border: 1px solid #e29ba7;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 500;
}

.project-detail-gallery {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (width >= 768px) {
  .project-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-detail-figure {
  margin: 0;
}

.project-detail-figure img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.project-detail-figure figcaption {
  color: #b7dbd8;
  margin-top: 8px;
  font-size: 0.875rem;
}

.modal-links {
  padding: 0;
  list-style: none;
  margin: 0;
}

.modal-links li {
  margin-bottom: 8px;
}

.modal-links a {
  color: #8bc5bf;
  font-weight: 500;
}

.modal-links a:hover {
  color: #b7dbd8;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-rise {
  from {
    opacity: 0.85;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
