/* ============================================================
   Julian Enciso — Portfolio Stylesheet
   ============================================================ */

/* ── CUSTOM PROPERTIES ── */
:root {
  --ink:          #0e0d0b;
  --paper:        #f4f0e8;
  --cream:        #ede8da;
  --accent:       #c85c2a;
  --accent2:      #2a5fc8;
  --muted:        #7a7567;
  --line:         #d0cab8;
  --white:        #ffffff;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-body:    'DM Sans', sans-serif;
}

/* ── BOOTSTRAP NAVBAR OVERRIDES ── */
/* These keep Bootstrap's navbar consistent with the JE design system */

.navbar-brand,
.nav-logo {
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--ink) !important;
  text-decoration: none;
  transition: color 0.35s ease;
}

/* Dark-background variant (nav-light class added via JS) */
.nav-light .navbar-brand,
.nav-light .nav-logo { color: var(--paper) !important; }

.navbar .nav-link {
  font-family: var(--font-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
  transition: color 0.35s ease !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--accent) !important; }

.nav-light .navbar-brand     { color: var(--paper) !important; }
.nav-light .nav-link          { color: #a09880 !important; }
.nav-light .nav-link:hover    { color: var(--accent) !important; }

/* Hamburger icon color on light bg */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(14,13,11,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(244,240,232,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile collapse background */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--ink);
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid #222;
  }
  .navbar-collapse .nav-link { color: #a09880 !important; padding: 0.6rem 0; }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ── TYPOGRAPHY HELPERS ── */
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  transition: color 0.35s ease;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.35s ease;
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.35s ease;
}

.nav-links a:hover { color: var(--accent); }

/* Light nav variant — activates over dark sections */
nav.nav-light .nav-logo          { color: var(--paper); }
nav.nav-light .nav-links a       { color: #a09880; }
nav.nav-light .nav-links a:hover { color: var(--accent); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 3rem 5rem 3rem;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-tagline {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--muted);
  max-width: 28ch;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-cta {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-right {
  position: relative;
  background: var(--cream);
  overflow: hidden;
}

/* Large decorative typographic element */
.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-family: var(--font-display);
  font-size: 22vw;
  font-weight: 900;
  color: var(--line);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 1s 1s forwards;
}

.hero-stats {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  right: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.stat-item {
  border-top: 2px solid var(--line);
  padding-top: 1rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}

.stat-number span { color: var(--accent); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Vertical rule between hero columns */
#hero::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  z-index: 3;
}

/* ── SECTION LAYOUT ── */
section { padding: 6rem 3rem; }

.section-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.section-rule {
  height: 1px;
  background: var(--line);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-title em { font-style: italic; color: var(--accent); }

/* ── ABOUT ── */
#about {
  background: var(--ink);
  color: var(--paper);
}

#about .section-num   { color: var(--accent); }
#about .section-rule  { background: #333; }
#about .section-title { color: var(--paper); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #c8c0b0;
  margin-bottom: 1.2rem;
}

.about-text p strong {
  color: var(--paper);
  font-weight: 500;
}

.about-contact {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-item .label { color: var(--muted); min-width: 5rem; }

.contact-item a,
.contact-item span {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.contact-item a:hover { color: var(--accent); }

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  padding: 0.4rem 1rem;
  border: 1px solid #333;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8c0b0;
  transition: all 0.2s;
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.skill-tag.featured {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 92, 42, 0.1);
}

/* ── EXPERIENCE ── */
#experience { background: var(--paper); }

.exp-list {
  display: flex;
  flex-direction: column;
}

.exp-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.exp-item:first-child { padding-top: 0; }

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.exp-company {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.exp-location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.exp-role {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.exp-role em { font-style: italic; color: var(--accent); }

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.exp-bullets li {
  font-size: 0.92rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.65;
}

.exp-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 0.05rem;
}

/* ── EDUCATION ── */
#education { background: var(--cream); }

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.edu-card {
  border: 1px solid var(--line);
  padding: 2.5rem;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(14, 13, 11, 0.1);
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.edu-institution {
  font-size: 0.88rem;
  color: var(--muted);
}

.training-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.training-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.training-item:last-child { border-bottom: none; }

.training-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.training-text {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.training-text strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.1rem;
}

/* ── TOOLS STRIP ── */
#tools {
  background: var(--ink);
  padding: 4rem 3rem;
  overflow: hidden;
}

.tools-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
  text-align: center;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  flex-shrink: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.marquee-item:hover { color: var(--accent); }

.marquee-sep {
  color: var(--accent);
  font-size: 1.1rem;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid #222;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.footer-name em { font-style: italic; color: var(--accent); }

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-align: right;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── ADDITIONAL EXPERIENCE ── */
.add-exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.add-exp-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--cream);
}

.add-exp-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.add-exp-place {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.add-exp-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }

  #hero { grid-template-columns: 1fr; }
  #hero::after { display: none; }

  .hero-left { padding: 7rem 1.5rem 3rem; }
  .hero-right { display: none; }

  section { padding: 4rem 1.5rem; }

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

  .exp-item { grid-template-columns: 1fr; gap: 1rem; }
  .exp-item .exp-meta { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

  .add-exp-grid { grid-template-columns: 1fr; }

  footer { grid-template-columns: 1fr; text-align: center; }
  .footer-links { text-align: center; }
}
