/* ============================================================
   Md Tariqul Islam — Portfolio (production)
   Dark-first · blue accent · Geist + JetBrains Mono
   Ported from the Claude Design system; theming on :root,
   responsive via media queries, real scroll-reveal states.
   ============================================================ */

:root {
  --pf-sans: 'Geist', system-ui, -apple-system, sans-serif;
  --pf-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* dark theme (default) */
  --pf-bg:        #0B0F14;
  --pf-bg-1:      #0E141B;
  --pf-bg-2:      #121A23;
  --pf-line:      rgba(255,255,255,0.07);
  --pf-line-2:    rgba(255,255,255,0.13);
  --pf-text:      #E8EDF2;
  --pf-text-2:    #98A4B2;
  --pf-text-3:    #5C6675;
  --pf-accent:    #4D9EFF;
  --pf-accent-2:  #8AC0FF;
  --pf-accent-soft: rgba(77,158,255,0.12);
  --pf-accent-line: rgba(77,158,255,0.32);
}

:root[data-theme="light"] {
  --pf-bg:        #F6F8FB;
  --pf-bg-1:      #FFFFFF;
  --pf-bg-2:      #EEF2F7;
  --pf-line:      rgba(11,15,20,0.10);
  --pf-line-2:    rgba(11,15,20,0.17);
  --pf-text:      #0C1118;
  --pf-text-2:    #51606E;
  --pf-text-3:    #8B97A4;
  --pf-accent:    #1F6FEB;
  --pf-accent-2:  #1857C4;
  --pf-accent-soft: rgba(31,111,235,0.09);
  --pf-accent-line: rgba(31,111,235,0.26);
}

* , *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--pf-sans);
  background: var(--pf-bg);
  color: var(--pf-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, p, ul, li, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--pf-text-3); }
.ac { color: var(--pf-accent); }

.pf-wrap { max-width: 1100px; margin: 0 auto; padding: 0 56px; }

.pf-eyebrow {
  font-family: var(--pf-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pf-text-2);
}

.pf-seclabel {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pf-mono);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pf-accent);
}
.pf-seclabel::before { content: ""; width: 22px; height: 1px; background: var(--pf-accent-line); }
.pf-seclabel .idx { color: var(--pf-text-3); }

.pf-h1 {
  font-size: 66px; font-weight: 600;
  line-height: 1.02; letter-spacing: -0.035em;
  color: var(--pf-text); text-wrap: balance;
  max-width: 880px;
}
.pf-h1 span { display: block; }
.pf-h2 { font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; color: var(--pf-text); }
.pf-lead { font-size: 19px; line-height: 1.6; color: var(--pf-text-2); max-width: 620px; }

/* ---------- nav ---------- */
.pf-nav {
  position: sticky; top: 0; z-index: 30;
  height: 66px; display: flex; align-items: center;
  border-bottom: 1px solid var(--pf-line);
  background: color-mix(in srgb, var(--pf-bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: background .2s, border-color .2s;
}
.pf-nav.scrolled {
  background: color-mix(in srgb, var(--pf-bg) 92%, transparent);
  border-bottom-color: var(--pf-line-2);
}
.pf-nav .pf-wrap { display: flex; align-items: center; width: 100%; }
.pf-logo {
  font-family: var(--pf-mono); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--pf-text);
  display: flex; align-items: center; gap: 9px;
}
.pf-logo .dot { color: var(--pf-accent); }
.pf-navlinks { display: flex; gap: 30px; margin-left: auto; align-items: center; }
.pf-navlinks a {
  font-size: 14.5px; font-weight: 450; color: var(--pf-text-2);
  transition: color .16s; position: relative; cursor: pointer;
}
.pf-navlinks a:hover { color: var(--pf-text); }
.pf-navlinks a.active { color: var(--pf-text); }
.pf-navlinks a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -23px;
  height: 2px; background: var(--pf-accent);
}
.pf-navcta { margin-left: 30px; }
.pf-mobnav-right { display: none; margin-left: auto; align-items: center; gap: 12px; }
.pf-burger { width: 40px; height: 40px; border: 1px solid var(--pf-line-2); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--pf-text); background: transparent; cursor: pointer; }

/* mobile menu panel */
.pf-mobile-menu {
  position: sticky; top: 66px; z-index: 25;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 22px 20px;
  background: var(--pf-bg-1);
  border-bottom: 1px solid var(--pf-line-2);
}
.pf-mobile-menu a { font-size: 16px; color: var(--pf-text-2); padding: 10px 0; border-bottom: 1px solid var(--pf-line); }
.pf-mobile-menu a:last-of-type { border-bottom: none; }
.pf-mobile-menu .pf-toggle { margin-top: 10px; }

/* ---------- buttons ---------- */
.pf-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--pf-sans); font-size: 14.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.pf-btn-primary { background: var(--pf-accent); color: #04101F; font-weight: 600; }
.pf-btn-primary:hover { background: var(--pf-accent-2); }
.pf-btn-ghost { background: transparent; color: var(--pf-text); border-color: var(--pf-line-2); }
.pf-btn-ghost:hover { border-color: var(--pf-accent-line); color: var(--pf-accent); background: var(--pf-accent-soft); }
.pf-btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 8px; }

/* ---------- status chip ---------- */
.pf-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--pf-mono); font-size: 12.5px; font-weight: 500;
  color: var(--pf-text-2); padding: 6px 13px 6px 11px;
  border: 1px solid var(--pf-line-2); border-radius: 999px; background: var(--pf-bg-1);
}
.pf-status .pulse { width: 7px; height: 7px; border-radius: 50%; background: #3DDC97; position: relative; }
.pf-status .pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(61,220,151,0.4); animation: pf-pulse 2.4s ease-out infinite; }
@keyframes pf-pulse { 0% { transform: scale(.7); opacity: .9; } 70%,100% { transform: scale(1.5); opacity: 0; } }

/* ---------- hero ---------- */
.pf-hero { position: relative; overflow: hidden; }
.pf-hero-contour { position: absolute; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }
.pf-hero-inner { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 92px; }
.pf-hero .pf-eyebrow { margin-bottom: 30px; }
.pf-hero .pf-lead { margin-top: 30px; }
.pf-cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 38px; }
.pf-hero-status { margin-top: 40px; }

/* ---------- stats strip ---------- */
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--pf-line); border-bottom: 1px solid var(--pf-line); }
.pf-stat { padding: 34px 30px; border-left: 1px solid var(--pf-line); }
.pf-stat:first-child { border-left: none; }
.pf-stat-num { font-family: var(--pf-mono); font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; color: var(--pf-text); display: flex; align-items: baseline; gap: 2px; }
.pf-stat-num .u { color: var(--pf-accent); }
.pf-stat-num.sm { font-size: 32px; }
.pf-stat-label { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--pf-text-2); max-width: 200px; }

/* ---------- sections ---------- */
.pf-section { padding: 84px 0; }
.pf-section-alt { background: var(--pf-bg-1); border-top: 1px solid var(--pf-line); border-bottom: 1px solid var(--pf-line); }
.pf-section-head { margin-bottom: 44px; }
.pf-section-head .pf-h2 { margin-top: 18px; }

/* ---------- timeline ---------- */
.pf-job { display: grid; grid-template-columns: 190px 1fr; gap: 40px; padding: 36px 0; border-top: 1px solid var(--pf-line); }
.pf-job:first-child { border-top: none; }
.pf-job-date { font-family: var(--pf-mono); font-size: 13px; color: var(--pf-text-2); }
.pf-job-place { font-family: var(--pf-mono); font-size: 12.5px; color: var(--pf-text-3); margin-top: 6px; }
.pf-job-co { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--pf-text); }
.pf-job-co .sub { color: var(--pf-text-3); font-weight: 400; font-size: 15px; }
.pf-job-role { font-size: 15px; color: var(--pf-accent); margin-top: 3px; font-weight: 500; }
.pf-job-tag { display: inline-block; font-family: var(--pf-mono); font-size: 11px; color: var(--pf-text-3); margin-top: 8px; border: 1px solid var(--pf-line-2); border-radius: 5px; padding: 2px 7px; }
.pf-job-bullets { margin-top: 16px; display: flex; flex-direction: column; gap: 13px; }
.pf-job-bullets li { font-size: 16px; line-height: 1.58; color: var(--pf-text-2); padding-left: 22px; position: relative; }
.pf-job-bullets li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 1px; background: var(--pf-accent); transform: rotate(45deg); }
.pf-job-bullets li b { color: var(--pf-text); font-weight: 600; }

/* ---------- skills ---------- */
.pf-skillgroup { padding: 26px 0; border-top: 1px solid var(--pf-line); display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: start; }
.pf-skillgroup:first-child { border-top: none; }
.pf-skillgroup-name { font-family: var(--pf-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pf-text-3); padding-top: 6px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.pf-chip { font-family: var(--pf-mono); font-size: 13.5px; font-weight: 450; color: var(--pf-text); background: var(--pf-bg-1); border: 1px solid var(--pf-line-2); border-radius: 8px; padding: 8px 13px; transition: border-color .16s, color .16s; }
.pf-chip:hover { border-color: var(--pf-accent-line); color: var(--pf-accent); }
.pf-section-alt .pf-chip { background: var(--pf-bg-2); }

/* ---------- achievements ---------- */
.pf-ach-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.pf-ach-card { background: var(--pf-bg-1); border: 1px solid var(--pf-line); border-radius: 14px; padding: 26px; position: relative; overflow: hidden; }
.pf-term-bar { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; }
.pf-term-bar .d { width: 11px; height: 11px; border-radius: 50%; }
.pf-term-bar .d.r { background: #ff5f57; } .pf-term-bar .d.y { background: #febc2e; } .pf-term-bar .d.g { background: #28c840; }
.pf-term-bar .t { font-family: var(--pf-mono); font-size: 12px; color: var(--pf-text-3); margin-left: 8px; }
.pf-term-line { font-family: var(--pf-mono); font-size: 14px; line-height: 1.85; color: var(--pf-text-2); }
.pf-term-line .pr { color: var(--pf-accent); } .pf-term-line .hl { color: var(--pf-text); font-weight: 500; } .pf-term-line .cm { color: var(--pf-text-3); }
.pf-ach-stat { display: flex; flex-direction: column; gap: 4px; }
.pf-ach-stat .n { font-family: var(--pf-mono); font-size: 30px; font-weight: 600; color: var(--pf-text); letter-spacing: -0.02em; }
.pf-ach-stat .n .u { color: var(--pf-accent); }
.pf-ach-stat .l { font-size: 13.5px; color: var(--pf-text-2); }
.pf-ach-stat .l .ac { font-weight: 600; }
.pf-ach-divider { height: 1px; background: var(--pf-line); margin: 18px 0; }

/* ---------- projects ---------- */
.pf-proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-proj { background: var(--pf-bg-1); border: 1px solid var(--pf-line); border-radius: 14px; padding: 24px; transition: border-color .18s, transform .18s; }
.pf-section-alt .pf-proj { background: var(--pf-bg-2); }
.pf-proj:hover { border-color: var(--pf-accent-line); transform: translateY(-3px); }
.pf-proj:hover .pf-proj-glyph { color: var(--pf-accent); }
.pf-proj-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pf-proj-kind { font-family: var(--pf-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pf-accent); }
.pf-proj-glyph { color: var(--pf-text-3); transition: color .18s, transform .18s; }
.pf-proj:hover .pf-proj-glyph { transform: translateX(3px); }
.pf-proj h3 { font-size: 18px; font-weight: 600; color: var(--pf-text); letter-spacing: -0.01em; line-height: 1.25; }
.pf-proj p { margin-top: 9px; font-size: 14.5px; line-height: 1.55; color: var(--pf-text-2); }
.pf-proj-tags { margin-top: 16px; display: flex; gap: 7px; flex-wrap: wrap; }
.pf-proj-tags span { font-family: var(--pf-mono); font-size: 11px; color: var(--pf-text-3); border: 1px solid var(--pf-line-2); border-radius: 5px; padding: 2px 7px; }

/* ---------- how I work ---------- */
.pf-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pf-how { border-top: 2px solid var(--pf-accent); padding-top: 20px; }
.pf-how .n { font-family: var(--pf-mono); font-size: 12px; color: var(--pf-text-3); }
.pf-how h3 { font-size: 18px; font-weight: 600; color: var(--pf-text); margin-top: 10px; letter-spacing: -0.01em; }
.pf-how p { font-size: 14.5px; line-height: 1.55; color: var(--pf-text-2); margin-top: 8px; }

/* ---------- contact ---------- */
.pf-contact-h { font-size: 52px; font-weight: 600; letter-spacing: -0.035em; color: var(--pf-text); }
.pf-contact-mail { font-family: var(--pf-mono); font-size: 22px; color: var(--pf-accent); display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; border-bottom: 1px solid var(--pf-accent-line); padding-bottom: 4px; }
.pf-contact-mail svg { transition: transform .16s; }
.pf-contact-mail:hover svg { transform: translateX(4px); }
.pf-social { display: flex; gap: 12px; margin-top: 30px; }
.pf-social a { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--pf-line-2); display: flex; align-items: center; justify-content: center; color: var(--pf-text-2); transition: border-color .16s, color .16s, background .16s; }
.pf-social a:hover { border-color: var(--pf-accent-line); color: var(--pf-accent); background: var(--pf-accent-soft); }
.pf-footer { border-top: 1px solid var(--pf-line); margin-top: 64px; padding: 26px 0; display: flex; align-items: center; justify-content: space-between; }
.pf-footer .m { font-family: var(--pf-mono); font-size: 12.5px; color: var(--pf-text-3); }

/* ---------- contact form ---------- */
.pf-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.pf-contact-sub { font-size: 16px; line-height: 1.6; color: var(--pf-text-2); margin-top: 16px; max-width: 360px; }
.pf-contact-left .pf-contact-mail { margin-top: 24px; }
.pf-form { display: flex; flex-direction: column; gap: 16px; background: var(--pf-bg-1); border: 1px solid var(--pf-line); border-radius: 16px; padding: 28px; }
.pf-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-field { display: flex; flex-direction: column; gap: 7px; }
.pf-field label { font-family: var(--pf-mono); font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pf-text-3); }
.pf-field label .opt { text-transform: none; letter-spacing: 0; color: var(--pf-text-3); opacity: .7; }
.pf-input, .pf-textarea {
  font-family: var(--pf-sans); font-size: 15px; color: var(--pf-text);
  background: var(--pf-bg-2); border: 1px solid var(--pf-line-2); border-radius: 9px;
  padding: 11px 13px; width: 100%; transition: border-color .16s, background .16s;
}
.pf-input::placeholder, .pf-textarea::placeholder { color: var(--pf-text-3); }
.pf-input:focus, .pf-textarea:focus { outline: none; border-color: var(--pf-accent); }
.pf-textarea { resize: vertical; min-height: 124px; line-height: 1.55; }
.pf-file { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.pf-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pf-file-btn {
  font-family: var(--pf-mono); font-size: 13px; color: var(--pf-text);
  border: 1px dashed var(--pf-line-2); border-radius: 8px; padding: 9px 14px;
  transition: border-color .16s, color .16s; white-space: nowrap;
}
.pf-file:hover .pf-file-btn { border-color: var(--pf-accent-line); color: var(--pf-accent); }
.pf-file-list { font-family: var(--pf-mono); font-size: 12.5px; color: var(--pf-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pf-form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.pf-form-status { font-size: 13.5px; line-height: 1.4; margin: 0; }
.pf-form-status.ok { color: #3DDC97; }
.pf-form-status.err { color: #ff6b6b; }
.pf-form.sending .pf-btn-primary { opacity: .6; pointer-events: none; }

/* ---------- theme toggle ---------- */
.pf-toggle { width: 52px; height: 28px; border-radius: 999px; border: 1px solid var(--pf-line-2); background: var(--pf-bg-1); position: relative; cursor: pointer; flex: none; }
.pf-toggle .knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--pf-text); transition: transform .2s, background .2s; display: flex; align-items: center; justify-content: center; color: var(--pf-bg); }
:root[data-theme="light"] .pf-toggle .knob { transform: translateX(24px); }
.pf-toggle .ic-sun { display: none; }
:root[data-theme="light"] .pf-toggle .ic-moon { display: none; }
:root[data-theme="light"] .pf-toggle .ic-sun { display: block; }

/* ---------- scroll reveal ----------
   Only hide when JS is active (.js on <html>); without JS everything
   is visible, so a script failure can never blank the page. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .pf-wrap { padding: 0 22px; }
  .pf-navlinks { display: none; }
  .pf-mobnav-right { display: flex; }
  .pf-hero-inner { padding-top: 64px; padding-bottom: 60px; }
  .pf-h1 { font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; }
  .pf-lead { font-size: 16.5px; }
  .pf-cta-row { flex-direction: column; align-items: stretch; }
  .pf-cta-row .pf-btn { justify-content: center; }
  .pf-stats { grid-template-columns: 1fr 1fr; }
  .pf-stat { padding: 24px 20px; border-left: none; border-top: 1px solid var(--pf-line); }
  .pf-stat:nth-child(even) { border-left: 1px solid var(--pf-line); }
  .pf-stat:nth-child(1), .pf-stat:nth-child(2) { border-top: none; }
  .pf-stat-num { font-size: 32px; }
  .pf-stat-num.sm { font-size: 24px; }
  .pf-section { padding: 56px 0; }
  .pf-section-head { margin-bottom: 32px; }
  .pf-h2 { font-size: 25px; }
  .pf-job { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .pf-skillgroup { grid-template-columns: 1fr; gap: 12px; }
  .pf-ach-grid { grid-template-columns: 1fr; }
  .pf-proj-grid { grid-template-columns: 1fr; }
  .pf-how-grid { grid-template-columns: 1fr; gap: 22px; }
  .pf-contact-h { font-size: 40px; }
  .pf-contact-mail { font-size: 15.5px; word-break: break-all; }
  .pf-contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .pf-form-row { grid-template-columns: 1fr; }
  .pf-form { padding: 22px; }
  .pf-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@media (min-width: 761px) { .pf-mobile-menu { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pf-status .pulse::after { animation: none; }
  * { transition-duration: .01ms !important; }
}
