/* ===========================================
   CONTENT
=========================================== */

/* -------------------------------------------
   HERO
------------------------------------------- */

.hero {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background-color: var(--background-primary-inverse);
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem;
}

.hero__container-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 512px;
}

.hero__container .display {
  color: var(--content-primary-inverse);
}

.hero__container .body-md {
  color: var(--content-secondary-inverse);
}

.fade-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: black;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease-out;
}

.page-content {
  margin-top: 100vh;
  background-color: var(--background-primary);
}

/* -------------------------------------------
   PROJECTS SPOTLIGHT
------------------------------------------- */

.project-card:hover .project-card__icon {
  opacity: 1;
}

.project-card:hover .project-card__name {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.project-card:hover .project-card__image {
  transform: scale(1.05);
}

.project-card__icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--background-secondary);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
}

.project-card__client {
  color: #fff;
}

.project-card__name {
  color: #fff;
}

.project-card__details {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(18, 19, 20, 0) 0%,
      rgba(18, 19, 20, 0.8) 100%
    ),
    linear-gradient(
      0deg,
      rgba(18, 19, 20, 0.25) 0%,
      rgba(18, 19, 20, 0.25) 100%
    );
  pointer-events: none;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.project-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 6;
  overflow: hidden;
  cursor: pointer;
  border-radius: 0.5rem;

  @media (min-width: 768px) {
    aspect-ratio: 4 / 6;
  }

  @media (min-width: 576px) {
    aspect-ratio: 6 / 4;
  }
}

.projects-spotlight__grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  @media (min-width: 768px) {
    flex-direction: row;
  }
}

.projects-table__grid--desktop .projects-table__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;

  @media (max-width: 767px) {
    /* Reset for mobile (wraps naturally) */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* -------------------------------------------
   PROJECTS MAIN
------------------------------------------- */

.projects-table__col {
  color: var(--content-secondary);
}

.projects-table__row:not(.projects-table__row--header):hover {
  background-color: var(--background-secondary);
}

.projects-table__row:not(.projects-table__row--header) {
  cursor: pointer;
}

.projects-table__row {
  padding: 0.75rem 1.5rem;
  /*   transition: background-color 0.5s ease; */
  border-bottom: 1px solid var(--border-light);

  @media (min-width: 768px) {
    padding: 0.75rem 2.5rem;
    border-bottom: none;
  }

  @media (min-width: 1024px) {
    padding: 0.75rem 5rem;
  }
}

.projects-table__row--header {
  display: none;

  @media (min-width: 768px) {
    display: block;
  }
}

.projects-table__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;

  @media (min-width: 768px) {
    grid-template-columns: 1fr 10rem 5rem;
    gap: 2.5rem;
  }
}

/* ---- PROJECTS TABLE VIEW SWITCHER (place AFTER .projects-table__grid) ---- */

/* Mobile-first: show mobile, hide desktop */
.projects-table__grid.projects-table__grid--desktop {
  display: none;

  @media (min-width: 768px) {
    display: grid;
  }
}

.projects-table__grid.projects-table__grid--mobile {
  display: grid;

  @media (min-width: 768px) {
    display: none;
  }
}

/* Mobile metadata colour */
.projects-table__grid--mobile .projects-table__category,
.projects-table__grid--mobile .projects-table__year {
  color: var(--content-secondary);
}

/* -------------------------------------------
   TABS
------------------------------------------- */

.tabs__btn:hover {
  color: var(--content-primary) !important;
}

.tabs__btn:hover .tabs__label {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.tabs__btn {
  display: inline-flex;
  vertical-align: top;
  gap: 0.25rem;
  color: var(--content-placeholder) !important;
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  margin-right: 1rem;
  cursor: pointer;
}

.tabs__btn span {
  color: inherit;
}

.tabs__btn--active {
  color: var(--content-primary) !important;
}

/* Container structure */
.tabs {
  margin-bottom: 2.5rem;
  padding: 0 1.5rem;
  text-wrap: nowrap;
  overflow-x: scroll;
  cursor: pointer;
  transition: background-color 0.5s ease;
  display: flex;

  @media (min-width: 768px) {
    padding: 0 2.5rem;
  }

  @media (min-width: 1024px) {
    padding: 0 5rem;
  }
}

.tabs__container {
  display: flex;
  gap: 1rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;

  @media (min-width: 768px) {
    gap: 1.5rem;
  }
}

/* WORK OVERLAY */

/* -------------------------------------------
   WORK OVERLAY RICHTEXT
------------------------------------------- */

.overlay-medium__richtext {
  display: flex;
  flex-direction: column;
}

/* Normal paragraphs */
.overlay-medium__richtext .overlay-paragraph {
  /*   font-size: 1rem; i'd like this to be pulled in as body-md, not directly in another css property */
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--content-primary);
}

/* Add larger spacing before images if preceded by text */
.overlay-medium__richtext .paragraph-image-spacer {
  height: 2.5rem;
}

/* Full-width images (6/4) */
.overlay-medium__richtext .overlay-img.standard {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  object-fit: cover;
  margin-bottom: 2.5rem;
}

/* Side-by-side 1:1 images */
.overlay-medium__richtext .overlay-img-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.overlay-medium__richtext .overlay-img-group .overlay-img.square {
  width: calc(50% - 0.5rem);
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  object-fit: cover;
}

/* -------------------------------------------
   ACHIEVEMENTS
------------------------------------------- */

.achievement-card:hover .achievement-card__icon {
  opacity: 1;
}

.achievement-card:hover .achievement__award-title,
.achievement-card:hover .achievement__quote {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.achievement-card__icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--background-secondary);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
}

.achievement__award-source {
  margin-bottom: 0.5rem;
  color: var(--content-secondary);
}

.achievement__award-title {
  margin-bottom: 1.5rem;

  @media (min-width: 768px) {
    flex-grow: 1;
  }
}

.achievement-card__details .label {
  margin-bottom: 0.75rem;
  color: var(--content-secondary);
}

.achievement__award-year {
  color: var(--content-secondary);
}

.achievement-card__details {
  display: flex;
  flex-direction: column;

  @media (min-width: 768px) {
    height: 100%;
  }
}

.achievement-card {
  position: relative;
  cursor: pointer;
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  padding: 2.5rem 1.5rem 1.5rem 1.5rem;

  @media (min-width: 768px) {
    aspect-ratio: auto;
  }
}

.achievement__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1fr;
  }
}

/* -------------------------------------------
   ABOUT
------------------------------------------- */

.about__disciplines-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about__disciplines-title {
  margin-bottom: 2.5rem;
}

.about__cv-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.about__introduction {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.about__introduction p:last-child {
  color: var(--content-secondary);
}

.about__main {
  width: 100%;

  @media (min-width: 768px) {
    width: 70%;
  }
}

.about__disciplines {
  width: 100%;

  @media (min-width: 768px) {
    width: 30%;
    margin-top: 1.5rem;
  }
}

.about__disciplines-title {
  color: var(--content-secondary);
}

.about__container {
  display: flex;
  flex-direction: column;
  gap: 5rem;

  @media (min-width: 768px) {
    flex-direction: row;
  }
}

/* -------------------------------------------
   FOOTER
------------------------------------------- */

footer {
  background-color: var(--background-primary-inverse);
}

.email:hover,
.social--links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.footer__container {
  padding: 5rem 0rem;
}

.footer__content--links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5rem;
  margin-bottom: 5rem;

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1fr;
  }
}

.social--links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

footer ul * {
  color: #fff;
}

.email {
  cursor: pointer;
}

.contact-header,
.social-header,
.copyright-statement {
  color: var(--content-secondary-inverse);
  margin-bottom: 1rem;
}

.toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: var(--background-secondary-inverse);
  color: var(--content-primary-inverse);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  opacity: 0;
  translate: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================================
   OVERLAY
=========================================== */

.overlay-medium {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  z-index: 9999;
}

.overlay-medium.active {
  display: flex;
}

.overlay-medium__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.overlay-medium__content {
  position: relative;
  width: 768px;
  height: 100vh;
  background: var(--background-primary);
  border-left: 1px solid var(--border-light);
  overflow-y: auto;
  animation: slideInRight 0.25s ease-out;
}

.overlay-medium__body {
  padding: 5rem 1.5rem 1.5rem 1.5rem;

  @media (min-width: 768px) {
    padding: 5rem 2.5rem 2.5rem 2.5rem;
  }
}

/* -------------------------------------------
   WORK OVERLAY HEADER
------------------------------------------- */

.overlay-work-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 2.5rem;
}

.overlay-work-title {
  color: var(--content-primary);
  margin-bottom: 2.5rem;
}

.overlay-work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.overlay-work-meta-item {
  display: flex;
  flex-direction: column;
}

.overlay-work-meta-label {
  color: var(--content-secondary);
  margin-bottom: 0.5rem;
}

.overlay-work-meta-value {
  color: var(--content-primary);
}

/* -------------------------------------------
   ACHIEVEMENT OVERLAY HEADER
------------------------------------------- */

.overlay-achievement-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 2.5rem;
}

.overlay-achievement-label {
  color: var(--content-secondary);
  margin-bottom: 0.75rem;
}

.overlay-achievement-title {
  color: var(--content-primary);
  margin-bottom: 1.5rem;
}

.overlay-achievement-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.overlay-achievement-source,
.overlay-achievement-year {
  color: var(--content-secondary);
}

.overlay-medium__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  border: none;
  background: var(--background-secondary);
  border-radius: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.overlay-medium__close:hover {
  background: var(--background-secondary-hover);
  color: var(--content-primary-inverse);
}

/* Shared */
body.no-scroll {
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.overlay-medium__richtext img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  aspect-ratio: 3/2;
  object-fit: cover;
}

/* -------------------------------------------
   OVERLAY LINKS
------------------------------------------- */

.overlay-medium__richtext .overlay-link {
  display: inline-flex;
  align-items: center;
  color: var(--content-primary);
  text-decoration: none;
  margin-top: 2.5rem;
}

.overlay-medium__richtext .overlay-link:hover .overlay-link__text {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.overlay-medium__richtext .overlay-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===========================================
   GLOBAL
=========================================== */

/* -------------------------------------------
   SPACING
------------------------------------------- */

.projects-spotlight,
.achievement,
.about,
footer,
.hero {
  padding: 0rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;

  @media (min-width: 768px) {
    padding: 0rem 2.5rem;
  }

  @media (min-width: 1024px) {
    padding: 0rem 5rem;
  }
}

.projects-spotlight__container,
.achievement__container,
.about__container,
.footer__container,
.hero__container {
  width: 100%;
  max-width: 1200px;
}

section h2 {
  margin-bottom: 2.5rem;
}

section:first-child {
  padding-top: 5rem;
}

section {
  margin-bottom: 5rem;
}

/* -------------------------------------------
   ICONS
------------------------------------------- */

.material-symbols-outlined {
  font-weight: 300;
  font-size: 24px;
}

.icon-download,
.icon-content-copy {
  margin-right: 0.5rem;
}

.icon-open-in-new {
  margin-left: 0.5rem;
}

/* -------------------------------------------
   TYPOGRAPHY
------------------------------------------- */

.display {
  font-family: "DM Sans";
  font-weight: 400;
  font-size: 1.75rem;
}

.heading-lg {
  font-family: "DM Sans";
  font-weight: 400;
  font-size: 1.75rem;
}

.heading-md {
  font-family: "DM Sans";
  font-weight: 400;
  font-size: 1.372rem;
}

.heading-sm {
  font-family: "DM Sans";
  font-weight: 400;
  font-size: 1.25rem;
}

.body-md {
  font-family: "DM Sans";
  font-weight: 300;
  font-size: 1rem;
}

.body-sm {
  font-family: "DM Sans";
  font-weight: 300;
  font-size: 0.875rem;
}

/* -------------------------------------------
   VARIABLES
------------------------------------------- */

:root {
  /* Grey Scale */
  --grey-0: #ffffff;
  --grey-5: #f8f9fa;
  --grey-10: #f1f3f5;
  --grey-20: #e0e2e5;
  --grey-30: #cfd2d6;
  --grey-40: #b8bcc2;
  --grey-50: #a0a5ac;
  --grey-60: #7f858d;
  --grey-70: #5e646c;
  --grey-80: #3e4349;
  --grey-90: #242628;
  --grey-100: #121314;

  /* Semantic Colors - Content */
  --content-primary: var(--grey-100);
  --content-secondary: var(--grey-70);
  --content-primary-inverse: var(--grey-0);
  --content-secondary-inverse: var(--grey-30);
  --content-disabled: var(--grey-40);
  --content-placeholder: var(--grey-40);

  /* Semantic Colors - Background */
  --background-primary: var(--grey-0);
  --background-primary-inverse: var(--grey-100);

  --background-secondary: var(--grey-10);
  --background-secondary-hover: var(--grey-40);
  --background-secondary-inverse: var(--grey-90);

  /* Semantic Colors - Borders */
  --border-light: var(--grey-20);
  --border-dark: var(--grey-100);
  --border-light-inverse: var(--grey-80);
  --border-dark-inverse: var(--grey-0);
}

/* -------------------------------------------
   RESET
------------------------------------------- */

* {
  padding: 0rem;
  margin: 0rem;
  box-sizing: border-box;
  scroll-behavior: smooth;
  color: var(--content-primary);
  vertical-align: middle;
  user-select: none;
}

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

li {
  list-style-type: none;
}
