/*
Theme Name: RCARJ Portfolio
Theme URI: https://rcarj.eu
Author: Rommel Campos
Author URI: https://rcarj.eu
Description: High-craft personal portfolio and AI web systems showcase for Rommel Campos, Senior DevOps Engineer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: MIT
Text Domain: rcarj
*/

:root {
  --bg-ground: #0a0a0c;
  --bg-surface: #12131a;
  --bg-surface-hover: #181a24;
  --bg-surface-elevated: #1a1c28;
  --bg-card: rgba(18, 19, 26, 0.85);
  
  --border-subtle: #23263a;
  --border-focus: #4f46e5;
  --border-hover: #3d4263;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-indigo: #6366f1;
  --accent-indigo-hover: #4f46e5;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  
  --font-sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-base: 1rem;
  --text-md: 1.15rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.85rem, 3.5vw, 2.5rem);
  --text-2xl: clamp(2.5rem, 5vw, 4rem);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(99, 102, 241, 0.3);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  
  --container-max: 1200px;
  --container-narrow: 880px;
  --header-height: 72px;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-ground);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-ground);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Custom Selection & Focus */
::selection {
  background: var(--accent-indigo);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 3px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-ground);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Ambient Radial Lighting */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  height: 600px;
  background: radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.08) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: var(--accent-indigo-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
}

.btn-block {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  text-align: center;
  z-index: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.tech-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}

.tech-pill:hover {
  border-color: var(--accent-indigo);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  transform: translateY(-1px);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: rgba(18, 19, 26, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-title-left {
  text-align: left;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* Featured Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.project-media-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-ground);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-card:hover .project-img {
  transform: scale(1.03);
}

.project-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

.project-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-indigo);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: color 0.15s ease, transform 0.15s ease;
}

.project-link:hover {
  color: #818cf8;
  transform: translateX(2px);
}

/* Architecture & DevOps Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pillar-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.pillar-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pillar-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pillar-list-item svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Experience Timeline */
.timeline-wrap {
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
}

.timeline-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-ground);
  border: 3px solid var(--accent-indigo);
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease;
}

.timeline-content:hover {
  border-color: var(--border-hover);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.timeline-company {
  font-size: var(--text-sm);
  color: var(--accent-indigo);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline-details {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-direct-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--text-md);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}

.contact-direct-link:hover {
  color: var(--accent-indigo);
}

.social-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-links-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.social-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-indigo);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  background: var(--bg-ground);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-feedback {
  display: none;
  font-size: var(--text-sm);
  margin-top: 0.5rem;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  background: var(--bg-ground);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    display: none;
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}
