/* Porto v2 — tokens and styles from the porto-v2 frame in portofolio.pen */
:root {
  --ink: #0a0a0a;
  --bg: #ffffff;
  --surface: #f9f8f6;
  --surface-2: #f2f1ef;
  --text-primary: #0a0a0a;
  --text-secondary: #0a0a0a99;
  --text-tertiary: #0a0a0a4d;
  --text-on-ink: #ffffff;
  --border: #0a0a0a14;
  --border-subtle: #0a0a0a0f;
  --success: #28c840;
  --success-soft: #28c84033;
  --terminal-bg: #111110;
  --violet: #bc97ff;
  --figma-selection: #0d99ff;
  --figma-selection-soft: #0d99ff33;
  --figma-component: #9747ff;
  --figma-component-soft: #9747ff08;
  --figma-gap: #e64aa8;
  --figma-redline: #f24822;
  --figma-cursor: #fde047;
  --figma-cursor-soft: #fef9c3;
  --figma-cursor-ink: #854d0e;
  --button-top: #2b2b30;
  --button-bottom: #111114;
  --button-stroke: #000000d9;
  --grid-mark: #00000029;
  --grid-line: #0000000e;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Inter', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-display: 'Instrument Serif', Georgia, serif;
  --content: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--figma-selection); outline-offset: 2px; }

.v2-wrap { width: 100%; max-width: calc(var(--content) + 32px); margin: 0 auto; padding: 0 16px; }
.v2-main { display: flex; flex-direction: column; gap: 80px; padding-top: 18px; padding-bottom: 80px; }
.v2-main.is-spaced { padding-top: 64px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-secondary); }
.section-label { font-family: var(--font-display); letter-spacing: 0.02em; font-size: 28px; line-height: 34px; font-weight: 400; color: var(--text-primary); }
.icon { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Top nav ---------- */
.v2-nav { position: sticky; top: 0; z-index: 20; background: #ffffffcc; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.v2-brand { margin-right: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.v2-nav-inner { max-width: calc(960px + 32px); display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 16px; padding-bottom: 16px; }
.v2-nav-link { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color .15s; }
.v2-nav-link:hover, .v2-nav-link.is-active { color: var(--text-primary); }
.v2-nav-link.home { margin-right: auto; }
.v2-menu { display: contents; }
.v2-burger { display: none; width: 38px; height: 38px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border-radius: 10px; background: none; border: 0; cursor: pointer; }
.v2-burger span { width: 18px; height: 1.5px; background: var(--text-primary); transition: transform .2s; }
.v2-nav.is-open .v2-burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.v2-nav.is-open .v2-burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.v2-contact { position: relative; }
.btn-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; padding: 0 16px 0 18px;
  border-radius: 9999px; border: 1px solid var(--button-stroke);
  background: linear-gradient(180deg, var(--button-top) 0%, var(--button-bottom) 100%);
  box-shadow: 0 1px 2px #00000014, 0 2px 6px #0000000d;
  color: var(--text-on-ink); font-size: 14px; font-weight: 500; list-style: none;
}
.btn-ink::-webkit-details-marker { display: none; }
.v2-contact[open] .btn-ink .icon { transform: rotate(180deg); }
.v2-contact-menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 640px; max-width: calc(100vw - 32px); aspect-ratio: 1.8 / 1; padding: 10px;
  background: var(--bg); border-radius: 14px; outline: 1px solid var(--border); box-shadow: 0 18px 44px #00000024;
  display: grid; grid-template-columns: 195px minmax(0, 1fr); gap: 10px;
}
.v2-contact .channels { display: flex; flex-direction: column; gap: 4px; }
.v2-contact .channel { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 9px; transition: background-color .15s; }
.v2-contact .channel:hover { background: var(--surface-2); }
.v2-contact .channel-icon { color: var(--text-primary); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v2-contact .channel-icon .icon, .v2-contact .channel-icon svg { width: 16px; height: 16px; }
.v2-contact .channel-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.v2-contact .channel-info strong { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }
.v2-contact .channel-info span { font-size: 10px; line-height: 1.35; color: var(--text-secondary); }
.v2-contact .contact-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.v2-contact .preview-head { display: flex; align-items: center; gap: 12px; }
.v2-contact .preview-head img { width: 30px; height: 30px; border-radius: 7px; background: #000; object-fit: contain; }
.v2-contact .preview-head strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; }
.v2-contact .preview-head span { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.v2-contact .preview-chat { display: flex; flex-direction: column; gap: 6px; }
.v2-contact .bubble { font-size: 11px; line-height: 1.45; border-radius: 10px; width: fit-content; }
.v2-contact .bubble.user { align-self: flex-end; max-width: 82%; padding: 6px 10px; background: #e7e7e9; color: #222; }
.v2-contact .bubble.bot { align-self: flex-start; max-width: 88%; padding: 7px 10px; background: var(--bg); border: 1px solid var(--border); color: #4a4a4a; }
@media (max-width: 900px) {
  .v2-contact-menu { position: fixed; top: 68px; left: 16px; right: 16px; width: auto; aspect-ratio: auto; grid-template-columns: 1fr; }
  .v2-contact .contact-preview { display: none; }
}

/* ---------- Figma decorations ---------- */
.fig-select { align-self: flex-start; position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.tools-title { display: flex; align-items: center; gap: 12px; }
.tools-title .comment-pin { position: static; }
.fig-box { position: relative; outline: 1px solid var(--figma-selection); padding: 12px 16px; }
.fig-box.is-component { outline-color: var(--figma-component); width: 100%; padding: 7px 8px 7px 16px; }
.fig-handle { position: absolute; width: 7px; height: 7px; background: var(--bg); outline: 1px solid var(--figma-selection); }
.is-component > .fig-handle { outline-color: var(--figma-component); }
.fig-handle.tl { left: -3px; top: -3px; } .fig-handle.tr { right: -3px; top: -3px; }
.fig-handle.bl { left: -3px; bottom: -3px; } .fig-handle.br { right: -3px; bottom: -3px; }
.fig-badge { display: inline-block; padding: 2px 6px; border-radius: 3px; background: var(--figma-selection); color: #fff; font-size: 10px; font-weight: 500; line-height: 12px; }
.fig-badge.gap { background: var(--figma-gap); padding: 2px 4px; }
.fig-badge.red { background: var(--figma-redline); padding: 2px 5px; }
.fig-tag { font-size: 10px; font-weight: 500; line-height: 12px; color: var(--figma-component); }
.fig-tag.blue { color: var(--figma-selection); }
.fig-redline { position: absolute; display: flex; align-items: center; gap: 6px; height: 80px; }
.fig-redline-line { position: relative; width: 9px; height: 100%; }
.fig-redline-line::before, .fig-redline-line::after { content: ''; position: absolute; left: 0; width: 9px; height: 1px; background: var(--figma-redline); }
.fig-redline-line::before { top: 0; } .fig-redline-line::after { bottom: 0; }
.fig-redline-line span { position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--figma-redline); }

.cursor { position: absolute; pointer-events: none; display: block; width: 64px; height: 36px; }
.cursor svg { position: absolute; left: 0; top: 0; width: 18px; height: 18px; }
.cursor-tag { position: absolute; left: 20px; top: 14px; padding: 4px 8px; border-radius: 4px 10px 10px 10px; font-size: 11px; font-weight: 500; line-height: 11px; white-space: nowrap; }
.cursor.sabil .cursor-tag { background: var(--figma-cursor-soft); border: 1px solid var(--figma-cursor); color: var(--figma-cursor-ink); }
.cursor.you { display: flex; align-items: center; gap: 2px; width: auto; height: auto; }
.cursor.you svg { position: static; }
.cursor.you .cursor-tag { position: static; background: var(--figma-selection); color: #fff; }

.comment-pin { position: absolute; width: 41px; height: 41px; padding: 4px; background: var(--bg); border-radius: 20.5px 20.5px 20.5px 4px; box-shadow: 0 2px 8px #0000001f; }
.comment-pin img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- Intro ---------- */
.intro { position: relative; display: flex; flex-direction: column; gap: 40px; }
.profile { display: flex; align-items: center; gap: 16px; }
.avatar { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; }
.profile-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); letter-spacing: 0.02em; font-size: 28px; font-weight: 400; line-height: 34px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); outline: 3px solid var(--success-soft); }
.profile-role { font-size: 15px; line-height: 20px; color: var(--text-secondary); }
.bio { display: flex; flex-direction: column; gap: 40px; }
.bio p { font-size: 16px; line-height: 26px; color: var(--text-secondary); }
.link-underline { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px; box-shadow: inset 0 -1.5px 0 var(--ink); font-size: 18px; font-weight: 500; line-height: 29px; }
.v2-brand img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.cv-link { box-shadow: none; padding-bottom: 0; font-size: 15px; line-height: 20px; }
.cv-link { position: relative; }
.cv-link .icon { width: 16px; height: 16px; }
/* PDF file that peeks above the CV link on hover, and flies to the download corner on click. */
.cv-file { position: absolute; left: 50%; bottom: calc(100% + 18px); width: 46px; height: 58px; margin-left: -23px; border-radius: 6px 14px 6px 6px; background: var(--bg); outline: 1px solid var(--border); box-shadow: 0 8px 20px #0000001f; pointer-events: none; opacity: 0; transform: translateY(6px) scale(.95); transition: opacity .2s cubic-bezier(0.23, 1, 0.32, 1), transform .2s cubic-bezier(0.23, 1, 0.32, 1); }
.cv-file::before { content: ""; position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-radius: 0 14px 0 5px; background: var(--surface-2); }
.cv-file-tag { position: absolute; left: -6px; bottom: 10px; padding: 2px 6px; border-radius: 4px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 13px; letter-spacing: .02em; }
@media (hover: hover) and (pointer: fine) {
  .cv-link:hover .cv-file, .cv-link:focus-visible .cv-file { opacity: 1; transform: none; }
}
.cv-file-flyer { position: fixed; bottom: auto; margin: 0; z-index: 1000; opacity: 1; transform: none; transition: none; }
.cv-link:hover { color: var(--figma-selection); }
.link-underline .icon { width: 18px; height: 18px; }
.intro .cursor.sabil { left: 203px; bottom: -36px; }

/* ---------- Selected work carousel ---------- */
.work-head { display: flex; justify-content: space-between; align-items: center; }
.work-arrows { display: flex; gap: 20px; }
.work-arrows button { display: inline-flex; }
.work-arrows .icon { width: 20px; height: 20px; }
.work-arrows button:disabled { opacity: .3; cursor: default; }
.carousel-wrap { margin-top: 20px; margin-right: calc((100vw - 100%) / -2); overflow: hidden; }
.carousel { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 1px 48px 1px 1px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex: 0 0 400px; }

.project-card { position: relative; display: flex; flex-direction: column; gap: 18px; }
.cover { position: relative; height: 260px; border-radius: 16px; overflow: hidden; outline: 1px solid var(--border); outline-offset: -1px; background: var(--surface); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.is-contain img { object-fit: contain; padding: 16px; }
.cover-fallback { height: 100%; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.cover-fallback .kicker { font-size: 12px; color: var(--text-secondary); }
.cover-fallback .big { font-size: 48px; line-height: 48px; letter-spacing: -1px; }
.project-card .comment-pin { right: 7px; top: 7px; }
.caption, .caption-text { display: flex; flex-direction: column; gap: 2px; }
.caption-name { font-size: 16px; font-weight: 500; line-height: 20px; }
.caption-cat { font-size: 14px; line-height: 18px; color: var(--text-secondary); }
.detail-link { display: inline-flex; align-items: center; gap: 4px; padding-top: 6px; font-size: 14px; line-height: 18px; font-weight: 500; }
.detail-link .icon { width: 12px; height: 12px; }
.cover-hover { position: absolute; inset: 0; display: grid; place-items: center; background: #0000004d; opacity: 0; transition: opacity .2s; }
.cover-hover .icon { width: 48px; height: 48px; padding: 14px; border-radius: 999px; background: #fff; color: #000; }
.project-card:hover .cover-hover, .project-card:focus-visible .cover-hover { opacity: 1; }

/* ---------- Lists: experience, process, tools ---------- */
.block { position: relative; display: flex; flex-direction: column; gap: 20px; }
.exp-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; }
.exp-logo { width: 36px; height: 36px; border-radius: 10px; outline: 1px solid var(--border); outline-offset: -1px; object-fit: cover; flex-shrink: 0; background: var(--surface); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.exp-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.exp-role { font-size: 16px; font-weight: 500; line-height: 22px; }
.exp-company, .exp-date { font-size: 14px; line-height: 18px; color: var(--text-secondary); }
.exp-date { white-space: nowrap; }
.exp-points { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.exp-points li { display: flex; gap: 8px; font-size: 16px; line-height: 26px; color: var(--text-secondary); }
.exp-points li::before { content: '•'; color: var(--text-tertiary); }

.step-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; }
.step-no { font-family: var(--font-mono); font-size: 14px; color: var(--text-secondary); line-height: 24px; }
.step-name { width: 120px; flex-shrink: 0; font-size: 16px; font-weight: 500; line-height: 24px; }
.step-desc { font-size: 16px; line-height: 24px; color: var(--text-secondary); }
.step-selected { display: flex; flex-direction: column; gap: 4px; }

.tool-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.tool-icon { width: 28px; height: 28px; border-radius: 8px; outline: 1px solid var(--border); outline-offset: -1px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.tool-name { font-size: 16px; line-height: 20px; font-weight: 500; flex: 1; }
.tool-name mark { background: var(--figma-selection-soft); color: inherit; box-shadow: 1.5px 0 0 var(--figma-selection); }
.tool-role { font-size: 14px; line-height: 18px; color: var(--text-secondary); text-align: right; }

/* ---------- Contact CTA ---------- */
.cta { position: relative; padding: 56px 24px 92px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.cta-mark { position: absolute; font-family: var(--font-mono); font-size: 11px; line-height: 11px; color: var(--grid-mark); }
.cta-mark.tl { left: 6px; top: 6px; } .cta-mark.tr { right: 6px; top: 6px; } .cta-mark.bl { left: 6px; bottom: 6px; } .cta-mark.br { right: 6px; bottom: 6px; }
.cta .cursor.you { left: 28px; top: 18px; }
.cta .cursor.sabil { left: 700px; top: 150px; }
.cta-title { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.cta-title > span:first-child { font-family: var(--font-display); letter-spacing: 0.02em; font-size: clamp(40px, 8vw, 72px); font-weight: 400; line-height: 1.1; }
.cta-pill { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 20px; border-radius: 9999px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 500; letter-spacing: -0.17px; line-height: 21px; }
.cta-pill-circle { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }
.cta-doodle { position: absolute; left: 96px; bottom: 10px; width: 229px; height: 62px; transform: rotate(-4deg); pointer-events: none; }
.cta-doodle span { position: absolute; left: 0; top: 40px; font-family: var(--font-hand); font-size: 22px; line-height: 22px; color: var(--text-secondary); white-space: nowrap; }
.cta-doodle svg { position: absolute; left: 159px; top: 0; width: 70px; height: 46px; stroke: var(--text-secondary); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* ---------- Footer ---------- */
.v2-footer { padding-top: 24px; padding-bottom: 40px; }
.v2-footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.v2-footer-links { display: flex; gap: 20px; }
.v2-footer-links a:hover { color: var(--text-primary); }

/* ---------- Page header (projects / detail / design system) ---------- */
.page-head { display: flex; flex-direction: column; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 18px; color: var(--text-secondary); align-self: flex-start; }
.back-link:hover { color: var(--text-primary); }
.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 8px; }
.page-title { font-family: var(--font-display); letter-spacing: 0.02em; font-size: 36px; font-weight: 400; line-height: 42px; }
.page-count { font-family: var(--font-mono); font-size: 14px; color: var(--text-secondary); }
.page-intro { font-size: 16px; line-height: 26px; color: var(--text-secondary); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; line-height: 18px; border-radius: 999px; outline: 1px solid var(--border); outline-offset: -1px; background: var(--bg); font-size: 14px; font-weight: 500; }
.pill small { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.pill.is-active { background: var(--ink); outline-color: var(--ink); color: #fff; }
.pill.is-active small { color: #ffffff99; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
.project-grid .project-card { gap: 14px; }
.project-grid .cover { height: 228px; }
.project-grid .caption { flex-direction: row; gap: 16px; }
.project-grid .caption-text { display: flex; flex-direction: column; gap: 2px; }
.project-grid .caption-name { font-size: 18px; line-height: 23px; }
.project-grid .detail-link { padding-top: 0; }
.project-grid .fig-tag { position: absolute; top: -16px; left: 0; }
.project-grid .is-selected .cover { outline: 2px solid var(--figma-selection); outline-offset: -1px; }
.gap-mark { position: absolute; top: 0; left: calc(100% + 0px); width: 20px; height: 228px; background: #e64aa833; }
.gap-mark .fig-badge { position: absolute; top: 105px; left: 0; }
.project-card[hidden] { display: none; }

/* ---------- Project detail ---------- */
.detail-title { font-family: var(--font-display); letter-spacing: 0.02em; font-size: 40px; font-weight: 400; line-height: 46px; }
.detail-sub { font-size: 16px; line-height: 26px; color: var(--text-secondary); }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 24px; }
.meta > div { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.meta dt { font-size: 13px; line-height: 16px; color: var(--text-secondary); }
.meta dd { font-size: 15px; line-height: 19.5px; font-weight: 500; }
.detail-cover { height: 480px; border-radius: 20px; }
.detail-cover.is-contain img { padding: 24px; }
.split { display: flex; gap: 40px; }
.split-label { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.split-label .mono, .screens-head .mono { font-size: 12px; color: var(--text-secondary); }
.split-label strong, .screens-head strong { font-size: 15px; font-weight: 500; }
.split-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.lead { font-size: 16px; line-height: 26px; color: var(--text-secondary); }
.para { font-size: 18px; line-height: 29px; color: var(--text-secondary); white-space: pre-line; }
.num-list li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); font-size: 16px; line-height: 24px; }
.num-list li:last-child { border-bottom: 1px solid var(--border); }
.num-list .no { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.num-list .t { width: 140px; flex-shrink: 0; font-weight: 500; }
.num-list .d { color: var(--text-secondary); }

.screens { position: relative; display: flex; flex-direction: column; gap: 48px; }
.screens-head { display: flex; flex-direction: column; gap: 4px; }
.screens-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.screen { display: flex; flex-direction: column; gap: 12px; }
.screen-img { position: relative; height: 440px; border-radius: 16px; outline: 1px solid var(--border); outline-offset: -1px; background: var(--surface); }
.screen-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 16px; }
.screen-cap { font-size: 14px; color: var(--text-secondary); }
.flow-start { position: absolute; left: 12px; top: 12px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 8px; border-radius: 4px; background: var(--figma-selection); color: #fff; font-size: 11px; font-weight: 500; line-height: 13px; }
.proto-link { position: absolute; top: 44px; width: calc((100% - 32px) / 3 * 0.62); height: 48px; pointer-events: none; color: var(--figma-selection); }
.proto-link svg { width: 100%; height: 100%; overflow: visible; }
.comment-thread { position: absolute; left: -40px; top: 290px; width: 240px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); outline: 1px solid var(--border); box-shadow: 0 8px 24px #0000001f; }
.comment-thread .head { display: flex; align-items: center; gap: 8px; }
.comment-thread .head img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.comment-thread .head strong { font-size: 12px; font-weight: 600; }
.comment-thread .head span { font-size: 11px; color: var(--text-secondary); }
.comment-thread p { font-size: 13px; line-height: 19px; }
.comment-thread .reply { padding: 6px 10px; border-radius: 8px; outline: 1px solid var(--border); font-size: 12px; color: var(--text-tertiary); }

.next-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.next-row a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.next-row .muted a { color: var(--text-primary); }

/* ---------- Design system page ---------- */
.ds-version { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.ds-section { display: flex; flex-direction: column; gap: 24px; }
.ds-group { display: flex; flex-direction: column; gap: 12px; }
.ds-group-label { font-size: 12px; color: var(--text-secondary); }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.swatch-chip { height: 72px; border-radius: 8px; outline: 1px solid var(--border); outline-offset: -1px; }
.swatch-name { display: flex; justify-content: space-between; padding-top: 8px; font-size: 13px; font-weight: 500; }
.swatch-name small, .count { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--text-tertiary); }
.swatch-hex { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.type-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.type-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 500; }
.type-meta span { font-family: var(--font-mono); font-weight: 400; color: var(--text-secondary); margin-left: 6px; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.ds-spacing { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.space-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; height: 22px; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.space-bar { height: 10px; background: #e64aa833; border-left: 1px solid var(--figma-gap); border-right: 1px solid var(--figma-gap); }
.radii { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 8px; }
.radius-chip { height: 56px; background: var(--surface); outline: 1px solid var(--border-strong, #0a0a0a99); outline-offset: -1px; }
.radius-cap { display: flex; justify-content: space-between; padding: 6px 0 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.comp { display: flex; flex-direction: column; gap: 4px; }
.comp.wide { grid-column: 1 / -1; }
.comp-stage { min-height: 140px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 24px; border-radius: 4px; outline: 1px solid var(--figma-component); outline-offset: -1px; background: var(--figma-component-soft); position: relative; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .fig-redline, .cta .cursor.sabil { display: none; }
}
@media (max-width: 860px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .gap-mark { display: none; }
  .split { flex-direction: column; gap: 16px; }
  .split-label { width: auto; }
  .meta { grid-template-columns: repeat(2, 1fr); }
  .screens-grid { grid-template-columns: 1fr; }
  .proto-link, .comment-thread { display: none; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .type-grid, .ds-spacing, .comp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .screens-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .screens-grid .screen { flex: 0 0 62%; scroll-snap-align: start; }
  .screen-img, .screen-img img { height: auto; }
  .v2-main { gap: 56px; padding-top: 18px; }
  .v2-burger { display: flex; }
  .v2-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 18px 32px #0000000f; }
  .v2-nav.is-open .v2-menu { display: flex; animation: menu-in .25s cubic-bezier(.2, .7, .2, 1); }
  .v2-menu .v2-nav-link.home { margin-right: 0; }
  .v2-menu .v2-nav-link { height: 48px; padding: 0; font-size: 16px; border-bottom: 1px solid var(--border-subtle); }
  .v2-menu .v2-contact summary { display: none; }
  .v2-menu .v2-contact-menu { position: static; padding: 12px 0 0; outline: none; box-shadow: none; border-radius: 0; }
  .v2-menu .v2-contact .channels { flex-direction: row; justify-content: flex-end; gap: 8px; }
  .v2-menu .v2-contact .channel { width: 44px; height: 44px; padding: 0; justify-content: center; align-items: center; border-radius: 12px; }
  .v2-menu .v2-contact .channel-icon .icon, .v2-menu .v2-contact .channel-icon svg { width: 20px; height: 20px; }
  .v2-menu .v2-contact .channel-info { display: none; }
  .carousel > * { flex-basis: 82vw; }
  .cover { height: 220px; }
  .project-grid { grid-template-columns: 1fr; }
  .exp-row { flex-wrap: wrap; }
  .exp-date { order: -1; width: 100%; padding-left: 52px; }
  .step-row { flex-wrap: wrap; gap: 4px 16px; }
  .step-desc { width: 100%; padding-left: 34px; }
  .tool-role { display: none; }



  .detail-cover { height: 260px; }
  .num-list li { flex-wrap: wrap; gap: 4px 16px; }
  .num-list .d { width: 100%; padding-left: 34px; }
  .cta { padding: 64px 16px 84px; }
  .cta-doodle { left: 12px; top: auto; bottom: 8px; transform: rotate(-4deg) scale(.8); transform-origin: left bottom; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Micro interactions ---------- */
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@view-transition { navigation: auto; }
/* Each section fades up from below as it scrolls into view (also on first load and page navigation).
   The root crossfade is off so it doesn't double up. .reveal is only added by JS, so content stays visible without JS. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
.reveal { opacity: 0; transform: translateY(32px); }
/* Transition lives only on .is-in, so hiding components at setup is instant and only the entrance animates. */
.reveal.is-in { opacity: 1; transform: none; transition: opacity 1.2s cubic-bezier(0.33, 1, 0.68, 1), transform 1.2s cubic-bezier(0.33, 1, 0.68, 1); }
.reveal-pending .v2-main { opacity: 0; }
.btn-ink, .pill, .v2-burger, .cv-link { transition: transform .15s, background-color .15s, color .15s; }
.btn-ink:active, .pill:active, .v2-burger:active, .cv-link:active, .project-card:active .cover { transform: scale(.97); }
.project-card .cover { transition: transform .15s; }
.u-line { color: var(--text-primary); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.tool-row { position: relative; }
.tool-preview { position: absolute; right: 0; bottom: calc(100% - 4px); z-index: 5; width: 280px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 12px; outline: 1px solid var(--border); background: var(--surface); box-shadow: 0 18px 44px #00000024; opacity: 0; transform: translateY(6px) scale(.97); transform-origin: bottom right; transition: opacity .2s, transform .2s; pointer-events: none; }
.tool-row:hover .tool-preview { opacity: 1; transform: none; }
.link-preview { position: relative; cursor: default; }
.link-preview img { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; width: 320px; max-width: none; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 14px; border: 4px solid var(--bg); outline: 1px solid var(--border); box-shadow: 0 18px 44px #00000029; opacity: 0; transform: translate(-50%, 8px) scale(.96); transform-origin: bottom center; transition: opacity .2s, transform .2s; pointer-events: none; }
.link-preview:hover img, .link-preview:focus-visible img { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .tool-preview, .link-preview img { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*) { transition: none !important; animation: none !important; }
}

/* ---------- 404 ---------- */
.not-found { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 40px; }
.not-found-frame { margin-top: 24px; padding: 4px 16px; outline: 1.5px solid var(--figma-selection); }
.not-found-frame .fig-tag { position: absolute; left: -1px; top: -24px; }
.not-found-frame .fig-badge { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); }
.not-found-frame .cursor.sabil { position: absolute; left: calc(100% + 16px); top: 70%; }
.not-found-title { font-family: var(--font-display); letter-spacing: 0.02em; font-size: clamp(48px, 9vw, 88px); font-weight: 400; line-height: 1.05; }
@media (max-width: 600px) { .not-found-frame .cursor.sabil { display: none; } }
