/* Shared site styles consolidated from Stitch exports */
/* Base */
body {
  background-color: #111317;
  color: #e2e2e8;
  -webkit-font-smoothing: antialiased;
}

/* Cards */
.sleek-card {
  background-color: #1A1D23;
  border: 1px solid #2D323B;
  transition: all 200ms ease-out;
}
.sleek-card:hover { border-color: #b3c5ff; }

.custom-dash::before {
  content: "—";
  color: #b3c5ff;
  margin-right: 0.75rem;
  font-weight: bold;
}

/* Status pulse */
.status-pulse { width: 8px; height: 8px; background-color: #4edea3; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 222, 163, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(78, 222, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 222, 163, 0); }
}

/* Nav underline hover */
.nav-link-hover { position: relative; }
.nav-link-hover::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background-color: #b3c5ff; transition: width 0.2s ease-out; }
.nav-link-hover:hover::after { width: 100%; }

/* Top navigation: global defaults for header/nav links to ensure consistent font, size, hover and motion */
header nav a,
header a[href^="/"] {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: rgba(226,226,232,0.86);
  padding: 0.25rem 0.375rem;
  text-decoration: none;
  transition: color 180ms ease, transform 160ms ease;
  position: relative;
}

header nav a:hover,
header a:hover {
  color: #b3c5ff;
  transform: translateY(-1px);
}

/* Active / current page indicator */
header nav a[aria-current='page'], header nav a.active {
  color: #b3c5ff;
  font-weight: 600;
}

/* Decorative underline for nav links (desktop) */
header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #b3c5ff;
  transition: width 180ms ease-out;
  pointer-events: none;
}
header nav a:hover::after { width: 100%; }

/* Slightly larger tap targets on mobile */
@media (max-width: 768px) {
  header nav a { font-size: 1.05rem; padding: 0.75rem 0; display: block; }
}

/* Glass / decorative */
.glass-panel { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.scanline { width: 100%; height: 2px; background: linear-gradient(to right, transparent, #b3c5ff, transparent); position: absolute; top: 0; left: 0; animation: scan 4s linear infinite; opacity: 0.2; z-index: 10; }
@keyframes scan { 0% { top: 0%; } 100% { top: 100%; } }
.pulse-dot { animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite; }
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.8; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.border-glow:hover { border-color: #b3c5ff; transition: border-color 0.2s ease-out; }

/* Small reveal animation */
.slide-up { animation: slideUp 0.6s ease-out forwards; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Utility */
.font-code-label { font-family: 'JetBrains Mono', monospace; }

/* Mobile navigation overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: linear-gradient(180deg, rgba(17,19,23,0.98), rgba(17,19,23,0.96));
  backdrop-filter: blur(6px);
  padding: 1rem;
  z-index: 60;
  overflow-y: auto;
}
.mobile-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--tw-text-opacity, #e2e2e8); text-decoration: none; }
.mobile-nav a:hover { color: #b3c5ff; }
.nav-open .mobile-nav { display: block; }

/* Slight tweak to ensure header buttons are visible on mobile */
button#nav-toggle { background: transparent; border: none; color: inherit; }

/* Portfolio assistant */
.assistant-card {
  display: flex;
  flex-direction: column;
  height: 440px;
  padding: 1.25rem;
  overflow: hidden;
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2d323b;
}

.assistant-connection {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  color: #f3c97a;
  font: 500 0.625rem/1 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.assistant-connection__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}

.assistant-connection[data-state='online'] { color: #4edea3; }
.assistant-connection[data-state='working'] { color: #b3c5ff; }
.assistant-connection[data-state='error'] { color: #ffb4ab; }
.assistant-connection[data-state='working'] .assistant-connection__dot { animation: assistant-status-pulse 1s ease-in-out infinite; }

.assistant-messages {
  flex: 1;
  min-height: 0;
  padding: 1rem 0.25rem 0.75rem 0;
  overflow-y: auto;
  scrollbar-color: #424655 transparent;
  scrollbar-width: thin;
}

.assistant-message {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  animation: assistant-message-in 180ms ease-out;
}

.assistant-message--user { justify-content: flex-end; }
.assistant-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: rgba(179, 197, 255, 0.1);
  color: #b3c5ff;
}

.assistant-avatar .material-symbols-outlined { font-size: 1rem; }
.assistant-bubble {
  max-width: 85%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #2d323b;
  border-radius: 0.7rem 0.7rem 0.7rem 0.15rem;
  background: #1e2024;
  color: #c2c6d8;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.assistant-message--user .assistant-bubble {
  border-color: rgba(179, 197, 255, 0.32);
  border-radius: 0.7rem 0.7rem 0.15rem 0.7rem;
  background: rgba(179, 197, 255, 0.12);
  color: #e2e2e8;
}

.assistant-message--error .assistant-bubble {
  border-color: rgba(255, 180, 171, 0.35);
  color: #ffb4ab;
}

.assistant-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.1rem;
}

.assistant-typing span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #b3c5ff;
  animation: assistant-typing 1.1s infinite ease-in-out;
}

.assistant-typing span:nth-child(2) { animation-delay: 120ms; }
.assistant-typing span:nth-child(3) { animation-delay: 240ms; }

.assistant-suggestions {
  display: flex;
  gap: 0.45rem;
  padding: 0.25rem 0 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.assistant-suggestions::-webkit-scrollbar { display: none; }
.assistant-suggestions button {
  flex: 0 0 auto;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(179, 197, 255, 0.22);
  border-radius: 999px;
  background: rgba(179, 197, 255, 0.05);
  color: #b3c5ff;
  font: 500 0.68rem/1.2 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.assistant-suggestions button:hover {
  border-color: rgba(179, 197, 255, 0.5);
  background: rgba(179, 197, 255, 0.12);
}

.assistant-suggestions button:disabled { cursor: not-allowed; opacity: 0.45; }
.assistant-input-row { position: relative; }
.assistant-input-row input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 3rem 0.7rem 0.85rem;
  border: 1px solid #424655;
  border-radius: 0.65rem;
  background: #0c0e12;
  color: #e2e2e8;
  font: 400 0.8rem/1.4 'JetBrains Mono', monospace;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.assistant-input-row input::placeholder { color: rgba(140, 144, 161, 0.65); }
.assistant-input-row input:focus {
  border-color: #b3c5ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(179, 197, 255, 0.12);
}

.assistant-input-row input:disabled { cursor: not-allowed; opacity: 0.65; }
.assistant-input-row button {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.45rem;
  background: #b3c5ff;
  color: #002b75;
  cursor: pointer;
  transform: translateY(-50%);
  transition: filter 160ms ease, opacity 160ms ease;
}

.assistant-input-row button:hover { filter: brightness(1.08); }
.assistant-input-row button:disabled { cursor: not-allowed; filter: none; opacity: 0.45; }
.assistant-input-row .material-symbols-outlined { font-size: 1.15rem; }
.assistant-form-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.35rem;
  color: #8c90a1;
  font: 400 0.6rem/1.2 'JetBrains Mono', monospace;
}

@keyframes assistant-status-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes assistant-message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes assistant-typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 480px) {
  .assistant-card { height: 430px; padding: 1rem; }
  .assistant-connection span:last-child { display: none; }
}

/* Resume preview modal */
body.resume-modal-open { overflow: hidden; }

.resume-dialog {
  width: min(1100px, 94vw);
  height: min(900px, 92vh);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #2d323b;
  border-radius: 1rem;
  background: #1a1d23;
  color: #e2e2e8;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.resume-dialog[open] { animation: resume-dialog-in 180ms ease-out; }
.resume-dialog::backdrop {
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(6px);
}

.resume-dialog__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.resume-dialog__header,
.resume-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #1a1d23;
}

.resume-dialog__header { border-bottom: 1px solid #2d323b; }
.resume-dialog__footer { border-top: 1px solid #2d323b; }
.resume-dialog__header h2 { margin: 0.15rem 0 0; font-size: 1.125rem; font-weight: 700; }
.resume-dialog__eyebrow {
  margin: 0;
  color: #b3c5ff;
  font: 500 0.65rem/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.14em;
}

.resume-dialog__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #2d323b;
  border-radius: 0.6rem;
  background: #111317;
  color: #e2e2e8;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.resume-dialog__close:hover { border-color: #b3c5ff; color: #b3c5ff; transform: scale(1.04); }
.resume-dialog__close:focus-visible,
.resume-dialog__actions a:focus-visible { outline: 2px solid #b3c5ff; outline-offset: 2px; }

.resume-dialog__viewer { flex: 1; min-height: 0; background: #52565d; }
.resume-dialog__viewer iframe { display: block; width: 100%; height: 100%; border: 0; background: white; }
.resume-dialog__footer p { margin: 0; color: rgba(226, 226, 232, 0.72); font-size: 0.85rem; }
.resume-dialog__actions { display: flex; flex: 0 0 auto; gap: 0.75rem; }
.resume-dialog__actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #b3c5ff;
  border-radius: 0.6rem;
  color: #b3c5ff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 160ms ease, background-color 160ms ease;
}

.resume-dialog__actions a:hover { background: rgba(179, 197, 255, 0.1); }
.resume-dialog__actions .resume-dialog__download { background: #b3c5ff; color: #0d265f; }
.resume-dialog__actions .resume-dialog__download:hover { filter: brightness(1.08); }
.resume-dialog__actions .material-symbols-outlined { font-size: 1.1rem; }

@keyframes resume-dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .resume-dialog { width: 96vw; height: 96dvh; border-radius: 0.75rem; }
  .resume-dialog__header, .resume-dialog__footer { padding: 0.8rem; }
  .resume-dialog__footer { align-items: stretch; flex-direction: column; }
  .resume-dialog__footer p { display: none; }
  .resume-dialog__actions { width: 100%; }
  .resume-dialog__actions a { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .resume-dialog[open] { animation: none; }
}
