/* ==========================================
   MESSENGER STYLE PORTFOLIO
========================================== */

/* ==========================================
   GLOBAL STYLES & CSS VARIABLES
========================================== */
:root {
  /* Colors - Dark Theme (Messenger Style) */
  --primary-color: #0084ff;
  --secondary-color: #0073e6;
  --accent-color: #00d4ff;

  /* Background Colors */
  --bg-primary: #0c0c0c;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-glass: rgba(255, 255, 255, 0.05);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --text-inverse: #000000;

  /* Message Colors */
  --message-sent: #0084ff;
  --message-received: #2a2a2a;
  --message-text: #ffffff;
  --message-time: #808080;

  /* Border & Shadow */
  --border-color: #333333;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Z-index */
  --z-sticky: 1020;
}

/* ==========================================
   RESET & BASE STYLES
========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #000000;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal);
  overflow-x: hidden;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}



/* ==========================================
   MESSENGER CONTAINER
========================================== */
.messenger-container {
  max-width: 1000px;
  width: 95%;
  height: 90vh;
  margin: 5vh auto;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 2s ease-in-out;
  position: relative;
}

/* POV Camera Effects */
.messenger-container.camera-zoom {
  transform: scale(1.02);
}

.messenger-container.camera-focus {
  transform: scale(1.05);
}

.chat-header.camera-highlight {
  transform: scale(1.05);
  filter: brightness(1.1);
  transition: all 1.5s ease-in-out;
}

.message.camera-focus {
  transform: scale(1.05);
  filter: brightness(1.2);
  transition: all 1s ease-in-out;
  z-index: 10;
  transform-origin: left center;
}

.message.camera-focus.camera-fade-out {
  transform: scale(1);
  filter: brightness(1);
  transition: all 1.5s ease-in-out;
}

.message-bubble.camera-text {
  animation: textReveal 1.5s ease-in-out;
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   CHAT HEADER (STICKY)
========================================== */
.chat-header {
  background: #000000;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  text-align: center;
  font-family: "Inter", sans-serif;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2);
}

.profile-pic-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background-color: #22c55e;
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.profile-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2);
}

.profile-name {
  font-size: var(--font-size-2xl);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.profile-handle {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

.profile-title {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.est,
.location,
.pronouns {
  display: flex;
  align-items: center;
}

.bullet {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}



/* ==========================================
   CHAT CONTAINER
========================================== */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-4) var(--spacing-6);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}

.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

/* Timestamp Separator */
.timestamp-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-4) 0;
  gap: var(--spacing-3);
}

.timestamp-line {
  flex: 1;
  height: 1px;
  background-color: var(--text-muted);
  opacity: 0.3;
}

.timestamp-text {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 400;
  white-space: nowrap;
  padding: 0 var(--spacing-2);
}

/* ==========================================
   MESSAGE STYLES
========================================== */
.message {
  display: flex;
  gap: var(--spacing-3);
  max-width: 80%;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-left {
  align-self: flex-start;
}

.message-right {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

.message-bubble {
  background: var(--message-received);
  color: var(--message-text);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-2xl);
  border-top-left-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
  position: relative;
}

.message-right .message-bubble {
  background: var(--message-sent);
  border-top-left-radius: var(--radius-2xl);
  border-top-right-radius: var(--radius-sm);
}

/* User message animations */
.message-right.user-message-appear {
  animation: userMessageSlideIn 0.8s ease-out;
}

@keyframes userMessageSlideIn {
  0% {
    opacity: 0;
    transform: translateX(30px) scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: translateX(10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.message-bubble p {
  margin: 0 0 var(--spacing-2) 0;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble em {
  font-style: italic;
  color: var(--accent-color);
}

.message-time {
  font-size: var(--font-size-xs);
  color: var(--message-time);
  align-self: flex-end;
  margin-top: var(--spacing-1);
}

.message-right .message-time {
  align-self: flex-start;
}

/* ==========================================
   RESPONSE OPTIONS
========================================== */
.response-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.response-btn {
  background: var(--message-sent);
  color: var(--message-text);
  border: none;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-2xl);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
  line-height: 1.4;
}

.response-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   CONTENT STYLES
========================================== */
.experience-item {
  background: var(--bg-tertiary);
  padding: var(--spacing-3);
  border-radius: var(--radius-lg);
  margin: var(--spacing-2) 0;
  border-left: 3px solid var(--primary-color);
}

.experience-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: var(--spacing-1);
}

.duration {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.experience-item p {
  margin: var(--spacing-1) 0 0 0;
  color: var(--text-secondary);
}

.message-bubble ul {
  margin: var(--spacing-2) 0;
  padding-left: var(--spacing-4);
}

.message-bubble li {
  margin-bottom: var(--spacing-2);
  color: var(--text-secondary);
}

.message-bubble li strong {
  color: var(--primary-color);
}

.testimonial-item blockquote {
  font-style: italic;
  margin: 0 0 var(--spacing-2) 0;
  color: var(--text-secondary);
  border-left: 2px solid var(--accent-color);
  padding-left: var(--spacing-3);
}

.testimonial-item cite {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-style: normal;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  margin-top: var(--spacing-3);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  color: var(--primary-color);
  text-decoration: none;
  padding: var(--spacing-2) var(--spacing-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.contact-link:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  transform: translateX(4px);
}

/* ==========================================
   TYPING INDICATOR
========================================== */
.typing-indicator {
  opacity: 0.7;
}

.typing-bubble {
  background: var(--message-received) !important;
  padding: var(--spacing-4) !important;
  min-width: 60px;
}

.typing-dots {
  display: flex;
  gap: var(--spacing-1);
  align-items: center;
  justify-content: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingDot {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================
   UTILITY CLASSES
========================================== */
.hidden {
  display: none !important;
}

.visible {
  display: flex !important;
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 768px) {
  .chat-container {
    padding: var(--spacing-3);
  }

  .chat-header {
    padding: var(--spacing-3);
  }

  .profile-info {
    gap: var(--spacing-3);
  }

  .profile-pic-wrapper {
    width: 50px;
    height: 50px;
  }

  .profile-pic {
    width: 100%;
    height: 100%;
  }

  .status-dot {
    width: 12px;
    height: 12px;
    bottom: 1px;
    right: 1px;
  }

  .profile-name {
    font-size: var(--font-size-lg);
  }

  .message {
    max-width: 90%;
  }

  .profile-meta {
    flex-direction: column;
    gap: var(--spacing-1);
  }
}

@media (max-width: 480px) {
  .chat-container {
    padding: var(--spacing-2);
  }

  .chat-header {
    padding: var(--spacing-2);
  }

  .profile-pic-wrapper {
    width: 45px;
    height: 45px;
  }

  .profile-pic {
    width: 100%;
    height: 100%;
  }

  .status-dot {
    width: 10px;
    height: 10px;
    bottom: 1px;
    right: 1px;
  }

  .profile-title {
    font-size: var(--font-size-sm);
  }

  .message {
    max-width: 95%;
  }

  .response-btn {
    font-size: var(--font-size-sm);
    padding: var(--spacing-2) var(--spacing-3);
  }
}

/* ==========================================
   ACCESSIBILITY
========================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.response-btn:focus,
.contact-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
