/*
 * shared.css — common styles for all portfolio project pages
 * Each page imports this file and defines its own :root accent variables:
 *   --accent, --accent-vivid, --accent-dim, --accent-pale
 *   --grad, --grad-v, --hdr-bg
 * All base variables (font, max, gutter, text, bg, etc.) are identical across pages
 * and should also be defined in each :root.
 */

/* ── RESET ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: default; }
a, button, [role="button"], label, select { cursor: pointer; }

/* ── BASE ─────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + var(--tag-h) + 8px);
}
body {
  background: var(--bg-a);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-b); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ── FOCUS / SKIP ─────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 9999; background: var(--grad); color: #fff; padding: 10px 22px; border-radius: var(--radius-btn); font-size: 14px; font-weight: 500; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* ── REVEAL ───────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .72s ease, transform .72s ease; }
.reveal.vis { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }

/* ── SITE HEADER ──────────────────────────────────────────────────────────── */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 500; background: #fff; border-bottom: 1px solid rgba(0,0,0,.08); box-shadow: 0 2px 16px rgba(0,0,0,.06); padding: 0 var(--gutter); height: var(--hdr-h); display: flex; align-items: center; }
.navbar { width: 100%; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; cursor: pointer; }
.brand:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; border-radius: 4px; }
.brand-mono { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; flex-shrink: 0; display: block; }
@media(max-width:480px) { .brand span { display: none; } }
.nav-links { display: flex; align-items: center; gap: 28px; justify-content: center; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-mid); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; position: relative; padding-bottom: 2px; transition: color .2s; cursor: pointer; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--grad-h, var(--accent-vivid)); border-radius: 2px; transition: width .3s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 4px; border-radius: 3px; }
.hdr-right { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.btn-contact { display: inline-flex; align-items: center; gap: 7px; padding: 11px 28px; border-radius: var(--radius-btn); background: var(--grad); border: none; color: #fff; font-family: var(--font); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; cursor: pointer; font-weight: 600; box-shadow: 0 3px 14px rgba(0,0,0,.22); transition: filter .2s, transform .2s; }
.btn-contact:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-contact:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; }
.hdr-linkedin { display: inline-flex; align-items: center; gap: 0; padding: 9px 12px; border-radius: var(--radius-btn); font-family: var(--font); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-mid); text-decoration: none; cursor: pointer; border: 1.5px solid rgba(0,0,0,.2); font-weight: 600; overflow: hidden; transition: padding .3s ease, gap .3s ease, color .2s, border-color .2s, background .2s; }
.hdr-linkedin:hover { padding: 9px 18px 9px 14px; gap: 7px; color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.hdr-linkedin .li-label { max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width .3s ease, opacity .25s ease; }
.hdr-linkedin:hover .li-label { max-width: 80px; opacity: 1; }
@media(max-width:960px) { .hdr-linkedin { display: none; } }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.12); color: var(--text); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 11px; transition: background .25s; }
.menu-btn:hover { background: rgba(0,0,0,.08); }
.menu-btn:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; }
.menu-btn span { display: block; width: 100%; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media(max-width:960px) { .nav-links { display: none; } .btn-contact { display: none; } .menu-btn { display: flex; } .navbar { grid-template-columns: 1fr auto; } }

/* ── DRAWER ───────────────────────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 590; opacity: 0; pointer-events: none; transition: opacity .4s; }
.drawer-overlay.on { opacity: 1; pointer-events: all; }
.side-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(310px,88vw); background: var(--hdr-bg); border-left: 1px solid rgba(255,255,255,.08); z-index: 600; padding: 84px 32px 40px; transform: translateX(110%); transition: transform .4s cubic-bezier(.25,.46,.45,.94); display: flex; flex-direction: column; }
.side-drawer.on { transform: translateX(0); }
.side-drawer a { font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #fff; text-decoration: none; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; transition: color .2s; }
.side-drawer a::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 0; height: 1.5px; background: var(--grad-h, var(--accent-vivid)); border-radius: 2px; transition: width .3s; }
.side-drawer a:hover { color: #fff; }
.side-drawer a:hover::after { width: 100%; }
.side-drawer a:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; }
.drawer-x { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #f5f0eb; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.drawer-x:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; }
.side-drawer .drawer-contact-btn { margin-top: auto; padding: 13px 24px; background: var(--grad); border-radius: var(--radius-btn); border-bottom: none; justify-content: center; gap: 8px; box-shadow: 0 3px 14px rgba(0,0,0,.3); transition: filter .2s, transform .2s; }
.side-drawer .drawer-contact-btn::after { display: none; }
.side-drawer .drawer-contact-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ── TAG NAV ──────────────────────────────────────────────────────────────── */
#tag-nav { position: sticky; top: var(--hdr-h); z-index: 399; background: var(--hdr-bg); border-bottom: 1px solid rgba(255,255,255,.08); padding: 0 var(--gutter); }
.tag-nav-inner { max-width: var(--max); margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.tag-nav-inner a { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: var(--tag-h); padding: 0 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: #f5f0eb; text-decoration: none; transition: color .2s; white-space: nowrap; position: relative; }
.tag-nav-inner a::after { display: none; }
.tag-nav-inner a span { position: relative; padding-bottom: 2px; }
.tag-nav-inner a span::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--grad-h, var(--accent-vivid)); border-radius: 2px; transition: width .3s; }
.tag-nav-inner a:hover span::after { width: 100%; }
.tag-nav-inner a:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: -2px; }

/* ── FAB ──────────────────────────────────────────────────────────────────── */
.fab-wrap { position: fixed; bottom: 26px; right: 22px; z-index: 600; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.fab { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; border: none; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s, filter .2s; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.fab:hover { filter: brightness(1.15); }
.fab.on { opacity: 1; transform: none; }
.fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hdr-contact-icon { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.18); transition: filter .2s, transform .2s; }
.hdr-contact-icon:hover { filter: brightness(1.12); transform: translateY(-1px); }
.hdr-contact-icon:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; }
@media(max-width:960px) { .hdr-contact-icon { display: flex; } }

/* ── LAYOUT ───────────────────────────────────────────────────────────────── */
section { padding: clamp(2.5rem,6vw,5rem) var(--gutter); }
.inner { max-width: var(--max); margin: 0 auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media(max-width:860px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 1.1rem; margin-top: 1.75rem; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.cards-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.1rem; margin-top: 1.75rem; }
@media(max-width:860px) { .cards-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .cards-grid-4 { grid-template-columns: 1fr; } }
.img-card { background-size: cover; background-position: center; min-height: 160px; }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1.25rem; margin-top: 1.75rem; }

/* ── TYPOGRAPHY ───────────────────────────────────────────────────────────── */
.sec-label { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.sec-label::before { content: ''; width: 24px; height: 1.5px; background: var(--grad); border-radius: 2px; }
.hero-title { font-size: clamp(34px,5.5vw,60px); font-weight: 600; line-height: 1.05; letter-spacing: -.025em; color: var(--text); }
.hero-title em { font-style: normal; color: var(--accent); }
.sec-h2 { font-size: clamp(17px,2.6vw,28px); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--text); margin-bottom: 16px; }
.sec-h2 em { font-style: normal; }
.sec-h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.sec-h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: .3rem; transition: color .25s; }
.sec-text { font-size: 15px; color: var(--text-muted); line-height: 1.8; font-weight: 400; max-width: 480px; }

/* ── BADGE ────────────────────────────────────────────────────────────────── */
.badge { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-dim); padding: 3px 11px; border-radius: var(--radius-btn); font-weight: 600; display: inline-flex; }
.badge-ongoing { background: var(--accent); color: #fff; border-color: transparent; }

/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card { background: var(--card-bg); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); position: relative; overflow: hidden; transition: box-shadow .3s; }
.card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--grad); border-radius: 2px; transition: width .45s ease; }
.card:hover::after { width: 100%; }
.card:hover .sec-h4 { color: var(--accent); }
.research-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-pale); display: flex; align-items: center; justify-content: center; margin-bottom: .85rem; color: var(--accent); flex-shrink: 0; }
.num-card { display: flex; gap: 1.4rem; align-items: center; }
.num-card .num { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; min-width: 2.4rem; flex-shrink: 0; }

/* ── LISTS ────────────────────────────────────────────────────────────────── */
ul { list-style: none; padding: 0; }
li { display: flex; align-items: flex-start; gap: .65rem; color: var(--text-muted); font-size: 13px; margin-bottom: .25rem; }
li::before { content: ''; display: inline-block; width: 6px; height: 6px; min-width: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 6px; }

/* ── STATUS BANNER ────────────────────────────────────────────────────────── */
.status-banner { background: var(--accent-pale); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 1.1rem 1.5rem; display: flex; align-items: flex-start; gap: 1rem; }
.status-banner svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.status-banner p { font-size: 14px; color: var(--text-mid); line-height: 1.7; }
.status-banner strong { color: var(--accent); }

/* ── PROCESS CARD ─────────────────────────────────────────────────────────── */
.process-card { background: var(--card-bg); border-radius: 12px; padding: 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--border); position: relative; overflow: hidden; }
.process-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--grad); border-radius: 2px; transition: width .45s ease; }
.process-card:hover::after { width: 100%; }
.process-card:hover h4 { color: var(--accent); }
.step-n { font-size: 2.2rem; font-weight: 700; color: var(--accent); margin-bottom: .35rem; line-height: 1; }
.process-card h4 { font-size: 14px; font-weight: 700; margin-bottom: .75rem; transition: color .25s; }
.process-card ul { display: flex; flex-direction: column; gap: .3rem; }
.process-card li { font-size: 12px; }

/* ── STEP STACK ───────────────────────────────────────────────────────────── */
.step-stack { display: flex; flex-direction: column; gap: .85rem; margin-top: 1.75rem; }
.step-item { background: var(--card-bg); border-radius: 12px; padding: 1rem 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; gap: 1rem; align-items: center; position: relative; overflow: hidden; }
.step-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--grad); border-radius: 2px; transition: width .45s ease; }
.step-item:hover::after { width: 100%; }
.step-dot { width: 8px; height: 8px; min-width: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.step-dot.done { background: #22c55e; }
.step-dot.active { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.step-dot.pending { background: var(--border); border: 2px solid rgba(0,0,0,.15); }
.step-item span { font-size: 14px; color: var(--text-mid); flex: 1; }
.step-item .step-status { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.step-item .step-status.done { color: #22c55e; }
.step-item .step-status.active { color: var(--accent); }

/* ── QUOTE SECTION ────────────────────────────────────────────────────────── */
.quote-section { background: var(--bg-a); padding: clamp(3rem,7vw,5rem) var(--gutter); text-align: center; }
.quote-inner { max-width: 760px; margin: 0 auto; }
.quote-inner .sec-label { justify-content: center; }
.cit-text,.quote-text { font-size: clamp(16px,2.8vw,28px); font-weight: 600; line-height: 1.5; color: var(--text); letter-spacing: -.02em; font-style: normal; margin-top: .75rem; }
.cit-text em,.quote-text em { font-style: normal; color: var(--accent); }
.cit-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-top: 1.25rem; font-weight: 500; }

/* ── REFLECTION BOX ───────────────────────────────────────────────────────── */
.reflection-box { background: var(--accent-pale); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 1.5rem 1.75rem; margin-top: 1.75rem; }
.reflection-box .rfl-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .6rem; }
.reflection-box p { font-size: 14px; color: var(--text-mid); line-height: 1.8; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--hdr-bg); color: #f5f0eb; }
.footer-cta { padding: 56px var(--gutter); background: var(--grad-v); }
.footer-cta-inner { max-width: var(--max); margin: 0 auto; }
.footer-h2 { font-family: var(--font); font-size: clamp(28px,4.5vw,52px); font-weight: 600; line-height: 1; letter-spacing: -.02em; color: #fff; }
.footer-sub { font-size: 14px; color: #fff; margin-top: 10px; font-weight: 400; }
.footer-bot { padding: 24px var(--gutter); border-top: 1px solid rgba(255,255,255,.12); }
.footer-bot-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.footer-bot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 11px; color: #fff; letter-spacing: .05em; }
.footer-links { display: flex; gap: 24px; align-items: center; }
.footer-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #fff; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; position: relative; padding-bottom: 2px; transition: color .2s; }
.footer-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.footer-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--accent-vivid); border-radius: 2px; transition: width .3s; }
.footer-link:hover::after { width: 100%; }
.footer-link:focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 3px; border-radius: 3px; }

/* ── LOADING SCREEN ───────────────────────────────────────────────────────── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #000000;
  display: flex; align-items: center; justify-content: center;
  opacity: 1; visibility: visible;
  transition: opacity .5s ease, visibility .5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.ls-icon {
  width: 90px; height: 90px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  animation: ls-pulse 1.4s ease-in-out infinite;
}
.ls-icon img {
  width: 52px; height: 52px; object-fit: contain; display: block;
  filter: brightness(0) invert(1);
}
@keyframes ls-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .8; } }

/* ── ANIMATIONS ───────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }

/* ── HERO BASE ────────────────────────────────────────────────────────────── */
body > header.hero-section { margin-top: var(--hdr-h); }

/* ── UTIL ─────────────────────────────────────────────────────────────────── */
.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; }
