/* Portfolio site styles — implemented from Portfolio.dc.html (claude.ai/design) */
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: #F7F8F3; font-family: "Geist", -apple-system, system-ui, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased }
a { color: #3F6B22; text-decoration: none }
::selection { background: #C7F04A; color: #101410 }

.brandpill { position: relative; transition: transform .3s cubic-bezier(.22,.8,.28,1) }
.brandpill:hover { transform: translateY(-1px) }
.brandpill .mark { transition: width .32s cubic-bezier(.22,.8,.28,1), background .3s ease }
.brandpill:hover .mark { width: 26px; background: #24361A }

@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .35; transform: scale(.7) } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
@keyframes glowDrift { 0% { transform: translate(-5%,-3%) scale(1) } 50% { transform: translate(5%,3%) scale(1.12) } 100% { transform: translate(-5%,-3%) scale(1) } }
.rise { animation: riseIn .9s cubic-bezier(.22,.8,.28,1) both }

.arw { display: inline-block; transition: transform .35s cubic-bezier(.22,.8,.28,1) }
.lnk:hover .arw { transform: translate(4px,-4px) }
.dnk:hover .arw { transform: translate(3px,3px) }
.rgt:hover .arw { transform: translateX(5px) }
.imgz { transition: transform .8s cubic-bezier(.22,.8,.28,1) }
.imgw:hover .imgz { transform: scale(1.04) }

/* hover variants (design's style-hover attributes) */
.hov-dark:hover { background: #24361A !important }
.hov-soft:hover { background: rgba(16,20,16,.08) !important }
.hov-ghostlight:hover { background: rgba(247,248,243,.07) !important }
.hov-paper:hover { background: #ECEFE1 !important }
.field:focus { border-color: #3F6B22 !important }

/* image slots */
.slot-img { width: 100%; height: 100%; object-fit: cover; display: block }

/* About page portrait: stretch to match the text column's height so the
   two read as one block; fixed ratio only when stacked on small screens. */
.about-portrait-frame { width: 100%; max-width: 440px; overflow: hidden; border-radius: 16px; background: #ECEFE1; align-self: stretch }
.about-portrait-frame .slot-img { object-position: 50% 25% }
@media (max-width: 900px) {
  .about-portrait-frame { aspect-ratio: 4/5; align-self: auto }
}

/* ---------- nav ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: center; padding: 20px clamp(14px,4vw,32px); pointer-events: none; transition: padding .35s cubic-bezier(.22,.8,.28,1) }
.site-nav.scrolled { padding: 12px clamp(14px,4vw,32px) }
.nav-shell { position: relative; pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 1100px; padding: 7px 7px 7px 9px; border-radius: 999px; background: rgba(247,248,243,.72); backdrop-filter: blur(22px) saturate(1.6); border: 1px solid rgba(16,20,16,.08); box-shadow: 0 4px 18px -10px rgba(16,20,16,.14); transition: box-shadow .35s ease, background .35s ease }
.site-nav.scrolled .nav-shell { box-shadow: 0 10px 30px -12px rgba(16,20,16,.22), 0 2px 6px rgba(16,20,16,.06) }
.nav-links { display: flex }
.nav-chip { display: inline-flex }
.nav-name-full { display: inline }
.nav-name-short { display: none }
.nav-link { padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; background: transparent; color: #5F6B5A; transition: background .25s ease, color .25s ease }
.nav-link.active { background: #3A6420; color: #F7F8F3 }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; padding: 0 11px; border: none; border-radius: 999px; background: rgba(16,20,16,.06); cursor: pointer }
.nav-toggle .bar { width: 100% }
.nav-toggle .bar2 { transition: width .3s cubic-bezier(.22,.8,.28,1) }
.nav-shell.menu-open .nav-toggle .bar2 { width: 60% }
.nav-menu { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px; border-radius: 22px; background: rgba(247,248,243,.97); backdrop-filter: blur(22px); border: 1px solid rgba(16,20,16,.08); box-shadow: 0 16px 40px -16px rgba(16,20,16,.3) }
.nav-menu .menu-item { padding: 13px 16px; border-radius: 14px; font-size: 15px }

/* ---------- responsive grids (design's narrow <= 900px state) ---------- */
.hero-grid { grid-template-columns: minmax(0,1.02fr) minmax(320px,.78fr) }
.cta-grid { grid-template-columns: minmax(0,1.15fr) minmax(280px,.6fr) }
.exp-row { grid-template-columns: 168px minmax(0,1fr) }

/* ---------- work page banner ---------- */
.work-band { position: relative; overflow: hidden; background: #ECEFE1; padding: 0 }
.work-band-img { position: absolute; inset: 0; height: 100% }
.work-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(247,248,243,.9) 0%, rgba(247,248,243,.62) 46%, rgba(247,248,243,.18) 70%, rgba(247,248,243,0) 84%) }
.work-copy { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(186px,19vh,210px) clamp(20px,5vw,72px) clamp(72px,9vh,104px); pointer-events: none }
.work-copy-inner { max-width: min(56%, 560px) }

@media (max-width: 900px) {
  .nav-name-full { display: none }
  .nav-name-short { display: inline }
  .nav-links { display: none }
  .nav-toggle { display: flex }
  .nav-shell.menu-open .nav-menu { display: flex }
  .hero-grid, .cta-grid, .exp-row { grid-template-columns: minmax(0,1fr) }
  .work-band { padding: 96px 0 0 }
  .work-band-img { position: relative; inset: auto; height: clamp(190px,44vw,300px) }
  .work-scrim { display: none }
  .work-copy { padding: clamp(26px,6vw,38px) clamp(20px,5vw,30px) clamp(34px,7vw,46px) }
  .work-copy-inner { max-width: 100% }
}

/* ---------- architecture diagram (case-study hero toggle) ---------- */
.arch-host .arch-shot { transition: opacity .5s ease }
.arch-host.show-arch .arch-shot { opacity: 0 }
.arch-panel { position: absolute; inset: 0; display: grid; place-items: center; padding: clamp(10px, 2vw, 28px); background: #101410; opacity: 0; pointer-events: none; transition: opacity .5s ease }
.arch-host.show-arch .arch-panel { opacity: 1; pointer-events: auto }
.arch-panel svg { width: 100%; height: 100%; font-family: "Geist", -apple-system, system-ui, sans-serif }
.arch-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; fill: #C7F04A }
.arch-node-box { fill: #1A211A; stroke: rgba(199, 240, 74, .28); stroke-width: 1; rx: 12 }
.arch-title { font-size: 15px; font-weight: 600; fill: #F7F8F3 }
.arch-sub { font-size: 11.5px; fill: #A8B09B }
.arch-edge { stroke: #5F6B5A; stroke-width: 1.5; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1 }
.arch-pulse { stroke: #C7F04A; stroke-width: 1.5; fill: none; stroke-dasharray: .05 .95; stroke-dashoffset: 1; opacity: 0 }
.arch-node { opacity: 0 }

.show-arch .arch-node { animation: archNode .55s cubic-bezier(.22,.8,.28,1) forwards }
.show-arch .arch-edge { animation: archEdge .45s ease forwards }
.show-arch .arch-pulse { animation: archPulse 2.6s linear 1.6s infinite }
.show-arch .d1 { animation-delay: .05s } .show-arch .d2 { animation-delay: .25s }
.show-arch .d3 { animation-delay: .45s } .show-arch .d4 { animation-delay: .65s }
.show-arch .d5 { animation-delay: .85s } .show-arch .d6 { animation-delay: 1.05s }
.show-arch .e1 { animation-delay: .2s } .show-arch .e2 { animation-delay: .4s }
.show-arch .e3 { animation-delay: .6s } .show-arch .e4 { animation-delay: .8s }
.show-arch .e5 { animation-delay: 1s } .show-arch .e6 { animation-delay: 1.2s }

@keyframes archNode { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes archEdge { to { stroke-dashoffset: 0 } }
@keyframes archPulse { 0% { stroke-dashoffset: 1; opacity: .9 } 100% { stroke-dashoffset: -1; opacity: .9 } }

.arch-toggle { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 11px 19px; border: 1px solid rgba(247,248,243,.18); border-radius: 999px; background: rgba(16,20,16,.72); backdrop-filter: blur(14px); color: #F7F8F3; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .25s ease }
.arch-toggle:hover { background: rgba(16,20,16,.9) }

/* ---------- project explorer (case-study workspace) ---------- */
.explorer { max-width: 1180px; margin: 0 auto clamp(56px, 7vw, 88px) }
.explorer__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px }
.explorer__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: #3F6B22 }
.explorer__badge { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 7px 13px; border-radius: 999px; background: rgba(199,240,74,.32); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #24361A }
.explorer__badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #3A6420; animation: pulseDot 2.4s ease-in-out infinite }
.explorer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; align-items: stretch }
/* height:0 + min-height:100% makes the chat adopt the row height set by the
   16/9 preview instead of growing with its own feed — answers scroll inside. */
.explorer__chat { display: flex; flex-direction: column; height: 0; min-height: 100%; background: #FFFFFF; border: 1px solid #DCE0D2; border-radius: 18px; padding: 20px }
.explorer__chat-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: #101410 }
.explorer__feed { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin: 14px 0 }
.qa-hint { margin: 0; font-size: 13px; line-height: 1.6; color: #A8B09B }
.qa-q { align-self: flex-end; max-width: 90%; padding: 9px 14px; border-radius: 14px 14px 4px 14px; background: #E8F5C9; border: 1px solid #C7F04A; font-size: 13px; font-weight: 600; color: #24361A; animation: riseIn .4s cubic-bezier(.22,.8,.28,1) both }
.qa-a { padding: 2px 0 2px 14px; border-left: 2px solid #C7F04A; font-size: 14px; line-height: 1.65; color: #38402F; animation: riseIn .45s cubic-bezier(.22,.8,.28,1) both }
.qa-a--pending { color: #A8B09B }
.explorer__chips { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #ECEFE1; padding-top: 14px }
.qa-chip { padding: 8px 13px; border-radius: 999px; background: #F7F8F3; border: 1px solid #DCE0D2; font-family: inherit; font-size: 12.5px; font-weight: 600; color: #24361A; cursor: pointer; transition: background .2s ease, opacity .2s ease }
.qa-chip:hover { background: #ECEFE1 }
.qa-chip.used { opacity: .55 }
.explorer__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 7px; border: 1px solid #DCE0D2; border-radius: 999px; background: #FFFFFF; width: fit-content }
.explorer__tab { padding: 9px 16px; border: none; border-radius: 999px; background: transparent; font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #5F6B5A; cursor: pointer; transition: background .2s ease, color .2s ease }
.explorer__tab:hover { color: #101410; background: #ECEFE1 }
section[id] { scroll-margin-top: 110px }
@media (max-width: 900px) {
  .explorer__grid { grid-template-columns: 1fr }
  /* stacked: the row can't size the chat, so use its own bounded height */
  .explorer__chat { height: auto; min-height: 300px; max-height: 440px }
  .explorer__feed { min-height: 140px }
  .explorer__tabs { width: 100%; border-radius: 22px }
}

/* ---------- document intelligence lab (/lab experiment) ---------- */
[hidden] { display: none !important }
.doclab { position: relative; overflow: hidden; margin-top: clamp(56px, 7vw, 88px); border-radius: clamp(24px, 3vw, 40px); background: #101410; color: #F7F8F3; padding: clamp(28px, 4vw, 52px) }
.doclab__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px }
.doclab__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: #C7F04A }
.doclab__badge { margin-left: auto; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(247,248,243,.22); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: rgba(247,248,243,.6); white-space: nowrap }
.doclab h2 { margin: 0 0 10px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -.015em }
.doclab__lead { margin: 0 0 24px; max-width: 60ch; font-size: 15px; line-height: 1.65; color: rgba(247,248,243,.66) }
.doclab__samples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px }
.doclab-sample { padding: 9px 16px; border-radius: 999px; background: rgba(247,248,243,.06); border: 1px solid rgba(247,248,243,.16); font-family: inherit; font-size: 13px; font-weight: 600; color: rgba(247,248,243,.75); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease }
.doclab-sample:hover { background: rgba(247,248,243,.12) }
.doclab-sample.active { background: #C7F04A; border-color: #C7F04A; color: #101410 }
.doclab__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start }

/* the fake document: white paper with a SAMPLE watermark */
.doclab__doc { position: relative; overflow: hidden; background: #FFFFFF; color: #101410; border-radius: 14px; padding: 26px 28px; min-height: 380px; font-size: 13.5px; line-height: 1.65 }
.doclab__doc::after { content: "SAMPLE"; position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 84px; font-weight: 700; letter-spacing: .18em; color: rgba(16,20,16,.06); pointer-events: none }
.doclab__doc-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #101410; padding-bottom: 10px; margin-bottom: 14px }
.doclab__doc-head strong { font-size: 15px }
.doclab__doc-head span { font-size: 11px; color: #5F6B5A; text-align: right }
.doclab__doc table { width: 100%; border-collapse: collapse; font-size: 12.5px }
.doclab__doc th, .doclab__doc td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #ECEFE1 }
.doclab__doc th { font-size: 10.5px; letter-spacing: .08em; color: #5F6B5A }
.doclab__doc .rx { font-size: 26px; font-family: 'Instrument Serif', serif; margin: 6px 0 }
.doclab__doc .flag-h { color: #A24A22; font-weight: 700 }
.doclab__doc .doc-sig { margin-top: 22px; padding-top: 8px; border-top: 1px dashed #DCE0D2; font-size: 12px; color: #5F6B5A }

/* console: pipeline stages, result, timeline */
.doclab__console { display: grid; gap: 14px; align-content: start }
.doclab-analyze { justify-self: start; display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border: none; border-radius: 999px; background: #C7F04A; color: #101410; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .2s ease }
.doclab-analyze:disabled { opacity: .55; cursor: default }
.doclab-stage { border: 1px solid rgba(247,248,243,.14); border-radius: 12px; padding: 14px 16px; animation: riseIn .4s cubic-bezier(.22,.8,.28,1) both }
.doclab-stage__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px }
.doclab-stage__name { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #F7F8F3 }
.doclab-stage__status { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #A8B09B }
.doclab-stage.done .doclab-stage__status { color: #C7F04A }
.doclab-stage .st-done { display: none }
.doclab-stage.done .st-run { display: none }
.doclab-stage.done .st-done { display: inline }
.doclab-bar { height: 6px; border-radius: 999px; background: rgba(247,248,243,.12); overflow: hidden }
.doclab-bar__fill { height: 100%; width: 0; border-radius: 999px; background: #C7F04A; transition: width 1.1s ease }
.doclab-stage.run .doclab-bar__fill { width: 100% }
.doclab-ocr-text { margin: 10px 0 0; font-family: ui-monospace, Consolas, monospace; font-size: 11px; line-height: 1.6; color: rgba(247,248,243,.45); white-space: pre-line }
.doclab-result { border: 1px solid rgba(199,240,74,.3); border-radius: 12px; padding: 16px; animation: riseIn .45s cubic-bezier(.22,.8,.28,1) both }
.doclab-result__title { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #C7F04A }
.doclab-row { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(247,248,243,.08); font-size: 13px; animation: riseIn .4s cubic-bezier(.22,.8,.28,1) both }
.doclab-row:last-child { border-bottom: none }
.doclab-row__label { color: #A8B09B; font-size: 12px }
.doclab-row__value { color: #F7F8F3; font-weight: 600 }
.conf { padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .06em; white-space: nowrap }
.conf--ok { background: rgba(199,240,74,.18); color: #C7F04A }
.conf--review { background: rgba(226,112,58,.2); color: #E2703A }
.doclab-timeline { border: 1px solid rgba(247,248,243,.14); border-radius: 12px; padding: 16px; animation: riseIn .45s cubic-bezier(.22,.8,.28,1) both }
.doclab-timeline__title { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: rgba(247,248,243,.6) }
.doclab-event { position: relative; padding: 0 0 14px 22px; animation: riseIn .4s cubic-bezier(.22,.8,.28,1) both }
.doclab-event::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: -2px; width: 1px; background: rgba(199,240,74,.3) }
.doclab-event:last-child { padding-bottom: 0 }
.doclab-event:last-child::before { display: none }
.doclab-event::after { content: ""; position: absolute; left: 1px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #C7F04A }
.doclab-event__date { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: #C7F04A }
.doclab-event__text { font-size: 13px; line-height: 1.55; color: rgba(247,248,243,.85) }
.doclab__note { margin: 22px 0 0; font-size: 11.5px; line-height: 1.6; color: rgba(247,248,243,.4) }
@media (max-width: 900px) { .doclab__grid { grid-template-columns: 1fr } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
  .show-arch .arch-node { opacity: 1 }
  .show-arch .arch-edge { stroke-dashoffset: 0 }
  .doclab-stage.run .doclab-bar__fill { width: 100% }
}
