/* ============================================================
   Portfolio template — easy-to-customize styles
   Edit the variables below to rebrand the whole site quickly.
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --text: #171717;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --border: #e6e8ec;

  --accent: #f5821f;        /* warm orange (primary buttons) */
  --accent-strong: #e26d0a;
  --accent-2: #1d4ed8;      /* blue (secondary highlights) */
  --signal: #e06e18;        /* ember — RATIONED: live/active signal only */
  --reg: #1a1c22;           /* plate ink for registration marks */

  --radius-sm: 10px;
  --radius: 16px;
  --radius-pill: 999px;

  --shadow: 0 8px 30px rgba(0, 0, 0, .06);
  --shadow-hover: 0 14px 40px rgba(0, 0, 0, .12);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Clash Display", "Plus Jakarta Sans", sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--bg); overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }

/* Global animated node-network background (whole site) */
.bg-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.site-header { position: sticky; }
main { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, .section-title { font-family: var(--font-display); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100; transition: width .08s linear;
}

/* Section eyebrow kicker */
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong);
  margin: 0 0 14px;
}
.eyebrow-center { display: block; text-align: center; }

/* Scroll-reveal (JS toggles .is-visible) */
.reveal-up { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal-up.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-up { opacity: 1; transform: none; transition: none; }
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; font-size: 18px; font-weight: 600;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.brand::after { content: "."; color: var(--accent); }
.nav-links { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; font-size: 16px; font-weight: 600; color: var(--text-soft);
  transition: color .15s ease; padding-bottom: 4px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .25s ease;
}
.nav-links a:hover { color: var(--accent-strong); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-current { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== Hero ===== */
.hero { position: relative; padding: 16px 0 40px; }
.hero-glow {
  position: absolute; z-index: 0; top: -10%; left: 8%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(245,130,31,.22), rgba(245,130,31,0) 62%);
  filter: blur(10px); pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Space Mono", ui-monospace, monospace; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2);
  background: rgba(29,78,216,.06); border: 1px solid rgba(29,78,216,.18);
  padding: 8px 14px; border-radius: var(--radius-pill); margin: 0 0 22px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.55); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70% { box-shadow: 0 0 0 9px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

.hero h1 {
  font-family: "Clash Display", var(--font); font-weight: 700;
  font-size: clamp(40px, 5.4vw, 78px); line-height: .98; letter-spacing: -.04em;
  margin: 0 0 20px;
}
.hero h1 .h1-line { display: block; }
.hero h1 .h1-amp {
  display: block; font-size: .82em; line-height: 1; color: var(--accent);
  margin: 2px 0;
}
.hero-lead { font-size: 18px; color: var(--text-soft); max-width: 540px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-arrow { display: inline-block; margin-left: 8px; transition: transform .2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }
.btn-outline { position: relative; overflow: hidden; z-index: 0; }
.btn-outline::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease; opacity: .08;
}
.btn-outline:hover::before { transform: scaleX(1); }

/* Floating photo card */
.hero-photo { position: relative; width: 100%; max-width: 400px; margin-left: auto; }
.hero-photo img {
  width: 100%; aspect-ratio: 1086 / 450; object-fit: cover; object-position: center top;
  border-radius: 28px; background: #fff;
  box-shadow: var(--shadow-hover); transform: rotate(-2deg);
  transition: transform .4s ease;
}
.hero-photo:hover img { transform: rotate(0deg) scale(1.01); }
.float-chip {
  position: absolute; font-family: "Space Mono", monospace; font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 14px; box-shadow: var(--shadow); white-space: nowrap;
}
.chip-1 { top: 8%; left: -22px; animation: bob 4.5s ease-in-out infinite; }
.chip-2 { top: 44%; right: -26px; animation: bob 5.5s ease-in-out infinite .6s; }
.chip-3 { bottom: 9%; left: -10px; animation: bob 5s ease-in-out infinite .3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Staggered reveal on load */
.reveal { opacity: 0; transform: translateY(22px); animation: revealUp .7s cubic-bezier(.22,.61,.36,1) forwards; animation-delay: var(--d, 0s); }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .status-dot, .float-chip, .signal-dot { animation: none; }
}

/* ===== Section titles ===== */
.section-title { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; text-align: center; }
.section-sub { color: var(--muted); text-align: center; max-width: 640px; margin: 0 auto 36px; }
.accent { color: var(--accent-strong); }

/* Section dot-grid texture */
.about, .portfolio { position: relative; }
.about::before, .portfolio::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(23,23,23,.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
}
.about .container, .portfolio .container { position: relative; z-index: 1; }

/* ===== About ===== */
.about { padding: 80px 0; background: rgba(247,248,250,.72); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: stretch; }
.about-copy h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; margin: 0 0 16px; letter-spacing: -.03em; line-height: 1.05; }
.about-copy p { color: var(--text-soft); font-size: 17px; }
.skill-list { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.skill-list li {
  position: relative; background: rgba(255,255,255,.7); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.skill-list li:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.skill-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; font-size: 20px; margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(245,130,31,.14), rgba(29,78,216,.12));
}
.skill-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.skill-desc { display: block; color: var(--muted); font-size: 14px; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 12px; }
.stat { position: relative; }
.stat-num { display: block; font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--accent-strong); line-height: 1; }
.stat-num::after { content: "+"; }
.stat-label { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 12px; padding-top: 10px; border-top: 3px solid var(--accent); display: inline-block; }
.about-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.about-art { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.about-art img {
  width: 100%; flex: 1 1 0; min-height: 0; object-fit: contain;
  border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); border: 1px solid var(--border);
}

/* ===== Portfolio ===== */
.portfolio { padding: 88px 0; }

/* --- Clinical "systems plate" header (Orchestral Field) --- */
.plate {
  position: relative; max-width: 760px; margin: 0 auto 44px;
  padding: 30px clamp(20px, 5vw, 56px) 34px; text-align: center;
}
/* registration crosshairs at the four corners */
.reg { position: absolute; width: 9px; height: 9px; border: 1px solid var(--reg); border-radius: 50%; opacity: .62; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--reg); }
.reg::before { left: 50%; top: -8px; width: 1px; height: 24px; transform: translateX(-.5px); }
.reg::after  { top: 50%; left: -8px; height: 1px; width: 24px; transform: translateY(-.5px); }
.reg-tl { left: -2px;  top: -2px; }
.reg-tr { right: -2px; top: -2px; }
.reg-bl { left: -2px;  bottom: -2px; }
.reg-br { right: -2px; bottom: -2px; }

.plate-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.plate-id { color: var(--text); font-weight: 700; }
.plate-meta { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
/* ember = the live SIGNAL, rationed to active state only */
.signal-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 0 rgba(224,110,24,.55); animation: signalPulse 2.2s ease-out infinite;
}
@keyframes signalPulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,110,24,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(224,110,24,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,110,24,0); }
}
.plate-rule { border: 0; height: 1px; margin: 16px 0 22px;
  background: linear-gradient(90deg, transparent, var(--border) 12%, var(--border) 88%, transparent); }

/* monumental-quiet serif divider word + whispered italic line */
.plate-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(54px, 11vw, 132px); line-height: .92; letter-spacing: -.02em;
  margin: 0; color: var(--text); text-align: center;
}
.plate-phrase {
  font-family: var(--font);
  font-size: clamp(16px, 2vw, 20px); line-height: 1.5; color: var(--muted);
  max-width: 560px; margin: 14px auto 0;
}
.plate-tick { display: block; width: 56px; height: 2px; margin: 22px auto 0; background: var(--signal); }

.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.filter {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .03em;
  padding: 8px 18px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: #fff; color: var(--text-soft); font-weight: 700; cursor: pointer;
  transition: all .18s ease;
}
.filter:hover { border-color: var(--accent); color: var(--accent-strong); }
.filter.is-active { background: var(--text); color: #fff; border-color: var(--text); }
.filter.is-active::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); margin-right: 8px; vertical-align: middle; transform: translateY(-1px); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #fff; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
  animation: cardIn .45s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-media { position: relative; margin: 0; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.card-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; cursor: zoom-in; }
.card:hover .card-thumb { transform: scale(1.06); }
/* "tap to zoom" hint on the thumbnail */
.card-media::after {
  content: "⤢ Tap to zoom"; position: absolute; bottom: 12px; right: 12px; z-index: 1;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff;
  background: rgba(23,23,23,.7); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: var(--radius-pill);
  opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.card:hover .card-media::after, .card:focus-within .card-media::after { opacity: 1; transform: translateY(0); }
.card-cat {
  position: absolute; top: 12px; left: 12px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff;
  background: rgba(23,23,23,.78); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: var(--radius-pill);
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.card-tags li { font-family: var(--font-mono); font-size: 11px; background: var(--bg-alt); border: 1px solid var(--border); padding: 3px 10px; border-radius: var(--radius-pill); color: var(--muted); }
.card h3 { font-size: 20px; margin: 4px 0 0; font-weight: 600; letter-spacing: -.01em; }
.card p { color: var(--text-soft); font-size: 14px; margin: 0; flex: 1; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.card .btn { padding: 8px 16px; font-size: 14px; }
.card .btn-primary { display: inline-flex; align-items: center; gap: 8px; }
.try-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: pulse 2s infinite; }
.card .btn-arrow { opacity: .5; transition: transform .2s ease, opacity .2s ease; }
.card:hover .btn-arrow { opacity: 1; transform: translateX(4px); }

/* ===== Contact ===== */
.contact { padding: 88px 0; background: rgba(247,248,250,.72); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-copy h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; margin: 0 0 14px; letter-spacing: -.03em; line-height: 1.05; }
.contact-copy > p { color: var(--text-soft); margin: 0 0 26px; }
.contact-form { display: grid; gap: 18px; margin-bottom: 28px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; padding: 22px 14px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { padding-top: 26px; resize: vertical; }
.field label {
  position: absolute; left: 14px; top: 15px; font-size: 15px; color: var(--muted);
  pointer-events: none; transition: all .16s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245,130,31,.14);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-strong);
}
.form-status { font-size: 14px; margin: 4px 0 0; min-height: 20px; color: var(--muted); }
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }
.btn:disabled, .btn[disabled] { opacity: .6; cursor: progress; transform: none; box-shadow: none; }

.contact-links-title { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 16px; }
.contact-links { display: grid; gap: 12px; }
.contact-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.contact-link:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cl-icon {
  width: 24px; height: 24px; padding: 8px; box-sizing: content-box; flex: 0 0 24px;
  background: var(--bg-alt); border-radius: 50%; transition: background .18s ease;
}
.contact-link:hover .cl-icon { background: #eef2ff; }
.cl-text { display: flex; flex-direction: column; min-width: 0; }
.cl-label { font-weight: 700; font-size: 13px; color: var(--accent-2); }
.cl-value { color: var(--text-soft); font-size: 14px; overflow-wrap: anywhere; word-break: break-word; }

/* ===== Footer ===== */
.site-footer { padding: 56px 0 28px; border-top: 1px solid var(--border); background: #0e1117; color: #c7cdd6; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-logo { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; }
.footer-logo::after { content: "."; color: var(--accent); }
.footer-tag { color: #8b94a3; font-size: 14px; max-width: 360px; margin: 14px 0 0; }
.footer-head { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #6b7480; margin-bottom: 16px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #c7cdd6; font-size: 15px; width: fit-content; transition: color .15s ease; }
.footer-nav a:hover { color: var(--accent); }
.footer-icons { display: flex; gap: 12px; }
.footer-icons a {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: 1px solid #2a2f3a; border-radius: 12px; color: #c7cdd6;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.footer-icons a svg { width: 20px; height: 20px; }
.footer-icons a:hover { color: #fff; border-color: var(--accent); background: var(--accent); transform: translateY(-3px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid #20242e;
}
.footer-bottom p { color: #6b7480; font-size: 13px; margin: 0; }
.footer-built { font-family: var(--font-mono); }

/* ===== Image lightbox ===== */
.lightbox { position: fixed; inset: 0; z-index: 210; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(10,12,18,.8); backdrop-filter: blur(6px); animation: ovIn .25s ease; }
.lightbox-figure {
  position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: lbPop .26s cubic-bezier(.2,.8,.25,1);
}
.lightbox-figure img {
  display: block; max-width: 80vw; max-height: 80vh; width: auto; height: auto; object-fit: contain;
  border-radius: 14px; background: #fff; border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.lightbox-figure figcaption {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: #fff; opacity: .9; text-align: center;
}
.lightbox-close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.lightbox-close:hover { background: #fff; color: #111; transform: rotate(90deg); }
@keyframes lbPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* ===== Project modal ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(8,10,15,.55); backdrop-filter: blur(6px); animation: ovIn .25s ease; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
  position: relative; z-index: 1; width: 80vw; max-width: 1040px; height: 82vh;
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 40px 100px rgba(0,0,0,.35); overflow: hidden;
  display: flex; flex-direction: column; animation: pmIn .32s cubic-bezier(.22,.61,.36,1);
}
@keyframes pmIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px;
  border: 1px solid var(--border); background: #fff; border-radius: 50%; font-size: 24px; line-height: 1;
  color: var(--text-soft); cursor: pointer; transition: all .15s ease;
}
.modal-close:hover { background: var(--text); color: #fff; border-color: var(--text); transform: rotate(90deg); }
.modal-content { overflow-y: auto; padding: 44px clamp(24px, 4vw, 56px) 48px; }

.pm-cat { display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 12px; }
.pm-content h2, #pm-content h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.04; margin: 0 0 16px; }
.pm-lead { font-size: 17px; color: var(--text-soft); max-width: 720px; margin: 0 0 22px; }
.pm-actions { margin-bottom: 30px; }
.pm-actions .btn-primary { display: inline-flex; align-items: center; gap: 9px; }

.pm-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.pm-block { min-width: 0; }
.pm-wide { grid-column: 1 / -1; }
.pm-block h3 { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.pm-block p { color: var(--text-soft); font-size: 15px; margin: 0; }
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pm-list li { position: relative; padding-left: 26px; color: var(--text-soft); font-size: 15px; }
.pm-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent-strong); font-weight: 800; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.pm-chips span { font-family: var(--font-mono); font-size: 13px; background: var(--bg-alt); border: 1px solid var(--border); padding: 6px 13px; border-radius: var(--radius-pill); color: var(--text); }
.pm-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.pm-steps li { counter-increment: s; position: relative; padding-left: 50px; min-height: 36px; }
.pm-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: linear-gradient(135deg, rgba(245,130,31,.16), rgba(29,78,216,.14));
  font-family: var(--font-mono); font-weight: 700; color: var(--accent-strong);
}
.pm-steps li b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.pm-steps li span { color: var(--text-soft); font-size: 14px; }

@media (max-width: 720px) {
  .modal { padding: 0; }
  .modal-panel { width: 100vw; height: 100vh; border-radius: 0; }
  .pm-sections { grid-template-columns: 1fr; }
}

/* ===== Large screens: scale the design up so it fills the viewport ===== */
@media (min-width: 1500px) {
  :root { --maxw: 1360px; }
  .hero { padding: 28px 0 64px; }
  .about, .portfolio, .contact { padding: 104px 0; }
  .hero-photo { max-width: 440px; }
}
/* QHD / 1440p */
@media (min-width: 1920px) {
  :root { --maxw: 1600px; }
  .hero h1 { font-size: clamp(78px, 5vw, 104px); }
  .hero-lead { font-size: 21px; max-width: 620px; }
  .hero-photo { max-width: 500px; }
  .section-title { font-size: clamp(40px, 3vw, 56px); }
  .about-copy h2, .contact-copy h2 { font-size: clamp(46px, 3.2vw, 60px); }
  .about-copy p, .contact-copy > p { font-size: 19px; }
  .plate { max-width: 920px; }
  .plate-title { font-size: clamp(132px, 9vw, 176px); }
  .plate-phrase { font-size: 22px; max-width: 640px; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .card h3 { font-size: 22px; }
  .card p { font-size: 15px; }
  .stat-num { font-size: 46px; }
}
/* 4K / UHD */
@media (min-width: 2560px) {
  :root { --maxw: 1960px; }
  .container { padding: 0 48px; }
  .btn { font-size: 20px; padding: 15px 32px; }
  .hero { padding: 40px 0 96px; }
  .about, .portfolio, .contact { padding: 140px 0; }
  .hero h1 { font-size: clamp(104px, 4.6vw, 148px); }
  .hero-lead { font-size: 25px; max-width: 760px; }
  .hero-photo { max-width: 640px; }
  .hero-tag { font-size: 16px; }
  .section-title { font-size: clamp(56px, 2.6vw, 76px); }
  .about-copy h2, .contact-copy h2 { font-size: clamp(60px, 3vw, 80px); }
  .about-copy p, .contact-copy > p { font-size: 22px; }
  .skill-title { font-size: 20px; }
  .skill-desc { font-size: 16px; }
  .plate { max-width: 1180px; }
  .plate-title { font-size: clamp(176px, 8vw, 232px); }
  .plate-phrase { font-size: 26px; max-width: 760px; }
  .filter { font-size: 16px; padding: 11px 24px; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 36px; }
  .card h3 { font-size: 26px; }
  .card p { font-size: 17px; }
  .card .btn { font-size: 16px; padding: 10px 20px; }
  .stat-num { font-size: 60px; }
  .stat-label { font-size: 14px; }
  .contact-link { padding: 18px 22px; }
  .cl-label { font-size: 15px; }
  .cl-value { font-size: 16px; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art, .about-art, .contact-art { order: -1; max-width: 460px; margin: 0 auto; }
  .about-art { height: auto; }
  .about-art img { flex: 0 0 auto; object-fit: contain; }
  .hero-photo { margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Hamburger nav for tablets & phones (before the links get cramped) */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--border); padding: 8px 24px;
    transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { padding: 10px 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .about, .portfolio, .contact { padding: 60px 0; }
  .hero { padding: 8px 0 36px; }
  .plate { padding: 24px 16px 28px; margin-bottom: 32px; }
  .stats { gap: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 600px) {
  .header-inner { height: 64px; }
  .skill-list { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .plate-top { flex-direction: column; gap: 8px; }
  .reg { display: none; }
  .stats { gap: 20px; }
  .stat-num { font-size: 32px; }
  .about-actions, .hero-actions, .card-actions { width: 100%; }
  .about-actions .btn, .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  /* keep the floating chips inside the viewport */
  .chip-1 { left: 4px; }
  .chip-2 { right: 4px; }
  .chip-3 { left: 8px; }
  .hero-glow { width: 360px; height: 360px; left: 0; }
  .lightbox { padding: 14px; }
  .lightbox-figure img { max-width: 92vw; max-height: 76vh; }
  .lightbox-close { top: -44px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Contact / Hire Me (CTA) */
  .contact-grid { gap: 32px; }
  .contact-link { gap: 12px; padding: 12px 14px; align-items: flex-start; }
  .cl-icon { flex: 0 0 22px; width: 22px; height: 22px; padding: 7px; }
  .cl-value { font-size: 13px; line-height: 1.35; }
  .contact-form { gap: 14px; }
  .contact-form .btn { width: 100%; }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .btn { padding: 11px 18px; font-size: 16px; }
  .hero-tag { font-size: 11px; padding: 7px 12px; flex-wrap: wrap; }
  .plate-title { font-size: clamp(40px, 14vw, 54px); }
  .card-actions { flex-direction: column; }
  .card-actions .btn { width: 100%; }
}
