/* ===== COMPONENTS.CSS ===== */
/* All reusable UI components */

/* ---- Panel System ---- */
.panel {
  display: none;
}
.panel.active {
  display: block;
  animation: panelIn 0.45s ease both;
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Cursor-aware subtle luxury glow */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(226, 183, 20, 0.06),
    transparent 40%
  );
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: rgba(226, 183, 20, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
/* Staggered entrance */
.card {
  animation: panelIn 0.5s ease both;
}
.card:nth-child(1) {
  animation-delay: 0.03s;
}
.card:nth-child(2) {
  animation-delay: 0.08s;
}
.card:nth-child(3) {
  animation-delay: 0.13s;
}
.card:nth-child(4) {
  animation-delay: 0.18s;
}
.card:nth-child(5) {
  animation-delay: 0.23s;
}
.card:nth-child(6) {
  animation-delay: 0.28s;
}

/* ==== Luxury Card Micro-Interactions ==== */
/* 1. Light Sweep on Hover */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transform: skewX(-20deg);
  z-index: 2;
  pointer-events: none;
  transition: left 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover::after {
  left: 200%;
}

/* 2. Image Zoom */
.card img {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover img {
  transform: scale(1.05);
}

/* 3. Technology Tag Stagger */
.card .tag {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover .tag:nth-child(1) {
  transform: translateY(-3px);
  transition-delay: 0s;
}
.card:hover .tag:nth-child(2) {
  transform: translateY(-3px);
  transition-delay: 0.05s;
}
.card:hover .tag:nth-child(3) {
  transform: translateY(-3px);
  transition-delay: 0.1s;
}
.card:hover .tag:nth-child(4) {
  transform: translateY(-3px);
  transition-delay: 0.15s;
}

.card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet);
  background: var(--violet-soft);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--sp-3);
  align-self: flex-start;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.card h3 {
  font-size: 17px;
  margin-bottom: var(--sp-2);
}
.card p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: var(--sp-3);
  line-height: 1.6;
  flex-grow: 1;
}
.card .links {
  display: flex;
  gap: var(--sp-3);
  font-size: 13px;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  align-items: center;
}
.card .links a {
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--ease-fast);
}
.card .links a:hover {
  text-decoration: underline;
}

/* Card Cover (gradient placeholder) */
.card-cover {
  margin: calc(var(--sp-6) * -1);
  margin-bottom: var(--sp-4);
  height: 8px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-cover--gradient-1 {
  background: linear-gradient(135deg, #6f4cff, #00d4ff);
}
.card-cover--gradient-2 {
  background: linear-gradient(135deg, #0090b8, #6f4cff);
}
.card-cover--gradient-3 {
  background: linear-gradient(135deg, #00d4ff, #6f4cff);
}
.card-cover--gradient-4 {
  background: linear-gradient(135deg, #6f4cff, #ff6b6b);
}
.card-cover--gradient-5 {
  background: linear-gradient(135deg, #0090b8, #2fcf71);
}
.card-cover--gradient-6 {
  background: linear-gradient(135deg, #ff6b6b, #ffb347);
}
.card-cover--image {
  height: 200px;
}

/* Card Status */
.card-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-status--active {
  background: rgba(47, 207, 113, 0.12);
  color: #2fcf71;
}
.card-status--completed {
  background: var(--violet-soft);
  color: var(--violet);
}
.card-status--ongoing {
  background: rgba(0, 144, 184, 0.1);
  color: var(--cyan);
}

/* Card Meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
}

/* Card Keywords */
.card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.keyword {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Tech Stack Badges */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-3);
}
.tech-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  background: rgba(0, 144, 184, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Link Button (text button in cards) */
.link-btn {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  padding: 0;
  transition: color var(--ease-fast);
}
.link-btn:hover {
  text-decoration: underline;
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--ease-base);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
}
.btn:not(.btn-primary):hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: translateY(0);
}
.btn-ghost {
  border-color: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: transparent;
  color: var(--text);
  background: var(--bg-alt);
  transform: translateY(-1px);
}
.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  transition: all var(--ease-base);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--text);
  transform: translateY(-2px);
}
.icon-btn:active {
  transform: translateY(0);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}
.badge-violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.badge-cyan {
  background: rgba(0, 144, 184, 0.1);
  color: var(--cyan);
}

/* ---- Chips / Highlights ---- */
/* ---- Chips / Highlights ---- */
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 6px;
}
.hl-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  font-size: 14px;
  transition: all var(--ease-base);
}
.hl-chip:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}
.hl-emoji {
  font-size: 18px;
  flex-shrink: 0;
}
.hl-text b {
  display: block;
  font-size: 14px;
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.hl-text span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---- Quotes ---- */
blockquote {
  font-size: var(--fs-h3);
  font-style: italic;
  line-height: var(--lh-base);
  color: var(--text);
  position: relative;
  text-align: center;
  padding: var(--sp-8) 0;
  margin: var(--sp-6) auto;
  max-width: 800px;
}
blockquote::before {
  content: "“";
  font-family: serif;
  font-size: 120px;
  color: var(--line);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  opacity: 0.5;
}

/* ---- Currently Badge ---- */
.currently {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fcf71;
  box-shadow: 0 0 8px #2fcf71;
  animation: pulseGlow 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* ---- Stats Strip ---- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 34px var(--container-pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--violet);
  font-weight: 600;
}
.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.t-item {
  position: relative;
  padding-bottom: 16px;
}
.t-item:last-child {
  padding-bottom: 0;
}
.t-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
}
.t-content {
  flex: 1;
}
.t-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.t-title {
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-display);
}
.t-expand-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: all var(--ease-fast);
  flex-shrink: 0;
}
.t-expand-btn:hover {
  border-color: var(--violet);
  color: var(--violet);
}
.t-expand-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.t-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin: 2px 0 6px;
}
.t-desc {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}
.t-details {
  margin-top: var(--sp-3);
}
.t-details[hidden] {
  display: none;
}
.t-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}
.modal-overlay.active,
.modal-overlay:not([hidden]) {
  display: flex;
}
.modal-overlay[hidden] {
  display: none;
}
.modal {
  width: 340px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: panelIn 0.3s ease both;
}
.modal--wide {
  width: 420px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal--detail {
  width: 640px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.modal .sub {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--ease-fast);
}
.modal-close:hover {
  color: var(--text);
}
.modal-error {
  color: #ff6b6b;
  font-size: 12.5px;
  margin-top: 6px;
  display: none;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--sp-4);
}
.lead-modal {
  width: 360px;
}
.thanks {
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-dim);
}
.thanks[hidden] {
  display: none;
}
.thanks b {
  color: var(--violet);
}

/* ---- Forms ---- */
.field {
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition:
    border-color var(--ease-fast),
    box-shadow var(--ease-fast);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Contact Form Specifics */
.contact-form-wide input,
.contact-form-wide textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #334155; /* border-slate-700 */
  background: #0f172a; /* bg-slate-900 */
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 16px;
  transition:
    border-color var(--ease-fast),
    box-shadow var(--ease-fast);
}
.contact-form-wide input::placeholder,
.contact-form-wide textarea::placeholder {
  color: #94a3b8; /* text-slate-400 */
}
.contact-form-wide input:focus,
.contact-form-wide textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2);
}
.contact-form-wide input:user-invalid,
.contact-form-wide textarea:user-invalid {
  border-color: #ef4444; /* red-500 */
}
/* ---- Grids ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ---- Connect Cards ---- */
.connect-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--ease-base);
  text-decoration: none;
  color: inherit;
}
.connect-card:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: inherit;
}
.connect-icon {
  color: var(--violet);
  flex-shrink: 0;
}
.connect-card .plat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.connect-card .handle {
  font-size: 15px;
  font-weight: 600;
}

/* ---- Publication Cards ---- */
.pub-card {
  gap: var(--sp-2);
}
.pub-type-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--violet);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
}
.pub-type-badge--review {
  background: #ffb347;
  color: #15142a;
}
.pub-authors {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.pub-venue {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--sp-2);
}
.pub-abstract {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  flex-grow: 1;
}
.pub-links {
  display: flex;
  gap: 8px;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

/* ---- Book Cards ---- */
.book-card {
  flex-direction: row;
  gap: var(--sp-5);
  align-items: flex-start;
}
.book-cover {
  width: 100px;
  min-height: 140px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(0, 0, 0, 0.15);
}
.book-front {
  text-align: center;
  padding: var(--sp-2);
}
.book-emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}
.book-title-mini {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  line-height: 1.2;
}
.book-info {
  flex: 1;
}
.book-info h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.book-meta {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.book-info p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: var(--sp-3);
}
.book-links {
  display: flex;
  gap: 8px;
}

/* ---- Filter / Tab Pills ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--sp-8);
}
.tab-pill {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--ease-fast);
}
.tab-pill:hover {
  border-color: var(--violet);
  color: var(--text);
}
.tab-pill.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* ---- Add Card (Admin) ---- */
.add-card-btn {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  min-height: 120px;
  transition: all var(--ease-base);
}
.add-card-btn:hover {
  border-color: var(--violet);
  color: var(--violet);
}

/* ---- Admin Bar ---- */
.admin-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-admin);
  background: var(--violet);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-family: var(--font-mono);
}
.admin-bar[hidden] {
  display: none;
}
.admin-bar span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.a-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-bar button,
.a-actions button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--ease-fast);
}
.admin-bar button:hover,
.a-actions button:hover {
  background: rgba(255, 255, 255, 0.28);
}
[contenteditable="true"] {
  outline: 2px dashed var(--cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  pointer-events: auto;
  animation: slideInRight 0.3s ease both;
}
.toast--success {
  border-left: 3px solid #2fcf71;
}
.toast--error {
  border-left: 3px solid #ff6b6b;
}
.toast--info {
  border-left: 3px solid var(--violet);
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---- Animations ---- */
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0px var(--violet);
  }
  50% {
    box-shadow: 0 0 14px var(--violet);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---- Nav Pill Highlight ---- */
.nav-links {
  position: relative;
}
.nav-pill {
  position: absolute;
  left: 0;
  width: 100%;
  height: 48px; /* rough height of a nav link */
  background: rgba(0, 229, 255, 0.08);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0; /* hidden until active link is found */
}
.nav-links a {
  position: relative;
  z-index: 1;
}

/* ===== EXPERTISE BENTO GRID ===== */
.expertise-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 32px;
  width: 100%;
  position: relative;
  z-index: 2;
}

@media (min-width: 1024px) {
  .expertise-bento-grid {
    gap: 32px;
  }
}

.bento-card {
  position: relative;
  background: rgba(20, 20, 30, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  cursor: crosshair;
}

.bento-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 10px 20px rgba(0, 229, 255, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(30, 30, 45, 0.5);
}

.bento-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bento-icon-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--cyan);
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    color 0.4s ease,
    background 0.4s ease,
    border-color 0.4s ease;
}

.bento-card:hover .bento-icon-wrapper {
  transform: scale(1.15) rotate(-5deg);
  color: #fff;
  background: rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.4);
}

.bento-text h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.2;
  transition: transform 0.3s ease;
}

.bento-card:hover .bento-text h3 {
  transform: translateY(-2px);
}

.bento-text p {
  font-size: 18px;
  font-weight: 500;
  color: #7a7a7a;
  margin: 0;
  line-height: 1.5;
}

.bento-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-card:hover .bento-keywords {
  opacity: 1;
  transform: translateY(0);
}

.bento-keywords span {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0, 229, 255, 0.05);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.15);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Asymmetric spans for bento */
.bento-card {
  grid-column: span 12;
}

@media (min-width: 768px) {
  /* Tablet: 2-column perfectly balanced grid */
  .card-ai {
    grid-column: span 6;
  }
  .card-quantum {
    grid-column: span 6;
  }
  .card-publications {
    grid-column: span 6;
  }
  .card-cv {
    grid-column: span 6;
  }
  .card-ml {
    grid-column: span 6;
  }
  .card-decision {
    grid-column: span 6;
  }
}

@media (min-width: 1024px) {
  /* Desktop: 3-column perfectly balanced asymmetric grid (No Row Spans) */
  .card-ai {
    grid-column: span 8;
  }
  .card-quantum {
    grid-column: span 4;
  }

  .card-publications {
    grid-column: span 4;
  }
  .card-cv {
    grid-column: span 8;
  }

  .card-ml {
    grid-column: span 6;
  }
  .card-decision {
    grid-column: span 6;
  }
}

/* ===== AMBIENT BACKGROUND ===== */
.ambient-background {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--violet);
  bottom: 10%;
  right: 10%;
  animation-delay: -5s;
}
.blob-3 {
  width: 300px;
  height: 300px;
  background: #ff3366;
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}
@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10%, 15%) scale(1.2);
  }
  100% {
    transform: translate(-10%, 5%) scale(0.9);
  }
}

/* ===== RESEARCH & ENGINEERING STACK ===== */
.stack-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .stack-container {
    gap: 16px;
  }
}

/* Premium Linear/Vercel Inspired Domain Cards */
.domain-card {
  position: relative;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.5s ease,
    border-color 0.5s ease,
    background 0.5s ease;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: crosshair;
}

.domain-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    800px circle at 0% 0%,
    rgba(255, 255, 255, 0.03),
    transparent 40%
  );
  z-index: 0;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    background 0.5s ease;
}

.domain-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.domain-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(0, 229, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 22, 0.8);
}

.domain-card:hover::before {
  background: radial-gradient(
    800px circle at 0% 0%,
    rgba(0, 229, 255, 0.1),
    transparent 40%
  );
}

.domain-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.domain-icon-wrapper {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #888;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.domain-card:hover .domain-icon-wrapper {
  transform: scale(1.15) rotate(8deg);
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(0, 229, 255, 0.2),
    rgba(0, 229, 255, 0.05)
  );
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 229, 255, 0.3);
}

.domain-title {
  font-size: 18px;
  font-weight: 700;
  color: #ededed;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.domain-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.skill-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-chip:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Grid Layout Spans */
.domain-card {
  grid-column: span 12;
}

@media (min-width: 768px) {
  /* Tablet: 2-column balanced grid */
  .card-ai-domain,
  .card-quantum-domain,
  .card-programming-domain,
  .card-data-domain,
  .card-research-domain {
    grid-column: span 6;
  }
  .card-research-domain {
    /* Center the last card */
    grid-column: 4 / span 6;
  }
}

@media (min-width: 1024px) {
  /* Desktop: 3-column asymmetric grid */
  .card-ai-domain {
    grid-column: span 8;
  }
  .card-quantum-domain {
    grid-column: span 4;
  }
  .card-programming-domain {
    grid-column: span 4;
  }
  .card-data-domain {
    grid-column: span 4;
  }
  .card-research-domain {
    grid-column: span 4;
  }
}

/* ===== PREMIUM CONNECT SECTION (ADAPTIVE THEME) ===== */
.premium-connect-section {
  background-color: transparent;
  color: var(--text);
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.connect-light-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}
@media (min-width: 1024px) {
  .connect-light-grid {
    grid-template-columns: 7fr 5fr;
  }
}
.connect-light-left {
  display: flex;
  flex-direction: column;
}
.cl-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.cl-headline {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 0 0 24px 0;
  max-width: 700px;
}
.cl-desc {
  font-size: 20px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 40px 0;
}
.cl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}
.btn-cl-primary,
.btn-cl-secondary {
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-cl-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}
.btn-cl-primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--text);
}
.btn-cl-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-cl-secondary:hover {
  background: var(--bg-alt);
  transform: translateY(-4px);
}
.cl-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 64px;
}
@media (min-width: 600px) {
  .cl-feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.cl-feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cl-feature-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}
.cl-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}
.cl-feature-card:hover .cl-icon {
  transform: rotate(6deg) scale(1.1);
}
.cl-feat-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}
.cl-feat-desc {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}
.cl-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cl-socials a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cl-socials a svg {
  width: 20px;
  height: 20px;
}
.cl-socials a:hover {
  transform: translateY(-6px) scale(1.05);
  background: var(--bg);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 10px 20px var(--gold-soft);
}
.cl-form-card {
  background: var(--card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.cl-form-group {
  position: relative;
  margin-bottom: 24px;
}
.cl-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 600px) {
  .cl-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
.cl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.cl-input {
  width: 100%;
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 20px;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
textarea.cl-input {
  height: auto;
  padding: 16px 20px;
  resize: vertical;
}
.cl-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.btn-cl-submit {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-cl-submit:hover {
  transform: translateY(-4px);
  background: var(--text);
  box-shadow: var(--shadow-md);
}
.btn-cl-submit:hover .btn-icon {
  transform: translateX(4px);
}
.cl-trust-badges {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cl-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ===== EXPERTISE PANEL (ADAPTIVE THEME) ===== */
.premium-expertise-section {
  background-color: transparent;
  color: var(--text);
  padding: 120px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.expertise-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.bento-light-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Grid Cell Sizes */
.card-ai-l,
.card-cv-l,
.card-qc-l,
.card-prog-l,
.card-ds-l,
.card-res-l {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .card-cv-l,
  .card-qc-l {
    grid-column: span 6;
  }
  .card-prog-l,
  .card-ds-l,
  .card-res-l {
    grid-column: span 4;
  }
}

@media (min-width: 1024px) {
  .card-ai-l {
    grid-column: span 12;
  }
  .card-cv-l,
  .card-qc-l {
    grid-column: span 6;
  }
  .card-prog-l,
  .card-ds-l,
  .card-res-l {
    grid-column: span 4;
  }
}

.bento-light-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
}
.bento-light-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.b-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.b-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
}
.b-icon-wrap svg {
  width: 20px;
  height: 20px;
}
.bento-light-card:hover .b-icon-wrap {
  color: var(--gold);
  border-color: var(--gold);
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 4px 12px var(--gold-soft);
  background: var(--bg-alt);
}

.b-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}
.b-desc {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0 0 24px 0;
}
.b-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.b-chips span {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.3s ease;
}
.bento-light-card:hover .b-chips span:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--gold);
  transform: translateY(-2px) scale(1.03);
}
