/* brian.samson.social — main stylesheet */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --surface: #1a1a1a;
  --surface-hover: #222;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  
  --accent-primary: #667eea;
  --accent-secondary: #764ba2;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  
  --window-red: #ff5f56;
  --window-yellow: #ffbd2e;
  --window-green: #27c93f;
  
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

/* Very small mobile devices */
@media (max-width: 375px) {
  .main-content {
    padding: 8px;
    gap: 8px;
  }
  
  .project-card {
    padding: 12px;
  }
  
  .project-header {
    gap: 8px;
  }
  
  .project-icon {
    width: 36px;
    height: 36px;
  }
  
  .project-title {
    font-size: 15px;
  }
  
  .project-description {
    font-size: 12px;
  }
  
  .mobile-header {
    padding: 12px;
  }
  
  .mobile-avatar {
    width: 50px;
    height: 50px;
  }
}

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

html, body {
  height: 100%;
}

/* Desktop only - prevent scrolling */
@media (min-width: 769px) {
  html, body {
    overflow: hidden;
  }
}

/* Dynamic viewport height support - desktop only */
@media (min-width: 769px) {
  @supports (height: 100dvh) {
    .app-container {
      height: 100dvh;
    }
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Layout */
.app-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Background Effect */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
  pointer-events: none;
}


/* Main Window */
.main-window {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  max-height: 750px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Window Header */
.window-header {
  background: var(--surface);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: opacity var(--transition-fast);
}

.window-dot.red { background: var(--window-red); }
.window-dot.yellow { background: var(--window-yellow); }
.window-dot.green { background: var(--window-green); }

.window-title {
  flex: 1;
  text-align: right;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Content Area */
.window-content {
  flex: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
  height: 100%;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
}

.avatar-container {
  position: relative;
  margin-bottom: 20px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  background: var(--accent-gradient);
  border-radius: 50%;
  opacity: 0.8;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 0.4; }
}

.profile-info {
  margin-bottom: 24px;
}

.name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.bio {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.location-icon {
  width: 14px;
  height: 14px;
}

.location a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Quick Links */
.quick-links {
  width: 100%;
}

.quick-links-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-weight: 600;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  font-size: 14px;
}

.quick-link-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* Main Content */
.main-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  height: 100%;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Grid adjustments for medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .window-content {
    grid-template-columns: 240px minmax(0, 1fr) 290px;
  }

  .main-content {
    padding: 16px;
    gap: 14px;
  }

  .sidebar {
    padding: 20px;
  }

  .feed-panel {
    padding: 20px 16px;
  }
}

/* Grid adjustments for very wide screens */
@media (min-width: 1400px) {
  .main-content {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
    margin: 0 auto;
  }
}

/* Project Cards */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: all var(--transition-medium);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: auto;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: translateY(-100%);
  transition: transform var(--transition-medium);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-secondary);
  padding: 2px;
  flex-shrink: 0;
}

.project-icon.svg-icon {
  padding: 10px;
  color: var(--text-primary);
}

/* Social Cards — horizontal list rows */
.social-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.social-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.social-card .project-icon {
  width: 42px;
  height: 42px;
}

.social-card .project-title {
  font-size: 16px;
}

.social-card .project-description {
  font-size: 13px;
  margin: 0;
}

.social-card .project-icon.svg-icon {
  padding: 8px;
  color: #fff;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast);
}

.social-card::before {
  background: var(--brand-gradient);
}

/* Bluesky */
.social-card.bluesky {
  --brand: #1185fe;
  --brand-gradient: linear-gradient(135deg, #0560ff 0%, #00c2ff 100%);
}
.social-card.bluesky .project-icon.svg-icon {
  background: var(--brand-gradient);
}

/* X */
.social-card.x {
  --brand: #e7e9ea;
  --brand-gradient: linear-gradient(135deg, #ffffff 0%, #71767b 100%);
}
.social-card.x .project-icon.svg-icon {
  background: #000;
  border: 1px solid var(--border);
}

/* Threads */
.social-card.threads {
  --brand: #fe0169;
  --brand-gradient: linear-gradient(135deg, #fe0169 0%, #a100ff 100%);
}
.social-card.threads .project-icon.svg-icon {
  background: linear-gradient(135deg, #101010 0%, #2a2a2a 100%);
}

.social-card .project-link {
  color: var(--brand);
  flex-shrink: 0;
}

.social-card .project-link svg {
  width: 18px;
  height: 18px;
}

/* Animated brand glow inside each card */
.social-card > * {
  position: relative;
  z-index: 1;
}

.social-card::before {
  z-index: 2;
}

.social-card::after {
  content: '';
  position: absolute;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--brand-gradient);
  filter: blur(60px);
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
  animation: card-glow 9s ease-in-out infinite;
}

.social-card.x::after {
  opacity: 0.1;
}

@keyframes card-glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.16; }
  50% { transform: translate(-40px, 50px) scale(1.25); opacity: 0.28; }
}

@media (prefers-reduced-motion: reduce) {
  .social-card::after {
    animation: none;
  }
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
  line-height: 1.3;
  word-wrap: break-word;
}

.project-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: gap var(--transition-fast);
  flex-shrink: 0;
}

.project-link svg {
  width: 14px;
  height: 14px;
}

/* Contact Card — full-width banner below the social links */
.contact-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  height: auto;
}

.contact-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.contact-text {
  flex: 1;
  min-width: 180px;
}

.contact-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Contact button */
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

/* Bluesky Feed — self-contained right panel */
.feed-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feed-panel .feed-header {
  position: sticky;
  top: -24px;
  margin: -24px -20px 0;
  padding: 24px 20px 14px;
  background: var(--surface);
  z-index: 1;
}

.feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-brand {
  width: 20px;
  height: 20px;
  color: #1185fe;
  flex-shrink: 0;
}

.feed-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.feed-all {
  margin-left: auto;
  font-size: 13px;
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.feed-repost {
  font-size: 12px;
  color: var(--text-tertiary);
}

.feed-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.feed-images img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.feed-images img:only-child {
  grid-column: 1 / -1;
  height: 170px;
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-tertiary);
}

.feed-stats {
  display: flex;
  gap: 12px;
}

.feed-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.feed-stats svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

/* Desktop hover states */
@media (hover: hover) {
  .feed-post:hover {
    border-color: rgba(17, 133, 254, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .feed-all:hover {
    color: var(--text-secondary);
  }

  .window-dot:hover {
    opacity: 0.8;
  }
  
  .contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
  }
  
  .project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }

  .project-card:hover::before {
    transform: translateY(0);
  }

  .social-card:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, transparent);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 20%, transparent);
  }

  .social-card:hover .project-icon.svg-icon {
    transform: scale(1.06);
  }

  .social-card:hover::after {
    opacity: 0.35;
    animation-duration: 4.5s;
  }

  .social-card .project-link:hover {
    color: var(--brand);
  }
  
  .quick-link:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
  }
  
  .project-link:hover {
    gap: 10px;
  }
  
  .location a:hover {
    color: var(--text-secondary);
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .app-container {
    padding: 0;
    height: auto;
    min-height: 100vh;
    display: block;
  }

  .main-window {
    border-radius: 0;
    border: none;
    height: auto;
    min-height: 100vh;
    max-height: none;
    display: flex;
    flex-direction: column;
    box-shadow: none;
  }

  .window-header {
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .window-content {
    grid-template-columns: 1fr;
    flex: 1;
    overflow: visible;
    display: block;
    height: auto;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 0 0 16px 0;
    gap: 0;
    flex: none;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    height: auto;
  }

  .social-list {
    padding: 16px 16px 0;
    gap: 10px;
  }

  .social-list .social-card {
    margin: 0;
    padding: 14px 16px;
  }

  /* Bluesky feed: full-width panel below the content on mobile */
  .feed-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    height: auto;
    overflow: visible;
    padding: 20px 16px;
  }

  .feed {
    margin: 0;
    gap: 12px;
  }

  .feed-panel .feed-header {
    position: static;
    margin: 0 0 4px;
    padding: 0 0 4px;
  }

  /* Show mobile header with full profile */
  .mobile-header {
    display: block !important;
    padding: 24px 16px;
    text-align: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .mobile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
  }

  .mobile-header .name {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
  }

  .mobile-header .bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .mobile-header .location {
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .mobile-header .location-icon {
    width: 14px;
    height: 14px;
  }

  /* Show mobile quick links on mobile */
  .mobile-quick-links {
    display: flex !important;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
  }

  .mobile-quick-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
  }

  .mobile-quick-link svg {
    width: 20px;
    height: 20px;
  }

  .mobile-quick-link:active {
    transform: scale(0.95);
    background: rgba(102, 126, 234, 0.1);
  }

  /* Mobile cards */
  .project-card {
    padding: 20px;
    margin: 16px;
    border-radius: 12px;
    min-height: auto;
  }

  .project-card:last-child {
    margin-bottom: 16px;
  }

  .project-header {
    gap: 16px;
    margin-bottom: 16px;
  }

  .project-icon {
    width: 48px;
    height: 48px;
  }

  .project-title {
    font-size: 18px;
  }

  .project-description {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .project-link {
    font-size: 14px;
  }

  /* Contact card on mobile */
  .contact-card {
    margin: 16px;
    margin-bottom: 0;
  }

  .contact-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .contact-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .contact-subtitle {
    font-size: 14px;
  }

  .contact-button {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
  }

  .window-title {
    display: none;
  }

  .footer {
    flex-shrink: 0;
    padding: 20px;
    font-size: 12px;
    margin-top: 8px;
  }
}

/* Desktop only - hide mobile elements */
.mobile-header, .mobile-quick-links {
  display: none;
}

/* Safe area support for modern devices */
@supports (padding: max(0px)) {
  .window-header {
    padding-top: max(16px, env(safe-area-inset-top));
  }
  
  .footer {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  
  @media (max-width: 768px) {
    .main-content {
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
    }
  }
}

/* Scrollbar Styling */
.main-content::-webkit-scrollbar {
  width: 8px;
}

.main-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.main-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Additional mobile fixes */
@media (max-width: 768px) {
  /* Ensure proper touch interactions */
  .project-card, .quick-link, .contact-button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
  }
  
  /* Prevent horizontal scroll */
  body {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Ensure full height works properly */
  html {
    height: 100%;
  }
  
  body {
    height: 100%;
  }
  
  /* Prevent zoom on input focus */
  input, textarea, select {
    font-size: 16px;
  }
  
  /* Ensure cards don't overflow */
  .project-card {
    max-width: 100%;
    word-wrap: break-word;
  }
  
  /* Adjust arrow size on mobile */
  .project-link svg {
    width: 12px;
    height: 12px;
  }
}
