@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&family=Sanchez:ital@0;1&display=swap');

:root {
  --bg: oklch(0.97 0.004 80);
  --ink: oklch(0.18 0 0);
  --muted: oklch(0.55 0 0);
  --muted-45: oklch(0.45 0 0);
  --muted-4: oklch(0.4 0 0);
  --border-1: oklch(0.88 0.004 80);
  --border-2: oklch(0.85 0.005 80);
  --border-3: oklch(0.9 0.004 80);
  --accent: #C10737;
  --accent-hover: oklch(0.32 0.12 15);
  --circle: #B34A64;
  --overlay: oklch(0.18 0 0 / 0.9);
  --white: oklch(1 0 0);
  --dark: oklch(0.18 0 0);
}

@keyframes bwFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

* { box-sizing: border-box; }

/* Class-based `display` rules below would otherwise out-specificity the
   browser's default [hidden] styling — force it to win everywhere. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--accent-hover); color: oklch(0.98 0.003 80); }

a { font-family: inherit; }

img { display: block; max-width: 100%; }

button { font-family: inherit; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px clamp(16px, 5vw, 48px);
  background: oklch(0.97 0.004 80 / 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-2);
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: 'Sanchez', serif;
  font-size: clamp(17px, 4.4vw, 26px);
  letter-spacing: 0.04em;
}

.brand-studio {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 8px clamp(10px, 3vw, 20px);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.main-nav a:hover { background: oklch(0.94 0.004 80); }

.main-nav a.nav-cta {
  color: #F6F6F6;
  font-weight: 500;
  background-color: var(--accent);
  padding: 8px clamp(12px, 3vw, 22px);
}

.main-nav a.nav-cta:hover { background: var(--accent-hover); }

/* HERO */
.hero {
  position: relative;
  padding: clamp(60px, 12vw, 100px) clamp(20px, 6vw, 48px) clamp(50px, 8vw, 90px);
  background: var(--dark);
  overflow: hidden;
  animation: bwFadeUp 0.7s ease both;
  scroll-margin-top: 80px;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 30px;
}

.hero h1 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.12;
  margin: 0;
  max-width: 16ch;
  color: var(--bg);
}

.hero h1 .accent { color: var(--accent); }

.hero p {
  font-size: 17px;
  line-height: 1.6;
  color: oklch(0.75 0.005 80);
  max-width: 48ch;
  margin: 26px 0 0;
  font-weight: 300;
}

.hero-circle {
  position: absolute;
  top: -15px;
  left: -11px;
  width: 111px;
  height: 113px;
  border-radius: 50%;
  background-color: var(--circle);
}

.hero-square {
  position: absolute;
  top: 209px;
  right: 40px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg);
}

/* WORK / CLIENTS */
.work {
  padding: 67px clamp(20px, 6vw, 48px) 110px;
  max-width: 1180px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.work-head {
  text-align: center;
  margin-bottom: 52px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-head h2 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: 34px;
  margin: 14px 0 0;
}

.work-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}

.work-carousel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(44px, 11vw, 60px);
}

.arrow-btn {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: clamp(34px, 9vw, 44px);
  height: clamp(34px, 9vw, 44px);
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(13px, 3vw, 16px);
  box-shadow: 0 4px 14px oklch(0.18 0 0 / 0.1);
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

.arrow-prev { left: 0; }
.arrow-next { right: 0; }

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 130px;
  gap: clamp(10px, 3vw, 18px);
}

.client-card {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--border-3);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  width: 100%;
  height: 100%;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.client-card:hover { border-color: var(--accent-hover); transform: translateY(-3px); }

.client-card img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
}

.client-card .fallback {
  font-family: 'Sanchez', serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: oklch(0.22 0 0);
  text-align: center;
  line-height: 1.2;
}

.page-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-2);
}

.page-dots span.active { background: var(--accent-hover); }

/* ABOUT */
.about {
  padding: 20px clamp(20px, 6vw, 48px) 120px;
  max-width: 1180px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.about-label {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 44px;
}

.about-label .rule {
  width: 44px;
  height: 2px;
  background-color: var(--accent);
}

.about-label span:last-child {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(28px, 6vw, 64px);
  align-items: start;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 110px;
}

.about-photo {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border-2);
  filter: grayscale(1) contrast(1.05);
  border-radius: 67px;
  object-fit: cover;
  background: var(--border-1);
}

.about-photo-fallback {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border-2);
  border-radius: 67px;
  background: var(--border-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.about-name { font-family: 'Sanchez', serif; font-size: 20px; }
.about-title { font-size: 13px; color: var(--muted); margin-top: 4px; }
.about-location { font-size: 12px; color: var(--muted); margin-top: 2px; }

.about-links {
  display: flex;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.cv-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  text-align: center;
  padding: 14px 0;
  border-radius: 999px;
  background: var(--dark);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.cv-btn:hover { background: var(--accent-hover); }

.about-content {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.bio {
  font-size: 19px;
  line-height: 1.7;
  font-weight: 300;
  margin: 0;
  max-width: 62ch;
}

.about-content h3 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: var(--muted);
}

.languages { display: flex; flex-direction: column; gap: 8px; }
.languages div { font-size: 14px; }
.languages span { color: var(--muted); }

.skills-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  padding: 8px 16px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted-4);
}

.soft-skills { display: flex; flex-direction: column; gap: 8px; }
.soft-skills div { font-size: 14px; }

.timeline { display: flex; flex-direction: column; }

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border-2);
}

.timeline-row .period { font-size: 13px; color: var(--muted); }
.timeline-row .title { font-size: 16px; }
.timeline-row .org { font-size: 13px; color: var(--muted); margin-top: 2px; }
.timeline-row .detail { font-size: 13px; color: var(--muted-45); margin-top: 8px; line-height: 1.5; font-weight: 300; }

.cert-list { display: flex; flex-direction: column; gap: 10px; }

.cert-item {
  font-size: 14px;
  padding-left: 18px;
  position: relative;
}

.cert-item::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-hover);
}

.show-all-courses {
  all: unset;
  cursor: pointer;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  border-bottom: 1px solid var(--accent-hover);
}

.show-all-courses:hover { color: oklch(0.22 0.1 15); }

/* FOOTER */
.site-footer {
  padding: clamp(40px, 8vw, 70px) clamp(20px, 6vw, 48px);
  background: var(--dark);
  color: var(--bg);
  scroll-margin-top: 80px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 36px;
}

.footer-inner h2 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: clamp(24px, 5.5vw, 34px);
  margin: 0 0 14px;
  max-width: 14ch;
}

.footer-emails { display: flex; flex-direction: column; gap: 6px; }

.footer-emails a {
  color: var(--bg);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid oklch(0.5 0.02 20);
  width: fit-content;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-emails a.secondary {
  color: oklch(0.85 0.005 80);
  border-bottom: 1px solid oklch(0.4 0.01 20);
}

.footer-emails a:hover { border-color: oklch(0.6 0.14 15); color: oklch(0.75 0.1 15); }

.footer-phone { font-size: 13px; color: oklch(0.6 0.005 80); margin-top: 10px; }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.footer-logo { height: 114px; width: 188px; object-fit: contain; }

.footer-logo-fallback {
  height: 114px;
  width: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sanchez', serif;
  font-size: 12px;
  text-align: center;
  color: oklch(0.7 0.005 80);
  border: 1px dashed oklch(0.4 0.01 20);
  border-radius: 8px;
  padding: 8px;
}

.footer-social {
  display: flex;
  gap: 28px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-social a {
  color: oklch(0.85 0.005 80);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-social a:hover { color: oklch(0.75 0.1 15); }

.footer-bottom {
  max-width: 1180px;
  margin: 50px auto 0;
  padding-top: 22px;
  border-top: 1px solid oklch(0.32 0.01 20);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.5 0.01 20);
}

/* SCROLL TO TOP */
.scroll-top-btn {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--dark);
  color: oklch(0.98 0.003 80);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 6px 18px oklch(0.18 0 0 / 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.scroll-top-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--accent-hover); }

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 6vw, 70px) 16px;
  overflow-y: auto;
  animation: bwFadeUp 0.35s ease both;
}

.modal-overlay.courses-overlay { z-index: 110; }

.modal-card {
  background: var(--white);
  width: 100%;
  max-width: 920px;
  padding: clamp(24px, 6vw, 56px);
  position: relative;
}

.courses-overlay .modal-card { max-width: 760px; }

.modal-close {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: clamp(14px, 4vw, 28px);
  right: clamp(16px, 4vw, 32px);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.modal-close:hover { color: var(--accent-hover); }

.modal-logo-box {
  width: 100%;
  height: clamp(70px, 14vw, 113px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border-3);
  border-radius: 12px;
  margin-bottom: 33px;
}

.modal-logo-box img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
}

.modal-category { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.modal-card h2 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: clamp(26px, 6vw, 40px);
  margin: 12px 0 16px;
}

.modal-summary {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-4);
  max-width: 60ch;
  font-weight: 300;
  margin: 0 0 16px;
}

.modal-website {
  display: inline-block;
  font-size: 13px;
  color: var(--accent-hover);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-hover);
  margin-bottom: 40px;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--dark);
  color: oklch(0.98 0.003 80);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 999px;
  margin-bottom: 40px;
}

.age-badge strong { font-weight: 700; }

.project-carousel { position: relative; margin-top: 24px; }

.project-frame {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border: 1px solid var(--border-1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-frame img { width: 100%; height: 100%; object-fit: contain; }

.project-frame .placeholder {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted-45);
  text-align: center;
  padding: 0 12px;
}

.project-carousel .arrow-btn {
  background: oklch(1 0 0 / 0.92);
  border: 1px solid var(--border-2);
}

.project-carousel .arrow-prev { left: 8px; }
.project-carousel .arrow-next { right: 8px; }

.project-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 18px;
}

.project-meta .title { font-size: 15px; }
.project-meta .type { font-size: 12px; color: var(--muted); margin-top: 2px; }
.project-meta .position { font-size: 12px; color: var(--muted); }

/* All courses modal */
.courses-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.courses-overlay h2 {
  font-family: 'Sanchez', serif;
  font-weight: 400;
  font-size: clamp(22px, 5vw, 30px);
  margin: 12px 0 32px;
}

.courses-list {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.course-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-3);
}

.course-row .course-title { font-size: 14px; }
.course-row .course-hours { font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 640px) {
  .about-side { position: static; }
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { align-items: flex-start; }
  .footer-right { align-items: flex-start; }
  .hero-circle, .hero-square { display: none; }

  .work-carousel { padding: 0 clamp(38px, 10vw, 50px); }
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 78px;
    gap: 8px;
  }
  .client-card { padding: 6px; border-radius: 10px; }
  .client-card .fallback { font-size: 8px; }
}
