:root {
  --pb-radius-sm: 8px;
  --pb-radius-md: 12px;
  --pb-radius-lg: 20px;
  --pb-radius-xl: 24px;
  --pb-radius-pill: 99px;
  --pb-font: 'Inter', system-ui, -apple-system, sans-serif;
  --pb-font-mono: 'JetBrains Mono', 'Fira Mono', monospace;
}

/* Dark mode — default for personal homepage */
body.pb-page {
  --pb-bg: #09090B;
  --pb-card: #18181B;
  --pb-card-elevated: #1C1C1F;
  --pb-border: #27272A;
  --pb-border-strong: #3F3F46;
  --pb-text: #FAFAFA;
  --pb-muted: #A1A1AA;
  --pb-faint: #52525B;
  --pb-primary: #2563EB;
  --pb-primary-hover: #1D4ED8;
  --pb-accent: #60A5FA;
  --pb-teal: #14B8A6;
  --pb-purple: #A855F7;
  --pb-error: #EF4444;
  --pb-shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --pb-shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --pb-shadow-lg: 0 8px 32px rgba(0,0,0,.6);
}

/* Light mode — user opt-in via JS toggle */
body.pb-page.pb-light {
  --pb-bg: #FFFFFF;
  --pb-card: #F4F4F5;
  --pb-card-elevated: #ECECEE;
  --pb-border: rgba(0,0,0,.08);
  --pb-border-strong: rgba(0,0,0,.15);
  --pb-text: #09090B;
  --pb-muted: #71717A;
  --pb-faint: #A1A1AA;
  --pb-shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --pb-shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --pb-shadow-lg: 0 8px 32px rgba(0,0,0,.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--pb-bg);
  color: var(--pb-text);
  font-family: var(--pb-font);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--pb-font);
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: var(--pb-font);
}

.pb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 32px;
  background: rgba(9,9,11,.88);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  transition: box-shadow .3s ease;
}

.pb-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #7a5c17 8%,
    #cfa94b 28%,
    #f6e7a4 50%,
    #cfa94b 72%,
    #7a5c17 92%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(207,169,75,.45), 0 0 24px rgba(207,169,75,.18);
  pointer-events: none;
}

.pb-nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
}

.pb-logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pb-text);
  user-select: none;
}

.pb-logo span {
  color: var(--pb-accent);
}

.pb-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.pb-nav-links a {
  font-size: 13px;
  color: var(--pb-muted);
  letter-spacing: .02em;
  transition: color .2s ease;
}

.pb-nav-links a:hover {
  color: var(--pb-text);
}

/* Dropdown nav items */
.pb-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.pb-nav-item--has-dropdown .pb-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pb-card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 160px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  z-index: 200;
  white-space: nowrap;
}

.pb-nav-item--has-dropdown:hover .pb-nav-dropdown,
.pb-nav-item--has-dropdown:focus-within .pb-nav-dropdown {
  display: block;
}

.pb-nav-dropdown-item {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--pb-muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}

.pb-nav-dropdown-item:hover,
.pb-nav-dropdown-item.active {
  color: var(--pb-text);
  background: rgba(255,255,255,.05);
}

.pb-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  background: var(--pb-primary);
  color: #fff;
  border-radius: var(--pb-radius-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  transition: background .2s ease, transform .15s ease;
  white-space: nowrap;
}

.pb-nav-cta:hover {
  background: var(--pb-primary-hover);
  transform: translateY(-1px);
}

.pb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--pb-radius-sm);
  cursor: pointer;
  background: transparent;
  border: none;
  z-index: 101;
}

.pb-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--pb-text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
  transform-origin: center;
}

.pb-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.pb-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.pb-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.pb-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: fixed;
  inset: 0;
  background: var(--pb-bg);
  z-index: 99;
  padding: 80px 32px 40px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.pb-mobile-nav.open {
  transform: translateX(0);
}

.pb-mobile-nav a {
  font-size: 24px;
  font-weight: 600;
  color: var(--pb-text);
  padding: 8px 0;
  border-bottom: 1px solid var(--pb-border);
  transition: color .2s ease;
}

.pb-mobile-nav a:hover {
  color: var(--pb-accent);
}

.pb-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ── Aurora mesh ─────────────────────────────────────────── */
.pb-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.pb-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* Blue — top left */
.pb-blob-1 {
  top: -160px;
  left: -80px;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle at 40% 40%, rgba(37,99,235,.55) 0%, transparent 65%);
  filter: blur(90px);
  animation: pb-drift-1 18s ease-in-out infinite;
}

/* Teal — top right */
.pb-blob-2 {
  top: -60px;
  right: -120px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle at 60% 40%, rgba(20,184,166,.45) 0%, transparent 65%);
  filter: blur(100px);
  animation: pb-drift-2 22s ease-in-out infinite;
}

/* Violet — bottom center */
.pb-blob-3 {
  bottom: -160px;
  left: 30%;
  width: 820px;
  height: 500px;
  background: radial-gradient(ellipse at 50% 60%, rgba(139,92,246,.38) 0%, transparent 65%);
  filter: blur(110px);
  animation: pb-drift-3 26s ease-in-out infinite;
}

/* Indigo — center */
.pb-blob-4 {
  top: 30%;
  left: 25%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,.30) 0%, transparent 65%);
  filter: blur(80px);
  animation: pb-drift-4 20s ease-in-out infinite 4s;
}

/* Cyan accent — mid right */
.pb-blob-5 {
  top: 40%;
  right: 5%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 50% 50%, rgba(6,182,212,.28) 0%, transparent 65%);
  filter: blur(70px);
  animation: pb-drift-2 16s ease-in-out infinite reverse 2s;
}

@keyframes pb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(60px, -40px) scale(1.08); }
  50%  { transform: translate(30px, 50px) scale(.94); }
  75%  { transform: translate(-50px, 20px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes pb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  30%  { transform: translate(-70px, 40px) scale(1.1); }
  60%  { transform: translate(40px, -30px) scale(.92); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes pb-drift-3 {
  0%   { transform: translateX(0) scale(1); }
  40%  { transform: translateX(-80px) scale(1.06); }
  70%  { transform: translateX(60px) scale(.96); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes pb-drift-4 {
  0%   { transform: translate(0, 0) scale(1); }
  35%  { transform: translate(50px, -60px) scale(1.12); }
  70%  { transform: translate(-40px, 40px) scale(.9); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Grain noise overlay */
.pb-aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  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='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: .028;
  pointer-events: none;
  z-index: 1;
}

/* Vignette to keep edges dark */
.pb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 40%, rgba(9,9,11,.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Light mode: mute aurora significantly */
body.pb-page.pb-light .pb-blob-1 { background: radial-gradient(circle at 40% 40%, rgba(37,99,235,.18) 0%, transparent 65%); }
body.pb-page.pb-light .pb-blob-2 { background: radial-gradient(circle at 60% 40%, rgba(20,184,166,.14) 0%, transparent 65%); }
body.pb-page.pb-light .pb-blob-3 { background: radial-gradient(ellipse at 50% 60%, rgba(139,92,246,.12) 0%, transparent 65%); }
body.pb-page.pb-light .pb-blob-4 { opacity: .5; }
body.pb-page.pb-light .pb-blob-5 { opacity: .4; }

.pb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--pb-radius-pill);
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.2);
  font-size: 12px;
  font-weight: 500;
  color: var(--pb-accent);
  letter-spacing: .04em;
  margin-bottom: 28px;
}

.pb-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pb-teal);
  position: relative;
  flex-shrink: 0;
}

.pb-pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(20,184,166,.3);
  animation: pb-pulse 2s ease-in-out infinite;
}

@keyframes pb-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0; }
}

.pb-hero h1 {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -.038em;
  line-height: 1.04;
  margin-bottom: 28px;
  color: var(--pb-text);
}

.pb-gradient-text {
  background: linear-gradient(135deg, #FAFAFA 0%, var(--pb-accent) 50%, var(--pb-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.pb-hero-sub {
  font-size: 19px;
  color: var(--pb-muted);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

.pb-btn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--pb-radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.pb-btn--primary {
  background: var(--pb-primary);
  color: #fff;
}

.pb-btn--primary:hover {
  background: var(--pb-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
}

.pb-btn--ghost {
  background: transparent;
  color: var(--pb-muted);
  border: 1px solid var(--pb-border-strong);
}

.pb-btn--ghost:hover {
  color: var(--pb-text);
  border-color: var(--pb-muted);
  transform: translateY(-1px);
}

.pb-float-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 48px;
}

.pb-fcard {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-sm);
  font-size: 13px;
  color: var(--pb-muted);
  transition: border-color .2s ease, transform .4s ease, opacity .4s ease;
}

body.pb-js .pb-fcard {
  opacity: 0;
  transform: translateY(20px);
}

body.pb-js .pb-fcard.visible {
  opacity: 1;
  transform: translateY(0);
}

.pb-fcard:hover {
  border-color: var(--pb-border-strong);
  transform: translateY(-2px);
}

.pb-fcard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pb-section {
  padding: 120px 32px;
}

.pb-section--alt {
  background: var(--pb-card);
}

.pb-container {
  max-width: 1100px;
  margin: 0 auto;
}

.pb-section-header {
  margin-bottom: 56px;
}

.pb-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--pb-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pb-section-header h2 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.12;
  margin-bottom: 14px;
  color: var(--pb-text);
}

.pb-section-sub {
  font-size: 17px;
  color: var(--pb-muted);
  max-width: 560px;
  line-height: 1.7;
}

.pb-comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pb-comp-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.pb-comp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,.04) 0%, transparent 60%);
  pointer-events: none;
}

.pb-comp-card:hover {
  border-color: var(--pb-primary);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 8px 24px rgba(37,99,235,.14);
}

.pb-comp-icon {
  display: block;
  font-size: 36px;
  margin-bottom: 20px;
  line-height: 1;
}

.pb-comp-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 10px;
  color: var(--pb-text);
}

.pb-comp-card p {
  font-size: 14px;
  color: var(--pb-muted);
  line-height: 1.65;
}

.pb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.pb-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--pb-radius-pill);
  background: rgba(96,165,250,.1);
  color: var(--pb-accent);
  border: 1px solid rgba(96,165,250,.2);
  letter-spacing: .02em;
}

.pb-proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pb-proj-card {
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.pb-proj-card:hover {
  transform: translateY(-6px);
  border-color: var(--pb-accent);
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 8px 24px rgba(96,165,250,.12);
}

.pb-proj-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pb-card-elevated), var(--pb-card));
  font-size: 48px;
}

.pb-proj-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(9,9,11,.6));
}

.pb-proj-body {
  padding: 24px;
}

.pb-proj-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pb-proj-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pb-teal);
  background: rgba(20,184,166,.1);
  border-radius: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(20,184,166,.2);
}

.pb-proj-date {
  font-size: 11px;
  color: var(--pb-faint);
}

.pb-proj-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-bottom: 8px;
  color: var(--pb-text);
  line-height: 1.3;
}

.pb-proj-card p {
  font-size: 13px;
  color: var(--pb-muted);
  line-height: 1.55;
}

.pb-proj-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.pb-tech {
  font-size: 10px;
  font-family: var(--pb-font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: var(--pb-muted);
  border: 1px solid var(--pb-border);
  letter-spacing: .02em;
}

.pb-timeline {
  position: relative;
  padding-left: 32px;
}

.pb-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--pb-border);
}

.pb-tl-item {
  position: relative;
  padding: 0 0 40px 28px;
}

.pb-tl-item:last-child {
  padding-bottom: 0;
}

.pb-tl-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pb-primary);
  border: 2.5px solid var(--pb-bg);
  box-shadow: 0 0 0 4px rgba(37,99,235,.2);
  z-index: 1;
}

.pb-tl-year {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--pb-accent);
  letter-spacing: .05em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.pb-tl-role {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--pb-text);
  margin-bottom: 3px;
  letter-spacing: -.01em;
}

.pb-tl-company {
  display: block;
  font-size: 13px;
  color: var(--pb-muted);
  margin-bottom: 10px;
}

.pb-tl-desc {
  font-size: 13px;
  color: var(--pb-faint);
  line-height: 1.6;
}

.pb-contact-wrap {
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-xl);
  padding: 48px;
  max-width: 620px;
  margin: 0 auto;
}

.pb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.pb-form-group {
  display: flex;
  flex-direction: column;
}

.pb-form-group--full {
  grid-column: 1 / -1;
}

.pb-form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--pb-muted);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.pb-form-input,
.pb-form-textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--pb-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--pb-text);
  font-size: 14px;
  font-family: var(--pb-font);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  width: 100%;
  appearance: none;
}

.pb-form-input::placeholder,
.pb-form-textarea::placeholder {
  color: var(--pb-faint);
}

.pb-form-input:focus,
.pb-form-textarea:focus {
  border-color: var(--pb-primary);
  background: rgba(37,99,235,.05);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.pb-form-textarea {
  height: 110px;
  resize: none;
  line-height: 1.55;
}

.pb-form-submit {
  width: 100%;
  background: var(--pb-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--pb-font);
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: .01em;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

.pb-form-submit:hover {
  background: var(--pb-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.3);
}

.pb-form-submit:active {
  transform: translateY(0);
}

/* ── Gallery template ─────────────────────────────────────────────────── */
.pb-gallery-section { padding-bottom: 80px; }

.pb-gallery-grid {
  display: grid;
  gap: 12px;
}
.pb-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pb-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pb-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }

.pb-gallery-item { border-radius: 10px; overflow: hidden; background: var(--pb-card); }

.pb-gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.pb-gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.pb-gallery-link:hover .pb-gallery-img { transform: scale(1.04); }

.pb-gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity .3s;
}
.pb-gallery-link:hover .pb-gallery-caption { opacity: 1; }

/* Lightbox */
.pb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.pb-lightbox.open { display: flex; }

.pb-lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pb-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
.pb-lightbox-caption { color: rgba(255,255,255,.7); font-size: 14px; text-align: center; }

.pb-lightbox-close,
.pb-lightbox-prev,
.pb-lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.pb-lightbox-close:hover,
.pb-lightbox-prev:hover,
.pb-lightbox-next:hover { background: rgba(255,255,255,.2); }
.pb-lightbox-close { top: 20px; right: 20px; font-size: 18px; }
.pb-lightbox-prev  { top: 50%; left: 16px;  transform: translateY(-50%); }
.pb-lightbox-next  { top: 50%; right: 16px; transform: translateY(-50%); }

@media (max-width: 768px) {
  .pb-gallery-cols-3,
  .pb-gallery-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .pb-gallery-cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pb-gallery-cols-2,
  .pb-gallery-cols-3,
  .pb-gallery-cols-4 { grid-template-columns: 1fr; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.pb-footer {
  padding: 40px 32px;
  border-top: 1px solid var(--pb-border);
}

.pb-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pb-footer-socials {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pb-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--pb-faint);
  transition: color .2s ease, background .2s ease;
}

.pb-footer-social-link:hover {
  color: var(--pb-text);
  background: rgba(255,255,255,.06);
}

body.pb-page.pb-light .pb-footer-social-link:hover {
  background: rgba(0,0,0,.06);
}

.pb-footer-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pb-text);
}

.pb-footer-logo span {
  color: var(--pb-accent);
}

.pb-footer-copy {
  font-size: 12px;
  color: var(--pb-faint);
}

.pb-footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pb-footer-social a {
  font-size: 12px;
  color: var(--pb-faint);
  letter-spacing: .03em;
  transition: color .2s ease;
}

.pb-footer-social a:hover {
  color: var(--pb-text);
}

.pb-reveal {
  transition: opacity .6s ease, transform .6s ease;
}

/* Only hide when JS is active — prevents invisible content if JS is slow/absent */
body.pb-js .pb-reveal {
  opacity: 0;
  transform: translateY(24px);
}

body.pb-js .pb-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.pb-reveal-d1 {
  transition-delay: .1s;
}

.pb-reveal-d2 {
  transition-delay: .2s;
}

.pb-reveal-d3 {
  transition-delay: .3s;
}

.pb-reveal-d4 {
  transition-delay: .4s;
}

.pb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.pb-divider {
  width: 100%;
  height: 1px;
  background: var(--pb-border);
  margin: 0;
}

.pb-scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pb-card-elevated);
  border: 1px solid var(--pb-border-strong);
  color: var(--pb-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .2s ease, color .2s ease;
  z-index: 50;
}

.pb-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.pb-scroll-top:hover {
  color: var(--pb-text);
  transform: translateY(-2px);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--pb-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--pb-border-strong);
  border-radius: var(--pb-radius-pill);
}

/* ═══════════════════════════════════════════════════════════
   PERSONAL PAGE — sub-page layout
═══════════════════════════════════════════════════════════ */

.pb-page-hero {
  padding: 140px 0 64px;
  text-align: center;
  position: relative;
}

.pb-page-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.pb-page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--pb-text);
  margin-bottom: 16px;
}

.pb-page-excerpt {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--pb-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

.pb-section--content {
  padding-bottom: 100px;
}

.pb-content {
  color: var(--pb-text);
  font-size: 18px;
  line-height: 1.85;
}

.pb-content h1,
.pb-content h2,
.pb-content h3,
.pb-content h4 {
  color: var(--pb-text);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 2em 0 .6em;
  line-height: 1.3;
}

.pb-content h2 { font-size: 1.75rem; }
.pb-content h3 { font-size: 1.35rem; }
.pb-content h4 { font-size: 1.1rem; }

.pb-content p {
  color: var(--pb-muted);
  margin: 0 0 1.25em;
}

.pb-content p:first-child { margin-top: 0; }

.pb-content a {
  color: var(--pb-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}

.pb-content a:hover { color: var(--pb-text); }

.pb-content ul,
.pb-content ol {
  color: var(--pb-muted);
  padding-left: 1.5em;
  margin: 0 0 1.25em;
}

.pb-content li { margin-bottom: .5em; }

.pb-content blockquote {
  border-left: 3px solid var(--pb-primary);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(37,99,235,.06);
  border-radius: 0 8px 8px 0;
  color: var(--pb-muted);
  font-style: italic;
}

.pb-content pre,
.pb-content code {
  font-family: var(--pb-mono);
  font-size: .88em;
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: 6px;
}

.pb-content code { padding: 2px 6px; }

.pb-content pre {
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: var(--pb-radius);
}

.pb-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.pb-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pb-radius);
  margin: 1.5em 0;
}

.pb-content hr {
  border: none;
  border-top: 1px solid var(--pb-border);
  margin: 2.5em 0;
}

/* Light mode overrides for content */
body.pb-page.pb-light .pb-content p,
body.pb-page.pb-light .pb-content ul,
body.pb-page.pb-light .pb-content ol,
body.pb-page.pb-light .pb-content li,
body.pb-page.pb-light .pb-content blockquote { color: var(--pb-muted); }

@media (max-width: 768px) {
  .pb-page-hero { padding: 110px 0 48px; }
  .pb-page-title { font-size: 2rem; }
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pb-faint);
}

::-webkit-scrollbar-corner {
  background: var(--pb-bg);
}

[data-theme-transitioning] *,
[data-theme-transitioning] *::before,
[data-theme-transitioning] *::after {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease !important;
}

@media (max-width: 1024px) {
  .pb-nav-links {
    display: none;
  }

  .pb-nav-cta {
    display: none;
  }

  .pb-hamburger {
    display: flex;
  }

  .pb-comp-grid {
    grid-template-columns: 1fr;
  }

  .pb-section-header h2 {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .pb-hero h1 {
    font-size: 44px;
  }

  .pb-hero-sub {
    font-size: 17px;
  }

  .pb-proj-grid {
    grid-template-columns: 1fr;
  }

  .pb-contact-wrap {
    padding: 28px;
  }

  .pb-form-grid {
    grid-template-columns: 1fr;
  }

  .pb-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .pb-section-header h2 {
    font-size: 30px;
  }

  .pb-float-cards {
    gap: 8px;
  }

  .pb-timeline {
    padding-left: 24px;
  }
}

@media (max-width: 480px) {
  .pb-hero {
    padding: 100px 20px 60px;
  }

  .pb-section {
    padding: 64px 20px;
  }

  .pb-nav {
    padding: 0 20px;
  }

  .pb-footer {
    padding: 32px 20px;
  }

  .pb-hero h1 {
    font-size: 38px;
    letter-spacing: -.025em;
  }

  .pb-btn {
    height: 42px;
    padding: 0 18px;
    font-size: 13px;
  }

  .pb-btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pb-btn-row .pb-btn {
    justify-content: center;
  }

  .pb-section-header {
    margin-bottom: 36px;
  }

  .pb-comp-card {
    padding: 24px;
  }

  .pb-contact-wrap {
    border-radius: var(--pb-radius-lg);
    padding: 24px 20px;
  }

  .pb-scroll-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .pb-reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ═══════════════════════════════════════════════════════════
   INLINE AUDIO PLAYER (shortcode embed)
═══════════════════════════════════════════════════════════ */

.pb-player {
  position: relative;
  z-index: 1;
  font-family: var(--pb-font);
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-lg);
  overflow: visible;
  margin: 1.5rem 0;
}

.pb-player-bar {
  display: grid;
  grid-template-columns: 260px auto 1fr 220px;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 64px;
  background: transparent;
}

/* Track info */
.pb-player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pb-player-disc {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pb-card);
  border: 1px solid var(--pb-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pb-accent);
  transition: transform 0s;
}

.pb-player-disc.spinning {
  animation: pb-spin 4s linear infinite;
}

@keyframes pb-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pb-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pb-player-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-player-count {
  font-size: 11px;
  color: var(--pb-faint);
}

/* Controls */
.pb-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pb-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--pb-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: color .15s ease, background .15s ease;
  flex-shrink: 0;
}

.pb-player-btn:hover { color: var(--pb-text); background: rgba(255,255,255,.07); }
.pb-player-btn:focus-visible { outline: 2px solid var(--pb-primary); outline-offset: 2px; }
.pb-player-btn.active { color: var(--pb-accent); }

.pb-player-btn--play {
  width: 42px;
  height: 42px;
  background: var(--pb-primary);
  color: #fff;
  border-radius: 50%;
}

.pb-player-btn--play:hover { background: var(--pb-accent); color: #fff; }

/* Progress */
.pb-player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pb-player-time {
  font-size: 11px;
  color: var(--pb-faint);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: center;
  flex-shrink: 0;
}

.pb-player-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height .15s ease;
}

.pb-player-progress:hover { height: 6px; }

.pb-player-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--pb-primary);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.pb-player-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition: transform .1s ease;
}

.pb-player-progress:hover .pb-player-progress-thumb { transform: translate(-50%, -50%) scale(1); }

/* Right side: volume + buttons */
.pb-player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.pb-player-vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pb-player-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.pb-player-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pb-text);
  cursor: pointer;
}

.pb-player-vol::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pb-text);
  cursor: pointer;
  border: none;
}

/* Playlist panel */
.pb-player-playlist {
  border-top: 1px solid var(--pb-border);
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pb-player-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pb-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--pb-border);
}

.pb-player-playlist-close {
  background: none;
  border: none;
  color: var(--pb-faint);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
  transition: color .15s;
}

.pb-player-playlist-close:hover { color: var(--pb-text); }

.pb-player-playlist-list {
  list-style: none;
  overflow-y: auto;
  padding: 4px 0;
  margin: 0;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--pb-border) transparent;
}

.pb-pl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .12s ease;
}

.pb-pl-item:hover { background: rgba(255,255,255,.05); }

.pb-pl-item.active {
  background: rgba(37,99,235,.15);
  color: var(--pb-accent);
}

.pb-pl-num {
  font-size: 11px;
  color: var(--pb-faint);
  min-width: 18px;
  text-align: right;
  flex-shrink: 0;
}

.pb-pl-item.active .pb-pl-num { display: none; }

.pb-pl-name {
  font-size: 13px;
  color: var(--pb-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-pl-item.active .pb-pl-name { color: var(--pb-accent); }

.pb-pl-play-icon {
  font-size: 9px;
  color: var(--pb-accent);
  display: none;
}

.pb-pl-item.active .pb-pl-play-icon { display: block; }

/* no bottom padding needed — player is inline */

/* Light mode */
body.pb-page.pb-light .pb-player {
  background: var(--pb-card);
  border-color: var(--pb-border);
}
body.pb-page.pb-light .pb-player-title { color: #111; }
body.pb-page.pb-light .pb-player-btn   { color: #555; }
body.pb-page.pb-light .pb-player-btn:hover { background: rgba(0,0,0,.06); color: #111; }
body.pb-page.pb-light .pb-player-progress { background: rgba(0,0,0,.1); }

/* Mobile */
@media (max-width: 640px) {
  .pb-player-bar {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 10px 14px 12px;
    gap: 8px;
  }

  .pb-player-info    { grid-column: 1; grid-row: 1; }
  .pb-player-controls{ grid-column: 2; grid-row: 1; }
  .pb-player-right   { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .pb-player-vol-wrap { display: none; }
  .pb-player-progress-wrap { grid-column: 1 / -1; grid-row: 2; }
}
