/* ============================================
   Chela.mckirgan.com — The Lobster Portfolio
   A parody of mckirgan.com. The claw is the law.
   ============================================ */

/* --- CSS Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.3);
  --accent: #e74c3c;
  --accent-hover: #ff6b5b;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.site-logo:hover {
  color: rgba(255, 255, 255, 0.35);
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.2);
}

.hamburger-icon {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.2);
}

.header-tooltip {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.header-tooltip.visible {
  opacity: 1;
}

/* --- Navigation Drawer --- */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: #111111;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-lg);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-drawer.open {
  right: 0;
}

.nav-link {
  font-size: 1.4rem;
  padding: var(--space-md) 0;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

/* --- Scroll Snap Container --- */
.snap-container {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.snap-container::-webkit-scrollbar {
  display: none;
}

.snap-section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-lg);
}

/* --- Hero Section --- */
.hero-section {
  background: var(--bg-primary);
  overflow: hidden;
}

.hero-portrait {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  max-width: 700px;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 0;
  filter: none;
  object-fit: cover;
  mask-image: radial-gradient(ellipse 85% 80% at 50% 40%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 40%, black 50%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  width: 90%;
  max-width: 600px;
}

.hero-company-logo {
  margin-bottom: var(--space-md);
}

.company-logo-placeholder {
  /* PLACEHOLDER: Company logos will cycle here */
  width: 110px;
  height: 110px;
  margin: 0 auto;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all 0.5s ease;
}

.typewriter-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 0 auto;
  min-height: 3em;
  line-height: 1.5;
}

.typewriter-text::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--text-secondary);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.scroll-down-btn {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.scroll-down-btn:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  transform: translateX(-50%) scale(1.1);
}

/* --- Work Sections --- */
.work-section {
  padding: var(--space-xl) var(--space-lg);
  background: #ffffff;
}

.work-content {
  max-width: var(--max-width);
  width: 100%;
}

.work-logo {
  margin-bottom: var(--space-lg);
}

.work-logo-placeholder {
  /* PLACEHOLDER: Replace with actual company/project logos */
  width: 110px;
  height: 110px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.zo-sea-gradient {
  background: linear-gradient(135deg, #f5a623, #e8722a);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.openclaw-gradient {
  background: linear-gradient(135deg, #1a3a5c, #2a5a8c);
  font-size: 3rem;
}

.chela-gradient {
  background: linear-gradient(135deg, #8e44ad, #c0392b);
  font-size: 2.5rem;
}

.workspace-gradient {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  font-size: 2.5rem;
}

.elim-gradient {
  background: linear-gradient(135deg, #2980b9, #6dd5fa);
  font-size: 2.5rem;
}

.work-company {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: var(--space-sm);
  letter-spacing: -1px;
}

.work-role {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: #444444;
  margin-bottom: var(--space-xs);
}

.work-date {
  font-family: var(--font-heading);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 600;
  color: #999999;
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.work-description {
  max-width: 700px;
  margin-bottom: var(--space-lg);
}

.work-description p {
  font-size: 1rem;
  line-height: 1.8;
  color: #333333;
  margin-bottom: var(--space-md);
}

.work-cta {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.work-cta:hover {
  background: #e8e8e8;
  border-color: #ccc;
  transform: scale(1.02);
}

.work-cta:active {
  transform: scale(0.98);
}

/* --- Footer Section --- */
.footer-section {
  background: #0a0a0a;
}

.footer-content {
  text-align: center;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}

.footer-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.social-link {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--text-primary);
  transform: scale(1.2);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* --- Bottom Nav --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: rgba(20, 18, 32, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255,255,255,0.05);
  border-bottom: none;
}

.bottom-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.bottom-nav-link:hover, .bottom-nav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* --- Konami Code Easter Egg --- */
.konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 5, 12, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.konami-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.konami-text {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 8px;
  animation: shake 0.5s ease-in-out infinite;
  text-shadow: 0 0 40px rgba(231, 76, 60, 0.5);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px) rotate(-2deg); }
  75% { transform: translateX(10px) rotate(2deg); }
}

/* --- Logo Easter Egg --- */
.logo-easter-egg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.logo-easter-egg.active {
  opacity: 1;
}

.easter-egg-text {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
  animation: pulse 0.8s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Blog Page Styles --- */
.blog-page {
  min-height: 100vh;
  padding-top: 100px;
}

.blog-page .site-header {
  position: relative;
  background: var(--bg-primary);
  padding-bottom: var(--space-lg);
}

.blog-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.blog-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

/* Featured blog card */
.blog-featured {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: var(--space-xl);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.blog-featured:hover {
  transform: scale(1.01);
}

.blog-featured-image {
  /* PLACEHOLDER: Replace with blog featured image */
  height: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-featured-image .placeholder-emoji {
  font-size: 4rem;
  opacity: 0.5;
}

.blog-featured-content {
  padding: var(--space-lg);
}

.blog-featured-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.blog-featured-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: space-between;
}

.blog-meta-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.blog-read-time {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.blog-tag {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.blog-featured:hover .blog-arrow {
  transform: translateX(4px);
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.blog-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: scale(1.02);
}

.blog-card-image {
  /* PLACEHOLDER: Replace with blog card images */
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image .placeholder-emoji {
  font-size: 3rem;
  opacity: 0.5;
}

.blog-card-image.matrix-gradient { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.blog-card-image.tdd-gradient { background: linear-gradient(135deg, #4a90d9, #67b26f); }
.blog-card-image.announce-gradient { background: linear-gradient(135deg, #f093fb, #f5576c); }
.blog-card-image.drone-gradient { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.blog-card-image.human-gradient { background: linear-gradient(135deg, #fa709a, #fee140); }

.blog-card-content {
  padding: var(--space-md);
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.blog-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.blog-card-read-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- 404 Page --- */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-primary);
}

.page-404-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-lg);
  animation: float 6s ease-in-out infinite;
  border-radius: 12px;
}

.page-404 h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.page-404 p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 500px;
}

.page-404 a {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.page-404 a:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-header {
    padding: var(--space-md);
  }

  .site-logo {
    font-size: 1.4rem;
  }

  .snap-section {
    padding: var(--space-md);
  }

  .hero-image-placeholder {
    width: 300px;
    height: 400px;
  }

  .placeholder-lobster {
    font-size: 8rem;
  }

  .hero-content {
    bottom: 80px;
  }

  .work-section {
    padding: var(--space-lg) var(--space-md);
  }

  .work-description {
    max-width: 100%;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-featured-image {
    height: 200px;
  }

  .social-links {
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 1.1rem;
  }

  .hero-content {
    bottom: 70px;
  }

  .typewriter-text {
    font-size: 0.95rem;
  }

  .work-company {
    font-size: 2rem;
  }

  .bottom-nav-link {
    width: 40px;
    height: 40px;
  }
}

/* --- Overlay backdrop for nav --- */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- Animations for sections scrolling in --- */
.work-content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.work-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Bubbles removed — clean minimal style */
