:root {
  --color-accent: #dedede;
  --color-bg: #ffffff;
  --color-highlight: #585469;
  --color-text: #222222;
  --font-main: "Montserrat", Arial, sans-serif;
  --space: 0.5rem;
  --theme-bg-clr: #000000;
  --theme-bg-scale: 0;
  --theme-toggle-dark-scale: 1;
  --theme-toggle-light-scale: 0;
  --theme-toggle-rotate: 0turn;
}

:root:has(input#theme:checked) {
  --color-accent: #212121;
  --color-bg: #000000;
  --color-highlight: #887ea8;
  --color-text: #ffffff;
  --theme-bg-scale: 1.25;
  --theme-toggle-dark-scale: 0;
  --theme-toggle-light-scale: 1;
  --theme-toggle-rotate: 1turn;
}

:root:has(input#theme:checked) .logo {
  content: url("../images/logo-white.png");
}

html,
body {
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  font-family: var(--font-main);
  height: calc(100dvh - 1rem);
  letter-spacing: 1px;
  margin: 0;
  scroll-behavior: smooth;
  user-select: none;
}

html {
  padding: var(--space);
}

section {
  display: none;
  left: 0;
  min-height: 100%;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity 0.5s ease;
}

section.active {
  display: block;
}

h1,
h2 {
  font-family: monospace;
  font-size: 1.6rem;
  line-height: 30px;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

p {
  margin-top: var(--space);
  margin-bottom: calc(var(--space) * 2);
}

a {
  color: inherit;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.5s ease;
}

a:hover {
  opacity: 0.7;
}

button {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: var(--color-text);
  outline: none;
}

.sr-only {
  border-width: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.top-row {
  align-items: center;
  background-color: var(--color-accent);
  border-radius: var(--space);
  display: flex;
  font-size: 1.2rem;
  font-weight: 300;
  justify-content: space-between;
  margin-bottom: var(--space);
  padding: var(--space);
}

.content {
  -ms-overflow-style: none;
  flex: 1;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.bottom-row {
  display: flex;
  gap: var(--space);
  margin-top: var(--space);
}

.logo {
  content: url("../images/logo-black.png");
}

.theme-btn {
  cursor: pointer;
  display: grid;
  font-size: 1.5rem;
  place-items: center;
  position: relative;
  transition: opacity 0.5s;
}

.theme-btn:hover {
  opacity: 0.7;
}

.theme-btn i {
  grid-area: 1/1;
  transition: scale 0.5s ease-in-out, rotate 0.5s ease-in-out;
}

.theme-btn .dark-icon {
  rotate: var(--theme-toggle-rotate, 0turn);
  scale: var(--theme-toggle-dark-scale, 1);
}

.theme-btn .light-icon {
  scale: var(--theme-toggle-light-scale, 0);
}

.theme-mask {
  display: grid;
  grid-template-rows: repeat(25, 1fr);
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.theme-mask > div {
  background-color: var(--theme-bg-clr);
  scale: var(--theme-bg-scale, 0);
  transition: scale 1s ease-in-out;
  transition-delay: calc(var(--i) * 10ms);
}

#home {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.nav-btn {
  align-items: center;
  background-color: var(--color-accent);
  border-radius: var(--space);
  color: var(--color-text);
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  font-size: clamp(0.75rem, 2.5vw, 0.85rem);
  gap: var(--space);
  justify-content: center;
  line-height: normal;
  min-width: 0;
  padding: 0.6rem 0.25rem;
  text-transform: uppercase;
  transition: background-color 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
}

.nav-btn:active {
  opacity: 0.5;
}

.nav-btn:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 1px;
}

.nav-btn:hover {
  opacity: 0.7;
}

.nav-btn i {
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1;
}

@media (max-width: 300px) {
  .bottom-row {
    flex-wrap: wrap;
  }

  .nav-btn {
    flex: 1 1 50%;
  }
}

.heading {
  font-size: 3rem;
  margin-bottom: 1rem;
  margin-top: 4rem;
}

.projects-grid {
  display: grid;
  gap: var(--space);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1600px) {
  .projects-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.project-card {
  border: 1px solid var(--color-accent);
  border-radius: var(--space);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Project Image */
.project-image-container {
  align-items: center;
  display: flex;
  justify-content: center;
  width: 100%;
}

.project-image {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

/* Project Content */
.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space);
  padding: var(--space);
}

.project-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  letter-spacing: 1px;
  margin: 0;
}

.project-subheader {
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 400;
  margin: 0;
}

/* Tags */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space) / 2);
}

.tag {
  background-color: var(--color-text);
  border-radius: calc(var(--space) / 2);
  color: var(--color-bg);
  font-size: clamp(0.75rem, 1.2vw, 0.75rem);
  font-weight: bold;
  padding: calc(var(--space) / 2);
}

/* Description */
.project-description {
  flex: 1;
  font-size: clamp(0.8rem, 1.75vw, 1rem);
  line-height: 1.5;
  margin: 0;
}

/* Action Button */
.project-action-button {
  align-items: center;
  background-color: var(--color-accent);
  border-radius: var(--space);
  color: var(--color-text);
  display: inline-flex;
  font-size: clamp(0.85rem, 2vw, 1rem);
  gap: 0.5rem;
  justify-content: center;
  letter-spacing: 1px;
  margin-top: auto;
  padding: 1rem;
  text-transform: uppercase;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.project-action-button:hover {
  opacity: 0.8;
  transform: translateX(4px);
}

.project-action-button:active {
  opacity: 0.6;
  transform: translateX(2px);
}

.project-action-button i {
  font-size: 1em;
  transition: transform 0.3s ease;
}

.project-action-button:hover i {
  transform: translateX(4px);
}

/* Animated SVG Text */
.svg-text-animation {
  font: 140px var(--font-main) !important;
}

.text-copy {
  animation: stroke-offset 20s infinite linear;
  fill: none;
  stroke: var(--color-text);
  stroke-dasharray: 20% 30%;
  stroke-dashoffset: 0%;
  stroke-width: 1px;
}

.text-copy:nth-child(1) {
  animation-delay: -1s;
}

.text-copy:nth-child(2) {
  animation-delay: -2s;
}

.text-copy:nth-child(3) {
  animation-delay: -3s;
}

.text-copy:nth-child(4) {
  animation-delay: -4s;
}

.text-copy:nth-child(5) {
  animation-delay: -5s;
}

.text-copy:nth-child(6) {
  animation-delay: -6s;
}

.text-copy:nth-child(7) {
  animation-delay: -7s;
}

@keyframes stroke-offset {
  100% {
    stroke-dashoffset: -50%;
  }
}
.media-scroller-container {
  -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
  background: transparent;
  border-left: 1px solid var(--color-1);
  border-radius: 5px;
  border-right: 1px solid var(--color-1);
  cursor: grab;
  margin: 1rem 0 0 0;
  mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.media-scroller-container:active {
  cursor: grabbing;
}

.media-scroller {
  display: flex;
  width: fit-content;
  will-change: transform;
}

.media-list {
  display: flex;
  gap: 2rem;
  padding: 0 1.5rem;
}

.media-list span {
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
  user-select: none;
  white-space: nowrap;
}

.media-list span:hover {
  opacity: 1;
}

@keyframes scroller {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.media-scroller-container::before,
.media-scroller-container::after {
  content: "";
  height: 100%;
  position: absolute;
  top: 0;
  width: 100px;
  z-index: 2;
}

.intro {
  font-size: 1.25rem;
}

.philosophy {
  background: var(--color-highlight);
  border-radius: 4px;
  color: var(--color-bg);
  margin: 1rem 0;
  padding: calc(var(--space) * 2);
}

.philosophy p:first-child {
  margin-top: 0;
}

.philosophy p:last-child {
  margin-bottom: 0;
}

.highlight {
  color: var(--color-highlight);
  font-weight: bold;
}

@media (max-width: 768px) {
  .intro {
    font-size: 1.1rem;
  }

  .stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space);
}

.contact-link {
  align-items: center;
  background-color: var(--color-accent);
  border-radius: var(--space);
  color: var(--color-text);
  display: flex;
  gap: calc(var(--space) * 2);
  line-height: 1.5;
  max-width: 470px;
  padding: calc(var(--space) * 2);
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-link i {
  font-size: 2rem;
  line-height: 1;
  min-width: 2rem;
}

.contact-link-content {
  display: flex;
  flex-direction: column;
}

.contact-link-label {
  font-size: 0.75rem;
  letter-spacing: 1px;
  opacity: 0.7;
  text-transform: uppercase;
}

.contact-link-value {
  font-weight: 500;
}

.bi-at {
  font-size: 1rem !important;
}

@media (max-width: 768px) {
  .contact-link i {
    font-size: 1.5rem;
    min-width: 1.5rem;
  }

  .contact-link-value {
    font-size: 0.9rem;
  }
}
