:root {
  --bg: #0e0f12;
  --bg-raised: #14161a;
  --text: #e8e6e1;
  --text-dim: #9a978f;
  --text-faint: #605e58;
  --accent: #ff6b35;
  --line: #24262b;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--text); }

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.7rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.2rem;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s;
}

h2.reveal::after { transform: scaleX(0); }
h2.reveal-in::after { transform: scaleX(1); }

section { padding: 5rem 0; border-top: 1px solid var(--line); }

/* ---- nav ---- */

.nav {
  max-width: 1020px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.85rem;
  animation: fade-down 0.5s ease both;
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-name { text-decoration: none; color: var(--text); font-weight: 600; }

.nav nav a {
  margin-left: 1.5rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav nav a:hover { color: var(--accent); }

/* ---- hero ---- */

.hero { border-top: none; padding: 6rem 0 7rem; }

.hero > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero .kicker { animation-delay: 0.05s; }
.hero h1     { animation-delay: 0.12s; }
.hero .lede  { animation-delay: 0.22s; }
.hero .status { animation-delay: 0.34s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 34em;
}

.lede strong { color: var(--text); font-weight: 600; }

.status {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #56c271;
  margin-right: 0.6em;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---- work ---- */

.project {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0;
}

.project + .project { border-top: 1px solid var(--line); }

.num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.project h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0.35rem 0 0.6rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.1em 0.5em;
  vertical-align: 0.25em;
  margin-left: 0.5em;
}

.project p { color: var(--text-dim); max-width: 32em; }

.tags {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 0.8rem;
}

.links { margin-top: 0.8rem; }

.links a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text-faint);
  margin-right: 1.4rem;
  padding-bottom: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.links a:hover { color: var(--accent); border-color: var(--accent); }

.project-shot {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-raised);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-shot:hover {
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.project-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.45s ease;
}

.project-shot:hover img {
  transform: scale(1.03);
  filter: saturate(1);
}

/* ---- about ---- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
}

.about-prose p { color: var(--text-dim); margin-bottom: 1.2rem; max-width: 32em; }

.about-prose .tags { margin-top: 1.6rem; line-height: 2; }

.tools div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}

.tools div:hover { border-color: var(--text-faint); }

.tools dt { font-family: var(--mono); font-size: 0.85rem; }

.tools dd { font-size: 0.82rem; color: var(--text-faint); text-align: right; }

.timeline { list-style: none; margin-top: 2.2rem; }

.timeline li {
  display: flex;
  gap: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 0.3rem 0;
}

.timeline span {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  min-width: 3em;
}

.timeline .now { color: var(--text); }
.timeline .now span { color: var(--accent); }

/* ---- contact ---- */

.contact-lede { color: var(--text-dim); max-width: 34em; margin-bottom: 2.5rem; }

.channels { list-style: none; max-width: 560px; }

.channels li {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.channel-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  min-width: 4.5em;
}

.channels a {
  font-family: var(--mono);
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px solid var(--text-faint);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.channels a:hover { color: var(--accent); border-color: var(--accent); }

.note {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.copy {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 1px dashed var(--text-faint);
  cursor: pointer;
  padding: 0 0 1px;
  position: relative;
}

.copy { transition: color 0.18s ease, border-color 0.18s ease; }

.copy:hover { color: var(--accent); border-color: var(--accent); }

.copy:active { transform: translateY(1px); }

.copied {
  position: absolute;
  left: calc(100% + 0.8em);
  top: 0;
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.copy.did-copy .copied { opacity: 1; }

/* ---- footer ---- */

.footer {
  max-width: 1020px;
  margin: 0 auto;
  padding: 2rem 24px 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer span:last-child { margin-left: auto; }

/* ---- scroll reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-shot.reveal { transform: translateY(14px) scale(0.975); }

.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

.project-shot.reveal-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav, .hero > * { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  h2::after { transform: scaleX(1); transition: none; }
  .dot { animation: none; }
}

/* ---- responsive ---- */

@media (max-width: 800px) {
  .project { grid-template-columns: 1fr; gap: 1.4rem; }
  .project-shot { order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 3.5rem 0 5rem; }
  section { padding: 3.5rem 0; }
  .note { display: none; }
}
