:root {
  --background: #0c0f10;
  --panel: #15191a;
  --line: rgba(221, 227, 228, 0.16);
  --text: #e4e8e8;
  --muted: #7e898c;
  --brass: #d4a947;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 48%, rgba(69, 74, 72, 0.14), transparent 42%),
    var(--background);
}

.home {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(1180px, calc(100% - 56px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 28px 0 22px;
}

.wordmark {
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile-grid {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 28px;
  width: 100%;
  padding: 44px 0;
}

.project-tile {
  display: block;
  overflow: hidden;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tile-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #050606;
}

.tile-image::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 30%);
}

.tile-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.78) contrast(1.05) brightness(0.82);
  transition: filter 180ms ease;
}

.tile-center-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  color: var(--brass);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  line-height: 0.94;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  transform: translate(-50%, -50%);
}

.tile-center-label strong {
  font-size: 30px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.tile-center-label span {
  margin-top: 7px;
  color: rgba(212, 169, 71, 0.76);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-indent: 0.25em;
  text-transform: uppercase;
}

.tile-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
}

.tile-label h1 {
  margin: 0;
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.01em;
}

.tile-label-copy {
  min-width: 0;
}

.tile-label-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.035em;
}

.tile-label svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.crystal-tile-image {
  background:
    radial-gradient(circle at 68% 26%, rgba(180, 156, 94, 0.13), transparent 32%),
    linear-gradient(145deg, #151a1c 0%, #090c0d 72%);
}

.crystal-graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 220ms ease, opacity 220ms ease;
}

.lattice-edges {
  fill: none;
  stroke: rgba(205, 213, 210, 0.42);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.lattice-plane {
  fill: rgba(209, 175, 88, 0.15);
  stroke: rgba(225, 194, 111, 0.62);
  stroke-width: 1.2;
}

.lattice-nodes {
  fill: #d9b665;
  stroke: rgba(255, 239, 190, 0.7);
  stroke-width: 1;
}

.crystal-symbol {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ead29a;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%);
}

.crystal-symbol strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 45px;
  font-style: italic;
  font-weight: 400;
  line-height: 0.9;
}

.crystal-symbol span {
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.project-tile:hover {
  border-color: rgba(212, 169, 71, 0.45);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px);
}

.project-tile:hover .tile-image img {
  filter: saturate(0.9) contrast(1.06) brightness(0.88);
}

.project-tile:hover .crystal-graphic {
  opacity: 0.92;
  transform: scale(1.018);
}

.project-tile:hover .tile-label svg {
  transform: translate(2px, -2px);
}

.project-tile:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 5px;
}

footer {
  color: var(--muted);
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 540px) {
  .home {
    width: calc(100% - 34px);
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .tile-grid {
    grid-template-columns: minmax(0, 320px);
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
