/* ============================================================
   CUBEWEB — Portfolio redesign
   Dark, cinematic, monochrome. Linear/Vercel-adjacent.
   ============================================================ */

:root {
  --bg: #050505;
  --bg-2: #0b0b0b;
  --fg: #f5f5f5;
  --fg-dim: #9a9a9a;
  --fg-muted: #555555;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body { cursor: none; }
@media (hover: none) { body { cursor: auto; } }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: none; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
img { display: block; max-width: 100%; }

::selection { background: #fff; color: #000; }

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyMDAnIGhlaWdodD0nMjAwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC45JyBudW1PY3RhdmVzPScyJyBzdGl0Y2hUaWxlcz0nc3RpdGNoJy8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9JzEwMCUnIGhlaWdodD0nMTAwJScgZmlsdGVyPSd1cmwoI24pJyBvcGFjaXR5PScxJy8+PC9zdmc+");
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
}
.cursor-ring {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #fff;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s var(--ease);
}
.cursor-ring[data-state="hover"] { width: 70px; height: 70px; }
.cursor-ring[data-state="text"] { width: 4px; height: 28px; border-radius: 2px; background: #fff; }
.cursor-label {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998;
  transform: translate(20px, 20px);
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); opacity: 0; transition: opacity 0.2s;
  background: rgba(0,0,0,0.6); padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 999px; backdrop-filter: blur(8px);
}
.cursor-label[data-show="true"] { opacity: 1; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  mix-blend-mode: difference;
  color: #fff;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.nav-logo .dot { width: 8px; height: 8px; background: #fff; border-radius: 1px; transform: rotate(45deg); animation: spin 8s linear infinite; }
@keyframes spin { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }
.nav-links { display: flex; gap: 28px; }
.nav-links a { position: relative; opacity: 0.7; transition: opacity 0.2s; }
.nav-links a::before { content: counter(navi, decimal-leading-zero) " / "; counter-increment: navi; opacity: 0.4; }
.nav-links { counter-reset: navi; }
.nav-links a:hover { opacity: 1; }
.nav-cta {
  padding: 8px 18px; border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.nav-cta:hover { background: #fff; color: #000; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 36px 80px;
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1400px; margin: 0 auto; width: 100%;
}
.hero-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  margin-bottom: 80px;
}
.hero-meta .col { display: flex; flex-direction: column; gap: 4px; }
.hero-meta .col span:first-child { color: var(--fg-muted); }
.hero-meta-center { text-align: center; }
.hero-meta-end { text-align: right; }
.availability { color: #fff; }

.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(64px, 13vw, 220px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line-inner {
  display: block;
  will-change: transform, opacity;
  animation: hero-rise 1.1s var(--ease) forwards;
}
.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.15s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 0.3s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-title em {
  font-style: normal;
  font-family: var(--display);
  font-weight: 200;
  -webkit-text-stroke: 1px #fff;
  color: transparent;
  font-style: italic;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hero-bottom {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px;
  align-items: end;
  margin-top: 60px;
}
.hero-bottom .bio {
  max-width: 380px;
  font-size: 15px; line-height: 1.55;
  color: var(--fg-dim);
}
.hero-bottom .bio strong { color: var(--fg); font-weight: 500; }
.hero-bottom .me {
  display: flex; align-items: center; gap: 16px;
}
.hero-bottom .me .avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border: 1px solid var(--line-strong);
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.hero-bottom .me .avatar::after {
  content: "NR"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em;
  color: var(--fg);
}
.hero-bottom .me .who { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-bottom .me .who .name { color: var(--fg); display: block; }
.hero-bottom .me .who .role { color: var(--fg-muted); display: block; margin-top: 4px; }
.hero-bottom .scroll-hint {
  justify-self: end;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  display: flex; align-items: center; gap: 12px;
  transition: color 0.2s;
}
.hero-bottom .scroll-hint:hover,
.hero-bottom .scroll-hint:focus-visible { color: var(--fg); }
.hero-bottom .scroll-hint .arrow {
  width: 32px; height: 1px; background: var(--fg-dim); position: relative; overflow: hidden;
}
.hero-bottom .scroll-hint .arrow::before {
  content: ""; position: absolute; inset: 0; background: #fff;
  animation: slide 2s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%);} 50% { transform: translateX(0);} 100% { transform: translateX(100%);} }

/* ============================================================
   SECTION SHARED
   ============================================================ */
section { position: relative; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 36px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-bottom: 80px;
}
.section-head .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
}
.section-head .label .num { color: var(--fg-muted); margin-right: 12px; }
.section-head .heading {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

/* ============================================================
   WORK / PROJECTS — horizontal scroll
   ============================================================ */
.work {
  padding: 140px 0 160px;
}
.work-track-wrap {
  overflow: hidden;
  position: relative;
}
.work-track {
  display: flex; gap: 32px;
  padding: 0 36px 40px;
  will-change: transform;
}
.project-card {
  flex-shrink: 0;
  width: 560px;
  position: relative;
  cursor: none;
}
.project-frame {
  width: 100%; aspect-ratio: 16 / 11;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform 0.6s var(--ease), border-color 0.4s;
}
.project-card:hover .project-frame {
  border-color: var(--line-strong);
}
.project-topbar {
  height: 28px;
  background: linear-gradient(to bottom, #161616, #0e0e0e);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 12px; gap: 6px;
}
.project-topbar .dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a2a; border: 1px solid #1a1a1a; }
.project-topbar .url {
  margin-left: auto; margin-right: auto;
  font-family: var(--mono); font-size: 10px; color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.project-thumb {
  position: absolute; inset: 28px 0 0 0;
  background: linear-gradient(135deg, #111, #060606);
  overflow: hidden;
}
.project-thumb svg,
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb img {
  filter: grayscale(1) contrast(1.04) brightness(0.94);
  transition: filter 0.5s var(--ease);
}

.project-card:hover .project-thumb img {
  filter: grayscale(0) contrast(1) brightness(1);
}
.project-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
}
.project-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-top: 20px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-meta .title {
  font-family: var(--display); font-size: 22px; letter-spacing: -0.02em;
  text-transform: none; color: var(--fg); font-weight: 500;
  margin: 0 0 6px;
}
.project-meta .outcome {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-dim);
  margin: 0 0 8px;
  max-width: 36ch;
}
.project-meta .tags { color: var(--fg-muted); margin: 0; }
.project-meta .year { color: var(--fg-muted); }

.work-progress {
  margin: 0 36px;
  height: 1px; background: var(--line); position: relative;
}
.work-progress .bar {
  position: absolute; top: 0; left: 0; height: 100%; background: #fff;
  width: 0%; transition: width 0.1s linear;
}
.work-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 18px 36px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
}
.work-track-wrap:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.work-nav {
  display: inline-flex;
  gap: 8px;
}
.work-nav-btn {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.work-nav-btn:hover:not(:disabled),
.work-nav-btn:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
}
.work-nav-btn:focus-visible { outline-offset: 2px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 140px 36px 140px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-portrait {
  position: sticky; top: 100px;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-top: -32px;
  align-self: start;
}

.about-portrait .about-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  filter: grayscale(0.9) contrast(1.05);
}

.about-portrait .portrait-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      var(--bg) 0%,
      rgba(5, 5, 5, 0.92) 10%,
      rgba(5, 5, 5, 0.45) 22%,
      transparent 38%
    ),
    linear-gradient(
      to bottom,
      transparent 28%,
      rgba(5, 5, 5, 0.22) 52%,
      rgba(5, 5, 5, 0.58) 74%,
      rgba(5, 5, 5, 0.82) 90%
    );
  pointer-events: none;
}

.about-content .about-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  margin-bottom: 20px;
}
.about-content .about-eyebrow .num { color: var(--fg-muted); margin-right: 12px; }
.about-content h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(36px, 4vw, 64px);
  line-height: 1.05; letter-spacing: -0.03em;
  margin: 0 0 32px;
}
.about-content h2 em {
  font-style: italic; font-weight: 200;
  -webkit-text-stroke: 1px rgba(255,255,255,0.6);
  color: transparent;
}
.about-content p {
  color: var(--fg-dim); font-size: 16px; line-height: 1.65;
  margin-bottom: 20px;
  max-width: 520px;
}
.about-content p strong { color: var(--fg); font-weight: 500; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line);
  margin-top: 50px;
  border: 1px solid var(--line);
}
.about-stats .stat {
  background: var(--bg);
  padding: 28px 24px;
}
.about-stats .stat .num {
  font-family: var(--display); font-weight: 300;
  font-size: 56px; letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}
.about-stats .stat .label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  margin: 0 0 12px;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 140px 0 140px;
  border-top: 1px solid var(--line);
}
.services-intro {
  padding: 0 36px;
  margin: -48px 0 64px;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-dim);
}
.services-list { padding: 0 36px; }
.service {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 100px;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding 0.5s var(--ease);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.service .name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: transform 0.5s var(--ease);
}
.service .desc {
  font-size: 14px; line-height: 1.55; color: var(--fg-dim);
  max-width: 460px;
}
.service .stack {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-muted);
  text-align: right;
}
.service h3.name,
.service p.desc,
.service p.stack { margin: 0; }

.seo-list {
  padding: 0 36px 40px;
  list-style: none;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.8;
}
.seo-list li + li { margin-top: 8px; }
.service:hover { padding-left: 24px; }
.service:hover .name { transform: translateX(8px); }
.service::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.service:hover::before { opacity: 1; }

/* ============================================================
   CTA / Contact
   ============================================================ */
.cta {
  padding: 200px 36px 100px;
  border-top: 1px solid var(--line);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-dim);
  margin-bottom: 32px;
}
.cta-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(56px, 11vw, 180px);
  letter-spacing: -0.045em; line-height: 0.9;
  margin-bottom: 24px;
}
.cta-note {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 42ch;
  margin: 0 auto 40px;
}
.cta-title em {
  font-style: italic; font-weight: 200;
  -webkit-text-stroke: 1px rgba(255,255,255,0.8);
  color: transparent;
}
.cta-button {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 22px 32px 22px 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color 0.4s var(--ease);
  z-index: 1;
}
.cta-button::before {
  content: ""; position: absolute; inset: 0;
  background: #fff; transform: translateY(101%);
  transition: transform 0.6s var(--ease);
  z-index: -1;
}
.cta-button:hover { color: #000; }
.cta-button:hover::before { transform: translateY(0); }
.cta-button .icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: #000;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background 0.4s, color 0.4s;
}
.cta-button:hover .icon { background: #000; color: #fff; }

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 36px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-dim);
}
.footer p { margin: 0; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 28px 0;
  display: flex;
  white-space: nowrap;
}
.marquee-inner {
  display: flex; gap: 60px;
  animation: marquee 40s linear infinite;
  padding-left: 60px;
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 60px;
  font-family: var(--display); font-weight: 200;
  font-size: 56px; letter-spacing: -0.03em;
  color: var(--fg);
}
.marquee-item em {
  font-style: italic; font-weight: 200;
  -webkit-text-stroke: 1px var(--fg);
  color: transparent;
}
.marquee-item .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fg); flex-shrink: 0;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */
.page-transition {
  position: fixed; inset: 0; z-index: 9000;
  background: #fff;
  transform: translateY(100%);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.page-transition[data-active="entering"] {
  animation: pt-enter 1.3s var(--ease-in-out) forwards;
}
.page-transition[data-active="leaving"] {
  animation: pt-leave 1.0s var(--ease-in-out) forwards;
}
@keyframes pt-enter {
  0% { transform: translateY(100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
@keyframes pt-leave {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
.page-transition .pt-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #000;
}

/* ============================================================
   ITALIC EM TREATMENT (was inline before)
   ============================================================ */
.section-head .heading em,
.about-content h2 em,
.cta-title em {
  font-style: italic;
  font-weight: 200;
  -webkit-text-stroke: 1px rgba(255,255,255,0.7);
  color: transparent;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 9000;
  width: 280px;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  font-family: var(--body);
  color: var(--fg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: tweaks-in 0.4s var(--ease);
}
@keyframes tweaks-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tweaks[hidden] { display: none; }
.tweaks-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-dim);
}
.tweaks-close {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.tweaks-close:hover { background: #fff; color: #000; }
.tweaks-body { padding: 8px 0; }
.tweaks-section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tweaks-section:last-child { border-bottom: 0; }
.tweaks-section-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.tweaks-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.tweaks-row-label { color: var(--fg); }
.tweaks-toggle {
  position: relative;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-strong);
  transition: background 0.2s;
}
.tweaks-toggle::after {
  content: "";
  position: absolute; top: 1px; left: 1px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--fg-dim);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.tweaks-toggle[data-on="true"] {
  background: #fff;
}
.tweaks-toggle[data-on="true"]::after {
  transform: translateX(16px);
  background: #000;
}
.tweaks-segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.tweaks-segmented button {
  padding: 5px 11px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-dim);
  transition: background 0.2s, color 0.2s;
}
.tweaks-segmented button[data-on="true"] {
  background: #fff;
  color: #000;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-inner { animation: none; transform: none; }
  .hero-title .line-inner { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .nav-logo .dot { animation: none; }
  .hero-bottom .scroll-hint .arrow::before { animation: none; transform: none; }

  .cursor-dot,
  .cursor-ring,
  .cursor-label,
  .grain { display: none !important; }

  body,
  button { cursor: auto; }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.22);
    --line-strong: rgba(255, 255, 255, 0.42);
    --fg-dim: #c8c8c8;
    --fg-muted: #9a9a9a;
  }
}

@media (max-width: 900px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; }
  .hero-bottom .scroll-hint { justify-self: start; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait { position: relative; top: 0; aspect-ratio: 16/10; margin-top: 0; }
  .service { grid-template-columns: 40px 1fr; gap: 16px; }
  .service .desc, .service .stack { display: none; }
  .nav-links { display: none; }
  .project-card { width: 320px; }
  .work-progress-meta { flex-wrap: wrap; }
}
