:root {
  --bg: #fbfbfa;
  --text: #1b1b1a;
  --muted: #8a8a86;
  --line: #ebebe8;
  --card: #f0efec;
  --btn-bg: #1b1b1a;
  --btn-text: #fbfbfa;
  --focus: #3b82f6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --text: #ededea;
    --muted: #8a8a86;
    --line: #242422;
    --card: #1c1c1a;
    --btn-bg: #ededea;
    --btn-text: #111110;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.muted { color: var(--muted); }

/* ---------- Home ---------- */
.home main p a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.home main p a:hover { text-decoration-color: currentColor; }
.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  padding: 14vh 20px 32px;
}
.home main { flex: 1; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--card);
  margin-bottom: 20px;
}
.avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 500;
}
.name { font-weight: 500; margin: 0; }
.role { color: var(--muted); margin: 0 0 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn svg { width: 14px; height: 14px; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 48px;
  font-size: 13px;
  color: var(--muted);
}
.icons { display: flex; gap: 6px; }
.icons a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
.icons a:hover { color: var(--text); background: var(--card); }
.icons svg { width: 18px; height: 18px; }

/* Subtle shimmering CTA */
.cta {
  --shine: rgba(0, 0, 0, 0.82);
  display: inline-block;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s ease, transform .15s ease;
}
.cta:hover { background: var(--line); }
.cta:active { transform: scale(.97); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .cta {
    background-image:
      linear-gradient(100deg, var(--muted) 42%, var(--shine) 50%, var(--muted) 58%),
      linear-gradient(var(--card), var(--card));
    background-size: 250% 100%, 100% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text, padding-box;
    background-clip: text, padding-box;
    color: transparent;
    animation: shimmer 2.8s ease-in-out infinite;
  }
  .cta:hover {
    background-image:
      linear-gradient(100deg, var(--muted) 42%, var(--shine) 50%, var(--muted) 58%),
      linear-gradient(var(--line), var(--line));
  }
}
@keyframes shimmer {
  0% { background-position: 100% 0, 0 0; }
  55%, 100% { background-position: 0% 0, 0 0; }
}
@media (prefers-color-scheme: dark) {
  .cta { --shine: rgba(255, 255, 255, 0.92); }
}
@media (prefers-reduced-motion: reduce) {
  .cta { animation: none; }
}

/* ---------- Work grid ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 20px 64px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 72px;
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 500;
}
.me img, .me .avatar { width: 28px; height: 28px; margin: 0; font-size: 12px; }
.topbar .back { color: var(--muted); text-decoration: none; font-size: 14px; }
.topbar .back:hover { color: var(--text); }

.page-title { font-size: 15px; font-weight: 500; margin: 0 0 24px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 24px;
}
.card { text-decoration: none; display: block; }
.card .cover {
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  transition: transform .3s ease;
}
.card:hover .cover { transform: scale(.985); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h2 { font-size: 15px; font-weight: 500; margin: 14px 4px 0; }
.card p { color: var(--muted); margin: 0 4px; font-size: 14px; }

.earlier {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Project page ---------- */
.project-text { max-width: 560px; margin: 0 auto 56px; }
.project-text h1 { font-size: 22px; font-weight: 500; line-height: 1.3; margin: 0 0 4px; letter-spacing: -0.01em; }
.project-text .meta { color: var(--muted); margin: 0 0 28px; }
.ext { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.ext:hover { color: var(--text); border-color: var(--text); }

.visuals { display: grid; gap: 20px; max-width: 960px; margin: 0 auto; }
.visuals img { width: 100%; display: block; border-radius: 20px; background: var(--card); }
.visuals .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.ph {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
}
.cover .ph { aspect-ratio: 1 / 1; border-radius: 0; border: 0; height: 100%; }

.next {
  max-width: 960px;
  margin: 72px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.next a { text-decoration: none; color: var(--muted); }
.next a:hover { color: var(--text); }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .card .cover { border-radius: 22px; }
  .topbar { margin-bottom: 48px; }
  .visuals .row { grid-template-columns: 1fr; }
  .visuals img, .ph { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
