/*
 * Main Styles for cristianexer
 * Built on top of Tailwind CSS
 */

/* Base Typography */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prose Content Styles */
.prose-content {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
}

.prose-content h1,
.prose-content h2,
.prose-content h3,
.prose-content h4,
.prose-content h5,
.prose-content h6 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 600;
  color: var(--color-text-primary);
  /* margin-top: 2em; */
  margin-bottom: 0.75em;
  line-height: var(--line-height-tight);
}

.prose-content h1 { font-size: var(--font-size-4xl); }
.prose-content h2 { font-size: var(--font-size-3xl); }
.prose-content h3 { font-size: var(--font-size-2xl); }
.prose-content h4 { font-size: var(--font-size-xl); }
.prose-content h5 { font-size: var(--font-size-lg); }
.prose-content h6 { font-size: var(--font-size-base); }

.prose-content p {
  margin-bottom: 1.5em;
}

.prose-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.prose-content a:hover {
  color: var(--color-accent-hover);
}

.prose-content strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.prose-content em {
  font-style: italic;
}

/* Lists */
.prose-content ul,
.prose-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.prose-content ul {
  list-style-type: disc;
}

.prose-content ol {
  list-style-type: decimal;
}

.prose-content li {
  margin-bottom: 0.5em;
}

.prose-content li > ul,
.prose-content li > ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

/* Blockquotes */
.prose-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.5em;
  margin: 2em 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.prose-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.prose-content code {
  font-family: 'JetBrains Mono', Menlo, Monaco, monospace;
  font-size: 0.875em;
  background-color: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
}

.prose-content pre {
  font-family: 'JetBrains Mono', Menlo, Monaco, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  background-color: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 1.5em;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid var(--color-border-subtle);
}

.prose-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* Highlight.js overrides for consistent styling */
.prose-content pre code.hljs {
  background: transparent !important;
  padding: 0 !important;
}

.hljs {
  background: transparent !important;
}

/* Tables */
.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: var(--font-size-base);
}

.prose-content th,
.prose-content td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.prose-content th {
  font-weight: 600;
  background-color: var(--color-surface-secondary);
}

.prose-content tr:hover td {
  background-color: var(--color-surface-secondary);
}

/* Images */
.prose-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 2em 0;
}

.prose-content figure {
  margin: 2em 0;
}

.prose-content figcaption {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: 0.75em;
}

/* Horizontal Rule */
.prose-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3em 0;
}

/* Callout / Key Takeaways */
.callout,
.prose-content .callout {
  background-color: var(--color-callout-bg);
  border-left: 4px solid var(--color-callout-border);
  padding: 1.5em;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 2em 0;
}

.callout-title {
  font-weight: 600;
  color: var(--color-callout-text);
  margin-bottom: 0.75em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.callout p:last-child,
.callout ul:last-child,
.callout ol:last-child {
  margin-bottom: 0;
}

/* Mermaid Diagrams */
.mermaid {
  background-color: var(--color-surface-secondary);
  padding: 2em;
  border-radius: var(--radius-lg);
  margin: 2em 0;
  overflow-x: auto;
}

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* Utility Classes */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pillar Cards */
.pillar-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition-normal);
}

.pillar-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Search and Filter */
.search-input {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  width: 100%;
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.dark .search-input:focus {
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background-color: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-pill:hover {
  background-color: var(--color-surface-elevated);
  border-color: var(--color-border);
}

.tag-pill.active {
  background-color: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

/* CTA Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: var(--color-accent);
  color: white;
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: transparent;
  color: var(--color-text-primary);
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hero Section */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-secondary) 100%);
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Skill Tags */
.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background-color: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background-color: var(--color-surface-elevated);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* Certification Cards */
.cert-card {
  background: linear-gradient(135deg, var(--color-surface-secondary) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.cert-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-border-subtle) 100%);
}

.timeline-dot {
  position: absolute;
  left: 1.5rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--color-accent);
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  z-index: 1;
}

/* Avatar glow effect */
.avatar-glow {
  box-shadow: 0 0 40px rgba(0, 102, 204, 0.15);
}

.dark .avatar-glow {
  box-shadow: 0 0 40px rgba(77, 166, 255, 0.2);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Feature cards for about page */
.feature-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Featured image styles */
.featured-image {
  position: relative;
  overflow: hidden;
}

.featured-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Hero Animations */
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-20px) translateX(10px); }
  50% { transform: translateY(-10px) translateX(-5px); }
  75% { transform: translateY(-25px) translateX(5px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-15px) translateX(-10px); }
  50% { transform: translateY(-25px) translateX(5px); }
  75% { transform: translateY(-10px) translateX(-5px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(15px); }
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 10s ease-in-out infinite;
  animation-delay: 2s;
}

.animate-float-slow {
  animation: float-slow 12s ease-in-out infinite;
  animation-delay: 4s;
}

.animate-scan {
  animation: scan 8s linear infinite;
}

/* ============================================
   AI Architecture Hero - Blueprint Animation
   ============================================ */

/* Gradient mesh background */
.hero-gradient-mesh {
  background: 
    radial-gradient(ellipse 100% 80% at 50% 20%, rgba(0, 102, 204, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-secondary) 100%);
}

.dark .hero-gradient-mesh {
  background: 
    radial-gradient(ellipse 100% 80% at 50% 20%, rgba(77, 166, 255, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-secondary) 100%);
}

/* Radial fade overlay - strong fade in center-left for text readability */
.bg-radial-fade {
  background: 
    radial-gradient(ellipse 70% 80% at 35% 45%, var(--color-surface) 0%, transparent 70%),
    linear-gradient(90deg, var(--color-surface) 0%, transparent 50%);
}

/* Blueprint orbs - subtle ambient glow */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform;
}

.dark .hero-orb {
  opacity: 0.25;
}

.hero-orb-1 {
  top: 10%;
  right: 20%;
  width: 400px;
  height: 400px;
  background: rgba(0, 102, 204, 0.3);
  animation: orbPulse1 8s ease-in-out infinite;
}

.hero-orb-2 {
  top: 50%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: rgba(139, 92, 246, 0.2);
  animation: orbPulse2 10s ease-in-out infinite;
}

.hero-orb-3 {
  bottom: 20%;
  right: 30%;
  width: 250px;
  height: 250px;
  background: rgba(6, 182, 212, 0.15);
  animation: orbPulse3 12s ease-in-out infinite;
}

@keyframes orbPulse1 {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

@keyframes orbPulse2 {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.4; }
}

@keyframes orbPulse3 {
  0%, 100% { transform: scale(1); opacity: 0.25; }
  50% { transform: scale(1.2); opacity: 0.35; }
}

/* Neural canvas styling - more visible */
#neural-canvas {
  opacity: 1;
}

/* Hero section text needs to be above canvas */
.hero-section .relative.z-10 {
  position: relative;
  z-index: 10;
}

/* Hero section reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-orb {
    animation: none !important;
  }
  
  .hero-orb-1,
  .hero-orb-2,
  .hero-orb-3 {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .prose-content a {
    color: black;
    text-decoration: underline;
  }
  
  .prose-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
