/* =============================================
   MARCOS RODRÍGUEZ — Personal Tech Portfolio
   Dark Neo-Brutalist & Tech Minimalist Design System
   ============================================= */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: #0d0d0d;
  --bg-card-hover: #121212;
  --bg-elevated: #161616;

  --border-subtle: #1c1c1c;
  --border-medium: #2a2a2a;
  --border-active: #ffffff;
  --border-glow: rgba(255, 255, 255, 0.15);

  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #666666;
  --text-dim: #3a3a3a;

  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.2);
  --accent-wa: #25d366;

  --font-display: 'Bebas Neue', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  --header-height: 72px;
  --container-max: 1240px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  --transition-fast: 0.18s ease;
  --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

::selection {
  background: #ffffff;
  color: #050505;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

img, svg {
  display: block;
}

/* --- Layout Containers & Backgrounds --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.section {
  padding: 7rem 0;
  position: relative;
  z-index: 2;
  background-color: rgba(5, 5, 5, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(1px);
}

.section-dark {
  background-color: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(2px);
}

/* Global Fixed 3D Particle Canvas */
.global-particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

/* --- Section Typography --- */
.section-meta {
  margin-bottom: 3.5rem;
}

.section-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

/* --- SITE HEADER & NAVBAR --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.site-header.scrolled {
  background: rgba(5, 5, 5, 0.92);
  border-bottom-color: var(--border-subtle);
}

.nav-container {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.nav-brand:hover {
  opacity: 0.8;
}

.brand-text {
  color: var(--text-primary);
}

.brand-accent {
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  position: relative;
  padding: 0.35rem 0;
  transition: color var(--transition-fast);
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
}

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

/* Language Switcher Pill */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 8px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 1px;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-nav-social {
  display: none;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.social-link svg {
  width: 19px;
  height: 19px;
  display: block;
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* --- 01 // HERO SECTION --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
  background-color: transparent;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Status Pill */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 2rem;
}

.status-pulse {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  font-weight: 600;
  text-transform: uppercase;
}

/* Giant Brutalist Headline */
.hero-headline-group {
  margin-bottom: 4rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.headline-primary {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-transform: uppercase;
  font-weight: 400;
}

.headline-secondary-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.headline-indicator {
  display: inline-block;
  width: clamp(4px, 0.8vw, 8px);
  height: clamp(3.5rem, 11vw, 9.5rem);
  background-color: #ffffff;
  border-radius: 1px;
}

.headline-secondary {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 14vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: #4a4a4a;
  text-transform: uppercase;
  font-weight: 400;
  transition: color var(--transition-base);
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

/* Hero Bottom Grid */
.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  align-items: start;
}

.hero-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-explore-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  padding: 0.5rem 0;
  width: fit-content;
  transition: transform var(--transition-fast);
}

.btn-submit:active {
  transform: translateY(2px);
}

.btn-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: wait;
}

.btn-submit.is-loading .btn-icon {
  animation: pulse 1s infinite alternate;
}

.hero-explore-btn:hover {
  transform: translateY(2px);
  color: #ffffff;
}

.hero-bottom-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-cta-wrapper {
  display: flex;
  gap: 1rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: #ffffff;
  color: #050505;
  border: 1px solid #ffffff;
}

.btn-primary:hover {
  background-color: transparent;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  border-color: #ffffff;
  background: var(--bg-elevated);
}

/* --- 02 // STACK & PROJECTS SECTION --- */
.stack-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.filter-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: #ffffff;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.stack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stack-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background var(--transition-fast);
}

.stack-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stack-card:hover::before {
  background: #ffffff;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 3px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.card-icon {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1.1875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-footer code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.section-action {
  text-align: center;
  padding-top: 1rem;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.action-link:hover {
  border-color: #ffffff;
  background: var(--bg-elevated);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* --- 03 // TRAJECTORY & EXPERIENCE --- */
.timeline-log {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  position: relative;
}

.log-entry {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1.75rem;
  position: relative;
}

.log-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-medium);
  border: 2px solid var(--bg-secondary);
  z-index: 2;
}

.log-entry.current .marker-dot {
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.marker-line {
  flex-grow: 1;
  width: 1px;
  background-color: var(--border-subtle);
  margin-top: 8px;
}

.log-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  transition: border-color var(--transition-fast);
}

.log-entry:hover .log-content {
  border-color: var(--border-medium);
}

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

.log-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.log-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.log-title {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.log-org {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.log-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Certifications Block */
/* Certifications Credentials (Interactive Cards Grid) */
.certs-block {
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.certs-header {
  margin-bottom: 2rem;
}

.certs-badge-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.certs-title {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-top: 4px;
}

.certs-accordion {
  margin: 2rem 0;
}

.certs-accordion:first-child {
  margin-top: 0;
}

.certs-accordion-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 0 0.5rem 0;
  margin-bottom: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.certs-accordion-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.accordion-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accordion-count {
  margin-left: 0.25rem;
  color: var(--text-dim);
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.certs-accordion.is-open .accordion-icon {
  transform: rotate(180deg);
}

.certs-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
}

.certs-accordion-inner {
  overflow: hidden;
}

.certs-accordion.is-open .certs-accordion-content {
  grid-template-rows: 1fr;
}

.certs-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.cert-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.cert-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cert-code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.cert-verified-pill {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

.cert-master-pill {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: #60a5fa; /* Cool blue */
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

.status-learning-pill {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: #fbbf24; /* Amber */
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  margin-left: 8px;
}

.cert-card-title {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.cert-card-org {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --- 04 // ABOUT ME & STATS --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-lead-text {
  font-size: 1.1875rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-body-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.about-side-area {
  align-self: start;
}

.side-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: fit-content;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
}

.side-card-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.langs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lang-name {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.lang-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.lang-badge.native {
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.lang-badge.professional {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.lang-badge.learning {
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.05);
}

/* --- 05 // CONTACT SECTION & TERMINAL --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all var(--transition-fast);
}

.channel-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateX(4px);
}

.channel-icon {
  color: var(--text-secondary);
}

.channel-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.channel-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.channel-val {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 500;
}

.channel-arrow {
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.channel-card:hover .channel-arrow {
  color: var(--text-primary);
  transform: translateX(3px);
}

/* Terminal Contact Window */
.contact-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  background: #080808;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #ffffff;
  background: var(--bg-elevated);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

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

.btn-submit {
  width: 100%;
  padding: 0.875rem;
  margin-top: 0.5rem;
}

.form-feedback {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  min-height: 1.25rem;
}

.form-feedback.success {
  color: var(--accent-green);
}
.form-feedback.error {
  color: #ef4444;
}

/* --- FLOATING WHATSAPP BUTTON (MONOCHROME & DRAGGABLE) --- */
.whatsapp-float-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 990;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.whatsapp-float-container.is-dragging {
  cursor: grabbing;
}

.whatsapp-btn.monochrome-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #0d0d0d;
  border: 1px solid #333333;
  color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.whatsapp-btn.monochrome-wa:hover {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.whatsapp-float-container:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(-4px);
}


/* --- SITE FOOTER --- */
.site-footer {
  padding: 4rem 0 2.5rem;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
}

.footer-top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  /* Keep Hero left-aligned, but adjust font size */
  .hero-title {
    font-size: clamp(3.5rem, 15vw, 5rem);
  }
  
  /* Center other section metadata */
  .about-metrics {
    grid-template-columns: 1fr;
  }

  /* Header Optimization */
  .nav-social {
    display: none; /* Hide in header to save space on mobile */
  }
  
  .mobile-nav-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    width: 100%;
  }
  .nav-brand {
    font-size: 1rem;
  }
  .nav-actions {
    gap: 0.75rem;
  }

  /* Reduce Canvas Opacity so text is always readable */
  .global-particle-canvas {
    opacity: 0.25;
  }

  /* Mobile Menu */
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 999;
    background: #050505;
    border-bottom: 1px solid var(--border-medium);
    padding: 2rem 1.5rem 4rem 1.5rem; /* added extra bottom padding for scrolling */
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 2.5rem 0;
  }

  .whatsapp-float-container {
    bottom: 5rem;
    right: 1.5rem;
  }

  /* BUG FIXES (Mobile Only) */
  /* 1. Certifications Accordion: align left, no wrap, prevent icon squish */
  .certs-accordion-btn {
    text-align: left;
  }
  .accordion-title {
    white-space: nowrap;
    font-size: 0.75rem; /* Allow text and counter to fit on one line without truncation */
  }
  .accordion-icon {
    flex-shrink: 0;
  }

  /* 2. Timeline titles: force font-size to fit in 3 lines */
  .log-title {
    font-size: 0.95rem !important; /* Safely small enough to fit 'Técnico Superior' in 3 lines */
    line-height: 1.4;
  }

  /* 3. Certifications Cards badge overflow */
  .cert-card {
    box-sizing: border-box;
    padding: 1.25rem 1rem;
  }
  .cert-card-top {
    gap: 0.5rem;
  }

  /* 4. Stack Card hover active state (white line) disabled on mobile */
  .stack-card:hover::before {
    background: transparent !important;
  }

  /* 5. Language Side Card max-width removed to match upper cards */
  .side-card {
    max-width: none;
  }

  /* 6. Standardize padding across all content cards to ensure identical mobile widths */
  .log-content,
  .certs-block,
  .stack-card,
  .side-card {
    box-sizing: border-box;
    padding: 1.5rem !important; /* Uniform padding for all main layout cards */
  }

  /* 7. Timeline Mobile Redesign: Maximizes width by moving the dot inside the card border */
  .log-entry {
    display: block; /* Removes grid column, giving the card 100% of the horizontal space */
    margin-bottom: 2rem;
  }
  .log-marker {
    display: none; /* Hide the desktop grid marker */
  }
  .log-content {
    border-left-width: 4px !important; /* Uses the left border as the timeline line */
  }
  .log-entry.current .log-content {
    border-left-color: var(--accent-green) !important;
  }
  .log-content::before {
    content: '';
    position: absolute;
    left: -7px; /* Centers the 10px dot exactly on the 4px border */
    top: 1.5rem; /* Aligns with the new uniform padding */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-medium);
    border: 2px solid var(--bg-card);
    z-index: 2;
    box-sizing: content-box;
  }
  .log-entry.current .log-content::before {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    border-color: var(--bg-card);
  }
}
