/* ═══════════════════════════════════════
   Metallica Theme — Portfolio
   ═══════════════════════════════════════ */

/* ── Variables ── */
:root {
  --gold:        #c9941a;
  --gold-bright: #e8b830;
  --gold-dim:    rgba(201,148,26,0.12);
  --gold-border: rgba(201,148,26,0.18);
  --red:         #7a0000;
  --bg:          #080806;
  --surface:     #0e0c07;
  --card:        #121008;
  --border:      rgba(201,148,26,0.1);
  --text:        #e8dcc8;
  --muted:       #7a6e58;
  --subtle:      #a89878;

  /* ── Typography tokens ── */
  --font-heading: 'Orbitron', sans-serif;
  --font-body:    'IBM Plex Mono', monospace;
  --tracking-tight:  0.02em;
  --tracking-normal: 0.06em;
  --tracking-wide:   0.1em;
  --tracking-wider:  0.14em;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Global: IBM Plex Mono for everything by default ── */
body, body * {
  font-family: var(--font-body) !important;
}

/* ── Restore Font Awesome icon font ── */
.fas, .far, .fab, .fal,
[class^="fa-"], [class*=" fa-"],
.fas::before, .far::before, .fab::before, .fal::before {
  font-family: "Font Awesome 5 Free" !important;
}
.fab, .fab::before {
  font-family: "Font Awesome 5 Brands" !important;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  font-weight: 400;
}

/* ── Global: Orbitron for all headings ── */
h1, h2, h3, h4, h5, h6,
.section-heading, .modal-title, .hero-name,
.label, .tag, .navlink, .btn-primary, .btn-outline,
.hero-badge-text, .badge-current, .exp-company,
.exp-modal-project-name, .proj-title, .contact-card-title,
.modal-rec-relation, .pub-badge, .rec-quote,
.exp-role-title, .exp-modal-role-title, .exp-modal-role-card-title,
.modal-media-title, .modal-media-name, .rec-name, .rec-relation,
.agpt-name, .scroll-arrow {
  font-family: var(--font-heading) !important;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ── Noise texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* ── Background blobs ── */
.blob-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.18;
}

/* ── Layout ── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.section {
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

/* ── Dividers ── */
hr.div {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Glass card base ── */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
}

/* ── Gold gradient text ── */
.grad {
  background: linear-gradient(135deg, #f0c040 0%, #c9941a 50%, #8b6010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section label ── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.label::before {
  content: '';
  display: block;
  width: 1.25rem;
  height: 1px;
  background: var(--gold);
}

/* ── Section heading ── */
.section-heading {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.section-heading.mb-sm { margin-bottom: 0.5rem; }

/* ── Section subtitle ── */
.section-sub {
  color: var(--subtle);
  margin-bottom: 2.5rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

/* ── Tech tag ── */
.tag {
  display: inline-block;
  padding: 0.175rem 0.625rem;
  border-radius: 2px;
  font-size: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  background: rgba(201,148,26,0.07);
  color: var(--gold);
  border: 1px solid rgba(201,148,26,0.22);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ── Pulse dot ── */
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.35;} }
.pulse { animation: pulse-dot 2s infinite; }

/* ── Border beam animation ── */
@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes border-beam {
  to { --beam-angle: 360deg; }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════
   NAV
══════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background 0.3s, border-color 0.3s;
}
#nav.scrolled {
  background: rgba(8,8,6,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}
.nav-logo {
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(5deg) brightness(0.88);
  height: 1.75rem;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.navlink {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: var(--tracking-normal);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.navlink::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.2s;
}
.navlink:hover, .navlink.active { color: var(--text); }
.navlink:hover::after, .navlink.active::after { width: 100%; }

/* Resume button in nav */
.nav-resume {
  padding: 0.4375rem 1.125rem;
  background: var(--gold);
  color: #000;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: opacity 0.2s;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}
.nav-resume:hover { opacity: 0.85; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
}

/* Mobile nav */
#mnav {
  display: none;
  border-top: 1px solid var(--border);
  background: #0e0d09;
  padding: 1.25rem 1.5rem;
  flex-direction: column;
  gap: 0.875rem;
}
#mnav.open { display: flex; }
.mnav-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--gold);
  color: #000;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  width: fit-content;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 3rem;
  position: relative;
  z-index: 2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-text { /* left column */ }
.hero-logo-img {
  max-width: 420px;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(5deg) brightness(0.88);
  display: block;
  margin-bottom: 1.25rem;
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
}
.hero-bio {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(168, 152, 120, 0.9);
  max-width: 480px;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.hero-bio strong { color: var(--text); font-weight: 600; font-family: var(--font-body); }
.hero-cta {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}
.hero-socials {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Hero photo */
.hero-photo {
  display: flex;
  justify-content: center;
}
.hero-photo-wrap {
  position: relative;
  padding: 1rem 1rem 4.6rem;
  isolation: isolate;
}
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 2rem 1.5rem 3.6rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 211, 116, 0.14), transparent 30%),
    radial-gradient(circle at 78% 82%, rgba(180, 72, 18, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(25, 18, 10, 0.76), rgba(8, 7, 4, 0.1));
  border-radius: 28px;
  filter: blur(22px);
  z-index: -2;
}
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0.5rem 0.25rem 2.8rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 215, 120, 0.08);
  background: linear-gradient(135deg, rgba(255, 216, 126, 0.03), rgba(255,255,255,0.01), rgba(165, 73, 22, 0.05));
  z-index: -1;
}
.hero-photo-frame {
  position: relative;
  width: 360px;
  height: 392px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 120, 0.4);
  background: #0f0d08;
  box-shadow:
    0 0 0 1px rgba(255, 224, 146, 0.08) inset,
    0 22px 70px rgba(0,0,0,0.56),
    0 0 36px rgba(201,148,26,0.12);
}
.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 225, 150, 0.72), rgba(255,255,255,0.04), rgba(207, 138, 38, 0.45));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 16%),
    radial-gradient(circle at 50% 120%, rgba(0,0,0,0.28), transparent 44%);
  pointer-events: none;
  z-index: 1;
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
}
.hero-deco-tr {
  position: absolute;
  top: 0; right: -0.2rem;
  width: 7rem; height: 7rem;
  border: 1px solid rgba(201,148,26,0.18);
  border-radius: 18px;
  z-index: -1;
}
.hero-deco-bl {
  position: absolute;
  bottom: 0.75rem; left: 0.2rem;
  width: 5rem; height: 7rem;
  background:
    linear-gradient(180deg, rgba(110, 25, 8, 0.28), rgba(55, 10, 7, 0.14));
  border-radius: 14px;
  filter: blur(0.3px);
  z-index: -1;
}
.hero-badge {
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  transform: translateX(-50%);
  min-width: 17.5rem;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(24, 19, 11, 0.96), rgba(15, 12, 7, 0.96));
  border: 1px solid rgba(214, 164, 62, 0.34);
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow:
    0 0 0 1px rgba(255, 220, 124, 0.05) inset,
    0 18px 36px rgba(0,0,0,0.4),
    0 0 24px rgba(201,148,26,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.hero-badge-dot {
  width: 0.65rem; height: 0.65rem;
  background: #22c55e;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(34,197,94,0.38);
}
.hero-badge-text {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-normal);
  white-space: nowrap;
  color: #e9d0a0;
  text-transform: uppercase;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--gold);
  color: #000;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}
.btn-primary:hover { opacity: 0.87; transform: translateY(-1px); }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(201,148,26,0.2);
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: rgba(201,148,26,0.5); color: var(--gold); }

/* ── Social button ── */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 2px;
  background: rgba(201,148,26,0.04);
  border: 1px solid rgba(201,148,26,0.14);
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}
.social-btn:hover {
  background: var(--gold-dim);
  border-color: rgba(201,148,26,0.4);
  color: var(--gold);
}

/* ══════════════════════════════
   STATS BAR
══════════════════════════════ */
.stats-bar {
  padding: 3rem 0;
  position: relative;
  z-index: 2;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}
.stat-num {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  font-family: var(--font-heading);
  line-height: 1;
  letter-spacing: 0.02em;
}
.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(168, 152, 120, 0.82);
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 14rem;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.005em;
  text-align: center;
}

/* ══════════════════════════════
   TECH STACK
══════════════════════════════ */
.tech-stack-section {
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}
.tech-stack-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.4rem;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.tech-stack-tag {
  display: inline-block;
  padding: 0.175rem 0.625rem;
  border-radius: 2px;
  font-size: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  background: rgba(201,148,26,0.07);
  color: var(--gold);
  border: 1px solid rgba(201,148,26,0.22);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}

/* ══════════════════════════════
   EXPERIENCE — Horizontal scrollable cards
══════════════════════════════ */

/* ── Scroll arrows ── */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(201,148,26,0.35);
  background: rgba(12,10,6,0.82);
  color: var(--gold);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, opacity 0.25s, transform 0.25s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.scroll-arrow:hover {
  background: rgba(201,148,26,0.15);
  border-color: rgba(201,148,26,0.7);
}
.scroll-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-arrow-left  { left: 0.5rem; }
.scroll-arrow-right { right: 0.5rem; }
.scroll-arrow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 2.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.exp-track {
  position: relative;
}
/* Right fade hint */
.exp-track::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 6rem;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 3;
}

.exp-timeline {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,148,26,0.3) transparent;
  padding-bottom: 0.75rem;
}
.exp-timeline:active { cursor: grabbing; }
.exp-timeline::-webkit-scrollbar { height: 3px; }
.exp-timeline::-webkit-scrollbar-track { background: transparent; }
.exp-timeline::-webkit-scrollbar-thumb { background: rgba(201,148,26,0.3); border-radius: 2px; }

.exp-list {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  width: max-content;
  padding: 0.25rem 0.125rem 0.25rem;
}

/* Card */
.exp-card {
  width: 260px;
  min-width: 260px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 214, 122, 0.14), transparent 34%),
    radial-gradient(circle at 82% 100%, rgba(255, 173, 52, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(34, 24, 14, 0.96), rgba(11, 8, 4, 0.98));
  border: 1px solid rgba(232, 180, 72, 0.36);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s;
  box-shadow: 0 0 0 1px rgba(255,220,124,0.06) inset, 0 20px 44px rgba(0,0,0,0.42);
}
.exp-card:hover {
  border-color: rgba(255, 212, 110, 0.68);
  box-shadow:
    0 0 0 1px rgba(255, 230, 154, 0.12) inset,
    0 0 24px rgba(201,148,26,0.12),
    0 24px 52px rgba(0,0,0,0.5);
  transform: translateY(-4px);
}
.exp-card:hover::after,
.rec-card:hover::after,
.rec-card:focus-visible::after,
.proj-card:hover::after,
.proj-card:focus-visible::after,
.pub-card:hover::after,
.pub-card:focus-visible::after {
  animation-play-state: running;
  opacity: 1;
  padding: 2.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 52%,
    rgba(201,148,26,0.85) 68%,
    rgba(255,210,60,1) 75%,
    rgba(255,230,100,1) 78%,
    rgba(201,148,26,0.85) 85%,
    transparent 100%
  );
  filter: drop-shadow(0 0 5px rgba(255,200,60,0.55));
}
.exp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 4s linear infinite;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 3;
  pointer-events: none;
}
.exp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.45), rgba(255,255,255,0.03), rgba(255, 186, 66, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
}

.exp-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(27, 19, 11, 0.92), rgba(17, 12, 7, 0.9));
  position: relative;
  border-bottom: 1px solid rgba(201,148,26,0.14);
}
.exp-logo-wrap::after {
  content: '';
  position: absolute;
  inset: auto 1.2rem 0.8rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 205, 92, 0.45), transparent);
  opacity: 0.65;
}

.exp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 12px;
  background: #f3eee4;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(201,148,26,0.32);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 0 rgba(201,148,26,0);
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
  position: relative;
  z-index: 1;
}
.exp-logo img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
}
.exp-card:hover .exp-logo {
  border-color: rgba(201,148,26,0.6);
  box-shadow:
    0 0 0 3px rgba(201,148,26,0.12),
    0 0 20px rgba(201,148,26,0.24),
    0 8px 24px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

.exp-body {
  padding: 1.25rem 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}
.exp-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  margin-bottom: 0.125rem;
  color: #f4e5c1;
}
.exp-company {
  color: #d8ae57;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.exp-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.exp-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(226, 202, 160, 0.78);
  font-family: var(--font-body);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.exp-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(240, 208, 138, 0.78);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.9rem;
  width: fit-content;
  letter-spacing: 0.005em;
}
.exp-location:hover { color: #f4d48a; }
.badge-current {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border-radius: 9999px;
  font-size: 0.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}

/* Responsive: stack vertically */
@media (max-width: 600px) {
  .exp-track::after { display: none; }
  .exp-list {
    flex-direction: column;
    width: auto;
    gap: 0.75rem;
  }
  .exp-card {
    width: auto;
    min-width: auto;
    flex-direction: row;
    overflow: visible;
    border-radius: 16px;
  }
  .exp-logo-wrap {
    padding: 1.25rem;
    flex-shrink: 0;
    width: 7.5rem;
    border-bottom: none;
    border-right: 1px solid rgba(201,148,26,0.14);
  }
  .exp-logo-wrap::after { display: none; }
  .exp-logo { width: 5rem; height: 5rem; }
  .exp-logo img { width: 3.75rem; height: 3.75rem; }
  .exp-body { padding: 1rem; }
}

/* ══════════════════════════════
   EXPERIENCE — multi-role inside card
══════════════════════════════ */
.exp-roles {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.1rem;
  border-top: 1px solid rgba(201,148,26,0.16);
  padding-top: 0.75rem;
}
.exp-role-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0;
  position: relative;
}
/* Vertical line connecting roles */
.exp-role-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0.3125rem;
  top: 1.25rem;
  bottom: -0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(201,148,26,0.4), rgba(201,148,26,0.1));
}
.exp-role-dot {
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 0.2rem;
  position: relative;
  z-index: 1;
}
.exp-role-item:first-child .exp-role-dot {
  background: var(--gold);
}
.exp-role-info { flex: 1; min-width: 0; }
.exp-role-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f2e2bc;
  line-height: 1.3;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.exp-role-date {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(226, 202, 160, 0.7);
  font-family: var(--font-body);
  margin-top: 0.2rem;
  letter-spacing: 0.01em;
}
.exp-modal-roles {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 215, 120, 0.14);
  border-radius: 12px;
  background: rgba(255, 188, 61, 0.04);
}
.exp-modal-role:not(:last-child) {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 215, 120, 0.12);
}
.exp-modal-role-title {
  color: #f2e2bc;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.exp-modal-role-date {
  color: rgba(226, 202, 160, 0.75);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}
.exp-modal-role-cards {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.exp-modal-role-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 215, 120, 0.14);
  border-radius: 12px;
  background: rgba(255, 188, 61, 0.04);
}
.exp-modal-role-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.exp-modal-role-card-title {
  color: #f2e2bc;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.exp-modal-role-card-date {
  color: rgba(226, 202, 160, 0.75);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.exp-modal-project-name {
  color: #d8ae57;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.modal-media {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 215, 120, 0.12);
}
.modal-media-title {
  color: #f2e2bc;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.modal-media-list {
  display: grid;
  gap: 0.75rem;
}
.modal-media-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 215, 120, 0.12);
  border-radius: 12px;
  background: rgba(255, 188, 61, 0.04);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.modal-media-card:hover {
  border-color: rgba(255, 215, 120, 0.3);
  background: rgba(255, 188, 61, 0.06);
}
.modal-media-thumb {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: #1b140c;
}
.modal-media-name {
  color: #f2e2bc;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.modal-media-desc {
  color: rgba(226, 202, 160, 0.78);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ══════════════════════════════
   RECOMMENDATIONS — horizontal scroll
══════════════════════════════ */
.rec-track {
  position: relative;
}
.rec-track::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 5rem;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 3;
}
.rec-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,148,26,0.3) transparent;
  padding-bottom: 0.75rem;
}
.rec-scroll:active { cursor: grabbing; }
.rec-scroll::-webkit-scrollbar { height: 3px; }
.rec-scroll::-webkit-scrollbar-track { background: transparent; }
.rec-scroll::-webkit-scrollbar-thumb { background: rgba(201,148,26,0.3); border-radius: 2px; }
.rec-list {
  display: flex;
  gap: 1.4rem;
  width: max-content;
  padding: 0.35rem 0.25rem 0.5rem;
}
.rec-card {
  position: relative;
  width: 292px;
  min-width: 292px;
  min-height: 408px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(232, 180, 72, 0.38);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 214, 122, 0.18), transparent 32%),
    radial-gradient(circle at 80% 100%, rgba(255, 173, 52, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(34, 24, 14, 0.96), rgba(11, 8, 4, 0.98));
  transition: transform 0.3s, border-color 0.3s;
  box-shadow: 0 0 0 1px rgba(255,220,124,0.08) inset, 0 24px 64px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 1.05rem 1rem;
  isolation: isolate;
}
.rec-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 212, 110, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 230, 154, 0.16) inset,
    0 0 22px rgba(201,148,26,0.16),
    0 30px 72px rgba(0,0,0,0.58);
}
.rec-card:focus-visible {
  outline: none;
  transform: translateY(-6px);
  border-color: rgba(255, 212, 110, 0.9);
  box-shadow:
    0 0 0 2px rgba(255, 220, 124, 0.22),
    0 0 46px rgba(201,148,26,0.3),
    0 30px 72px rgba(0,0,0,0.58);
}
.rec-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 4s linear infinite;
  animation-delay: -1.3s;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 3;
  pointer-events: none;
}
.rec-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.6), rgba(255,255,255,0.04), rgba(255, 186, 66, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.rec-card-glow {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: transparent;
  filter: none;
  opacity: 0;
  z-index: -1;
}
.rec-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}
.rec-quote {
  color: #ffca58;
  font-size: 3.8rem;
  line-height: 0.8;
  font-family: var(--font-heading);
  text-shadow: 0 0 18px rgba(255, 194, 73, 0.42);
}
.rec-relation {
  color: #e8c779;
  font-size: 0.65rem;
  line-height: 1.4;
  text-align: right;
  max-width: 60%;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.rec-company {
  display: block;
  margin-top: 0.24rem;
  color: #f3d48e;
  font-weight: 700;
}
.rec-highlight {
  position: relative;
  color: rgba(255, 243, 224, 0.92);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.008em;
  margin: 0;
  padding-right: 0.4rem;
  z-index: 1;
}
.rec-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
}
.rec-info {
  position: relative;
  z-index: 1;
  max-width: 66%;
}
.rec-name {
  color: #f1d08a;
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 0.32rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-tight);
}
.rec-role {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(226, 202, 160, 0.75);
  line-height: 1.5;
  letter-spacing: 0.005em;
}
.rec-avatar-wrap {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 218, 129, 0.9), rgba(186, 127, 27, 0.65));
  box-shadow: 0 0 24px rgba(201,148,26,0.24);
  flex-shrink: 0;
}
.rec-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 50%;
  background: #20160c;
}
.rec-footer { margin-top: 1.75rem; }
.rec-li-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all 0.2s;
}
.rec-li-link:hover { border-color: rgba(201,148,26,0.35); color: var(--gold); }

/* ══════════════════════════════
   PROJECTS (professional + academic)
══════════════════════════════ */
.proj-track {
  position: relative;
}
.proj-track::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5rem;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 3;
}
.proj-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,148,26,0.3) transparent;
  padding: 0.7rem 0.4rem 1rem;
}
.proj-scroll:active { cursor: grabbing; }
.proj-scroll::-webkit-scrollbar { height: 3px; }
.proj-scroll::-webkit-scrollbar-track { background: transparent; }
.proj-scroll::-webkit-scrollbar-thumb { background: rgba(201,148,26,0.3); border-radius: 2px; }
.proj-grid {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: 0.15rem 0.2rem 0.35rem;
}
.proj-card {
  position: relative;
  width: 320px;
  min-width: 320px;
  min-height: 292px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(232, 180, 72, 0.3);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 214, 122, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(24, 19, 12, 0.98), rgba(12, 10, 7, 0.99));
  transition: transform 0.38s ease, border-color 0.38s ease;
  box-shadow: 0 0 0 1px rgba(255,220,124,0.05) inset, 0 16px 34px rgba(0,0,0,0.28);
}
.proj-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 4s linear infinite;
  animation-delay: -2.6s;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 3;
  pointer-events: none;
}
.proj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.34), rgba(255,255,255,0.02), rgba(255, 186, 66, 0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 4;
}
.proj-card:hover,
.proj-card:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgba(255, 230, 154, 0.1) inset,
    0 22px 42px rgba(0,0,0,0.42),
    0 0 28px rgba(201,148,26,0.16);
  border-color: rgba(255, 212, 110, 0.58) !important;
}
.proj-card:focus-visible {
  outline: none;
}
.proj-card-glow {
  position: absolute;
  inset: -12%;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 188, 61, 0.08), transparent 68%);
  filter: blur(26px);
  opacity: 0.22;
  z-index: 0;
  transition: opacity 0.38s ease;
}
.proj-card:hover .proj-card-glow,
.proj-card:focus-visible .proj-card-glow {
  opacity: 0.4;
}
.proj-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.proj-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.4s ease, transform 0.4s ease;
  filter: saturate(0.94) brightness(0.9);
}
.proj-media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,7,0.42) 0%, rgba(8,8,7,0.76) 58%, rgba(8,8,7,0.9) 100%),
    linear-gradient(90deg, rgba(8,8,7,0.56) 0%, rgba(8,8,7,0.16) 45%, rgba(8,8,7,0.5) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.proj-card:hover .proj-media-img,
.proj-card:focus-visible .proj-media-img {
  opacity: 1;
  transform: scale(1.08);
}
.proj-card:hover .proj-media-overlay,
.proj-card:focus-visible .proj-media-overlay {
  opacity: 1;
}
.proj-body {
  position: relative;
  z-index: 3;
  min-height: 292px;
  padding: 1.15rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.proj-title {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #f2e2bc;
}
.proj-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(232, 215, 188, 0.82);
  margin-bottom: 1.1rem;
  line-height: 1.72;
  letter-spacing: 0.005em;
}
.proj-body .tags {
  position: relative;
  z-index: 3;
}
.proj-body .tag {
  background: rgba(10, 9, 6, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (hover: none), (pointer: coarse) {
  .proj-media-img,
  .proj-media-overlay {
    opacity: 1;
  }
  .proj-media-img {
    transform: scale(1.05);
  }
}

/* Academic grid slightly wider cards */
.acad-grid {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: 0.15rem 0.2rem 0.35rem;
}

/* ══════════════════════════════
   PUBLICATIONS
══════════════════════════════ */
.pub-track {
  position: relative;
}
.pub-track::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5rem;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 3;
}
.pub-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,148,26,0.3) transparent;
  padding: 0.7rem 0.4rem 1rem;
}
.pub-scroll:active { cursor: grabbing; }
.pub-scroll::-webkit-scrollbar { height: 3px; }
.pub-scroll::-webkit-scrollbar-track { background: transparent; }
.pub-scroll::-webkit-scrollbar-thumb { background: rgba(201,148,26,0.3); border-radius: 2px; }
.pub-grid {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding: 0.15rem 0.2rem 0.35rem;
}
.pub-card {
  position: relative;
  width: 286px;
  min-width: 286px;
  min-height: 220px;
  padding: 1rem 1rem 0.95rem;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(232, 180, 72, 0.3);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 214, 122, 0.12), transparent 34%),
    radial-gradient(circle at 88% 100%, rgba(255, 173, 52, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(24, 19, 12, 0.98), rgba(12, 10, 7, 0.99));
  box-shadow:
    0 0 0 1px rgba(255, 220, 124, 0.05) inset,
    0 16px 34px rgba(0,0,0,0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.pub-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 4s linear infinite;
  animation-delay: -0.7s;
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 3;
  pointer-events: none;
}
.pub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.34), rgba(255,255,255,0.02), rgba(255, 186, 66, 0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.pub-card:hover,
.pub-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(255, 212, 110, 0.54);
  box-shadow:
    0 0 0 1px rgba(255, 230, 154, 0.1) inset,
    0 18px 42px rgba(0,0,0,0.4),
    0 0 22px rgba(201,148,26,0.08);
}
.pub-card:focus-visible {
  outline: none;
}
.pub-card-glow {
  position: absolute;
  inset: auto -10% -24% auto;
  width: 58%;
  height: 46%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 191, 74, 0.16), transparent 68%);
  filter: blur(22px);
  opacity: 0.48;
  pointer-events: none;
}
.pub-card-top,
.pub-title,
.pub-link-row {
  position: relative;
  z-index: 3;
}
.pub-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.pub-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(255, 201, 86, 0.08);
  border: 1px solid rgba(255, 213, 124, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.pub-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 197, 82, 0.08);
  border: 1px solid rgba(255, 213, 124, 0.18);
  color: #f1d08a;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.55rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.pub-title {
  font-size: 0.9375rem;
  line-height: 1.72;
  font-weight: 500;
  color: rgba(244, 230, 198, 0.92);
  margin: 0 0 1.1rem;
  letter-spacing: 0.005em;
}
.pub-link-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(241, 208, 138, 0.88);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.pub-card:hover .pub-link-row,
.pub-card:focus-visible .pub-link-row {
  color: #ffd98e;
}

/* ══════════════════════════════
   CONTACT
══════════════════════════════ */
.contact-center {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
  margin: 0 auto 1.5rem;
}
.contact-card {
  position: relative;
  border-radius: 18px;
  padding: 1.05rem 1rem 1rem;
  text-decoration: none;
  display: block;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(232, 180, 72, 0.28);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 214, 122, 0.12), transparent 32%),
    radial-gradient(circle at 82% 100%, rgba(255, 173, 52, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(34, 24, 14, 0.94), rgba(11, 8, 4, 0.97));
  box-shadow:
    0 0 0 1px rgba(255, 220, 124, 0.05) inset,
    0 14px 34px rgba(0,0,0,0.34);
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.34), rgba(255,255,255,0.02), rgba(255, 186, 66, 0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 212, 110, 0.54);
  box-shadow:
    0 0 0 1px rgba(255, 230, 154, 0.1) inset,
    0 18px 42px rgba(0,0,0,0.4),
    0 0 22px rgba(201,148,26,0.08);
}
.contact-icon {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 201, 86, 0.08);
  border: 1px solid rgba(255, 215, 120, 0.16);
}
.contact-card-title {
  font-weight: 700;
  font-size: 0.7rem;
  font-family: var(--font-heading);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: #f2e2bc;
}
.contact-card-detail {
  color: rgba(226, 202, 160, 0.82);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.005em;
}
.contact-cta { /* wrapper for the CTA button */ }
.contact-label { justify-content: center; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  padding: 2rem 0;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.footer-logo img {
  height: 1.5rem;
  width: auto;
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(5deg) brightness(0.88);
}
.footer-copy { color: var(--subtle); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.01em; opacity: 0.7; }

/* ══════════════════════════════
   MODALS
══════════════════════════════ */
.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s;
}
.modal-wrap.open { display: flex; }
.modal-wrap.vis { opacity: 1; }
.modal-box {
  background: #100e08;
  border: 1px solid rgba(201,148,26,0.18);
  border-radius: 2px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: scale(0.97);
  transition: transform 0.25s;
  box-shadow: 0 0 60px rgba(201,148,26,0.08);
}
.modal-wrap.vis .modal-box { transform: scale(1); }
.modal-box::-webkit-scrollbar { width: 3px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--gold); }
.modal-box-rec {
  max-width: 860px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 197, 83, 0.13), transparent 30%),
    linear-gradient(180deg, rgba(27, 19, 11, 0.98), rgba(10, 8, 4, 0.98));
}
.modal-img-wrap {
  overflow: hidden;
  border-radius: 2px 2px 0 0;
  aspect-ratio: 16/7;
}
.modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-body { padding: 2rem; }
.modal-body-rec { padding: 2rem 2rem 1.75rem; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.modal-header-proj { margin-bottom: 1rem; }
.modal-header-rec {
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-rec-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.modal-rec-avatar-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 218, 129, 0.92), rgba(186, 127, 27, 0.65));
  flex-shrink: 0;
}
.modal-rec-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.modal-rec-relation {
  margin-top: 0.5rem;
  color: #d5ae56;
  font-size: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.modal-rec-relation .rec-company {
  margin-top: 0.35rem;
  color: #f0cf82;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}
.modal-title a { color: var(--text); text-decoration: none; }
.modal-title a:hover { color: var(--gold); }
.modal-sub { color: var(--subtle); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.005em; line-height: 1.55; }
.modal-close {
  background: rgba(201,148,26,0.06);
  border: 1px solid rgba(201,148,26,0.12);
  color: var(--muted);
  cursor: pointer;
  border-radius: 2px;
  width: 2rem; height: 2rem;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(201,148,26,0.14); color: var(--gold); }
.modal-p {
  color: rgba(168, 152, 120, 0.92);
  line-height: 1.82;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  margin-bottom: 1.5rem;
}
.modal-p strong { color: var(--text); font-weight: 600; }
.modal-ul {
  color: rgba(168, 152, 120, 0.92);
  line-height: 1.82;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.modal-ul li { margin-bottom: 0.55rem; }
.modal-ul strong { color: var(--text); font-weight: 600; }
.modal-body .tags {
  margin-top: 0.9rem;
  margin-bottom: 1rem;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all 0.2s;
}
.modal-link:hover { border-color: rgba(201,148,26,0.4); color: var(--text); }
.li-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10,102,194,0.15);
  border: 1px solid rgba(10,102,194,0.35);
  color: #60a5fa;
  border-radius: 2px;
  font-size: 0.8125rem;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.li-btn:hover { background: rgba(10,102,194,0.25); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  #desktop-nav { display: none !important; }
  .hamburger { display: flex !important; }
  #resume-nav { display: none !important; }
  .hero-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto;
  }
  .hero-photo {
    justify-content: center;
    margin-top: 1.5rem;
  }
  .hero-photo-wrap {
    padding: 0.5rem 0.5rem 3rem;
  }
  .hero-photo-frame {
    width: 220px;
    height: 240px;
  }
  .stats-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .pub-card {
    width: 262px;
    min-width: 262px;
    min-height: 208px;
  }
  .proj-card {
    width: 292px;
    min-width: 292px;
  }
  .rec-card {
    width: 268px;
    min-width: 268px;
    min-height: 388px;
    padding: 1rem 0.95rem 0.9rem;
  }
  .rec-highlight { font-size: 0.88rem; line-height: 1.62; }
  .rec-avatar-wrap { width: 68px; height: 68px; }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .rec-track::after { width: 2rem; }
  .proj-track::after { width: 2rem; }
  .pub-track::after { width: 2rem; }
  .rec-list { gap: 1rem; }
  .pub-grid { gap: 1rem; }
  .proj-grid,
  .acad-grid { gap: 1rem; }
  .pub-card {
    width: calc(100vw - 4rem);
    min-width: calc(100vw - 4rem);
    min-height: 204px;
    padding: 0.95rem;
  }
  .pub-title {
    font-size: 0.84rem;
    line-height: 1.58;
    margin-bottom: 0.95rem;
  }
  .pub-badge {
    font-size: 0.58rem;
    padding: 0.32rem 0.58rem;
  }
  .proj-card {
    width: calc(100vw - 4rem);
    min-width: calc(100vw - 4rem);
  }
  .rec-card {
    width: calc(100vw - 4rem);
    min-width: calc(100vw - 4rem);
    min-height: 372px;
  }
  .rec-relation {
    font-size: 0.7rem;
    max-width: 62%;
  }
  .rec-highlight { font-size: 0.84rem; }
  .rec-card-bottom { align-items: center; }
  .modal-body-rec { padding: 1.4rem 1.1rem 1.2rem; }
  .modal-rec-identity { align-items: flex-start; }
  .modal-rec-avatar-wrap {
    width: 68px;
    height: 68px;
  }
  .contact-card { padding: 0.9rem 0.85rem; border-radius: 16px; }
  .contact-icon {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1rem;
    margin-bottom: 0.55rem;
  }
  .contact-card-title { font-size: 0.84rem; }
  .contact-card-detail { font-size: 0.72rem; }
}

/* Hero wrap fills full width */
.hero-wrap { width: 100%; }

/* Large CTA variant */
.btn-primary--lg { font-size: 1rem; padding: 1rem 2.5rem; }

/* ══════════════════════════════════════
   AsifGPT — Chat Widget
══════════════════════════════════════ */

@keyframes agpt-btn-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,148,26,0), 0 4px 20px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(201,148,26,0.18), 0 4px 20px rgba(0,0,0,0.5); }
}
@keyframes agpt-hint-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
@keyframes agpt-bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes agpt-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%            { transform: translateY(-5px); opacity: 1; }
}

.agpt-portal {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
}
.agpt-portal > * { pointer-events: auto; }

/* ── Floating button ── */
.agpt-btn {
  position: fixed;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(201,148,26,0.55);
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: agpt-btn-glow 3s ease-in-out infinite;
  transition: transform 0.2s ease, border-color 0.2s ease;
  z-index: 9001;
  touch-action: none;
}
.agpt-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.5) 86%,
    rgba(240,192,64,0.95) 90%,
    rgba(201,148,26,0.5) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 2.2s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.agpt-btn:hover { transform: scale(1.07); border-color: rgba(201,148,26,0.8); }
.agpt-btn.panel-open { transform: scale(0.94); }
.agpt-btn.dragging { transition: none !important; cursor: grabbing; transform: scale(1.05); }
.agpt-btn-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.agpt-btn-fallback {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  position: absolute;
}

/* ── Hint label ── */
.agpt-hint {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(201,148,26,0.12);
  border: 1px solid rgba(201,148,26,0.3);
  color: var(--gold);
  font-size: 0.72rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  animation: agpt-hint-float 2.4s ease-in-out infinite;
  backdrop-filter: blur(6px);
  z-index: 9000;
}
.agpt-hint-arrow { font-size: 0.8rem; }

/* ── Chat panel ── */
.agpt-panel {
  position: fixed;
  bottom: 110px;
  right: 24px;
  width: min(520px, calc(100vw - 2rem));
  max-height: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(201,148,26,0.2);
  background: var(--card);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,220,124,0.05) inset;
  display: flex;
  flex-direction: column;
  transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
  opacity: 0;
  z-index: 9002;
  pointer-events: none;
}
.agpt-panel.open {
  max-height: min(640px, 80dvh);
  opacity: 1;
  pointer-events: auto;
}
/* animated border on panel */
.agpt-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 78%,
    rgba(201,148,26,0.4) 86%,
    rgba(240,192,64,0.85) 90%,
    rgba(201,148,26,0.4) 94%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam 3.5s linear infinite;
  animation-delay: -1.8s;
  z-index: 3;
  pointer-events: none;
}

/* ── Header ── */
.agpt-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(201,148,26,0.14);
  background: rgba(8,8,6,0.6);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}
.agpt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(201,148,26,0.4);
}
.agpt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.agpt-info { flex: 1; min-width: 0; }
.agpt-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1.2;
}
.agpt-status {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agpt-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(201,148,26,0.2);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.agpt-close svg { width: 14px; height: 14px; }
.agpt-close:hover { color: var(--gold); border-color: rgba(201,148,26,0.5); background: rgba(201,148,26,0.08); }

/* ── Messages area ── */
.agpt-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scroll-behavior: smooth;
}
.agpt-messages::-webkit-scrollbar { width: 3px; }
.agpt-messages::-webkit-scrollbar-track { background: transparent; }
.agpt-messages::-webkit-scrollbar-thumb { background: rgba(201,148,26,0.3); border-radius: 2px; }

/* ── Scroll arrows inside messages ── */
.agpt-msg-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(201,148,26,0.3);
  background: rgba(12,10,6,0.85);
  color: var(--gold);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}
.agpt-msg-arrow.visible { opacity: 1; pointer-events: auto; }
.agpt-msg-arrow-up   { top: 3.8rem; }
.agpt-msg-arrow-down { bottom: 4.2rem; }

/* ── Bubbles ── */
.agpt-bubble {
  display: flex;
  animation: agpt-bubble-in 0.22s ease forwards;
  max-width: 84%;
}
.agpt-bubble-sent     { align-self: flex-end; }
.agpt-bubble-received { align-self: flex-start; }

.agpt-bubble-inner {
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
}
.agpt-bubble-sent .agpt-bubble-inner {
  background: linear-gradient(135deg, #c9941a 0%, #9a6e0f 100%);
  color: #fff8ea;
  border-bottom-right-radius: 4px;
}
.agpt-bubble-received .agpt-bubble-inner {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,148,26,0.14);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.agpt-bubble-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.25rem;
  text-align: right;
}
.agpt-bubble-received .agpt-bubble-time { color: var(--muted); text-align: left; }

/* ── Typing indicator ── */
.agpt-typing .agpt-bubble-inner {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.7rem 1rem;
}
.agpt-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: agpt-dot-bounce 1.3s ease-in-out infinite;
}
.agpt-dot:nth-child(2) { animation-delay: 0.18s; }
.agpt-dot:nth-child(3) { animation-delay: 0.36s; }

/* ── Error message ── */
.agpt-error {
  align-self: center;
  font-size: 0.75rem;
  color: #e07070;
  background: rgba(180,60,60,0.1);
  border: 1px solid rgba(180,60,60,0.2);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  text-align: center;
  max-width: 92%;
}

/* ── Footer / input ── */
.agpt-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid rgba(201,148,26,0.12);
  background: rgba(8,8,6,0.5);
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}
.agpt-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,148,26,0.2);
  border-radius: 22px;
  padding: 0.58rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.agpt-input::placeholder { color: var(--muted); }
.agpt-input:focus {
  border-color: rgba(201,148,26,0.5);
  box-shadow: 0 0 0 3px rgba(201,148,26,0.08);
}
.agpt-input:disabled { opacity: 0.5; }
.agpt-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #c9941a, #9a6e0f);
  color: #fff8ea;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.2s;
}
.agpt-send svg { width: 16px; height: 16px; }
.agpt-send:hover   { transform: scale(1.08); }
.agpt-send:active  { transform: scale(0.93); }
.agpt-send:disabled { opacity: 0.45; cursor: default; transform: none; }

@media (max-width: 480px) {
  .agpt-panel { right: 0.75rem; width: calc(100vw - 1.5rem); bottom: 100px; }
  .agpt-btn   { width: 54px; height: 54px; }
}
