@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../../assets/fonts/host-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../../assets/fonts/host-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.72);
  --glass-item: rgba(255, 255, 255, 0.05);
  --glass-item-hover: rgba(255, 255, 255, 0.11);
  --border: rgba(255, 255, 255, 0.12);
  --glass-bg: linear-gradient(rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.26)), rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.28);
  --radius-card: 16px;
  --radius-item: 12px;
}

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

html {
  min-height: 100%;
  background: #000 url("../../assets/images/background.png") center / cover no-repeat fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  font-family: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Central card (black morphism) ---------- */

.page {
  width: 100%;
  max-width: 722px;
}

/* One glass card (same glass as the social dock) holding photo + projects */
.card {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 16px;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Black & white portrait */
.photo {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 8px;
  filter: grayscale(1) contrast(1.05);
}

/* Projects block: black-glass panel, same height as the portrait beside it */
.card > section {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: rgba(8, 8, 10, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* project cards stretch to fill the height set by the portrait */
.card > section .projects {
  flex: 1;
  grid-auto-rows: 1fr;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ---------- Corner text ---------- */

.brand,
.date,
.tagline {
  position: fixed;
  z-index: 10;
  margin: 0;
  text-align: left;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.brand {
  top: 24px;
  left: 24px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: default;
}

.date {
  top: 24px;
  right: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-align: right;
  margin-right: -0.12em; /* cancel the trailing letter-spacing so the edge lines up */
}

.tagline {
  bottom: 24px;
  left: 24px;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- Sections ---------- */

.section-title {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Projects: 2 x 2 ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 16px;
  background: var(--glass-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.project-name {
  font-size: 1.02rem;
  font-weight: 650;
}

.project-desc {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.project:hover,
.project:focus-visible {
  background: var(--glass-item-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ---------- Project: empty "add" card ---------- */

.project-empty {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

.project-empty svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* ---------- Socials: icons, outside the card ---------- */

.page nav {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  height: 54px;
  padding: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-item);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Tiles sit on the bottom edge and grow upward past the bar (see main.js). */
.socials {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.socials li {
  position: relative;
  flex: none;
}

.social {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 36%;
  background: rgba(255, 255, 255, 0.07);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.social svg {
  width: 52%;
  height: auto;
  aspect-ratio: 1;
  fill: currentColor;
}

.social:hover,
.social:focus-visible {
  opacity: 1;
}

/* Label that fades in above the hovered icon */
.tip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(8, 8, 10, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  filter: blur(6px);
  transform: translate(-50%, 6px);
  transition:
    opacity 0.3s ease,
    filter 0.3s ease,
    transform 0.3s ease;
}

.socials li:hover .tip,
.socials li:has(.social:focus-visible) .tip {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, 0);
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  /* Normal page flow: card centered, tagline as a footer after it */
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 16px 100px;
  }

  .page {
    max-width: 560px;
    margin-block: auto;
  }

  .card {
    grid-template-columns: 1fr;
  }

  .photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
  }

  .card > section {
    padding: 14px;
  }

  .section-title {
    text-align: center;
  }

  /* Name and date: same size, same line, same side margins */
  .brand,
  .date {
    top: 16px;
    font-size: 0.75rem;
    line-height: 1;
    letter-spacing: 0.1em;
  }

  .brand {
    left: 16px;
  }

  .date {
    right: 16px;
    margin-right: -0.1em;
  }

  .tagline {
    position: static;
    order: 2;
    width: 100%;
    max-width: 560px;
    margin: 24px auto 0;
    text-align: center;
    text-shadow: none;
  }

  /* Dock stays fixed (sticky) but centered */
  .page nav {
    left: 50%;
    right: auto;
    bottom: 16px;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .card {
    padding: 10px;
  }
}

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