:root {
  --bg: #fafaf7;
  --text: #1a1a1a;
  --muted: #8a8a85;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Home ---------- */
.home main {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
}

.home h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.home main nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
}

.home main nav a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.home main nav a:hover {
  color: var(--text);
}

/* ---------- Sidebar (glass dock) ---------- */
.sidebar {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.7),
    rgba(235, 235, 230, 0.45)
  );
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sidebar a {
  position: relative;
  display: block;
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.sidebar a:hover {
  transform: scale(1.14);
}

/* app-icon tile */
.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #ececea 100%);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* soft sheen on the top half */
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.tile svg {
  position: relative;
  width: 24px;
  height: 24px;
  fill: #2a2a28;
}

/* running-app dot for the current page */
.sidebar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}

/* hover label */
.sidebar a::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: calc(100% + 18px);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-4px, -50%) scale(0.88);
  transform-origin: left center;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sidebar a:hover::after {
  opacity: 1;
  transform: translate(0, -50%) scale(0.88);
}

/* ---------- Inner pages ---------- */
.page main {
  max-width: 560px;
  margin: 0 auto;
  padding: 18vh 104px 96px;
  box-sizing: content-box;
  text-align: center;
}

.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.page p {
  font-size: 15px;
  line-height: 1.7;
  color: #4a4a46;
  margin: 0 0 16px;
}

/* ---------- Projects ---------- */
.page-wide main {
  max-width: 1200px;
}

.projects {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
}

/* image | description | link | duration */
.project {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(260px, 1fr) minmax(200px, 250px) 170px;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.project:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.shot {
  display: block;
  aspect-ratio: 16 / 10;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #ecebe5;
  object-fit: cover;
}

.project h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.project p {
  font-size: 14px;
  margin: 0;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project .link .label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.project .link {
  font-size: 13px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.project .link:hover {
  text-decoration-color: var(--text);
}

.duration {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}

.duration .note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* medium screens: image on the left, the rest stacked beside it */
@media (max-width: 1100px) {
  .project {
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px 32px;
  }

  .shot {
    grid-row: 1 / 4;
  }
}

/* small screens: everything stacked */
@media (max-width: 760px) {
  .project {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .shot {
    grid-row: auto;
  }
}

/* ---------- Contact ---------- */
.contact {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact .label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.contact a {
  font-size: 16px;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.contact a:hover {
  text-decoration-color: var(--text);
}

@media (max-width: 560px) {
  .sidebar {
    left: 8px;
    padding: 7px;
    gap: 8px;
    border-radius: 18px;
  }

  .tile {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .tile svg {
    width: 20px;
    height: 20px;
  }

  .sidebar a::after {
    display: none;
  }

  .page main {
    padding: 12vh 64px 64px;
  }

  .home main {
    padding: 0 60px;
  }
}
