/* ================================================================
   Md Kamrul Islam — Portfolio  |  css/style.css
   Amber IC Design System
   ================================================================ */

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #070608;
  --surface:   #100F14;
  --surface-2: #17151D;
  --border:    #221F2E;
  --border-hi: #322D45;
  --amber:     #F5A623;
  --a-dim:     rgba(245,166,35,.10);
  --a-glow:    rgba(245,166,35,.22);
  --teal:      #0ECAB8;
  --t-dim:     rgba(14,202,184,.10);
  --text:      #EDE5D8;
  --muted:     #706660;
  --dim:       #2E2820;
  --fd: 'Bebas Neue', Impact, sans-serif;
  --fh: 'Barlow Semi Condensed', sans-serif;
  --fb: 'Barlow', sans-serif;
  --fm: 'Fira Code', 'Courier New', monospace;
  --ease: cubic-bezier(.4,0,.2,1);
  --nav-h: 72px;
  --pad: max(106px, calc((100% - 1280px) / 2));
}

/* ── Light mode — cool slate-blue palette ───────────────────────── */
[data-theme="light"] {
  --bg:        #EDF1F7;   /* cool blue-white canvas          */
  --surface:   #E1E8F2;   /* slightly deeper slate card      */
  --surface-2: #D5DFEE;
  --border:    #BACADA;
  --border-hi: #A4B8CE;
  --amber:     #B86600;   /* rich amber, legible on light bg */
  --a-dim:     rgba(184,102,0,.10);
  --a-glow:    rgba(184,102,0,.25);
  --teal:      #087A6E;   /* deeper teal for contrast        */
  --t-dim:     rgba(8,122,110,.12);
  --text:      #0C1B2E;   /* deep navy                       */
  --muted:     #516480;
  --dim:       #98B0C6;
}
[data-theme="light"] body::before  { opacity: .15; }
[data-theme="light"] body::after   { opacity: .018; }
[data-theme="light"] #nav.on       { background: rgba(237,241,247,.95); }
[data-theme="light"] .sni          { background: rgba(225,232,242,.85); }
[data-theme="light"] section.alt   { background: rgba(208,218,234,.50); }
[data-theme="light"] #hc           { opacity: .18; }
/* Terminal intentionally stays dark — it's a terminal */
[data-theme="light"] .terminal     { background: #141F30; border-color: #2A3D58; }
[data-theme="light"] .terminal-hdr { border-color: #2A3D58; }
/* White pill becomes transparent on light bg — logos show on their own */
[data-theme="light"] .logo-pill,
[data-theme="light"] .logo-pill-sm { background: transparent; padding: 0; border-radius: 0; }

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { background: var(--bg); color: var(--text); font-family: var(--fb); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--a-dim); color: var(--amber); }
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* Dot grid */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--dim) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .45;
}
/* Film grain */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9990; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Scroll progress ─────────────────────────────────────────────── */
#prog { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 6000; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--amber), var(--teal)); transition: transform .04s linear; }

/* ── Navigation ──────────────────────────────────────────────────── */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; height: var(--nav-h); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid transparent; transition: background .4s var(--ease), border-color .4s var(--ease); }
#nav.on { background: rgba(7,6,8,.96); backdrop-filter: blur(24px) saturate(1.3); border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { font-family: var(--fm); font-size: 14px; color: var(--amber); letter-spacing: .06em; }
.brand-mark .d { color: var(--muted); }
.brand-sep  { width: 1px; height: 28px; background: var(--border-hi); }
.brand-info { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--fh); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.brand-sub  { font-family: var(--fm); font-size: 9px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav-ul { display: flex; gap: 22px; list-style: none; flex: 1; justify-content: center; }
.nav-ul a { font-family: var(--fm); font-size: 10px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; transition: color .2s; position: relative; padding-bottom: 2px; }
.nav-ul a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--amber); transition: width .22s var(--ease); }
.nav-ul a:hover, .nav-ul a.on { color: var(--amber); }
.nav-ul a:hover::after, .nav-ul a.on::after { width: 100%; }
.nav-acts  { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-hi); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; }
.theme-btn:hover { border-color: var(--amber); color: var(--amber); }
.btn-dl { padding: 9px 20px; background: var(--amber); color: var(--bg); font-family: var(--fm); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: transform .2s, box-shadow .2s; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.btn-dl:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--a-glow); }

/* ── Side nav ────────────────────────────────────────────────────── */
.side-nav { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 2500; display: flex; flex-direction: column; gap: 6px; }
.sni { display: flex; align-items: center; justify-content: center; padding: 9px 14px; min-width: 52px; background: rgba(16,15,20,.8); border: 1px solid var(--border); border-radius: 20px; font-family: var(--fm); font-size: 10px; color: var(--muted); letter-spacing: .06em; backdrop-filter: blur(10px); transition: all .25s; white-space: nowrap; }
.sni:hover, .sni.on { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,.08); }

/* ── Logo pill (white-bg PNGs on dark background) ────────────────── */
.logo-pill    { display: inline-flex; align-items: center; background: rgba(255,255,255,.92); border-radius: 6px; padding: 3px 8px; line-height: 0; }
.logo-pill img { height: 26px; width: auto; object-fit: contain; display: block; }
.logo-pill-sm { display: inline-flex; align-items: center; background: rgba(255,255,255,.92); border-radius: 4px; padding: 2px 6px; line-height: 0; }
.logo-pill-sm img { height: 20px; width: auto; object-fit: contain; display: block; }

/* ── Hero ────────────────────────────────────────────────────────── */
#hero { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; padding: calc(var(--nav-h) + 30px) var(--pad) 56px; }
#hc  { position: absolute; inset: 0; z-index: 0; opacity: .4; }
.g1  { position: absolute; z-index: 0; pointer-events: none; top: -10%; right: -5%; width: 55%; height: 80%; background: radial-gradient(ellipse at 70% 30%, rgba(245,166,35,.07), transparent 60%); }
.g2  { position: absolute; z-index: 0; pointer-events: none; bottom: -5%; left: -5%; width: 50%; height: 60%; background: radial-gradient(ellipse at 30% 70%, rgba(14,202,184,.05), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; width: min(100%, 1360px); margin: 0 auto; position: relative; z-index: 1; }
.h-eye  { font-family: var(--fm); font-size: 10.5px; color: var(--amber); letter-spacing: .25em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; opacity: 0; animation: up .6s .15s var(--ease) forwards; }
.h-eye .ln { width: 24px; height: 1px; background: var(--amber); }
.h-name { font-family: var(--fd); font-size: clamp(60px, 10vw, 130px); line-height: .88; letter-spacing: .01em; margin-bottom: 20px; display: flex; flex-direction: column; opacity: 0; animation: up .75s .28s var(--ease) forwards; }
.h-name .l1, .h-name .l2 { color: var(--text); }
.h-name .l3 { color: var(--amber); }
.h-sub  { font-family: var(--fh); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 9px; opacity: 0; animation: up .6s .44s var(--ease) forwards; }
.h-id   { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; opacity: 0; animation: up .6s .54s var(--ease) forwards; }
.h-id span { color: var(--amber); font-weight: 700; letter-spacing: .06em; font-family: var(--fm); font-size: 12px; }
.h-desc { font-size: 14px; color: var(--muted); line-height: 1.85; max-width: 480px; margin-bottom: 34px; opacity: 0; animation: up .6s .64s var(--ease) forwards; }
.h-desc strong { color: var(--text); font-weight: 600; }
.h-btns { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: up .6s .76s var(--ease) forwards; }
.portrait-wrap  { opacity: 0; animation: fadein .9s .5s var(--ease) forwards; display: flex; flex-direction: column; align-items: center; gap: 72px; }
.portrait-stack { position: relative; width: 300px; height: 300px; }
.p-frame  { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--border-hi); z-index: 2; }
.p-frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(12%) contrast(1.05) brightness(.97); }
.p-ring { position: absolute; border-radius: 50%; border: 1px solid; animation: spin linear infinite; }
.p-r1 { inset: -26px; border-color: rgba(245,166,35,.28); animation-duration: 14s; }
.p-r2 { inset: -54px; border-color: rgba(14,202,184,.18); animation-duration: 22s; animation-direction: reverse; }
.p-r1::before, .p-r2::before { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; top: -3px; left: 50%; transform: translateX(-50%); }
.p-r1::before { background: var(--amber); }
.p-r2::before { background: var(--teal); }
.s-chip  { position: absolute; z-index: 3; padding: 8px 14px; background: rgba(16,15,20,.88); border: 1px solid var(--border-hi); backdrop-filter: blur(12px); font-family: var(--fm); font-size: 11px; color: var(--text); white-space: nowrap; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.chip-tr { top: 6%; right: -16%; }
.chip-bl { bottom: 6%; left: -16%; }
.terminal     { background: #08101E; border: 1px solid var(--border-hi); border-radius: 6px; overflow: hidden; width: 380px; max-width: 100%; }
.terminal-hdr { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-family: var(--fm); font-size: 9.5px; color: var(--teal); letter-spacing: .1em; }
.t-dot   { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #FF5F57; }
.t-dot.y { background: #FEBC2E; }
.t-dot.g { background: #28C840; }
.terminal-hdr .hdr-label { margin-left: 8px; }
.terminal-body { padding: 12px 16px; font-family: var(--fm); font-size: 13px; color: #9FCEAA; min-height: 44px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.t-prompt { color: #5BC0DE; }
.t-cursor { display: inline-block; width: 8px; height: 14px; background: #9FCEAA; animation: blink .7s step-end infinite; vertical-align: middle; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.clip  { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.btn-a { display: inline-block; padding: 12px 28px; background: var(--amber); color: var(--bg); font-family: var(--fh); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; border: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn-a:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--a-glow); }
.btn-b { display: inline-block; padding: 12px 28px; background: transparent; color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--border-hi); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.btn-b:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Waveform divider ────────────────────────────────────────────── */
.wdiv       { height: 44px; overflow: hidden; position: relative; z-index: 1; }
.wave-track { display: flex; width: 200%; animation: wscroll 14s linear infinite; }
.wave-track svg { flex: 1 0 50%; height: 44px; opacity: .24; }

/* ── Stats ───────────────────────────────────────────────────────── */
#stats { padding: 44px var(--pad); position: relative; z-index: 1; }
.stats-wrap { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; }
.sc { background: var(--surface); border: 1px solid var(--border); padding: 22px 20px; position: relative; overflow: hidden; transition: border-color .25s, transform .25s; }
.sc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg,transparent,var(--amber),transparent); opacity: 0; transition: opacity .25s; }
.sc:hover::before { opacity: 1; }
.sc:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.sc.t::before { background: linear-gradient(90deg,transparent,var(--teal),transparent); }
.sc-s2 { grid-column: span 2; }
.sn    { font-family: var(--fm); font-size: 38px; font-weight: 500; color: var(--amber); line-height: 1; margin-bottom: 7px; }
.sn.t  { color: var(--teal); }
.sl    { font-family: var(--fh); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; }
.sc-ico { position: absolute; bottom: 12px; right: 14px; width: 28px; height: 28px; opacity: .09; color: var(--amber); }
.sc.t .sc-ico { color: var(--teal); }

/* ── Shared section ──────────────────────────────────────────────── */
section      { padding: 80px var(--pad); position: relative; z-index: 1; }
section.alt  { background: rgba(16,15,20,.65); }
.eye         { font-family: var(--fm); font-size: 10.5px; color: var(--amber); letter-spacing: .26em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; margin-bottom: 11px; }
.eye::after  { content: ''; flex: 1; max-width: 72px; height: 1px; background: var(--border-hi); }
.sec-t       { font-family: var(--fh); font-size: clamp(26px,4vw,48px); font-weight: 800; line-height: 1.05; margin-bottom: 48px; }
.sec-t em    { font-style: normal; color: var(--amber); }
.rv          { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.on       { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ── About ───────────────────────────────────────────────────────── */
.about-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.about-lead   { font-family: var(--fh); font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 18px; }
.about-lead em { font-style: normal; color: var(--amber); }
.about-p      { font-size: 14px; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
.arc          { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--amber); padding: 22px 24px; margin-bottom: 12px; }
.arc-lbl      { font-family: var(--fm); font-size: 9.5px; color: var(--amber); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.arc-role     { font-family: var(--fh); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.arc-co       { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.mini-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc           { background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; transition: border-color .22s; }
.mc:hover     { border-color: var(--border-hi); }
.mc-lbl       { font-family: var(--fm); font-size: 9px; color: var(--teal); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.mc-val       { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }

/* ── Education ───────────────────────────────────────────────────── */
.edu          { background: var(--surface); border: 1px solid var(--border); padding: 34px 38px; position: relative; }
.edu::before  { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--amber), var(--teal)); }
.edu-header   { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 5px; }
.edu-deg      { font-family: var(--fh); font-size: 20px; font-weight: 700; color: var(--text); }
.edu-inst     { font-family: var(--fm); font-size: 12px; color: var(--amber); letter-spacing: .07em; margin-bottom: 20px; }
.chips        { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.chip         { padding: 5px 12px; background: var(--bg); border: 1px solid var(--border); font-family: var(--fm); font-size: 11px; color: var(--muted); }
.chip b       { color: var(--text); }
.thesis-box   { padding: 16px 20px; background: var(--bg); border: 1px solid var(--border); border-left: 2px solid var(--teal); font-size: 13px; color: var(--muted); line-height: 1.75; }
.thesis-lbl   { font-family: var(--fm); font-size: 9.5px; color: var(--teal); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 7px; }
.thesis-box a { color: var(--teal); transition: color .2s; }
.thesis-box a:hover { color: var(--amber); }

/* ── Research ────────────────────────────────────────────────────── */
.research-layout  { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: start; }
.research-intro-p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.int-col   { display: flex; flex-direction: column; gap: 8px; }
.int       { padding: 9px 18px 9px 28px; background: var(--surface); border: 1px solid var(--border); font-family: var(--fh); font-size: 13px; font-weight: 600; color: var(--muted); position: relative; transition: all .2s; }
.int::before { content: '▸'; position: absolute; left: 10px; color: var(--amber); font-size: 10px; top: 50%; transform: translateY(-50%); }
.int:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }
.pub-stack { display: flex; flex-direction: column; gap: 10px; }
.pub       { background: var(--surface); border: 1px solid var(--border); padding: 18px 22px; display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: start; transition: border-color .2s, transform .2s; }
.pub:hover { border-color: var(--border-hi); transform: translateX(4px); }
.pub-yr    { font-family: var(--fm); font-size: 26px; font-weight: 500; color: var(--dim); line-height: 1; padding-top: 2px; }
.pub-t     { font-family: var(--fh); font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; line-height: 1.3; }
.pub-a     { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pub-row   { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-v     { font-family: var(--fm); font-size: 10px; color: var(--teal); letter-spacing: .06em; }
.ieee-text  { font-family: var(--fm); font-size: 10px; font-weight: 700; color: var(--teal); background: var(--t-dim); border: 1px solid rgba(14,202,184,.3); padding: 2px 8px; letter-spacing: .06em; flex-shrink: 0; }
.pl        { padding: 3px 10px; font-family: var(--fm); font-size: 10px; color: var(--amber); border: 1px solid var(--amber); transition: all .2s; }
.pl:hover  { background: var(--amber); color: var(--bg); }

/* ── Projects ────────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.fbtn       { padding: 8px 18px; font-family: var(--fm); font-size: 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); cursor: pointer; letter-spacing: .1em; text-transform: uppercase; transition: all .2s; }
.fbtn.on, .fbtn:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }
.proj-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.proj       { background: var(--surface); border: 1px solid var(--border); padding: 24px; position: relative; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; }
.proj::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--a-dim), transparent 65%); opacity: 0; transition: opacity .25s; }
.proj:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: 0 16px 48px rgba(245,166,35,.07); }
.proj:hover::after { opacity: 1; }
.proj-hdr   { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.proj-date  { font-family: var(--fm); font-size: 9.5px; color: var(--muted); letter-spacing: .06em; }
.proj-badge { font-family: var(--fm); font-size: 9px; color: var(--teal); letter-spacing: .16em; text-transform: uppercase; }
.proj-name  { font-family: var(--fh); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 9px; line-height: 1.3; }
.proj-desc  { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 10px; }
.proj-outs  { list-style: none; margin-bottom: 13px; }
.proj-outs li { font-size: 12px; color: var(--muted); padding-left: 14px; position: relative; margin-bottom: 3px; }
.proj-outs li::before { content: '◆'; position: absolute; left: 0; color: var(--amber); font-size: 7px; top: 5px; }
.proj-tags  { display: flex; flex-wrap: wrap; gap: 5px; }
.ptag       { font-family: var(--fm); font-size: 9.5px; padding: 2px 8px; background: var(--bg); border: 1px solid var(--border); color: var(--dim); transition: all .18s; letter-spacing: .04em; }
.proj:hover .ptag { border-color: var(--border-hi); color: var(--muted); }

/* ── Experience timeline ─────────────────────────────────────────── */
.tl          { position: relative; padding-left: 40px; }
.tl::before  { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--amber), var(--teal) 60%, transparent); }
.tli         { position: relative; margin-bottom: 38px; }
.tli:last-child { margin-bottom: 0; }
.tl-dot      { position: absolute; left: -44px; top: 8px; width: 10px; height: 10px; background: var(--amber); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--amber); }
.tli.cur .tl-dot { animation: gpulse 2s ease-in-out infinite; }
.tl-card     { background: var(--surface); border: 1px solid var(--border); padding: 22px 26px; padding-right: 120px; transition: border-color .25s; position: relative; }
.tl-logo     { position: absolute; top: 16px; right: 18px; }
.tli.cur .tl-card { border-color: var(--border-hi); }
.tl-badge    { display: inline-block; padding: 3px 10px; background: var(--a-dim); border: 1px solid var(--amber); color: var(--amber); font-family: var(--fm); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 9px; }
.tl-role     { font-family: var(--fh); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.tl-co-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.tl-co       { font-family: var(--fm); font-size: 12px; color: var(--amber); }
.tl-period   { font-family: var(--fm); font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.tl-list     { list-style: none; }
.tl-list li  { font-size: 13.5px; color: var(--muted); padding-left: 18px; position: relative; margin-bottom: 5px; line-height: 1.65; }
.tl-list li::before { content: '◈'; position: absolute; left: 0; color: var(--amber); font-size: 9px; top: 5px; }

/* ── Skills ──────────────────────────────────────────────────────── */
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px,1fr)); gap: 14px; }
.sg      { background: var(--surface); border: 1px solid var(--border); padding: 20px 22px; transition: border-color .25s; }
.sg:hover { border-color: var(--border-hi); }
.sg-n    { font-family: var(--fm); font-size: 10px; color: var(--amber); letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.tags    { display: flex; flex-wrap: wrap; gap: 6px; }
.tag     { padding: 5px 11px; font-family: var(--fm); font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); transition: all .18s; }
.tag:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Certifications ──────────────────────────────────────────────── */
.cert-list { display: flex; flex-direction: column; gap: 11px; }
.cert      { background: var(--surface); border: 1px solid var(--border); padding: 16px 22px; display: flex; align-items: flex-start; gap: 16px; transition: all .22s; }
.cert:hover { border-color: var(--border-hi); transform: translateX(4px); }
.cert-ico  { width: 40px; height: 40px; background: var(--a-dim); border: 1px solid rgba(245,166,35,.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--amber); }
.cert-ico svg { width: 20px; height: 20px; }
.cert-t    { font-family: var(--fh); font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.cert-t a  { transition: color .2s; }
.cert-t a:hover { color: var(--amber); }
.cert-d    { font-size: 12px; color: var(--muted); line-height: 1.6; }
.cert-yr   { font-family: var(--fm); font-size: 10px; color: var(--amber); margin-left: 6px; }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.c-intro      { font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 26px; }
.c-list       { display: flex; flex-direction: column; gap: 9px; }
.ci           { display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--border); transition: all .22s; }
.ci:hover     { border-color: var(--amber); background: var(--a-dim); }
.ci-ico       { width: 40px; height: 40px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color .22s; color: var(--amber); }
.ci-ico svg   { width: 18px; height: 18px; }
.ci:hover .ci-ico { border-color: var(--amber); }
.ci-l         { font-family: var(--fm); font-size: 9.5px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 2px; }
.ci-v         { font-family: var(--fh); font-size: 14px; font-weight: 700; color: var(--text); }

/* ── Footer ──────────────────────────────────────────────────────── */
footer    { padding: 30px var(--pad); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.ft       { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.ft span  { color: var(--amber); }
.btt      { width: 38px; height: 38px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; transition: all .22s; }
.btt svg  { width: 16px; height: 16px; }
.btt:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes spin    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes up      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadein  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes gpulse  { 0%, 100% { box-shadow: 0 0 0 2px var(--amber); } 50% { box-shadow: 0 0 0 8px rgba(245,166,35,.12); } }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .side-nav { display: none; }
  :root { --pad: max(52px, calc((100% - 1280px) / 2)); }
}
@media (max-width: 1200px) {
  .nav-ul { gap: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { flex-direction: column; align-items: center; gap: 72px; margin-top: 32px; }
  .portrait-stack { width: 240px; height: 240px; }
  .chip-tr { right: -3%; } .chip-bl { left: -3%; }
  .stats-wrap { grid-template-columns: repeat(3,1fr); }
  .sc-s2 { grid-column: span 1; }
  .about-grid, .research-layout, .contact-wrap { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #nav { padding: 0 20px; }
  .brand-sep, .brand-info { display: none; }
  .nav-ul { display: none; }
  :root { --pad: 20px; }
  .stats-wrap { grid-template-columns: 1fr 1fr; }
  .h-name { font-size: clamp(54px,16vw,80px); }
  .edu { padding: 22px; }
  .btn-dl { font-size: 9px; padding: 8px 14px; }
}
