/* ===========================================================
   Gonzalo Hal — Portfolio 2026
   =========================================================== */

:root {
  --bg: #f5f3ee;
  --bg-alt: #ece8df;
  --card: #ffffff;
  --ink: #16161a;
  --ink-soft: #5c5c64;
  --ink-faint: #8a8a90;
  --line: #ddd8cc;
  --accent: #ff5a33;
  --accent-ink: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --ff-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ff-body: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ---------- nav ---------- */
.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0 var(--pad);
  pointer-events: none;
}
.nav {
  pointer-events: all;
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(245, 243, 238, 0.72);
  border: 1px solid rgba(22,22,26,0.08);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 8px 30px rgba(22,22,26,0.06);
  transition: box-shadow .3s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 10px 34px rgba(22,22,26,0.12); }

.nav-logo {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a { transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  align-items: center;
  justify-content: center;
  flex: none;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { display: none; }
.nav-toggle svg { width: 16px; height: 16px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--pad);
  padding-top: 84px;
  transform: translateY(-100%);
  transition: transform .4s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.mobile-menu a { font-family: var(--ff-head); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.mobile-menu-close {
  position: fixed;
  top: 26px;
  right: var(--pad);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 170px var(--pad) 90px;
  overflow: hidden;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 84px);
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 26px;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.55;
}
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 64px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta strong { font-family: var(--ff-head); font-size: 26px; font-weight: 800; }
.hero-meta span { font-size: 13px; color: var(--ink-faint); }

/* ticker */
.ticker {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  gap: 40px;
  animation: ticker 26s linear infinite;
}
.ticker-track span {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.ticker-track span::after { content: "\2726"; color: var(--accent); font-size: 11px; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- clients strip ---------- */
.clients {
  padding: 46px var(--pad);
}
.clients-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 44px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0.85;
}
.clients img {
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.62;
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}
.clients img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- section shell ---------- */
section { padding: 100px var(--pad); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 52px);
  max-width: 16ch;
  margin-top: 14px;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 40ch;
  font-size: 16px;
}
.inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------- about ---------- */
.about { background: var(--card); border-radius: var(--radius-lg); margin: 0 var(--pad); padding: 90px clamp(24px,5vw,72px); }
.about .inner { padding: 0; max-width: none; }
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/3.6;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 62ch;
}
.about-text p + p { margin-top: 18px; color: var(--ink-soft); font-size: 17px; }

.skill-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.skill-pills span {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.about-facts {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
.about-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 4px; }
.about-facts dd { margin: 0; font-weight: 600; font-size: 15px; }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--ink); }
.service-num {
  font-family: var(--ff-head);
  font-weight: 800;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 22px;
}
.service-card h3 { font-size: 21px; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* ---------- work ---------- */
.work-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(22,22,26,0.12); }
.work-card.is-hidden { display: none; }
.work-card.is-locked { cursor: default; }
.work-card.is-locked:hover { transform: none; box-shadow: none; }
.work-card-inner { filter: blur(16px) saturate(1.1); pointer-events: none; user-select: none; }
.work-thumb {
  position: relative;
  aspect-ratio: 4/3.1;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.work-card:hover .work-thumb img { transform: scale(1.06); }

/* ---------- blurred-image "unlock" badge ---------- */
.blur-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.blur-badge .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(22,22,26,0.42);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.blur-badge svg { width: 14px; height: 14px; flex: none; }
.work-card.is-textonly .work-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.work-card.is-textonly .work-thumb .mono {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-faint);
}
.work-body { padding: 20px 22px 24px; }
.work-body .tag { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.work-body h3 { font-size: 20px; margin-top: 8px; }
.work-body p { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

.work-more { margin-top: 44px; text-align: center; }

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; }
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { font-size: 13px; color: var(--ink-faint); font-weight: 600; padding-top: 3px; }
.timeline-role h3 { font-size: 19px; font-weight: 700; font-family: var(--ff-body); letter-spacing: 0; }
.timeline-role .company { color: var(--accent); font-weight: 600; }
.timeline-role p { margin-top: 8px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

.edu-list { display: flex; flex-direction: column; gap: 22px; }
.edu-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.edu-item .yr { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.edu-item h4 { font-family: var(--ff-body); font-weight: 700; font-size: 15.5px; margin-top: 6px; }
.edu-item p { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- contact ---------- */
.contact {
  background: var(--ink);
  color: #f5f3ee;
  border-radius: var(--radius-lg);
  margin: 0 var(--pad);
  padding: 90px clamp(24px,6vw,90px);
  text-align: center;
}
.contact h2 { color: #fff; font-size: clamp(32px, 5.4vw, 62px); max-width: 18ch; margin: 0 auto; }
.contact p { color: #b7b6c0; margin-top: 20px; font-size: 17px; max-width: 44ch; margin-left: auto; margin-right: auto; }
.contact-cta { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact .btn-ghost { border-color: rgba(255,255,255,0.24); color: #fff; }
.contact .btn-ghost:hover { border-color: #fff; }
.contact-links {
  margin-top: 56px;
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 34px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 14px;
  color: #cfced8;
}
.contact-links a:hover { color: var(--accent); }

/* ---------- footer ---------- */
footer {
  padding: 40px var(--pad) 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-faint);
}
.to-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.to-top:hover { border-color: var(--ink); transform: translateY(-3px); }

/* ---------- modal / lightbox ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15,15,17,0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal-overlay.is-open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 980px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(.98);
  transition: transform .35s var(--ease);
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: sticky;
  top: 18px;
  margin-left: auto;
  margin-right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-hero {
  position: relative;
  margin-top: -42px;
  aspect-ratio: 16/8.5;
  overflow: hidden;
  background: var(--bg-alt);
}
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-body { padding: 8px clamp(24px,5vw,56px) 56px; }
.modal-body .tag { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.modal-body h3 { font-size: clamp(26px,4vw,38px); margin-top: 10px; }
.modal-body p.desc { color: var(--ink-soft); margin-top: 16px; font-size: 16px; line-height: 1.6; max-width: 62ch; }
.modal-strip {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.modal-strip img, .modal-strip .pdf-tile {
  border-radius: var(--radius-sm);
  width: 100%;
  aspect-ratio: 1/0.85;
  object-fit: cover;
  background: var(--bg-alt);
}
.pdf-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
  padding: 10px;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-ghost { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .exp-grid { grid-template-columns: 1fr; gap: 40px; }
  .modal-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  section { padding: 70px var(--pad); }
  .about { padding: 56px 22px; border-radius: 22px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 26px; }
  .about-facts { grid-template-columns: 1fr; }
  .contact { padding: 64px 22px; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .nav { padding: 8px 8px 8px 18px; }

  .work-filters { gap: 8px; }
  .filter-btn { padding: 8px 14px; font-size: 12px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .work-thumb { aspect-ratio: 1/1; }
  .work-body { padding: 12px 12px 14px; }
  .work-body .tag { font-size: 10px; }
  .work-body h3 { font-size: 14px; margin-top: 4px; }
  .work-body p { font-size: 11px; margin-top: 3px; }
  .blur-badge .pill { padding: 7px 12px; font-size: 10px; gap: 5px; }
  .blur-badge svg { width: 11px; height: 11px; }
}

@media (max-width: 340px) {
  .work-grid { grid-template-columns: 1fr; }
}
