@font-face { font-family: "Lora"; src: url(fonts/lora.woff) format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-400.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-500.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-700.woff) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --paper: #eceff5;
  --ink: #0d1730;
  --cobalt: #2646ff;
  --cobalt-dark: #1b35d4;
  --sun: #ffb23e;
  --chalk: #ffffff;
  --muted: #4b5876;
  --line: #d3d9e6;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- masthead ---------- */
.masthead { background: var(--ink); color: #fff; }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem 1.5rem; padding: 1.6rem 0; }
.me { width: 5.5rem; height: 5.5rem; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18), 0 0 0 7px rgba(255, 178, 62, 0.9); margin: 0.4rem; }
.who { flex: 1 1 14rem; min-width: 0; }
.who h1 { margin: 0; font: 600 clamp(1.9rem, 4.6vw, 3.1rem)/1.05 var(--serif); letter-spacing: -0.015em; }
.who p { margin: 0.35rem 0 0; color: #c9d3ec; font-size: 1.05rem; }
.links { display: flex; gap: 0.6rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: 0 1.4rem; border-radius: 10px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 500 0.98rem/1 var(--sans); text-decoration: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn.primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
.btn.ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn[hidden] { display: none; }

/* ---------- project list ---------- */
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.project + .project { border-top: 1px solid var(--line); }
.copy h2 { margin: 0; font: 600 clamp(2rem, 3.4vw, 2.9rem)/1.05 var(--serif); letter-spacing: -0.015em; }
.kind { margin: 0.5rem 0 0; font-weight: 500; font-size: 0.95rem; color: var(--cobalt); }
.text { margin: 1rem 0 0; color: var(--muted); max-width: 46ch; }
.tech { margin: 0.8rem 0 0; font-size: 0.86rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 0; }

.visual { min-width: 0; }
.frame { margin: 0; background: var(--chalk); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 60px -42px rgba(13, 23, 48, 0.5); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project:hover .frame { transform: translateY(-4px); box-shadow: 0 50px 70px -42px rgba(13, 23, 48, 0.55); }
.chrome { display: flex; align-items: center; gap: 0.9rem; padding: 0.65rem 0.9rem; background: #f6f8fc; border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 0.35rem; flex: none; }
.lights i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: #cdd5e6; }
.addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.9rem; background: var(--chalk); border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; color: var(--muted); }
.addr [data-addr] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.3em; }
.live { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgba(255, 178, 62, 0.28); }

.shot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #e3e8f2; cursor: pointer; aspect-ratio: var(--ratio, 1.6); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: opacity 0.2s ease, transform 0.2s ease; }
.shot img.out { opacity: 0; transform: translateY(-6px); }

.pager { display: flex; gap: 0.5rem; margin-top: 1rem; }
.dot { position: relative; width: 2.2rem; height: 0.5rem; padding: 0; border: 0; border-radius: 999px; background: #c5cde0; cursor: pointer; transition: background-color 0.2s, width 0.2s; }
.dot::before { content: ""; position: absolute; inset: -0.7rem -0.2rem; }
.dot[aria-current="true"] { background: var(--ink); width: 3.2rem; }

.foot { padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.foot p { margin: 0; }

/* ---------- load + scroll moments ---------- */
@media (prefers-reduced-motion: no-preference) {
  .me { animation: pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .who { animation: rise 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .links { animation: rise 0.7s 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .project .copy, .js .project .visual { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .project .visual { transition-delay: 0.1s; }
  .js .project.seen .copy, .js .project.seen .visual { opacity: 1; transform: none; }
}
@keyframes pop { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }

/* ---------- tablet / mobile ---------- */
@media (max-width: 880px) {
  .project { grid-template-columns: 1fr; gap: 1.5rem; }
  .visual { order: -1; }
  .links { width: 100%; }
  .links .btn { flex: 1; }
  .actions .btn { flex: 1 1 9rem; }
  .text { max-width: none; }
}
