/* ============================================================
   STYLE.CSS — Jordi Metz CV Website
   Aesthetic: Deep navy · Copper gold · Cormorant Garamond
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --navy:         #0d1f35;
  --blue:         #2e6fa3;
  --blue-light:   #f0f6fc;
  --copper:       #c9872a;
  --copper-light: #e0a84c;
  --ink:          #1e3a55;
  --muted:        #5a7a95;
  --white:        #ffffff;
  --off:          #f7fbff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.4;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: static;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 80px;
  background: linear-gradient(to bottom, rgba(13,31,53,0.95) 0%, transparent 100%);
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--white);
  text-transform: uppercase;
}
.nav-logo span { color: var(--copper-light); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #7da4c0;
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--copper-light); }

/* ── LANGUAGE TOGGLE ─────────────────────────────────────── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 32px;
}
.lang-btn {
  background: none;
  border: 1px solid rgba(201,135,42,0.3);
  color: #7da4c0;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}
.lang-btn:hover { color: var(--copper-light); border-color: var(--copper); }
.lang-btn.lang-active {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--navy);
  font-weight: 600;
}
.lang-sep { color: rgba(201,135,42,0.3); font-size: 11px; }

/* ── 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: center;
  padding: 80px 60px 80px 80px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(72px, 8vw, 120px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -2px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s forwards;
}
.hero-name span {
  color: var(--copper-light);
  display: block;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: #7da4c0;
  line-height: 1.5;
  max-width: 400px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.6s forwards;
}

.hero-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.8s forwards;
}
.hero-meta-item {
  font-size: 13px;
  color: #7da4c0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-meta-item strong {
  color: var(--white);
  font-weight: 400;
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1s ease 1.2s forwards;
}
.scroll-hint::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--copper);
}

/* Hero right — photo */
.hero-right {
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1.2s ease 0.3s forwards;
}
.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--navy) 0%, transparent 30%);
  z-index: 1;
}
.hero-right::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--navy) 100%);
  z-index: 1;
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) contrast(1.05);
  mix-blend-mode: luminosity;
  opacity: 0.7;
}
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46,111,163,0.3) 0%, rgba(201,135,42,0.15) 100%);
  z-index: 2;
}

/* ── COPPER LINE ─────────────────────────────────────────── */
.copper-line {
  height: 3px;
  background: linear-gradient(to right, var(--copper), var(--copper-light), transparent);
  opacity: 0;
  animation: fadeIn 1s ease 1s forwards;
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
  background: var(--off);
  color: var(--ink);
  padding: 100px 80px;
}
.section-dark {
  background: #0a1929;
  color: var(--white);
  padding: 100px 80px;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--copper);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 60px;
  color: var(--navy);
}
.section-dark .section-title { color: var(--white); }

/* ── ABOUT ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 24px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stat-card {
  background: var(--navy);
  color: var(--white);
  padding: 32px 28px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--copper);
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--copper-light);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7da4c0;
}

/* ── EXPERIENCE ──────────────────────────────────────────── */
.experience-grid { display: grid; gap: 2px; }

.exp-block {
  background: #0d1f35;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s ease;
  overflow: hidden;
}
.exp-block:hover, .exp-block.active { border-left-color: var(--copper); }

.exp-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 36px 48px;
  transition: background 0.3s ease;
}
.exp-block:hover .exp-header,
.exp-block.active .exp-header {
  background: rgba(46,111,163,0.15);
}

.exp-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--copper-light);
  letter-spacing: 2px;
  min-width: 120px;
}
.exp-role {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 4px;
}
.exp-company {
  font-size: 13px;
  color: var(--copper-light);
  letter-spacing: 1px;
}
.exp-toggle {
  font-size: 22px;
  color: var(--copper);
  transition: transform 0.4s ease;
  font-family: 'Cormorant Garamond', serif;
}
.exp-block.active .exp-toggle { transform: rotate(45deg); }

.exp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.exp-block.active .exp-body { max-height: 1400px; }

.exp-content {
  padding: 32px 48px 48px calc(48px + 120px + 32px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  border-top: 1px solid rgba(46,111,163,0.2);
  margin: 0 48px;
}
.exp-description p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 300;
  line-height: 1.7;
  color: #a8bdd0;
  margin-bottom: 16px;
}
.exp-description p:last-child { margin-bottom: 0; }

.exp-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}
.exp-tag {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper-light);
  padding: 6px 12px;
  border: 1px solid rgba(201,135,42,0.3);
  text-align: center;
  white-space: nowrap;
}

/* Project refs */
.exp-refs {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(46,111,163,0.2);
  grid-column: 1 / -1;
}
.exp-refs-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.exp-refs-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--copper);
}
.exp-refs-list { display: flex; flex-direction: column; gap: 8px; }

.exp-ref-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: #a8bdd0;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  padding: 10px 14px;
  background: rgba(46,111,163,0.08);
  border: 1px solid rgba(46,111,163,0.15);
  border-left: 2px solid transparent;
  transition: all 0.25s ease;
  line-height: 1.4;
}
.exp-ref-link:hover {
  background: rgba(201,135,42,0.08);
  border-left-color: var(--copper);
  color: var(--white);
  transform: translateX(4px);
}
.exp-ref-icon { font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.exp-ref-title { font-weight: 500; color: var(--white); margin-bottom: 2px; font-size: 13px; }
.exp-ref-sub { font-size: 11px; color: #7da4c0; }

/* ── SKILLS ──────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.skill-card {
  padding: 40px 36px;
  background: white;
  border-bottom: 3px solid transparent;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.skill-card:hover {
  border-bottom-color: var(--copper);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(13,31,53,0.12);
}
.skill-card-icon { font-size: 32px; margin-bottom: 20px; }
.skill-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}
.skill-card-body { font-size: 14px; color: var(--muted); line-height: 1.6; }
.skill-list { list-style: none; margin-top: 12px; }
.skill-list li {
  font-size: 13px;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid #e8f0f8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-list li::before { content: '—'; color: var(--copper); font-size: 12px; }

/* ── EDUCATION & VOLUNTARY ───────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.col-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 24px;
}
.edu-item {
  padding: 28px 0;
  border-bottom: 1px solid rgba(46,111,163,0.2);
  cursor: pointer;
  transition: padding-left 0.3s;
}
.edu-item:hover {
  padding-left: 12px;
  border-bottom-color: var(--copper);
}
.edu-year { font-size: 12px; letter-spacing: 2px; color: var(--copper-light); margin-bottom: 8px; }
.edu-degree {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 4px;
}
.edu-school { font-size: 13px; color: #7da4c0; }
.edu-note {
  font-size: 13px;
  color: #7da4c0;
  font-style: italic;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s;
  opacity: 0;
}
.edu-item:hover .edu-note { max-height: 100px; opacity: 1; }

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-section {
  background: var(--navy);
  padding: 100px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  border-top: 3px solid var(--copper);
}
.contact-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
}
.contact-title span { color: var(--copper-light); }
.contact-intro {
  margin-top: 24px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 300;
  color: #7da4c0;
  line-height: 1.6;
}
.contact-links { display: flex; flex-direction: column; gap: 24px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--white);
  font-size: 16px;
  padding: 20px 24px;
  background: rgba(46,111,163,0.15);
  border: 1px solid rgba(46,111,163,0.3);
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}
.contact-link:hover {
  background: rgba(201,135,42,0.15);
  border-color: var(--copper);
  transform: translateX(8px);
}
.contact-link-icon { font-size: 20px; min-width: 28px; }
.contact-link-text { font-family: 'Cormorant Garamond', serif; font-size: 20px; }
.contact-link-sub { font-size: 12px; color: #7da4c0; margin-top: 2px; }

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.hero-meta-icon {
  font-size: 15px;
  margin-right: 4px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 16px 32px; flex-wrap: wrap; gap: 10px; }
  .nav-links { gap: 16px; order: 3; width: 100%; padding-bottom: 4px; }
  .nav-links a { font-size: 10px; letter-spacing: 2px; }
  .lang-toggle { margin-left: auto; }

  .hero { grid-template-columns: 1fr; min-height: 80vh; }
  .hero-left { padding: 60px 40px 60px; }
  .hero-right { display: none; }

  .section, .section-dark { padding: 70px 40px; }
  .contact-section { padding: 70px 40px; grid-template-columns: 1fr; gap: 48px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .two-col { grid-template-columns: 1fr; gap: 48px; }

  .exp-header { gap: 20px; padding: 28px 32px; }
  .exp-content {
    padding: 28px 32px 36px 32px;
    margin: 0 32px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .exp-tags { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 600px) {
  /* Nav */
  nav { padding: 12px 20px; background: rgba(13,31,53,0.98); flex-wrap: wrap; gap: 8px; }
  .nav-logo { flex: 1; }
  .lang-toggle { margin-left: 0; }
  .lang-btn { font-size: 10px; padding: 4px 9px; }
  .nav-links { order: 3; width: 100%; gap: 14px; padding-bottom: 2px; }
  .nav-links a { font-size: 9px; letter-spacing: 1px; }

  /* Hero — photo as background */
  .hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
    position: relative;
  }
  .hero-left {
    padding: 48px 24px 60px;
    position: relative;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(13,31,53,0.82) 0%, rgba(13,31,53,0.95) 100%);
  }
  .hero-right {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.35;
  }
  .hero-right::before, .hero-right::after { display: none; }
  .hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
  }

  .hero-name { font-size: clamp(54px, 14vw, 78px); letter-spacing: -1px; }
  .hero-tagline { font-size: 16px; margin-bottom: 28px; }
  .hero-eyebrow { font-size: 10px; margin-bottom: 14px; }
  .hero-meta { gap: 12px; flex-direction: column; }
  .hero-meta-item { font-size: 13px; }
  .scroll-hint { left: 24px; bottom: 24px; }

  /* Sections */
  .section, .section-dark { padding: 52px 20px; }
  .contact-section { padding: 52px 20px; grid-template-columns: 1fr; gap: 40px; }
  .section-title { font-size: clamp(28px, 8vw, 40px); margin-bottom: 36px; }
  .contact-title { font-size: 40px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-text p { font-size: 18px; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 22px 18px; }
  .stat-number { font-size: 38px; }
  .stat-label { font-size: 10px; }

  /* Experience */
  .exp-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 20px 18px;
  }
  .exp-year {
    grid-column: 1 / -1;
    min-width: unset;
    font-size: 11px;
    margin-bottom: 2px;
  }
  .exp-title-group { grid-column: 1; }
  .exp-toggle { grid-column: 2; grid-row: 2; align-self: center; }
  .exp-role { font-size: 20px; }
  .exp-company { font-size: 12px; }
  .exp-content {
    padding: 20px 18px 28px;
    margin: 0 18px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .exp-description p { font-size: 16px; }
  .exp-tags { flex-direction: row; flex-wrap: wrap; }
  .exp-tag { font-size: 10px; padding: 4px 10px; }
  .exp-ref-link { font-size: 12px; padding: 8px 12px; }
  .exp-ref-title { font-size: 12px; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-card { padding: 28px 22px; }

  /* Education — notes always visible on mobile (no hover) */
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .edu-note { max-height: none; opacity: 1; }

  /* Contact */
  .contact-link { padding: 16px 18px; gap: 14px; }
  .contact-link-text { font-size: 16px; }
}

@media print {
  nav, .copper-line { display: none; }
  body { background: white; }
  .section, .section-dark { padding: 40px; }
}
