:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --line-strong: #0a0a0a;
  --soft: #f4f4f2;
  --max: 1440px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

em { font-style: italic; font-weight: 300; }

/* ─── GRAIN OVERLAY ──────────────────────────────────────── */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.mark .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
}

.mark .tld { color: var(--muted); font-weight: 400; }

.status {
  display: flex;
  gap: 22px;
  color: var(--muted);
}

.available { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0.35); }
  70%  { box-shadow: 0 0 0 9px rgba(10, 10, 10, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 10, 10, 0); }
}

.nav nav { display: flex; gap: 26px; font-size: 13px; color: var(--muted); }
.nav nav a:hover { color: var(--fg); }

/* ─── MAIN ───────────────────────────────────────────────── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO (framed) ──────────────────────────────────────── */
.hero {
  margin-top: 96px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  background: var(--soft);
  padding: 72px 0 0;
}

.hero-text {
  text-align: center;
  padding: 0 24px 64px;
}

.hero h1 {
  font-weight: 600;
  font-size: clamp(64px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.hero h1 .big {
  display: inline-block;
  font-weight: 700;
  font-style: italic;
}

.hero h1 .rotate {
  display: inline-grid;
  vertical-align: top;
}

.hero h1 .rotate > .ghost {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

.hero h1 .rotate > .ghost.active {
  opacity: 1;
}

.hero .sub {
  margin: 24px auto 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.hero .sub .tld { color: var(--muted); font-weight: 400; }

/* ─── BROWSER WINDOW ─────────────────────────────────────── */
.window {
  width: 100%;
  border-top: 1px solid var(--line-strong);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, 0.18);
}

.window-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.window-bar .dots {
  display: inline-flex;
  gap: 6px;
}

.window-bar .dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
}

.window-bar .dots span:nth-child(1) { background: #ff5f57; }
.window-bar .dots span:nth-child(2) { background: #febc2e; }
.window-bar .dots span:nth-child(3) { background: #28c840; }

.window-bar .addr {
  justify-self: center;
  color: var(--muted);
  padding: 4px 12px;
  background: var(--soft);
  border-radius: 4px;
}

.window-bar .addr-spacer { width: 42px; }

.window-frame {
  position: relative;
  width: 100%;
  height: clamp(420px, 62vh, 720px);
  background: #fff;
}

.window-frame iframe,
.window-frame img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.window-cover {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
}

.window-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}

/* ─── MARQUEE ────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 0 -24px;
  white-space: nowrap;
  background: var(--bg);
}

.marquee .track {
  display: inline-block;
  animation: scroll 50s linear infinite;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.marquee .track span { display: inline-block; padding: 0 22px; }
.marquee .track span:nth-child(even) { color: var(--muted); }

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── BLOCKS ─────────────────────────────────────────────── */
.block { padding: 120px 0; border-bottom: 1px solid var(--line); }

#work {
  padding: 0;
  background: var(--soft);
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

#work .window {
  border: none;
  border-top: 1px solid var(--line-strong);
  box-shadow: none;
}

.block-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 56px;
  color: var(--muted);
}

.label { display: block; color: var(--muted); }

/* ─── PROJECTS ───────────────────────────────────────────── */
.projects { list-style: none; }

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

.project a {
  display: grid;
  grid-template-columns: 72px 1fr auto 40px;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  transition: padding 320ms cubic-bezier(.2,.7,.2,1);
}

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

.project .name {
  font-weight: 500;
  font-size: clamp(26px, 4.2vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}

.project .kind { color: var(--muted); justify-self: end; }

.project .arrow {
  font-size: 22px;
  color: var(--muted);
  justify-self: end;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}

.project a:hover { padding-left: 20px; padding-right: 20px; }
.project a:hover .name { transform: translateX(6px); }
.project a:hover .arrow { transform: translate(6px, -6px); color: var(--fg); }

/* ─── ABOUT ──────────────────────────────────────────────── */
.about .manifesto {
  margin-top: 32px;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 1000px;
}

/* ─── CONTACT ────────────────────────────────────────────── */
.contact .email {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(36px, 6.5vw, 96px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 24px 0 32px;
}

.contact .email .arrow-lg {
  font-size: 0.45em;
  color: var(--muted);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}

.contact .email:hover .arrow-lg { transform: translate(8px, -8px); color: var(--fg); }

.contact .meta {
  display: flex;
  gap: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .status { display: none; }
  main { padding: 0 16px; }

  .hero { margin-top: 76px; padding: 48px 0 0; }
  .hero-text { padding: 0 16px 40px; }
  .window-frame { height: 380px; }

  .marquee { margin: 0 -16px; padding: 14px 0; }
  .marquee .track { font-size: 18px; }

  .block { padding: 80px 0; }
  .block-head { margin-bottom: 36px; }

  .project a {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 20px 0;
  }
  .project .num { display: none; }
  .project .kind { grid-column: 1 / -1; justify-self: start; }
  .project a:hover { padding-left: 0; padding-right: 0; }

  footer { padding: 18px 16px; flex-direction: column; gap: 6px; }
}
