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

:root {
  --bg-light: #F9F7F9;
  --bg-dark: #2D2A2B;
  --text-dark: #2D2A2B;
  --text-box: rgba(224,220,221,0.5);
  --text-box-solid: #E0DCDD;
  --text-grey: #AFABAC;
  --text-sector: #555253;
  --accent: #0F9ED5;
  --white: #FFFFFF;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --sidebar-w: 80px;
  --dots-w: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; overflow-y: scroll; }
body { font-family: var(--sans); color: var(--text-dark); background: var(--bg-light); -webkit-font-smoothing: antialiased; }

/* ═══════════════════════════════════════
   SIDEBAR — label top, bracket spans section height with margin, icons bottom
   ═══════════════════════════════════════ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; z-index: 100;
}
.sidebar__label-wrap {
  padding-top: 32px; display: flex; justify-content: flex-start; padding-left: 16px;
}
.sidebar__label {
  writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: 5px; text-transform: uppercase; color: var(--text-dark);
  transition: color 0.4s;
}
.sidebar__label.light { color: var(--white); }

.sidebar__bracket-wrap {
  position: fixed; left: 48px; top: 32px; bottom: 32px;
  width: 20px;
}
.sidebar__bracket {
  width: 20px; height: 100%;
}
.sidebar__bracket img { width: 100%; height: 100%; object-fit: fill; }
.sidebar__bracket.light img { filter: brightness(0) invert(1); opacity: 0.3; }

.sidebar__icons {
  position: fixed; left: 0; bottom: 32px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  padding-left: 16px;
}
.sidebar__icons a { display: block; width: 20px; height: 20px; transition: opacity 0.3s; }
.sidebar__icons a img { width: 100%; height: 100%; object-fit: contain; }
.sidebar__icons a:hover { opacity: 0.6; }
.sidebar__icons.light a img { filter: brightness(0) invert(1); opacity: 0.5; }

/* ═══════════════════════════════════════
   DOT NAVIGATION
   ═══════════════════════════════════════ */
.dots-nav {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 100;
}
.dots-nav__dot {
  width: 12px; height: 12px; border-radius: 50%; border: none;
  background: var(--text-box-solid); cursor: pointer; transition: all 0.3s; padding: 0;
}
.dots-nav__dot.active { background: var(--text-dark); }

/* ═══════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════ */
.section {
  min-height: 100vh; scroll-snap-align: start;
  display: flex; align-items: center;
  padding: 40px calc(var(--dots-w) + 60px) 40px calc(var(--sidebar-w) + 40px);
  position: relative;
}
.section--about { background: var(--bg-light); }
.section--work { background: var(--bg-dark); }
.section--cv { background: var(--bg-light); }
.section__inner { max-width: 960px; margin: 0 auto; width: 100%; }

/* ═══════════════════════════════════════
   SECTION 1: ABOUT
   ═══════════════════════════════════════ */
.about-layout { display: flex; flex-direction: column; gap: 36px; }

.about-top { display: flex; align-items: flex-start; gap: 0; position: relative; }

.about__photo-wrap {
  flex-shrink: 0; width: 260px; position: relative; z-index: 2;
  overflow: hidden; border-radius: 0 0 50% 50%;
}
.about__photo { width: 260px; height: 330px; object-fit: cover; object-position: top;  display: block; }

/* Info box: starts at photo top, shifted right, narrower text area */
.about__info {
  background: var(--text-box);
  padding: 28px 48px 28px 140px;
  flex: 1; display: flex; flex-direction: column; justify-content: flex-start;
  position: relative; margin-left: -80px;
  min-height: 320px;
}
.about__name {
  font-family: var(--serif); font-size: 46px; font-weight: 700;
  line-height: 1.1; margin-bottom: 8px; color: var(--text-dark);
}
.about__tagline {
  font-size: 14px; font-weight: 400; color: var(--text-grey);
  letter-spacing: 2px; margin-bottom: 20px;
}
.about__bio {
  font-family: var(--serif); font-size: 14px;
  line-height: 1.6; color: var(--text-dark); max-width: 440px;
}

/* Blue accent: vertical at bottom-right, horizontal at bottom */
.about__accent-v {
  position: absolute; top: 60%; right: 16px; bottom: 3%;
  width: 3px; background: var(--accent);
}
.about__accent-h {
  position: absolute; bottom: 16px; right: 10px;
  width: 216px; height: 3px; background: var(--accent);
}

/* ═══════════════════════════════════════
   TESTIMONIAL
   ═══════════════════════════════════════ */
.testimonial-area {
  display: flex; gap: 48px; align-items: flex-start;
  position: relative; height: 200px; overflow: hidden;
  padding-right: 40px;
}
.testimonial__live { flex: 3; display: flex; gap: 16px; align-items: flex-start; max-width: 650px; }
.testimonial__quote-open { flex-shrink: 0; width: 44px; height: 44px; margin-top: -12px; }
.testimonial__quote-open img { width: 100%; height: 100%; object-fit: contain; }
.testimonial__content { flex: 1; position: relative; height: 180px; overflow: visible; }
.testimonial__slider { position: relative; min-height: 90px; }
.testimonial__slide { opacity: 0; position: absolute; top: 0; left: 0; right: 0; transition: opacity 0.6s; }
.testimonial__slide.active { opacity: 1; position: relative; }
.testimonial__text {
  font-family: var(--sans); font-style: italic; font-size: 15px;
  line-height: 1.5; color: var(--text-dark); margin-bottom: 10px;
  max-height: 135px; overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}
.testimonial__author { font-size: 14px; font-weight: 600; color: var(--text-grey); margin-bottom: 2px; }
.testimonial__company { font-size: 13px; color: var(--text-dark); font-weight: 500; }
.testimonial__quote-close { position: absolute; bottom: -12px; right: -32px; width: 44px; height: 44px; }
.testimonial__quote-close img { width: 100%; height: 100%; object-fit: contain; }

.testimonial__peek { flex: 1; opacity: 0.45; padding-top: 0; transition: opacity 300ms ease; }
.testimonial__peek-text {
  font-family: var(--serif); font-style: italic; font-size: 11px;
  line-height: 1.5; color: var(--text-dark); margin-bottom: 4px;
}
.testimonial__peek-author { font-size: 10px; color: var(--text-grey); font-weight: 600; }
.testimonial__peek-company { font-size: 10px; color: var(--text-dark); }
.testimonial--empty { display: none; }

/* ═══════════════════════════════════════
   SECTION 2: SELECTED WORK — scrolling if >4
   ═══════════════════════════════════════ */
.work__label {
  font-family: var(--sans); font-size: 26px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--white);
  position: relative; display: inline-block; padding-bottom: 8px;
  border-bottom: 3px solid #0F9ED5; padding-bottom: 4px;
}
.work__label--right { float: right; margin-bottom: 12px; }
.work__label--left { float: left; }

.work__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  clear: both; padding-top: 20px;
}
/* Scrolling grid for >4 items */
.work__grid--scroll {
  display: flex; gap: 16px; clear: both; padding-top: 20px;
  overflow: hidden; position: relative;
}
.work__grid--scroll .work__scroll-track {
  display: flex; gap: 16px;
  animation: scrollLogos 20s linear infinite;
}
@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.work__grid--scroll .logo-card { flex-shrink: 0; width: 220px; }

.work__divider {
  clear: both; border: none; height: 1px;
  background: rgba(175,171,172,0.4);
  margin: 28px auto 12px; width: 200px;
}

.logo-card {
  background: var(--text-box-solid); border-radius: 12px;
  aspect-ratio: 5/3; display: flex; align-items: center;
  justify-content: center; padding: 20px; cursor: pointer;
  position: relative; overflow: hidden; transition: all 0.3s;
}
.logo-card img { max-width: 80%; max-height: 55%; object-fit: contain; transition: opacity 0.3s; }
.logo-card__overlay {
  position: absolute; inset: 0; background: rgba(45,42,43,0.85);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; opacity: 0; transition: opacity 0.3s;
  padding: 12px; text-align: center; border-radius: 12px;
}
.logo-card:hover .logo-card__overlay { opacity: 1; }
.logo-card__sector { font-size: 10px; color: var(--text-grey); letter-spacing: 1px; margin-bottom: 6px; }
.logo-card__type { font-size: 11px; color: var(--white); font-weight: 500; }

.work__bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 28px; clear: both;
}
.work__all-link {
  font-size: 13px; color: var(--text-grey); text-decoration: none;
  letter-spacing: 2px; text-transform: uppercase; transition: color 0.3s;
}
.work__all-link:hover { color: var(--white); }

/* ═══════════════════════════════════════
   SECTION 3: CV — cards with shadow, blue bottom border, fade-in
   ═══════════════════════════════════════ */
.cv-layout { text-align: center; margin-top: 36px; }

.cv__section-label {
  font-family: var(--sans); font-size: 16px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--text-dark); margin-bottom: 24px;
}
.cv__row {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 8px;
}
.cv__card {
  width: 200px; height: 120px; background: var(--white);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-bottom: 3px solid var(--accent);
  opacity: 0; transform: translateY(16px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}
.cv__card.visible { opacity: 1; transform: translateY(0); }
.cv__card img { max-width: 85%; max-height: 50%; object-fit: contain; }

.cv__timeline {
  display: flex; justify-content: center; align-items: center;
  position: relative; height: 24px; margin-bottom: 40px;
  max-width: 700px; margin-left: auto; margin-right: auto;
}
.cv__timeline-line {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 2px; background: var(--text-box-solid);
  transform: translateY(-50%);
}
.cv__timeline-dots {
  display: flex; justify-content: space-around; width: 100%;
  position: relative; z-index: 1;
}
.cv__timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}

/* ═══════════════════════════════════════
   ALL PROJECTS PAGE
   ═══════════════════════════════════════ */
.projects-page { padding: 48px 60px; min-height: 100vh; max-width: 1100px; margin: 0 auto; }
.projects__back { display: inline-block; margin-bottom: 32px; font-size: 13px; color: var(--text-grey); text-decoration: none; letter-spacing: 1px; }
.projects__back:hover { color: var(--text-dark); }
.projects__category-label { font-family: var(--sans); font-size: 30px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; color: var(--text-dark); display: inline-block; border-bottom: none; }
.projects__tab.active .projects__category-label { border-bottom: 3px solid #0F9ED5; }
.projects__tab:not(.active) .projects__category-label { border-bottom: none; }
.projects__tabs { display: flex; gap: 56px; margin-bottom: 32px; }
.projects__tab { cursor: pointer; user-select: none; transition: opacity 200ms ease; }
.projects__tab:not(.active) { opacity: 0.35; }
.projects__tab:not(.active):hover { opacity: 0.6; }
.projects__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 56px; }
.project-card { display: flex; border: 1px solid var(--text-box-solid); border-radius: 10px; overflow: hidden; background: var(--text-box); }
.project-card__logo { width: 180px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--white); }
.project-card__logo img { max-width: 90%; max-height: 80%; object-fit: contain; }
.project-card__info { padding: 20px 24px; flex: 1; }
.project-card__sector { font-size: 13px; color: var(--text-sector); margin-bottom: 8px; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.project-card__tag { background: var(--accent); color: var(--white); font-size: 12px; font-weight: 500; padding: 5px 16px; border-radius: 6px; }
.project-card__desc { font-size: 13px; color: var(--text-dark); line-height: 1.5; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .dots-nav { right: 8px; }
  .dots-nav__dot { width: 8px; height: 8px; }
  .section { padding: 40px 20px; }
  .about-top { flex-direction: column; align-items: center; }
  .about__photo-wrap { width: 180px; }
  .about__photo { width: 180px; height: 240px; }
  .about__info { margin-left: 0; margin-top: -24px; padding: 32px 20px; text-align: center; min-height: auto; }
  .about__name { font-size: 32px; }
  .about__bio { max-width: 100%; }
  .testimonial-area { flex-direction: column; }
  .testimonial__peek { display: none; }
  .work__grid { grid-template-columns: 1fr 1fr; }
  .work__label { font-size: 18px; }
  .cv__row { flex-wrap: wrap; gap: 16px; }
  .cv__card { width: 160px; height: 100px; }
  .projects-page { padding: 24px 16px; }
  .projects__grid { grid-template-columns: 1fr; }
  .project-card { flex-direction: column; }
  .project-card__logo { width: 100%; padding: 16px; }
}
