﻿/* Root Variables */
:root {
  --color-bg: #0a0a0a;
  --color-text: #ffffff;
  --color-gray: #aaaaaa;
  --color-blue: #0000cd;
  --color-green: #0de162;
  --color-scrollbar: #333;
  --color-scrollbar-hover: #666;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Flex Utilities */
.flex-row { display: flex; flex-direction: row; }
.flex-column { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.gap-xl { gap: 3rem; }
.gap-lg { gap: 2rem; }
.gap-md { gap: 1rem; }
.gap-sm { gap: 0.5rem; }
.gap-xs { gap: 0.25rem; }
.flex-1 { flex: 1; }
.grow-1 { flex-grow: 1; }

/* Alignment */
.justify-center { justify-content: center; }
.justify-space { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

/* Containers */
main, .about {
  min-height: 100vh;
  padding: 1rem;
}
main {
  position: sticky;
  top: 0;
}
.about {
  z-index: 2;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(4px);
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  main, .about {
    min-height: 100svh;
  }
}

/* Text & Color */
.title { text-transform: uppercase; }
.gray { color: var(--color-gray); }
.blue { color: var(--color-blue); }
.green {
  color: var(--color-green);
  font-size: 0.875rem;
}
.nowrap, a { white-space: nowrap; }

/* Links */
a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  transition: color 100ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
a:active {
  color: var(--color-green);
}
/* Hover (pointer devices only) */
@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--color-green);
  }
}

/* Pictures */
.card1,
.card2 {
  display: flex;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.card1 {
  top: 1rem;
  right: 1rem;
}
.card2 {
  bottom: 1rem;
  left: 1rem;
}
.card1.tilt-ready,
.card2.tilt-ready {
  pointer-events: auto;
}
.card1:not(.tilt-ready) .js-tilt-glare-inner,
.card2:not(.tilt-ready) .js-tilt-glare-inner {
  opacity: 0 !important;
}
img {
  max-width: 45vmin;
  min-width: 120px;
  height: auto;
}
.fade-in {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.fade-in.visible {
  opacity: 1;
}

/* Rdde Animation */
.rdde > * {
  visibility: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}
.rdde.ready > * {
  visibility: visible;
  opacity: 1;
}
.rdde.ready > *[data-index] {
  transition-delay: calc(100ms * var(--i));
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 0.5rem;
}
::-webkit-scrollbar-track {
  background: none;
}
::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-hover);
}

/* Selection */
::selection {
  color: var(--color-green);
  background: var(--color-blue);
}

/* Responsive */
@media (max-width: 768px) {
  .mobile { flex-direction: column; }
  .js-tilt-glare { display: none !important; }
  img { max-width: 40vmin; }
}
@media (max-width: 480px) {
  h2 { font-size: 1.25rem; }
  img { max-width: 35vmin; }
}
