/* Prabhansh Tiwari — warm, low-glare portfolio system */
:root {
  color-scheme: light;
  --page: #efeee6;
  --surface: #f7f6ef;
  --surface-raised: #fbfaf5;
  --surface-soft: #e7e8df;
  --surface-tint: #dfe7dc;
  --text: #202b24;
  --muted: #5b685f;
  --line: #d5d9cf;
  --accent: #315e49;
  --accent-hover: #254b39;
  --accent-soft: #e0e8dd;
  --accent-contrast: #fffefb;
  --gold: #805b2c;
  --shadow: 0 15px 38px rgba(37, 50, 40, .055);
  --radius: 20px;
  --max: 1160px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121915;
  --surface: #19231d;
  --surface-raised: #202c24;
  --surface-soft: #202c24;
  --surface-tint: #293a2e;
  --text: #f0f2ed;
  --muted: #b0bdb2;
  --line: #35443a;
  --accent: #a9c9b1;
  --accent-hover: #c5ddca;
  --accent-soft: #2b3e31;
  --accent-contrast: #17221a;
  --gold: #d4b87c;
  --shadow: 0 16px 40px rgba(0, 0, 0, .19);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--page); color: var(--text); font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.7; transition: background-color .2s ease, color .2s ease; }
body, button, input { font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-contrast); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.container { width: min(var(--max), calc(100% - 56px)); margin-inline: auto; }
.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; }
.skip-link { position: fixed; z-index: 100; left: 14px; top: 12px; padding: 10px 15px; background: var(--text); color: var(--page); border-radius: 9px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 40; top: 0; background: color-mix(in srgb, var(--page) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav-wrap { min-height: 76px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand { display:inline-flex; align-items:center; gap:11px; white-space:nowrap; }
.brand-mark { width:35px; height:35px; display:grid; place-items:center; border-radius:11px; background:var(--accent); color:var(--accent-contrast); font:800 15px/1 "Manrope",sans-serif; letter-spacing:-.08em; }
.brand-name { font:800 17px/1 "Manrope",sans-serif; letter-spacing:-.055em; }
.brand-dot,.heading-period { color:var(--gold); }
.desktop-nav { display:flex; align-items:center; gap:30px; color:var(--muted); font-size:13px; font-weight:700; }
.desktop-nav a,.footer-links a { transition:color .15s ease; }
.desktop-nav a:hover,.footer-links a:hover { color:var(--accent); }
.nav-actions { display:flex; align-items:center; gap:9px; }
.icon-button { display:inline-grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--text); cursor:pointer; font-size:19px; }
.icon-button:hover { border-color:var(--accent); }
.menu-toggle { display:none; }
.mobile-nav { padding:4px 0 16px; }
.mobile-nav a { display:block; padding:12px 4px; border-top:1px solid var(--line); color:var(--muted); font-size:14px; font-weight:650; }
.button { min-height:48px; display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:0 19px; border:1px solid transparent; border-radius:12px; font-size:13px; font-weight:750; transition:transform .16s ease, background-color .16s ease, border-color .16s ease; }
.button:hover { transform:translateY(-2px); }
.button-small { min-height:40px; padding-inline:14px; font-size:12px; }
.button-primary { color:var(--accent-contrast); background:var(--accent); border-color:var(--accent); }
.button-primary:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
.button-secondary,.button-quiet { color:var(--text); background:var(--surface); border-color:var(--line); }
.button-secondary:hover,.button-quiet:hover { border-color:var(--accent); }
.eyebrow,.section-kicker,.overline,.case-index { margin:0; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
.eyebrow { display:flex; align-items:center; gap:9px; font-size:11px; letter-spacing:.08em; }
.availability-dot { width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 15%,transparent); }
.eyebrow-divider { color:var(--gold); }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { font-family:"Manrope","DM Sans",sans-serif; }
.hero-section { padding:105px 0 96px; }
.hero-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(275px,.75fr); gap:70px; align-items:center; }
.hero-copy h1 { max-width:780px; margin:20px 0 0; font-size:clamp(45px,6.2vw,76px); line-height:1.04; letter-spacing:-.075em; font-weight:800; }
.hero-accent { color:var(--accent); }
.hero-summary { max-width:640px; margin:25px 0 0; color:var(--muted); font-size:17px; line-height:1.85; }
.hero-manifesto { max-width:580px; margin:18px 0 0; color:var(--accent); font-size:14px; font-weight:650; }
.hero-actions { display:flex; flex-wrap:wrap; gap:11px; margin-top:30px; }
.hero-socials { display:flex; flex-wrap:wrap; gap:21px; margin-top:27px; color:var(--muted); font-size:12px; font-weight:750; }
.hero-socials a:hover { color:var(--accent); }
.hero-card { min-height:410px; padding:30px; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; border:1px solid var(--line); border-radius:25px; background:linear-gradient(145deg,var(--surface-raised),var(--surface-soft)); box-shadow:var(--shadow); }
.hero-card-top,.hero-card-bottom { display:flex; justify-content:space-between; gap:15px; align-items:center; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.1em; }
.hero-card-index { color:var(--accent); }
.identity-mark { width:100px; height:100px; display:grid; place-items:center; position:relative; border-radius:28px; background:var(--accent-soft); color:var(--accent); font:800 45px/1 "Manrope",sans-serif; letter-spacing:-.11em; }
.identity-mark i { position:absolute; right:-10px; top:-12px; color:var(--gold); font-style:normal; font-size:36px; }
.hero-card-title { margin:28px 0; font:800 clamp(34px,4vw,52px)/1.05 "Manrope",sans-serif; letter-spacing:-.07em; }
.hero-card-title em { color:var(--accent); font-style:normal; }
.hero-card-bottom { padding-top:17px; border-top:1px solid var(--line); letter-spacing:0; font-size:11px; }
.section { padding:86px 0; border-top:1px solid var(--line); }
.work-section { background:var(--surface-soft); }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:30px; margin-bottom:34px; }
.section-heading h2,.about-grid h2,.experience-grid h2 { margin:9px 0 0; font-size:clamp(30px,4.4vw,46px); font-weight:800; line-height:1.15; letter-spacing:-.065em; }
.section-intro { max-width:430px; margin:0 0 3px; color:var(--muted); font-size:14px; line-height:1.85; }
.selected-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.work-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.work-card:hover { transform:translateY(-4px); border-color:color-mix(in srgb,var(--accent) 50%,var(--line)); box-shadow:var(--shadow); }
.work-card-link { display:block; height:100%; }
.work-card-media { position:relative; overflow:hidden; aspect-ratio:16/10; background:var(--surface-soft); border-bottom:1px solid var(--line); }
.work-card-media img { width:100%; height:100%; object-fit:cover; }
.media-label { position:absolute; left:13px; bottom:13px; padding:6px 10px; border:1px solid var(--line); border-radius:99px; background:color-mix(in srgb,var(--surface-raised) 94%,transparent); color:var(--text); font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; backdrop-filter:blur(8px); }
.work-card-content { padding:22px 23px 21px; }
.work-card-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.status { display:inline-flex; align-items:center; gap:6px; letter-spacing:0; text-transform:none; }
.status i { width:6px; height:6px; border-radius:50%; background:var(--accent); }
.work-card h3,.work-card h2 { margin:15px 0 7px; font-size:23px; font-weight:800; line-height:1.2; letter-spacing:-.045em; }
.work-card-content p { min-height:58px; margin:0; color:var(--muted); font-size:13px; line-height:1.8; }
.work-card-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:19px; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; font-weight:700; }
.section-tail { display:flex; justify-content:center; margin-top:31px; }
.about-section { background:var(--page); }
.about-grid,.experience-grid { display:grid; grid-template-columns:minmax(250px,.8fr) minmax(0,1.2fr); gap:90px; align-items:start; }
.muted-heading { color:var(--muted); }
.about-body p { color:var(--muted); font-size:15px; line-height:1.95; }
.about-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.about-tags span,.stack-chip { display:inline-flex; padding:7px 11px; border:1px solid var(--line); border-radius:99px; color:var(--muted); background:var(--surface); font-size:11px; font-weight:700; }
.expertise-section { background:var(--surface); }
.expertise-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.expertise-card { min-height:185px; padding:21px; border:1px solid var(--line); border-radius:16px; background:var(--surface-raised); }
.expertise-number { color:var(--accent); font-size:10px; font-weight:850; letter-spacing:.1em; }
.expertise-card h3 { margin:20px 0 8px; font-size:17px; letter-spacing:-.035em; }
.expertise-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.8; }
.experience-section { background:var(--surface-soft); }
.experience-entry { padding:25px 0 0; border-top:1px solid var(--line); }
.experience-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.1em; }
.experience-entry h3 { margin:17px 0 9px; font-size:22px; letter-spacing:-.04em; }
.experience-entry p { max-width:670px; margin:0; color:var(--muted); font-size:14px; line-height:1.9; }
.writing-section { background:var(--page); }
.writing-list { border-top:1px solid var(--line); }
.writing-item { display:grid; grid-template-columns:170px minmax(0,1fr) 24px; gap:22px; align-items:center; padding:22px 5px; border-bottom:1px solid var(--line); transition:padding .16s ease,color .16s ease; }
.writing-item:hover { padding-inline:12px; color:var(--accent); }
.writing-type { color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.1em; }
.writing-title { font:700 18px/1.45 "Manrope",sans-serif; letter-spacing:-.025em; }
.writing-footnote { margin:17px 0 0; color:var(--muted); font-size:12px; }
.writing-footnote a { color:var(--accent); font-weight:750; }
.contact-section { padding-bottom:92px; background:var(--surface-soft); }
.contact-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px 40px; align-items:center; padding:40px; border:1px solid var(--line); border-radius:25px; background:var(--surface); }
.contact-panel h2 { margin:12px 0 8px; font:800 clamp(28px,4vw,42px)/1.15 "Manrope",sans-serif; letter-spacing:-.06em; }
.contact-panel p:not(.section-kicker) { max-width:560px; margin:0; color:var(--muted); font-size:14px; }
.contact-actions { display:flex; flex-direction:column; gap:9px; }
.contact-email { grid-column:1/-1; color:var(--accent); font-size:13px; font-weight:750; }
.site-footer { padding:34px 0 29px; border-top:1px solid var(--line); background:var(--page); }
.footer-inner { display:grid; grid-template-columns:1fr auto; gap:17px 30px; align-items:center; }
.footer-brand .brand { margin-bottom:8px; }
.footer-brand p { margin:0; color:var(--muted); font-size:11px; }
.footer-links { display:flex; flex-wrap:wrap; gap:19px; color:var(--muted); font-size:11px; font-weight:700; }
.footer-inner small { grid-column:1/-1; color:var(--muted); font-size:10px; }
/* Projects archive */
.archive-page { padding:66px 0 100px; }
.archive-intro { max-width:720px; margin-bottom:34px; }
.back-link { display:inline-flex; margin-bottom:30px; color:var(--muted); font-size:12px; font-weight:750; }
.archive-intro h1 { margin:15px 0; font-size:clamp(45px,7vw,74px); line-height:1.04; letter-spacing:-.075em; }
.archive-intro p:last-child { max-width:620px; margin:0; color:var(--muted); font-size:15px; }
.archive-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:30px 0 23px; }
.filter-list { display:flex; flex-wrap:wrap; gap:7px; }
.filter-chip { min-height:40px; padding:0 14px; border:1px solid var(--line); border-radius:99px; background:var(--surface); color:var(--muted); font-size:11px; font-weight:750; cursor:pointer; }
.filter-chip[aria-pressed="true"] { border-color:var(--accent); background:var(--accent); color:var(--accent-contrast); }
.search-field { width:min(100%,320px); min-height:43px; display:flex; align-items:center; gap:10px; padding:0 13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); }
.search-field input { width:100%; min-width:0; border:0; outline:none; background:transparent; color:var(--text); font-size:12px; }
.search-field input::placeholder { color:var(--muted); opacity:1; }
.search-field input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:3px; }
.archive-grid { align-items:stretch; }
.archive-count { margin:19px 0 0; color:var(--muted); font-size:11px; }
.empty-state { padding:34px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); text-align:center; }
/* Case study */
.case-page { padding:38px 0 90px; }
.case-back-row { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.case-back-row .back-link { margin:0; }
.case-index { color:var(--accent); }
.case-hero { max-width:850px; padding:56px 0 37px; }
.case-hero h1 { margin:13px 0 15px; font-size:clamp(43px,7vw,76px); line-height:1.04; letter-spacing:-.075em; }
.case-summary { max-width:740px; margin:0; color:var(--muted); font-size:18px; line-height:1.8; }
.case-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:26px; }
.case-hero-visual { position:relative; overflow:hidden; border:1px solid var(--line); border-radius:22px; background:var(--surface-soft); box-shadow:var(--shadow); }
.case-hero-visual img { width:100%; aspect-ratio:16/9; object-fit:cover; }
.case-meta-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; padding:25px 0; border-bottom:1px solid var(--line); }
.case-meta-grid div { display:flex; flex-direction:column; gap:6px; }
.case-meta-grid span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.12em; }
.case-meta-grid strong { font-size:12px; font-weight:750; }
.case-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:70px; align-items:start; padding-top:22px; }
.case-content { min-width:0; }
.case-section { padding:43px 0; border-bottom:1px solid var(--line); }
.case-section h2 { margin:10px 0 14px; font-size:clamp(25px,3.4vw,34px); letter-spacing:-.055em; }
.case-section > p:not(.section-kicker) { max-width:760px; margin:0; color:var(--muted); font-size:14px; line-height:1.95; }
.case-list { margin:0; padding-left:22px; color:var(--muted); font-size:14px; line-height:1.95; }
.case-list li { padding-left:5px; margin:7px 0; }
.decision-list { border-top:1px solid var(--line); }
.decision-row { display:grid; grid-template-columns:210px minmax(0,1fr); gap:22px; padding:19px 0; border-bottom:1px solid var(--line); }
.decision-row h3 { margin:0; font-size:14px; letter-spacing:-.02em; }
.decision-row p { margin:0; color:var(--muted); font-size:13px; line-height:1.85; }
.case-muted { margin-bottom:18px !important; font-size:12px !important; }
.case-media-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.case-media-card { margin:0; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.case-image { overflow:hidden; background:var(--surface-soft); }
.case-image img { width:100%; aspect-ratio:16/10; object-fit:cover; }
.case-media-card figcaption { display:flex; flex-direction:column; gap:3px; padding:12px 13px; color:var(--muted); font-size:10px; }
.case-media-card figcaption span:first-child { color:var(--accent); font-size:9px; font-weight:850; letter-spacing:.12em; }
.video-placeholder { display:flex; gap:15px; align-items:flex-start; margin-top:14px; padding:19px; border:1px dashed var(--line); border-radius:14px; background:var(--surface-soft); }
.video-icon { width:43px; height:43px; flex:0 0 43px; display:grid; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent); }
.video-placeholder strong { font-size:13px; }
.video-placeholder p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.8; }
.video-placeholder code { color:var(--accent); font-size:10px; }
.case-sidebar { position:sticky; top:105px; }
.case-side-card { padding:20px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.side-label { display:block; color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.13em; }
.stack-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.stack-chip { padding:6px 9px; font-size:10px; }
.side-divider { height:1px; margin:19px 0; background:var(--line); }
.case-side-card > a { display:block; margin-top:11px; color:var(--accent); font-size:12px; font-weight:750; }
.case-next { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:55px; padding:27px 0 0; border-top:1px solid var(--line); }
.case-next h2 { margin:6px 0 0; font-size:25px; letter-spacing:-.05em; }
/* Responsive */
@media (max-width: 980px) {
  .hero-grid { gap:38px; }
  .about-grid,.experience-grid { gap:48px; }
  .expertise-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-layout { grid-template-columns:minmax(0,1fr) 235px; gap:36px; }
}
@media (max-width: 820px) {
  .container { width:min(var(--max),calc(100% - 40px)); }
  .desktop-nav { display:none; }
  .menu-toggle { display:inline-grid; }
  .hero-section { padding:75px 0 72px; }
  .hero-grid { grid-template-columns:minmax(0,1fr) 285px; gap:28px; }
  .hero-card { min-height:355px; padding:24px; }
  .hero-card-bottom { flex-direction:column; align-items:flex-start; gap:5px; }
  .section { padding:70px 0; }
  .about-grid,.experience-grid { grid-template-columns:1fr; gap:26px; }
  .case-layout { grid-template-columns:1fr; }
  .case-sidebar { position:static; }
  .case-side-card { display:grid; grid-template-columns:1fr 1fr; gap:8px 18px; }
  .case-side-card .side-divider { grid-column:1/-1; width:100%; }
}
@media (max-width: 620px) {
  .container { width:calc(100% - 32px); }
  .nav-wrap { min-height:68px; gap:10px; }
  .brand-name { font-size:15px; }
  .brand-mark { width:33px; height:33px; }
  .nav-actions { gap:7px; }
  .nav-actions > [data-resume] { display:none; }
  .icon-button { width:43px; height:43px; }
  .hero-section { padding:59px 0 55px; }
  .hero-grid { grid-template-columns:1fr; gap:32px; }
  .hero-copy h1 { font-size:clamp(42px,12vw,59px); }
  .hero-summary { font-size:15px; line-height:1.8; }
  .hero-card { min-height:265px; padding:22px; }
  .identity-mark { width:72px; height:72px; border-radius:20px; font-size:34px; }
  .hero-card-title { margin:20px 0; font-size:37px; }
  .section { padding:58px 0; }
  .section-heading { display:block; margin-bottom:23px; }
  .section-heading h2,.about-grid h2,.experience-grid h2 { font-size:32px; }
  .section-intro { margin-top:13px; font-size:13px; }
  .selected-grid { grid-template-columns:1fr; gap:15px; }
  .work-card-content { padding:19px; }
  .work-card h3,.work-card h2 { font-size:21px; }
  .work-card-content p { min-height:0; }
  .expertise-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .expertise-card { min-height:160px; padding:15px; }
  .expertise-card h3 { margin-top:14px; font-size:15px; }
  .expertise-card p { font-size:11px; }
  .writing-item { grid-template-columns:1fr; gap:6px 12px; padding:18px 2px; }
  .writing-type { grid-column:1; }
  .writing-title { grid-column:1; grid-row:2; font-size:15px; }
  .contact-panel { grid-template-columns:1fr; gap:22px; padding:24px; }
  .contact-actions { flex-direction:row; flex-wrap:wrap; }
  .contact-actions .button { flex:1 1 150px; }
  .contact-email { grid-column:1; }
  .footer-inner { grid-template-columns:1fr; }
  .footer-links { gap:14px; }
  .footer-inner small { grid-column:1; }
  .archive-page { padding:42px 0 70px; }
  .archive-intro h1 { font-size:49px; }
  .archive-toolbar { align-items:stretch; }
  .filter-list { width:100%; }
  .filter-chip { min-height:42px; }
  .search-field { width:100%; }
  .case-page { padding-top:25px; }
  .case-hero { padding:39px 0 27px; }
  .case-hero h1 { font-size:clamp(39px,11vw,56px); }
  .case-summary { font-size:15px; }
  .case-meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 12px; }
  .case-layout { gap:22px; }
  .case-section { padding:31px 0; }
  .decision-row { grid-template-columns:1fr; gap:6px; }
  .case-media-grid { grid-template-columns:1fr; }
  .case-side-card { display:block; }
  .case-next { align-items:flex-start; flex-direction:column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition-duration:.01ms !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; }
}


/* Reference-inspired editorial layout — original Prabhansh identity */
.site-header { background: color-mix(in srgb, var(--page) 94%, transparent); }
.nav-wrap { min-height: 72px; }
.brand { gap:10px; }
.brand-mark { width:33px; height:33px; border-radius:10px; text-transform:uppercase; }
.brand-name { font-size:16px; letter-spacing:-.045em; }
.desktop-nav { gap:27px; font-size:12px; }
.nav-contact { min-height:39px; padding-inline:13px; }
.hero-reference { padding:82px 0 76px; }
.hero-reference-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:64px; align-items:center; }
.hero-copy h1 { max-width:760px; margin:22px 0 0; font-size:clamp(43px,5.7vw,72px); line-height:1.035; letter-spacing:-.073em; }
.hero-summary { max-width:610px; margin-top:21px; font-size:16px; line-height:1.85; }
.hero-actions { margin-top:25px; }
.hero-socials { gap:22px; margin-top:23px; font-size:12px; }
.hero-credentials { display:flex; flex-wrap:wrap; gap:24px; margin-top:34px; padding-top:20px; border-top:1px solid var(--line); }
.hero-credentials span { display:flex; flex-direction:column; gap:3px; }
.hero-credentials strong { font-size:12px; font-weight:800; }
.hero-credentials small { color:var(--muted); font-size:10px; }
.hero-portrait { position:relative; width:100%; max-width:400px; aspect-ratio:4/5; justify-self:end; margin:0; overflow:hidden; border:1px solid var(--line); border-radius:26px; background:#f7f6ef; box-shadow:var(--shadow); }
.hero-portrait img { display:block; width:100%; height:100%; object-fit:cover; object-position:center center; background:#f7f6ef; }
.hero-portrait figcaption { position:absolute; left:15px; right:15px; bottom:14px; display:flex; justify-content:space-between; gap:12px; padding:9px 11px; border:1px solid var(--line); border-radius:9px; background:color-mix(in srgb,var(--surface-raised) 93%,transparent); color:var(--text); font-size:8px; font-weight:850; letter-spacing:.13em; backdrop-filter:blur(8px); }
.portrait-fallback { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:13px; padding:30px; color:var(--text); text-align:center; background:radial-gradient(circle at 50% 35%, var(--surface-raised) 0 32%, var(--surface) 80%); }
.portrait-fallback[hidden] { display:none; }
.portrait-monogram { width:105px; height:105px; display:grid; place-items:center; border-radius:32px; background:var(--accent); color:var(--accent-contrast); font:800 40px/1 "Manrope",sans-serif; letter-spacing:-.09em; }
.portrait-fallback strong { font:800 21px/1.2 "Manrope",sans-serif; }
.portrait-fallback small { color:var(--muted); font-size:11px; line-height:1.7; }
.portrait-fallback code { color:var(--accent); font-size:10px; }
.intro-strip { border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--surface); }
.intro-strip-inner { min-height:64px; display:flex; align-items:center; flex-wrap:wrap; gap:14px 17px; color:var(--muted); font-size:11px; }
.intro-strip-inner > span { margin-right:7px; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.intro-strip-inner strong { color:var(--text); font-weight:700; }
.intro-strip-inner i { color:var(--gold); font-style:normal; }
.section { padding:82px 0; }
.what-section { background:var(--page); }
.what-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.what-card { min-height:270px; display:flex; flex-direction:column; align-items:flex-start; padding:23px; border:1px solid var(--line); border-radius:16px; background:var(--surface); transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.what-card:hover { transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow); }
.what-index { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.14em; }
.what-icon { width:42px; height:42px; display:grid; place-items:center; margin-top:21px; border-radius:12px; background:var(--accent-soft); color:var(--accent); font-size:23px; }
.what-card h3 { margin:16px 0 7px; font-size:19px; letter-spacing:-.045em; }
.what-card p { flex:1; margin:0; color:var(--muted); font-size:12px; line-height:1.85; }
.what-card a { margin-top:19px; color:var(--accent); font-size:11px; font-weight:800; }
.what-card a span { margin-left:3px; }
.work-section { background:var(--surface-soft); }
.selected-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.work-card { border-radius:15px; background:var(--surface); }
.work-card-media { aspect-ratio:16/10; }
.work-card-content { padding:19px; }
.work-card h3,.work-card h2 { font-size:19px; }
.work-card-content p { min-height:76px; font-size:12px; }
.work-card-foot { font-size:9px; }
.learning-section { background:var(--page); }
.learning-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); gap:15px; }
.learning-feature { min-height:315px; display:flex; flex-direction:column; justify-content:space-between; padding:28px; border:1px solid var(--line); border-radius:17px; background:linear-gradient(135deg,var(--surface-tint),var(--surface)); }
.learning-feature-top { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.learning-symbol { width:39px; height:39px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; color:var(--accent); font-size:20px; }
.learning-feature h3 { max-width:500px; margin:0 0 11px; font-size:clamp(25px,3.4vw,39px); line-height:1.12; letter-spacing:-.06em; }
.learning-feature p { max-width:570px; margin:0; color:var(--muted); font-size:13px; line-height:1.9; }
.learning-tag { display:inline-flex; margin-top:20px; padding:7px 10px; border:1px solid var(--line); border-radius:99px; color:var(--muted); font-size:10px; font-weight:700; }
.learning-side { display:grid; gap:15px; }
.learning-note { padding:22px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.learning-note h3 { margin:15px 0 7px; font-size:18px; letter-spacing:-.04em; }
.learning-note p { margin:0; color:var(--muted); font-size:12px; line-height:1.85; }
.writing-section { background:var(--surface); }
.writing-item { grid-template-columns:155px minmax(0,1fr); padding:19px 5px; }
.writing-title { font-size:16px; }
.about-detail-section { background:var(--surface-soft); }
.about-detail-grid { display:grid; grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr); gap:68px; align-items:start; }
.about-detail-grid h2 { margin:9px 0 0; font-size:clamp(30px,4.4vw,45px); line-height:1.16; letter-spacing:-.065em; }
.background-content > p { max-width:680px; margin:0 0 25px; color:var(--muted); font-size:14px; line-height:1.9; }
.background-list { border-top:1px solid var(--line); }
.background-list > div { display:flex; flex-direction:column; gap:4px; padding:16px 0; border-bottom:1px solid var(--line); }
.background-list span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.13em; }
.background-list strong { font-size:14px; }
.background-list small { color:var(--muted); font-size:11px; }
.contact-section { padding-bottom:84px; background:var(--page); }
.contact-panel { grid-template-columns:minmax(0,1fr) auto; padding:36px; border-radius:18px; }
.contact-panel h2 { font-size:clamp(28px,3.6vw,39px); }
.contact-actions { min-width:190px; }
.site-footer { padding:55px 0 22px; background:var(--surface); }
.footer-layout { display:grid; grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(120px,1fr)); gap:34px; }
.footer-intro { max-width:300px; }
.footer-intro .brand { margin-bottom:14px; }
.footer-intro p { margin:0; color:var(--muted); font-size:12px; line-height:1.8; }
.footer-manifesto { display:inline-block; margin-top:18px; color:var(--accent); font-size:10px; font-weight:800; }
.footer-column { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.footer-column h2 { margin:3px 0 5px; color:var(--muted); font-size:10px; font-family:"DM Sans",sans-serif; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.footer-column a { color:var(--text); font-size:11px; font-weight:650; }
.footer-column a:hover,.footer-bottom a:hover { color:var(--accent); }
.footer-bottom { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:9px; padding-top:18px; border-top:1px solid var(--line); }
.footer-bottom small,.footer-bottom a { color:var(--muted); font-size:10px; }
.footer-bottom a { font-weight:700; }
/* Archive and case pages share the same editorial navigation/footer */
.archive-page { padding-top:60px; }
.archive-intro h1 { font-size:clamp(43px,6vw,68px); }
.case-page { padding-top:34px; }
@media (max-width: 980px) {
  .hero-reference-grid { grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); gap:35px; }
  .hero-portrait { max-width:370px; }
  .selected-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .selected-grid .work-card:last-child:nth-child(odd) { grid-column:1/-1; }
  .footer-layout { grid-template-columns:1.3fr 1fr 1fr; }
  .footer-intro { grid-column:1/-1; max-width:460px; }
}
@media (max-width: 760px) {
  .desktop-nav { display:none; }
  .menu-toggle { display:inline-grid; }
  .nav-contact { display:none; }
  .hero-reference { padding:55px 0 50px; }
  .hero-reference-grid { grid-template-columns:1fr; gap:27px; }
  .hero-copy h1 { font-size:clamp(42px,9.8vw,62px); }
  .hero-portrait { width:min(100%,390px); max-width:none; justify-self:center; grid-row:2; }
  .hero-credentials { gap:16px 22px; }
  .intro-strip-inner { padding-top:13px; padding-bottom:13px; gap:9px 12px; }
  .what-grid { grid-template-columns:1fr; }
  .what-card { min-height:0; }
  .learning-grid { grid-template-columns:1fr; }
  .learning-feature { min-height:275px; }
  .about-detail-grid { grid-template-columns:1fr; gap:25px; }
  .footer-layout { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 22px; }
  .footer-intro { grid-column:1/-1; }
  .footer-bottom { grid-column:1/-1; }
}
@media (max-width: 620px) {
  .section { padding:60px 0; }
  .hero-reference { padding:45px 0 42px; }
  .hero-copy h1 { font-size:clamp(39px,11vw,54px); }
  .hero-summary { margin-top:17px; font-size:14px; }
  .hero-socials { gap:16px; font-size:11px; }
  .hero-portrait { width:min(100%,330px); border-radius:20px; }
  .hero-portrait figcaption { font-size:7px; }
  .hero-credentials { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:25px; }
  .intro-strip-inner { font-size:10px; }
  .intro-strip-inner > span { flex-basis:100%; }
  .intro-strip-inner i { display:none; }
  .section-heading { display:block; margin-bottom:23px; }
  .section-heading h2,.about-detail-grid h2 { font-size:31px; }
  .section-intro { margin-top:12px; font-size:12px; }
  .selected-grid { grid-template-columns:1fr; }
  .selected-grid .work-card:last-child:nth-child(odd) { grid-column:auto; }
  .work-card-content p { min-height:0; }
  .learning-feature { padding:22px; }
  .writing-item { grid-template-columns:1fr; gap:4px 12px; padding:17px 2px; }
  .writing-type { grid-column:1/-1; }
  .writing-title { font-size:14px; }
  .contact-panel { grid-template-columns:1fr; padding:24px; }
  .contact-actions { flex-direction:row; flex-wrap:wrap; }
  .contact-actions .button { flex:1 1 145px; }
  .footer-layout { grid-template-columns:1fr 1fr; }
  .footer-intro { grid-column:1/-1; }
  .footer-bottom { align-items:flex-start; }
  .portrait-fallback { padding:18px; }
  .portrait-fallback small { font-size:9px; }
}
@media (prefers-reduced-motion: reduce) {
  .what-card,.work-card,.button,.writing-item { transition:none !important; }
}

@media (max-width: 400px) { .container { width:calc(100% - 28px); } .hero-portrait figcaption { left:10px; right:10px; bottom:10px; font-size:7px; } }


/* Journey cards: education and experience open dedicated detail pages. */
.journey-section { background:var(--surface-soft); }
.journey-block + .journey-block { margin-top:44px; }
.journey-block-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid var(--line); color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.journey-block-heading span:last-child { font-weight:650; letter-spacing:.04em; text-transform:none; }
.journey-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.journey-grid-single { grid-template-columns:minmax(0,1fr); }
.journey-card { display:flex; flex-direction:column; min-height:245px; padding:23px; border:1px solid var(--line); border-radius:17px; background:var(--surface); transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.journey-card:hover { transform:translateY(-4px); border-color:color-mix(in srgb,var(--accent) 50%,var(--line)); box-shadow:var(--shadow); }
.journey-card-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:9px; color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.1em; }
.journey-card h3 { margin:25px 0 5px; font-size:21px; line-height:1.25; letter-spacing:-.045em; }
.journey-card > p { margin:0; color:var(--accent); font-size:12px; font-weight:750; }
.journey-card-summary { margin-top:17px; color:var(--muted); font-size:12px; line-height:1.85; }
.journey-card-link { align-self:flex-start; margin-top:auto; padding-top:19px; color:var(--accent); font-size:11px; font-weight:850; }

/* AI-assisted development statement. */
.ai-principles-section { background:var(--page); }
.ai-principles-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:65px; align-items:start; }
.ai-principles-grid h2 { margin:10px 0 0; font-size:clamp(30px,4.5vw,46px); line-height:1.13; letter-spacing:-.065em; }
.ai-principles-copy p { color:var(--muted); font-size:14px; line-height:1.95; }
.ai-principles-copy .ai-principles-punch { margin:0 0 14px; color:var(--text); font:800 clamp(19px,2.3vw,25px)/1.4 "Manrope",sans-serif; letter-spacing:-.04em; }

/* Project gallery and layered walkthrough video. */
.project-showcase { isolation:isolate; }
.showcase-stage { position:relative; overflow:hidden; aspect-ratio:16/9; background:#101712; }
.showcase-stage > [data-showcase-image] { width:100%; height:100%; object-fit:cover; transition:opacity .25s ease,transform .5s ease; }
.showcase-player { position:absolute; inset:0; background:#050706; }
.showcase-player iframe { display:block; width:100%; height:100%; border:0; }
.showcase-play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); display:inline-flex; align-items:center; gap:11px; min-height:55px; padding:0 20px 0 12px; border:1px solid rgba(255,255,255,.35); border-radius:99px; background:rgba(20,30,23,.86); color:#fff; font-size:12px; font-weight:800; cursor:pointer; box-shadow:0 10px 35px rgba(0,0,0,.25); backdrop-filter:blur(10px); transition:transform .2s ease,background .2s ease; }
.showcase-play:hover { transform:translate(-50%,-50%) scale(1.04); background:rgba(20,30,23,.97); }
.showcase-play-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:#f5f5ee; color:#223328; font-size:12px; padding-left:2px; }
.showcase-stop { position:absolute; z-index:2; top:14px; right:14px; padding:9px 13px; border:1px solid rgba(255,255,255,.25); border-radius:99px; background:rgba(18,25,20,.85); color:#fff; font-size:10px; font-weight:750; cursor:pointer; }
.project-showcase .media-label { z-index:3; }
.case-gallery-section { scroll-margin-top:100px; }
.case-media-grid { align-items:stretch; }
.case-media-card { transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease; }
.case-media-card:hover,.case-media-card.is-selected { border-color:color-mix(in srgb,var(--accent) 65%,var(--line)); box-shadow:var(--shadow); }
.gallery-select { position:relative; display:block; width:100%; padding:0; border:0; background:var(--surface-soft); cursor:pointer; text-align:left; }
.gallery-select img { width:100%; aspect-ratio:16/10; object-fit:cover; transition:transform .35s ease,filter .25s ease; }
.gallery-select:hover img,.gallery-select:focus-visible img { transform:scale(1.025); }
.gallery-select-overlay { position:absolute; right:10px; bottom:10px; padding:6px 10px; border:1px solid var(--line); border-radius:99px; background:var(--surface-raised); color:var(--text); font-size:9px; font-weight:800; opacity:0; transform:translateY(4px); transition:opacity .2s ease,transform .2s ease; }
.gallery-select:hover .gallery-select-overlay,.gallery-select:focus-visible .gallery-select-overlay,.case-media-card.is-selected .gallery-select-overlay { opacity:1; transform:none; }
.case-media-card.is-selected .gallery-select-overlay { background:var(--accent); color:var(--accent-contrast); border-color:var(--accent); }
.case-media-card figcaption { min-height:58px; }

/* Education / experience detail page layout. */
.detail-page { padding:38px 0 90px; }
.detail-hero { max-width:900px; padding:55px 0 40px; }
.detail-hero h1 { margin:13px 0 15px; font-size:clamp(40px,6.7vw,72px); line-height:1.05; letter-spacing:-.075em; }
.detail-summary { max-width:760px; margin:0; color:var(--muted); font-size:17px; line-height:1.85; }
.detail-meta { display:flex; flex-wrap:wrap; gap:9px; margin-top:24px; }
.detail-meta span { display:inline-flex; padding:8px 12px; border:1px solid var(--line); border-radius:99px; background:var(--surface); color:var(--muted); font-size:10px; font-weight:750; }
.detail-content-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:65px; align-items:start; padding-top:14px; }
.detail-main { min-width:0; }
.detail-section { padding:38px 0; border-top:1px solid var(--line); }
.detail-section h2 { margin:10px 0 13px; font-size:clamp(25px,3.4vw,35px); letter-spacing:-.055em; }
.detail-section > p:not(.section-kicker) { max-width:760px; color:var(--muted); font-size:14px; line-height:1.95; }
.detail-topic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:22px; }
.detail-topic-grid > div { display:flex; flex-direction:column; gap:6px; min-height:100px; padding:16px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.detail-topic-grid strong { font-size:12px; }
.detail-topic-grid span { color:var(--muted); font-size:11px; line-height:1.7; }
.detail-aside { position:sticky; top:105px; }
.detail-aside-card { padding:21px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.detail-facts { margin:14px 0 0; }
.detail-facts div { padding:12px 0; border-top:1px solid var(--line); }
.detail-facts dt { margin-bottom:4px; color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.detail-facts dd { margin:0; font-size:12px; font-weight:750; line-height:1.65; }
.detail-side-link { display:block; margin-top:16px; padding-top:15px; border-top:1px solid var(--line); color:var(--accent); font-size:11px; font-weight:800; }
.detail-caveat { padding:13px 15px; border-left:3px solid var(--gold); background:var(--surface); font-size:12px !important; }
.detail-end { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; padding-top:28px; border-top:1px solid var(--line); }
.certificate-panel { margin-top:20px; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.certificate-empty { display:flex; gap:15px; align-items:flex-start; padding:23px; }
.certificate-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:12px; background:var(--accent-soft); color:var(--accent); font-size:21px; }
.certificate-empty strong { font-size:13px; }
.certificate-empty p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.8; }
.certificate-empty code { overflow-wrap:anywhere; color:var(--accent); font-size:10px; }
.certificate-frame { display:block; width:100%; min-height:560px; border:0; background:#fff; }
.certificate-actions { display:flex; gap:10px; padding:14px; border-top:1px solid var(--line); }

/* Subtle entrance motion: content is never hidden unless the observer is active. */
.motion-ready [data-reveal] { opacity:0; transform:translateY(18px); transition:opacity .65s ease var(--reveal-delay,0ms),transform .65s cubic-bezier(.2,.7,.2,1) var(--reveal-delay,0ms); }
.motion-ready [data-reveal].is-visible { opacity:1; transform:translateY(0); }
.hero-copy h1 { animation:rise-in .75s ease both; }
.hero-summary { animation:rise-in .75s .09s ease both; }
.hero-portrait { animation:portrait-in .9s .12s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise-in { from { opacity:0; transform:translateY(15px); } to { opacity:1; transform:translateY(0); } }
@keyframes portrait-in { from { opacity:0; transform:translateY(22px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }

@media (max-width: 980px) {
  .detail-content-grid { grid-template-columns:minmax(0,1fr) 245px; gap:35px; }
  .ai-principles-grid { gap:35px; }
}
@media (max-width: 760px) {
  .journey-grid { grid-template-columns:1fr; }
  .ai-principles-grid { grid-template-columns:1fr; gap:20px; }
  .detail-content-grid { grid-template-columns:1fr; gap:25px; }
  .detail-aside { position:static; grid-row:1; }
  .detail-hero { padding:37px 0 27px; }
  .detail-summary { font-size:14px; }
  .detail-topic-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 560px) {
  .journey-card { min-height:220px; padding:19px; }
  .journey-block-heading { align-items:flex-start; flex-direction:column; gap:3px; }
  .showcase-play { min-height:47px; gap:8px; padding:0 14px 0 9px; font-size:10px; }
  .showcase-play-icon { width:28px; height:28px; }
  .showcase-stop { top:8px; right:8px; font-size:9px; }
  .case-media-grid { grid-template-columns:1fr; }
  .gallery-select-overlay { opacity:1; transform:none; }
  .detail-topic-grid { grid-template-columns:1fr; }
  .detail-end .button { flex:1 1 145px; }
  .certificate-frame { min-height:420px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .motion-ready [data-reveal],.hero-copy h1,.hero-summary,.hero-portrait { opacity:1 !important; transform:none !important; animation:none !important; transition:none !important; }
  .journey-card,.gallery-select img,.showcase-play { transition:none !important; }
}


/* Certificate library: orientation-safe thumbnails and full-size original viewer. */
.certificate-page { padding:60px 0 100px; }
.certificate-intro { max-width:840px; padding:10px 0 35px; }
.certificate-intro h1 { margin:14px 0 16px; font-size:clamp(44px,7vw,76px); line-height:1.04; letter-spacing:-.075em; }
.certificate-intro > p:not(.section-kicker) { max-width:740px; margin:0; color:var(--muted); font-size:15px; line-height:1.9; }
.certificate-intro-note { display:flex; align-items:center; gap:12px; max-width:700px; margin-top:24px; padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--muted); font-size:11px; line-height:1.75; }
.certificate-intro-mark { flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:var(--accent-soft); color:var(--accent); font-size:17px; }
.certificate-library { border-top:1px solid var(--line); padding-top:22px; }
.certificate-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin:7px 0 24px; }
.certificate-search { width:min(100%,340px); }
.certificate-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; align-items:stretch; }
.certificate-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:17px; background:var(--surface); box-shadow:var(--shadow); transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.certificate-card:hover { transform:translateY(-4px); border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); box-shadow:0 18px 40px rgba(23,35,27,.09); }
.certificate-card-button { display:flex; width:100%; height:100%; flex-direction:column; padding:0; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.certificate-card-preview { position:relative; display:grid; place-items:center; width:100%; aspect-ratio:1.38; overflow:hidden; padding:15px; background:var(--surface-soft); border-bottom:1px solid var(--line); }
.certificate-card-preview img { display:block; width:100%; height:100%; object-fit:contain; object-position:center; }
.certificate-card-preview[data-orientation="portrait"] img { width:auto; max-width:100%; }
.certificate-card-preview[data-orientation="landscape"] img { height:auto; max-height:100%; }
.certificate-orientation { position:absolute; right:10px; bottom:10px; padding:5px 8px; border:1px solid var(--line); border-radius:99px; background:var(--surface-raised); color:var(--muted); font-size:8px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.certificate-card-copy { display:flex; flex:1; flex-direction:column; align-items:flex-start; padding:17px 17px 18px; }
.certificate-card-meta { display:flex; justify-content:space-between; width:100%; gap:10px; color:var(--muted); font-size:8px; font-weight:850; letter-spacing:.09em; text-transform:uppercase; }
.certificate-card-meta span:last-child { text-align:right; }
.certificate-card-title { display:block; margin-top:14px; font:800 17px/1.35 "Manrope",sans-serif; letter-spacing:-.04em; }
.certificate-card-issuer { display:block; margin-top:6px; color:var(--accent); font-size:11px; font-weight:750; }
.certificate-card-description { display:-webkit-box; overflow:hidden; margin-top:11px; color:var(--muted); font-size:11px; line-height:1.75; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.certificate-card-action { display:inline-flex; align-items:center; gap:7px; margin-top:auto; padding-top:18px; color:var(--accent); font-size:10px; font-weight:850; }
.certificate-card-button:hover .certificate-card-action { text-decoration:underline; text-underline-offset:4px; }
.certificate-card[hidden] { display:none !important; }
.certificate-preview-section { background:var(--surface); }
.certificate-spotlight { display:grid; grid-template-columns:minmax(240px,.78fr) minmax(0,1.22fr); gap:38px; align-items:center; padding:26px; border:1px solid var(--line); border-radius:21px; background:var(--surface-raised); box-shadow:var(--shadow); }
.certificate-spotlight-preview { position:relative; width:min(100%,370px); justify-self:center; overflow:hidden; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface-soft); }
.certificate-spotlight-preview img { width:100%; max-height:410px; object-fit:contain; }
.certificate-spotlight-stamp { position:absolute; left:21px; bottom:21px; padding:7px 10px; border-radius:99px; background:var(--surface-raised); color:var(--accent); font-size:8px; font-weight:850; letter-spacing:.09em; }
.certificate-spotlight-copy h3 { margin:13px 0 5px; font:800 clamp(23px,3vw,34px)/1.2 "Manrope",sans-serif; letter-spacing:-.055em; }
.certificate-spotlight-copy > p:not(.section-kicker) { max-width:620px; color:var(--muted); font-size:13px; line-height:1.9; }
.certificate-spotlight-issuer { margin-bottom:13px; color:var(--accent) !important; font-weight:750; }
.certificate-spotlight-copy .button { margin-top:7px; }
.certificate-dialog { width:min(1080px,calc(100vw - 36px)); max-width:none; max-height:min(94dvh,1100px); padding:0; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 28px 90px rgba(0,0,0,.35); }
.certificate-dialog::backdrop { background:rgba(8,13,10,.72); backdrop-filter:blur(5px); }
.certificate-dialog-shell { display:flex; max-height:min(94dvh,1100px); flex-direction:column; overflow:hidden; }
.certificate-dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:21px 24px 14px; }
.certificate-dialog-heading { min-width:0; }
.certificate-dialog-heading h2 { margin:7px 0 3px; font:800 clamp(19px,3vw,27px)/1.25 "Manrope",sans-serif; letter-spacing:-.045em; }
.certificate-dialog-issuer { margin:0; color:var(--accent); font-size:11px; font-weight:750; }
.certificate-dialog-close { flex:0 0 42px; font-size:25px; }
.certificate-dialog-meta { display:flex; flex-wrap:wrap; gap:8px; padding:0 24px 11px; }
.certificate-dialog-meta span { padding:6px 9px; border:1px solid var(--line); border-radius:99px; color:var(--muted); font-size:9px; font-weight:800; }
.certificate-dialog-description { margin:0; padding:0 24px 15px; color:var(--muted); font-size:11px; line-height:1.7; }
.certificate-viewer-content { display:grid; place-items:center; min-height:240px; max-height:calc(94dvh - 235px); overflow:auto; padding:14px; border-block:1px solid var(--line); background:var(--surface-soft); }
.certificate-original-pdf { display:block; width:min(100%,900px); height:min(69dvh,850px); border:0; background:#fff; }
.certificate-original-image { display:block; width:auto; height:auto; max-width:100%; max-height:min(69dvh,850px); object-fit:contain; object-position:center; background:#fff; box-shadow:0 8px 28px rgba(0,0,0,.12); }
.certificate-dialog-actions { display:flex; justify-content:flex-end; gap:9px; padding:14px 20px 18px; background:var(--surface); }
.certificate-dialog-actions .button { min-height:42px; font-size:11px; }
@media (max-width: 980px) {
  .certificate-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .certificate-spotlight { gap:25px; }
}
@media (max-width: 760px) {
  .certificate-page { padding-top:40px; }
  .certificate-spotlight { grid-template-columns:1fr; gap:22px; padding:19px; }
  .certificate-spotlight-preview { width:min(100%,330px); }
}
@media (max-width: 560px) {
  .certificate-grid { grid-template-columns:1fr; gap:13px; }
  .certificate-card { display:block; }
  .certificate-card-button { display:grid; grid-template-columns:minmax(112px,.72fr) minmax(0,1.28fr); align-items:stretch; }
  .certificate-card-preview { height:100%; min-height:190px; aspect-ratio:auto; padding:8px; border-right:1px solid var(--line); border-bottom:0; }
  .certificate-card-copy { padding:13px 12px; }
  .certificate-card-meta { flex-direction:column; gap:4px; font-size:7px; }
  .certificate-card-meta span:last-child { text-align:left; }
  .certificate-card-title { margin-top:9px; font-size:14px; }
  .certificate-card-description { margin-top:7px; font-size:10px; -webkit-line-clamp:3; }
  .certificate-card-action { padding-top:11px; font-size:9px; }
  .certificate-toolbar { align-items:stretch; }
  .certificate-search { width:100%; }
  .certificate-dialog { width:calc(100vw - 14px); max-height:96dvh; border-radius:15px; }
  .certificate-dialog-shell { max-height:96dvh; }
  .certificate-dialog-header { padding:15px 14px 11px; gap:10px; }
  .certificate-dialog-meta { padding-inline:14px; }
  .certificate-dialog-description { padding-inline:14px; }
  .certificate-viewer-content { max-height:calc(96dvh - 225px); padding:8px; }
  .certificate-original-pdf { height:68dvh; }
  .certificate-original-image { max-height:68dvh; }
  .certificate-dialog-actions { padding:11px; }
  .certificate-dialog-actions .button { flex:1 1 0; padding-inline:10px; }
}
@media (prefers-reduced-motion: reduce) {
  .certificate-card { transition:none !important; }
  .certificate-card:hover { transform:none; }
}


/* v4: recruiter-first skills, GitHub proof, always-visible résumé and contact form */
.nav-resume { display:inline-flex !important; align-items:center; justify-content:center; min-width:82px; border-color:var(--accent); background:var(--accent-soft); color:var(--text); }
.nav-resume:hover { border-color:var(--accent); background:var(--surface-tint); }
.mobile-nav [data-mobile-resume] { color:var(--accent); font-weight:800; }
.skills-section { background:var(--surface-soft); }
.skills-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.skill-card { min-width:0; padding:25px; border:1px solid var(--line); border-radius:18px; background:var(--surface); transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.skill-card:hover { transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow); }
.skill-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.skill-number { color:var(--accent); font:800 12px/1 "Manrope",sans-serif; }
.skill-level,.repo-kind { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.12em; }
.skill-card h3 { margin:17px 0 7px; font-size:21px; letter-spacing:-.045em; }
.skill-card > p { min-height:49px; margin:0; color:var(--muted); font-size:12px; line-height:1.8; }
.skill-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:17px; }
.skill-tags span { display:inline-flex; align-items:center; padding:6px 9px; border:1px solid var(--line); border-radius:999px; background:var(--surface-raised); color:var(--muted); font-size:10px; font-weight:700; }
.skill-evidence { display:inline-flex; align-items:center; gap:7px; margin-top:19px; color:var(--accent); font-size:11px; font-weight:800; }
.skill-evidence:hover { text-decoration:underline; text-underline-offset:4px; }
.skills-learning-row { display:grid; grid-template-columns:minmax(200px,.7fr) minmax(0,1.3fr) auto; align-items:center; gap:18px; margin-top:17px; padding:21px 24px; border:1px solid var(--line); border-radius:17px; background:var(--surface-tint); }
.skills-learning-row h3 { margin:7px 0 0; font-size:17px; letter-spacing:-.035em; }
.skills-learning-row .skill-tags { margin-top:0; }
.skills-learning-row .skill-evidence { white-space:nowrap; margin-top:0; }
.github-section { background:var(--page); }
.github-stats { display:flex; flex-wrap:wrap; align-items:center; gap:13px; margin:-5px 0 22px; padding:15px 17px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.github-stats > div { display:flex; flex-direction:column; min-width:115px; gap:1px; }
.github-stats strong { font:800 20px/1.2 "Manrope",sans-serif; color:var(--accent); }
.github-stats span { color:var(--muted); font-size:9px; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.github-stats .button { margin-left:auto; }
.github-featured-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.github-repo-card { display:flex; flex-direction:column; min-width:0; min-height:270px; padding:20px; border:1px solid var(--line); border-radius:17px; background:var(--surface); transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.github-repo-card:hover { transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow); }
.github-repo-top { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:8px; font-weight:850; letter-spacing:.1em; }
.github-repo-card h3 { margin:18px 0 7px; font-size:20px; line-height:1.2; letter-spacing:-.04em; }
.github-repo-card h3 a:hover { color:var(--accent); }
.github-repo-card > p { min-height:68px; margin:0; color:var(--muted); font-size:12px; line-height:1.8; }
.github-repo-card .skill-tags { margin-top:13px; }
.github-repo-meta { display:flex; flex-wrap:wrap; gap:8px 13px; margin-top:auto; padding-top:16px; color:var(--muted); font-size:9px; font-weight:750; }
.github-repo-actions { display:flex; flex-wrap:wrap; gap:14px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.github-repo-actions a { color:var(--accent); font-size:10px; font-weight:850; }
.github-repo-actions a:hover { text-decoration:underline; text-underline-offset:4px; }
.github-activity-panel { margin-top:20px; padding:24px; border:1px solid var(--line); border-radius:18px; background:var(--surface-soft); }
.github-activity-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:8px; }
.github-activity-heading h3 { margin:6px 0 0; font-size:20px; letter-spacing:-.04em; }
.github-activity-heading > span { color:var(--muted); font-size:10px; }
.github-activity-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 25px; margin:0; padding:0; list-style:none; }
.github-activity-item { display:flex; align-items:flex-start; gap:12px; padding:15px 0; border-top:1px solid var(--line); }
.github-activity-marker { width:8px; height:8px; flex:0 0 8px; margin-top:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.github-activity-item p { margin:0 0 4px; color:var(--text); font-size:11px; line-height:1.6; }
.github-activity-item span:not(.github-activity-marker) { color:var(--muted); font-size:9px; }
.github-activity-empty { padding:17px 0 3px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.contact-section { background:var(--surface-soft); }
.contact-layout { display:grid; grid-template-columns:minmax(260px,.78fr) minmax(0,1.22fr); align-items:stretch; gap:18px; }
.contact-panel { display:flex; flex-direction:column; justify-content:space-between; grid-template-columns:1fr; align-items:stretch; gap:22px; padding:29px; }
.contact-panel h3 { margin:12px 0 9px; font-size:29px; line-height:1.12; letter-spacing:-.06em; }
.contact-panel p:not(.section-kicker) { font-size:13px; }
.contact-panel .contact-actions { display:flex; flex-direction:column; align-items:stretch; }
.contact-panel .contact-email { grid-column:auto; overflow-wrap:anywhere; }
.contact-response-note { display:flex; align-items:flex-start; gap:10px; padding-top:15px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; line-height:1.65; }
.contact-response-note .availability-dot { flex:0 0 8px; margin-top:5px; }
.contact-form { min-width:0; padding:29px; border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:var(--shadow); }
.contact-form-heading h3 { margin:7px 0 5px; font-size:25px; letter-spacing:-.05em; }
.contact-form-heading > p:last-child { margin:0 0 20px; color:var(--muted); font-size:11px; }
.contact-fields-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.form-field { display:flex; flex-direction:column; gap:7px; min-width:0; color:var(--text); font-size:11px; font-weight:750; }
.form-field-full { grid-column:1/-1; }
.form-field input,.form-field select,.form-field textarea { width:100%; min-width:0; border:1px solid var(--line); border-radius:10px; padding:12px 13px; background:var(--page); color:var(--text); font:500 12px/1.55 "DM Sans",sans-serif; outline-offset:2px; }
.form-field input,.form-field select { min-height:46px; }
.form-field textarea { min-height:140px; resize:vertical; }
.form-field input::placeholder,.form-field textarea::placeholder { color:var(--muted); opacity:.8; }
.form-field small { color:var(--muted); font-size:9px; font-weight:500; }
.form-honeypot { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.contact-form-footer { display:flex; align-items:center; gap:15px; margin-top:17px; }
.contact-form-footer button:disabled { opacity:.65; cursor:wait; transform:none; }
.contact-form-status { margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
.contact-form-status[data-state="success"] { color:var(--accent); font-weight:750; }
.contact-form-status[data-state="error"] { color:#a04438; font-weight:750; }
.contact-fallback { margin:12px 0 0; color:var(--muted); font-size:10px; }
.contact-fallback a { color:var(--accent); font-weight:800; }
@media (max-width: 1080px) {
  .desktop-nav { gap:17px; font-size:12px; }
  .nav-wrap { gap:15px; }
  .brand-name { font-size:15px; }
}
@media (max-width: 900px) {
  .desktop-nav { display:none; }
  .menu-toggle { display:inline-grid; }
  .nav-contact { display:none; }
  .nav-wrap { gap:10px; }
}
@media (max-width: 1080px) {
  .github-featured-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .contact-layout { grid-template-columns:1fr; }
  .contact-panel { min-height:0; }
  .contact-panel .contact-actions { flex-direction:row; flex-wrap:wrap; }
  .contact-panel .contact-actions .button { flex:1 1 170px; }
}
@media (max-width: 760px) {
  .skills-learning-row { grid-template-columns:1fr; align-items:start; }
  .skills-learning-row .skill-evidence { white-space:normal; }
  .github-stats .button { margin-left:0; }
}
@media (max-width: 620px) {
  .skills-grid { grid-template-columns:1fr; }
  .skill-card > p { min-height:0; }
  .github-featured-grid { grid-template-columns:1fr; }
  .github-repo-card { min-height:0; }
  .github-repo-card > p { min-height:0; }
  .github-activity-list { grid-template-columns:1fr; }
  .github-activity-panel { padding:19px; }
  .github-activity-heading { align-items:flex-start; flex-direction:column; }
  .contact-panel,.contact-form { padding:21px; }
  .contact-fields-grid { grid-template-columns:1fr; }
  .form-field-full { grid-column:1; }
  .contact-form-footer { align-items:flex-start; flex-direction:column; }
  .contact-form-footer .button { width:100%; }
  .nav-actions > [data-resume] { display:inline-flex !important; }
  .nav-resume { min-width:38px; padding-inline:9px; }
  .nav-resume .resume-label { display:none; }
  .nav-resume::after { content:"CV"; }
}
@media (max-width: 380px) {
  .brand-name { font-size:13px; }
  .brand-mark { width:31px; height:31px; }
  .nav-actions { gap:5px; }
  .icon-button { width:40px; height:40px; }
  .nav-resume { min-width:35px; padding-inline:7px; }
}
@media (prefers-reduced-motion: reduce) {
  .skill-card,.github-repo-card { transition:none !important; }
  .skill-card:hover,.github-repo-card:hover { transform:none; }
}
