/* ============================================================
   Muhardiansyah — Futuristic Portfolio Theme
   Custom design system: dark, glassy, math-inspired.
   ============================================================ */

:root {
  --bg-0: #04060e;
  --bg-1: #090d1a;
  --bg-2: #0e1426;
  --surface: rgba(148, 163, 216, 0.055);
  --surface-strong: rgba(148, 163, 216, 0.1);
  --border: rgba(148, 163, 216, 0.16);
  --border-bright: rgba(94, 234, 212, 0.45);
  --text: #e6eaf6;
  --text-dim: #9aa5c4;
  --text-faint: #64708f;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --magenta: #e879f9;
  --lime: #a3e635;
  --amber: #fbbf24;
  --grad-main: linear-gradient(100deg, #22d3ee, #8b5cf6 55%, #e879f9);
  --grad-rainbow: linear-gradient(90deg, #22d3ee, #a3e635, #fbbf24, #fb7185, #e879f9, #8b5cf6);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 16px;
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

/* Ambient background layers */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 216, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 216, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -2; pointer-events: none;
  width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(140px); opacity: 0.16;
}
.bg-glow.one { top: -25vw; right: -18vw; background: #8b5cf6; }
.bg-glow.two { bottom: -30vw; left: -20vw; background: #0ea5e9; }

#graph-canvas {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.9;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7dd3fc; }

img { max-width: 100%; }

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

.mono { font-family: var(--font-mono); }

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ Header ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 9, 18, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; max-width: 1240px;
}
.logo {
  display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-mono); font-size: 19px; font-weight: 700;
  color: var(--text); letter-spacing: 0.5px;
}
.logo:hover { color: var(--text); }
.logo .bracket { color: var(--cyan); font-weight: 800; }
.logo .dot { color: var(--magenta); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 13px; border-radius: 10px;
  color: var(--text-dim); font-size: 14.5px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-strong); }
.nav-links a.active { color: var(--cyan); }
.nav-links .nav-idx {
  font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
  margin-right: 4px; opacity: 0.8;
}
.nav-cta {
  margin-left: 10px;
  border: 1px solid var(--border-bright);
  color: var(--text) !important;
  border-radius: 12px !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: rgba(34, 211, 238, 0.12) !important; box-shadow: 0 0 24px rgba(34, 211, 238, 0.25); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 22px;
  width: 42px; height: 42px; cursor: pointer; line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(6, 9, 18, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 22px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 130px 0 70px;
  position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; color: var(--cyan);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 26px;
  background: var(--surface);
}
.hero-kicker .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 76px);
  line-height: 1.05; letter-spacing: -0.02em; font-weight: 700;
  margin-bottom: 18px;
}
.hero .typed-line {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.2vw, 23px);
  color: var(--text-dim); margin-bottom: 22px; min-height: 1.8em;
}
.hero .typed-line .prompt { color: var(--lime); }
.hero .typed-line #typed { color: var(--text); }
.typed-cursor {
  display: inline-block; width: 10px; margin-left: 3px;
  background: var(--cyan); color: transparent;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { color: var(--text-dim); max-width: 560px; margin-bottom: 34px; font-size: 17px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 38px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 13px; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad-main); color: #060814;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { color: #060814; transform: translateY(-2px); box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5); }
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); background: var(--surface-strong); transform: translateY(-2px); }

.social-row { display: flex; gap: 10px; }
.social-row a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 18px;
  transition: all 0.2s;
}
.social-row a:hover {
  color: var(--cyan); border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.2);
}

/* Terminal card */
.terminal {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(9, 13, 26, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(2, 4, 12, 0.7), 0 0 0 1px rgba(34, 211, 238, 0.05);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 13.5px;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.terminal:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 216, 0.05);
}
.terminal-bar .t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #fb7185; } .t-dot.y { background: #fbbf24; } .t-dot.g { background: #34d399; }
.terminal-bar .t-title { margin-left: auto; color: var(--text-faint); font-size: 12px; }
.terminal-body { padding: 20px 22px 26px; line-height: 1.85; }
.terminal-body .c-kw { color: #c084fc; }
.terminal-body .c-str { color: #86efac; }
.terminal-body .c-fn { color: #67e8f9; }
.terminal-body .c-cm { color: var(--text-faint); font-style: italic; }
.terminal-body .c-var { color: #fca5a5; }
.terminal-body .c-num { color: #fbbf24; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--text-faint); font-family: var(--font-mono); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.scroll-hint .line { width: 1px; height: 42px; background: linear-gradient(var(--cyan), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .terminal { transform: none; }
}

/* ============ Stats strip ============ */
.stats-strip { padding: 8px 0 30px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 22px 24px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--grad-rainbow); opacity: 0.6;
}
.stat-card .num {
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  color: var(--text);
}
.stat-card .num .unit { color: var(--cyan); font-size: 24px; }
.stat-card .lbl { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
@media (max-width: 800px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ Sections ============ */
.section { padding: 96px 0; position: relative; }

.section-head { margin-bottom: 52px; }
.section-head .eyebrow {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--cyan);
  letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
}
.section-head .eyebrow::after {
  content: ""; height: 1px; width: 70px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -0.02em;
}
.section-head p.sub { color: var(--text-dim); max-width: 640px; margin-top: 14px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.35fr; gap: 52px; align-items: start; }
.about-photo { position: relative; }
.about-photo img {
  border-radius: var(--radius); width: 100%; display: block;
  filter: saturate(0.95) contrast(1.05);
}
.about-photo::before {
  content: ""; position: absolute; inset: -14px auto auto -14px;
  width: 90px; height: 90px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan);
  border-radius: 14px 0 0 0; opacity: 0.85;
}
.about-photo::after {
  content: ""; position: absolute; inset: auto -14px -14px auto;
  width: 90px; height: 90px; border-right: 2px solid var(--violet); border-bottom: 2px solid var(--violet);
  border-radius: 0 0 14px 0; opacity: 0.85;
}
.about-photo .badge-eq {
  position: absolute; bottom: 18px; left: 18px;
  background: rgba(6, 9, 18, 0.85); border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  padding: 8px 14px; border-radius: 10px;
}
.about-photo .badge-eq .op { color: var(--magenta); }

.about-text p { color: var(--text-dim); margin-bottom: 16px; }
.about-text p strong { color: var(--text); font-weight: 600; }

.fact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px;
}
.fact {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 12px 16px; font-size: 14px;
}
.fact .k { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); letter-spacing: 0.5px; text-transform: uppercase; display: block; }
.fact .v { color: var(--text); }
.fact .v a { color: var(--text); border-bottom: 1px dashed var(--border-bright); }
.fact .v a:hover { color: var(--cyan); }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 380px; }
}
@media (max-width: 560px) { .fact-grid { grid-template-columns: 1fr; } }

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 26px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.skill-card:hover {
  transform: translateY(-5px); border-color: var(--border-bright);
  box-shadow: 0 18px 40px rgba(2, 6, 18, 0.6);
}
.skill-card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  margin-bottom: 16px; color: var(--bg-0);
}
.skill-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 6px; }
.skill-card .lvl {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
  margin-bottom: 14px; display: block;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--font-mono); font-size: 12px;
  padding: 5px 11px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text-dim);
  background: rgba(148, 163, 216, 0.04);
  transition: all 0.2s;
}
.skill-card:hover .chip { color: var(--text); }
@media (max-width: 980px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .skills-grid { grid-template-columns: 1fr; } }

/* ============ Experience timeline ============ */
.timeline { position: relative; max-width: 860px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet), var(--magenta), transparent);
  opacity: 0.5;
}
.tl-item { position: relative; padding: 0 0 42px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-0); border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
}
.tl-item .period {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px;
  display: inline-block; margin-bottom: 10px; background: var(--surface);
}
.tl-item h3 { font-family: var(--font-display); font-size: 20px; }
.tl-item .org { color: var(--text-dim); font-size: 14.5px; margin: 3px 0 12px; }
.tl-item .org a { color: var(--text-dim); border-bottom: 1px dashed var(--border-bright); }
.tl-item .org a:hover { color: var(--cyan); }
.tl-item ul { list-style: none; }
.tl-item ul li {
  color: var(--text-dim); font-size: 14.5px; padding-left: 20px; position: relative; margin-bottom: 5px;
}
.tl-item ul li::before { content: "▹"; position: absolute; left: 0; color: var(--violet); }
.tl-item .thesis {
  border-left: 2px solid var(--violet); background: var(--surface);
  border-radius: 0 10px 10px 0; padding: 10px 16px; margin-top: 10px;
  font-size: 14px; color: var(--text-dim);
}
.tl-item .thesis .mono { color: var(--magenta); font-size: 13px; }

/* ============ Services ============ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 28px 26px;
  transition: transform 0.25s, border-color 0.25s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: attr(data-idx);
  position: absolute; top: 14px; right: 20px;
  font-family: var(--font-mono); font-size: 38px; font-weight: 700;
  color: rgba(148, 163, 216, 0.1);
}
.service-card:hover { transform: translateY(-5px); border-color: var(--border-bright); }
.service-card .icon { font-size: 26px; margin-bottom: 14px; display: inline-block; }
.service-card h3 { font-family: var(--font-display); font-size: 17.5px; margin-bottom: 8px; }
.service-card p { color: var(--text-dim); font-size: 14px; }
@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }

/* ============ Portfolio ============ */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-btn {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--surface); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 20px; cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-bright); }
.filter-btn.active {
  background: var(--grad-main); color: #060814; border-color: transparent; font-weight: 700;
}

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-card:hover {
  transform: translateY(-6px); border-color: var(--border-bright);
  box-shadow: 0 22px 50px rgba(2, 6, 18, 0.65);
}
.project-card.hidden { display: none; }
.project-card.featured { grid-column: span 2; }
.project-thumb { position: relative; aspect-ratio: 16 / 9.4; overflow: hidden; }
.project-card.featured .project-thumb { aspect-ratio: auto; height: 100%; min-height: 240px; }
.project-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.5s ease; display: block;
}
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-thumb .cat-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.5px;
  background: rgba(4, 6, 14, 0.8); backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: var(--cyan);
  padding: 4px 11px; border-radius: 999px;
}
.project-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; }
.project-body p { color: var(--text-dim); font-size: 14px; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.project-links { display: flex; gap: 14px; }
.project-links a {
  font-family: var(--font-mono); font-size: 13px; display: inline-flex; align-items: center; gap: 6px;
}
.project-card.featured { flex-direction: row; }
.project-card.featured .project-thumb { flex: 1.1; }
.project-card.featured .project-body { flex: 1; }
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.featured { grid-column: span 2; flex-direction: column; }
  .project-card.featured .project-thumb { aspect-ratio: 16 / 9.4; height: auto; }
}
@media (max-width: 620px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; }
}

/* ============ Publications ============ */
.pub-intro-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px;
}
.pub-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 30px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px;
  margin-bottom: 18px;
  transition: border-color 0.25s, transform 0.25s;
  position: relative; overflow: hidden;
}
.pub-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-rainbow);
}
.pub-card:hover { border-color: var(--border-bright); transform: translateX(4px); }
.pub-eq {
  font-family: var(--font-mono); font-size: 15px;
  width: 92px; height: 92px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-1);
  display: grid; place-items: center; color: var(--magenta);
  text-align: center;
}
.pub-card h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 8px; }
.pub-card h3 a { color: var(--text); }
.pub-card h3 a:hover { color: var(--cyan); }
.pub-card .authors { color: var(--text-dim); font-size: 14px; margin-bottom: 4px; }
.pub-card .authors b { color: var(--text); font-weight: 600; }
.pub-card .venue { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-bottom: 14px; }
.pub-card .pub-links { display: flex; gap: 16px; }
.pub-card .pub-links a { font-family: var(--font-mono); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 800px) {
  .pub-intro-stats { grid-template-columns: repeat(2, 1fr); }
  .pub-card { grid-template-columns: 1fr; }
  .pub-eq { width: 100%; height: 60px; }
}

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; }
.contact-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 28px;
  display: flex; align-items: flex-start; gap: 18px;
  transition: transform 0.25s, border-color 0.25s;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--border-bright); }
.contact-card .icon {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 21px; color: var(--bg-0);
  background: var(--grad-main);
}
.contact-card h3 { font-family: var(--font-display); font-size: 16.5px; margin-bottom: 4px; }
.contact-card p, .contact-card a.val { color: var(--text-dim); font-size: 14.5px; word-break: break-word; }
.contact-card a.val:hover { color: var(--cyan); }
.contact-card .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-top: 6px; display: block; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-banner {
  margin-top: 46px; text-align: center;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 54px 30px; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 120% at 50% 0%, rgba(139, 92, 246, 0.14), transparent),
    var(--surface);
}
.contact-banner h3 {
  font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 34px); margin-bottom: 12px;
}
.contact-banner p { color: var(--text-dim); max-width: 520px; margin: 0 auto 28px; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 46px 0 34px; margin-top: 40px;
  background: rgba(6, 9, 18, 0.6);
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-inner .tagline { color: var(--text-dim); font-size: 14.5px; }
.footer-eq { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.footer-eq .hl { color: var(--cyan); }
.copyright { color: var(--text-faint); font-size: 13px; }
.copyright .built { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 12px; }

/* ============ Detail page ============ */
.detail-hero { padding: 140px 0 40px; }
.detail-hero .back-link {
  font-family: var(--font-mono); font-size: 13.5px; display: inline-flex; gap: 8px; align-items: center;
  margin-bottom: 26px; color: var(--text-dim);
}
.detail-hero .back-link:hover { color: var(--cyan); }
.detail-hero h1 {
  font-family: var(--font-display); font-size: clamp(30px, 5vw, 50px);
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.detail-grid { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 40px; align-items: start; }
.detail-main img.shot {
  border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 34px;
}
.detail-main h2 {
  font-family: var(--font-display); font-size: 24px; margin: 34px 0 14px;
  display: flex; align-items: center; gap: 12px;
}
.detail-main h2 .idx { font-family: var(--font-mono); font-size: 14px; color: var(--cyan); }
.detail-main p { color: var(--text-dim); margin-bottom: 14px; }
.detail-main ul { list-style: none; margin-bottom: 14px; }
.detail-main ul li { color: var(--text-dim); padding-left: 22px; position: relative; margin-bottom: 7px; }
.detail-main ul li::before { content: "▹"; position: absolute; left: 0; color: var(--violet); }
.detail-main ul li strong { color: var(--text); }
.detail-aside {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 28px; position: sticky; top: 100px;
}
.detail-aside h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 16px; }
.detail-aside .row { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.detail-aside .row:last-of-type { border-bottom: none; }
.detail-aside .row .k { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.detail-aside .btn { width: 100%; justify-content: center; margin-top: 12px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .detail-aside { position: static; } }

/* Scroll top */
#scroll-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--border);
  color: var(--text); font-size: 20px;
  opacity: 0; pointer-events: none; transition: all 0.3s;
  backdrop-filter: blur(8px);
}
#scroll-top.show { opacity: 1; pointer-events: auto; }
#scroll-top:hover { border-color: var(--border-bright); color: var(--cyan); transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
