/*
Theme Name:   Jenor Editorial
Theme URI:    https://jenor.ricafort-ps.com/
Author:       Jenor Ricafort
Author URI:   https://jenor.ricafort-ps.com/
Description:  A modern dark-first minimalist portfolio WordPress theme featuring an HTML5 Aurora Borealis background, interactive skills & experience hero banner, sliding pill navigation, responsive Bento grid, and equal-height blog thumbnail cards.
Version:      1.2.1
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  jenor-editorial
Tags:         portfolio, minimalist, dark-mode, grid-layout, custom-colors, block-styles
*/

:root {
  --bg-canvas: #02050c;
  --bg-surface: rgba(11, 16, 29, 0.72);
  --bg-subtle: #0b101d;
  --ink-primary: #f4f4f5;
  --ink-muted: #a1a1aa;
  --border-hairline: rgba(255, 255, 255, 0.1);
  --accent: #34d399;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* Aurora Borealis Fullscreen Canvas Backdrop */
#je-aurora-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.je-site-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.je-site-shell > main {
  flex: 1;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}

.je-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Scroll progress hairline */
.je-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 90;
  pointer-events: none;
}

/* 3-Zone Top Bar with Sliding Pill Rail */
.je-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(3, 6, 14, 0.68);
  border-bottom: 1px solid var(--border-hairline);
}

.je-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4.5rem;
}

.je-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink-primary);
  text-decoration: none;
  white-space: nowrap;
}

.je-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.04);
}

.je-nav-indicator {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 280ms var(--ease-editorial), width 280ms var(--ease-editorial);
  pointer-events: none;
}

.je-nav a {
  position: relative;
  z-index: 1;
  padding: 0.375rem 1rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 180ms var(--ease-editorial);
}

.je-nav a:hover,
.je-nav a.is-active {
  color: var(--ink-primary);
}

.je-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.65rem;
  background: var(--accent);
  color: #09090b;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 200ms var(--ease-editorial), filter 200ms var(--ease-editorial);
}

.je-cta-btn:hover {
  filter: brightness(1.08);
}

/* Split-Screen Interactive Hero */
.je-hero-split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: stretch;
}

.je-hero-col {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.je-kicker {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 1rem;
}

.je-hero-title {
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.je-hero-media {
  grid-column: span 6;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.je-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.je-hero-metrics {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-hairline);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.je-metric-val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.je-metric-lbl {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* Interactive Skills & Experience Hero Tabs */
.je-skill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.3rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-hairline);
  background: rgba(11, 16, 29, 0.65);
  margin-bottom: 1.25rem;
}

.je-skill-tab {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms var(--ease-editorial), color 200ms var(--ease-editorial);
}

.je-skill-tab.is-active {
  background: var(--accent);
  color: #09090b;
}

.je-skill-panel {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border-hairline);
  background: rgba(11, 16, 29, 0.55);
  backdrop-filter: blur(12px);
}

.je-skill-panel strong {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.je-skill-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.je-skill-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Section Headers & Filter Tabs */
.je-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.je-section-head h2 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 700;
}

.je-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.04);
}

.je-filter-bar button {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-editorial), color 180ms var(--ease-editorial);
}

.je-filter-bar button.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink-primary);
}

/* Responsive Bento Grid */
.je-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.je-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 280ms var(--ease-editorial), border-color 240ms var(--ease-editorial);
}

.je-card.is-featured {
  grid-column: span 2;
}

.je-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms var(--ease-editorial);
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(16, 185, 129, 0.14), transparent 65%);
  z-index: 2;
}

.je-card:hover::before {
  opacity: 1;
}

.je-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.je-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.je-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 520ms var(--ease-editorial);
}

.je-card:hover .je-card-media img {
  transform: scale(1.035);
}

.je-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.je-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.je-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.je-card-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Equal-Height Blog Thumbnail Cards (Flexbox in Grid) */
.je-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.je-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 300ms var(--ease-editorial), border-color 240ms var(--ease-editorial), box-shadow 300ms var(--ease-editorial);
}

.je-blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.je-blog-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.je-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 520ms var(--ease-editorial);
}

.je-blog-card:hover .je-blog-thumb img {
  transform: scale(1.08);
}

.je-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b1224, #112238);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.je-thumb-scrim {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.25rem 0.75rem;
  background: linear-gradient(to top, rgba(2, 5, 12, 0.8), transparent);
  font-size: 0.75rem;
  color: #f4f4f5;
}

.je-blog-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.je-blog-body h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.je-blog-excerpt {
  flex: 1;
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0;
}

.je-blog-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.je-read-more {
  color: var(--accent);
  font-weight: 600;
}

/* Single & Page Prose */
.je-single-header {
  margin-bottom: 2rem;
}

.je-single-metric {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

.je-single-hero {
  margin: 0 0 2.5rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
}

.je-single-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.je-prose {
  max-width: 72ch;
  color: #d4d4d8;
}

.je-prose p {
  margin-bottom: 1.25rem;
}

.je-post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

/* Lightbox Modal */
.je-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.je-lightbox[hidden] {
  display: none;
}

.je-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.8);
  backdrop-filter: blur(6px);
}

.je-lightbox-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 1rem;
  border: 1px solid var(--border-hairline);
  background: #0b101d;
  padding: 2rem;
}

.je-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

/* Kinetic Marquee */
.je-marquee {
  border-block: 1px solid var(--border-hairline);
  background: rgba(5, 8, 18, 0.45);
  padding-block: 1rem;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

@keyframes je-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.je-marquee-track {
  display: flex;
  width: max-content;
  animation: je-marquee 32s linear infinite;
}

.je-marquee:hover .je-marquee-track {
  animation-play-state: paused;
}

/* Footer */
.je-footer {
  border-top: 1px solid var(--border-hairline);
  padding-block: 2rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

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

/* Reveal Choreography */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 540ms var(--ease-editorial), transform 540ms var(--ease-editorial);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (max-width: 960px) {
  .je-hero-col,
  .je-hero-media { grid-column: span 12; }
  .je-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .je-bento-grid,
  .je-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .je-card.is-featured { grid-column: span 2; }
}

@media (max-width: 640px) {
  .je-nav { display: none; }
  .je-bento-grid,
  .je-blog-grid { grid-template-columns: 1fr; }
  .je-card.is-featured { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .je-marquee-track { animation: none; }
  .je-blog-card:hover { transform: none; }
}
