/* ========================================
   PORTFOLIO — Lucas Tadeu
   ======================================== */

/* ----------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------- */

:root {
  /* Premium Color Palette — Warm, sophisticated */
  --color-bg: #F5F3F0;
  --color-bg-warm: #F8F6F3;
  --color-sidebar: #EBE8E4;
  --color-sidebar-light: #F0EDE9;
  --color-card: #FFFFFF;
  --color-card-elevated: #FEFEFE;
  --color-text: #1A1A1A;
  --color-text-secondary: #525252;
  --color-text-tertiary: #767676;
  --color-divider: rgba(0, 0, 0, 0.06);
  --color-border-subtle: rgba(0, 0, 0, 0.04);
  --color-highlight: rgba(255, 255, 255, 0.7);
  --color-overlay: rgba(15, 15, 15, 0.4);
  --color-accent: #1A1A1A;
  --color-accent-hover: #000000;
  --color-accent-subtle: rgba(0, 0, 0, 0.06);

  /* Gradient Stops */
  --gradient-bg-from: #F7F5F2;
  --gradient-bg-to: #F2EFEB;
  --gradient-sidebar-from: #EFECE8;
  --gradient-sidebar-to: #E8E5E0;

  /* Typography — Premium system */
  --font-display: "Funnel Display", "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", "SF Pro Text", system-ui, sans-serif;

  /* Type Scale — Body */
  --text-2xs:  0.6875rem;   /* 11px — captions, meta, labels uppercase */
  --text-xs:   0.75rem;     /* 12px — texto pequeno, footnotes */
  --text-sm:   0.8125rem;   /* 13px — body secundário */
  --text-base: 0.875rem;    /* 14px — body primário (leitura) */
  --text-md:   0.9375rem;   /* 15px — body enfatizado */
  --text-lg:   1rem;         /* 16px — section titles, body grande */

  /* Type Scale — Display (headings responsivos) */
  --display-xs:  1.5rem;    /* 24px */
  --display-sm:  1.75rem;   /* 28px */
  --display-md:  2rem;      /* 32px */
  --display-lg:  2.25rem;   /* 36px */
  --display-xl:  2.5rem;    /* 40px */
  --display-2xl: 2.75rem;   /* 44px */
  --display-3xl: 3rem;      /* 48px */
  --display-4xl: 3.5rem;    /* 56px */
  --display-5xl: 4rem;      /* 64px */
  --display-6xl: 4.5rem;    /* 72px */

  /* Spacing — 8pt with premium ratios */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Premium Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Timing */
  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-slow: 500ms;

  /* Shadows */
  --shadow-sm:
    0 1px 1px rgba(0, 0, 0, 0.02),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-md:
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 8px 16px rgba(0, 0, 0, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.02);
  --shadow-card:
    0 1px 1px rgba(0, 0, 0, 0.01),
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 4px 8px rgba(0, 0, 0, 0.02),
    0 8px 16px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 var(--color-highlight);

  /* Border Radius — Premium scale */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Z-index */
  --z-base: 1;
  --z-sticky: 10;
  --z-overlay: 100;
  --z-modal: 101;
}


/* ----------------------------------------
   2. RESET & BASE
   ---------------------------------------- */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background:
    radial-gradient(
      ellipse 120% 80% at 80% 20%,
      var(--gradient-bg-from) 0%,
      var(--gradient-bg-to) 100%
    );
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: normal;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--color-accent);
  color: var(--color-card);
}

/* Display text — optimized rendering only where it matters */
.signature-name,
.signature-role,
.case-title,
.modal-title,
.modal-section-title,
.about-title {
  text-rendering: optimizeLegibility;
}


/* ----------------------------------------
   3. ACCESSIBILITY
   ---------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-card);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  z-index: 200;
  transition: top 300ms var(--ease-out-quart);
}

.skip-link:focus {
  top: var(--space-4);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------
   4. LAYOUT
   ---------------------------------------- */

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}


/* ----------------------------------------
   5. SIDEBAR — 3 Zone Layout
   ---------------------------------------- */

.sidebar {
  background: #000000;
  padding: var(--space-8) var(--space-6);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  transition: background var(--duration-slow) var(--ease-out-quart);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Upper Zone: Experimental Typography (55-60%) */
.sidebar-upper {
  flex: 0 0 55%;
  display: flex;
  align-items: flex-start;
  padding-top: var(--space-4);
  margin-bottom: var(--space-10);

  opacity: 0;
  animation: fadeIn 1s var(--ease-out-expo) 0.1s forwards;
}

.sidebar-logo {
  width: 100%;
  max-width: none;
  height: auto;
}

/* Middle Zone: Breathing Space */
.sidebar-middle {
  flex: 1;
}

/* Lower Zone: Signature (15-20%) */
.sidebar-lower {
  flex: 0 0 auto;
  padding-bottom: var(--space-4);

  opacity: 0;
  animation: fadeIn 0.8s var(--ease-out-expo) 0.3s forwards;
}

.signature-name {
  font-family: var(--font-display);
  font-size: clamp(var(--display-xs), 4vw, var(--display-md));
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
  margin-bottom: 0.25em;
  letter-spacing: -0.025em;
  line-height: 1;
  transition: color var(--duration-slow) var(--ease-out-quart);
}

.signature-role {
  font-family: var(--font-display);
  font-size: clamp(var(--text-sm), 1.5vw, var(--text-lg));
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: block;
  transition: color var(--duration-slow) var(--ease-out-quart);
}

.sidebar-lower {
  pointer-events: none;
}

.sidebar-social {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--space-8);
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--duration-fast) var(--ease-out-quart);
  pointer-events: auto;
}

.sidebar-social:hover {
  color: #FFFFFF;
}

.sidebar-social svg {
  width: 16px;
  height: 16px;
}

.sidebar.is-light .sidebar-social {
  color: rgba(0, 0, 0, 0.4);
}

.sidebar.is-light .sidebar-social:hover {
  color: var(--color-text);
}

/* Vertical Divider */
.v-divider {
  display: none;
}


/* ----------------------------------------
   6. MAIN CONTENT
   ---------------------------------------- */

.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Panels — Mobile (edge-to-edge) */
.panel {
  padding: 0;
  min-height: 100%;
}

.panel-projects {
  padding-bottom: var(--space-12);
}

.cases {
  display: flex;
  flex-direction: column;
  gap: 0;
}


/* ----------------------------------------
   7. CASE CARD — Premium Design
   ---------------------------------------- */

.case {
  position: relative;
  border-radius: 0;
  padding: var(--space-6) var(--space-4);
  cursor: pointer;
  text-align: left;
  width: 100%;

  /* Clean white surface */
  background: #FFFFFF;

  /* Bottom border only for mobile list style */
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);

  /* No shadow on mobile */
  box-shadow: none;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);

  /* Smooth transitions */
  transition:
    transform var(--duration-slow) var(--ease-out-quart),
    box-shadow var(--duration-slow) var(--ease-out-quart),
    opacity var(--duration-slow) var(--ease-out-quart),
    background var(--duration-fast) var(--ease-out-quart);

  /* GPU acceleration */
  will-change: transform, box-shadow;
}

.case.is-visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

/* Mobile: Active state only (no hover) */
.case:active {
  background: rgba(0, 0, 0, 0.02);
  transition-duration: var(--duration-instant);
}

/* Staggered reveal */
.case:nth-child(1) { transition-delay: 0.05s; }
.case:nth-child(2) { transition-delay: 0.1s; }
.case:nth-child(3) { transition-delay: 0.15s; }
.case:nth-child(4) { transition-delay: 0.2s; }
.case:nth-child(5) { transition-delay: 0.25s; }

/* Case Inner — Stacked layout */
.case-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Case Tag — Category pill */
.case-tag {
  align-self: flex-start;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  background: var(--color-accent-subtle);
  color: #000000;
  pointer-events: none;
}

/* Case Title */
.case-title {
  font-family: var(--font-display);
  font-size: clamp(var(--display-xs), 5.5vw, var(--display-md));
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin: 0;
}

/* Case Meta — Description + Arrow on same line */
.case-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Case Description — Mobile */
.case-description {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
  letter-spacing: 0;
  flex: 1;
  max-width: 60%;
}

/* Case Action — Arrow aligned right */
.case-action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Case Arrow — Mobile (subtle) */
.case-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: var(--radius-full);
  flex-shrink: 0;

  transition:
    background var(--duration-fast) var(--ease-out-quart),
    transform 300ms var(--ease-out-quart);
}

.case-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-tertiary);
  transition:
    transform var(--duration-fast) var(--ease-out-quart),
    color var(--duration-fast) var(--ease-out-quart);
}

.case:active .case-arrow svg {
  transform: translateX(2px);
  color: var(--color-text);
}

/* Placeholder for smooth collapse animation */
.case-placeholder {
  pointer-events: none;
  visibility: hidden;
}


/* ----------------------------------------
   8. PROJECT MODAL SYSTEM
   ---------------------------------------- */

/* Blur Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 300ms;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal Container */
.modal-container {
  position: fixed;
  z-index: 1001;
  background: #FFFFFF;
  overflow: hidden;

  /* Positioned by JS at final size — no layout animation */
  opacity: 0;
  transform: scale(0.96);
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 300ms;
}

.modal-container.is-open {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  pointer-events: auto;
}

/* Modal Content — Two Column Layout */
.modal-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Modal Header */
.modal-header {
  padding: var(--space-8);
  padding-bottom: var(--space-4);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(var(--display-sm), 5vw, var(--display-3xl));
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin: 0 0 var(--space-4) 0;
}

.modal-subtitle {
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}

.modal-tag {
  display: inline-block;
  margin-top: var(--space-4);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  background: var(--color-accent-subtle);
  color: #000000;
  pointer-events: none;
}

/* Modal Body — Two Columns */
.modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* Left Column — Text */
.modal-col-text {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--space-8);
  padding-right: var(--space-6);

  /* Premium scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.modal-col-text::-webkit-scrollbar {
  width: 6px;
}

.modal-col-text::-webkit-scrollbar-track {
  background: transparent;
}

.modal-col-text::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

.modal-col-text::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Right Column — Images */
.modal-col-images {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--space-8);
  padding-top: var(--space-4);
  padding-left: var(--space-6);

  /* Premium scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.modal-col-images::-webkit-scrollbar {
  width: 6px;
}

.modal-col-images::-webkit-scrollbar-track {
  background: transparent;
}

.modal-col-images::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

.modal-col-images::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Text Content Styles */
.modal-section {
  margin-bottom: var(--space-6);
}

.modal-section:last-child {
  margin-bottom: var(--space-10);
}

.modal-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2) 0;
  letter-spacing: -0.02em;
}

.modal-section p {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2) 0;
}

.modal-section p:last-child {
  margin-bottom: 0;
}

.modal-section strong {
  color: var(--color-text);
  font-weight: 500;
}

.modal-list {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  color: var(--color-text-secondary);
}

.modal-list li {
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-1);
}

.modal-list li:last-child {
  margin-bottom: 0;
}

.modal-list li strong {
  color: var(--color-text);
  font-weight: 500;
}

/* Image Styles */
.modal-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.modal-image:last-child {
  margin-bottom: 0;
}

/* Animation States — Body content (fade-in with delay) */
.modal-body {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 350ms cubic-bezier(0.16, 1, 0.3, 1) 100ms,
    transform 350ms cubic-bezier(0.16, 1, 0.3, 1) 100ms;
}

.modal-container.is-open .modal-body {
  opacity: 1;
  transform: translateY(0);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  border: none;
  cursor: pointer;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: scale(0.8);

  transition:
    opacity 250ms cubic-bezier(0.16, 1, 0.3, 1) 80ms,
    transform 250ms cubic-bezier(0.16, 1, 0.3, 1) 80ms,
    background 150ms ease;
}

.modal-close svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-secondary);
  transition: color 150ms ease;
}

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

.modal-close:hover svg {
  color: #FFFFFF;
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-container.is-open .modal-close {
  opacity: 1;
  transform: scale(1);
}

/* Hide original card close button */
.case-close {
  display: none;
}

/* Card selected state — hidden while modal is open, fades back in on close */
.case.is-selected {
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Detail Content in original cards (hidden) */
.case-detail {
  display: none;
}


/* ----------------------------------------
   9. FOOTER
   ---------------------------------------- */

.footer {
  padding: var(--space-8) var(--space-4);
  text-align: center;
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer p {
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  letter-spacing: -0.01em;
}


/* ----------------------------------------
   9.5 TAB PANELS & ABOUT
   ---------------------------------------- */

/* Tab Switcher — Hidden on mobile */
.tab-switcher {
  display: none;
}

/* Tab Transition Blur — Hightech, fast & subtle */
.tab-transition-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  pointer-events: none;

  opacity: 0;
  transition: opacity 120ms ease-out;
}

.tab-transition-blur.is-active {
  opacity: 1;
  transition: opacity 80ms ease-in;
}

/* ─────────────────────────────────────────────
   SIDEBAR LIGHT MODE (when About tab is active)
   ───────────────────────────────────────────── */

.sidebar.is-light {
  background: linear-gradient(
    165deg,
    var(--gradient-sidebar-from) 0%,
    var(--gradient-sidebar-to) 100%
  );
}

.sidebar.is-light .sidebar-logo {
  filter: invert(1);
}

.sidebar.is-light .signature-name {
  color: var(--color-text);
}

.sidebar.is-light .signature-role {
  color: var(--color-text-secondary);
}

/* Divider also transitions */
.v-divider {
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--duration-slow) var(--ease-out-quart);
}

body.tab-about-active .v-divider {
  background: var(--color-divider);
}

/* Panels — Fade transitions (no transform to avoid clipping) */
.panel {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  inset: 0;
  transition:
    opacity var(--duration-slow) var(--ease-out-expo),
    visibility var(--duration-slow);
}

.panel.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.panel[hidden] {
  display: block;
  pointer-events: none;
}

/* Ensure smooth transition when switching */
.main {
  position: relative;
  overflow: hidden;
}

.main > .panel {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* About Panel — Dark background with white text */
.panel-about {
  padding: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.about-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(var(--display-xl), 10vw, var(--display-4xl));
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: #FFFFFF;
  margin: 0 0 var(--space-10) 0;
}

.about-section {
  margin-bottom: var(--space-6);
}

.about-section:first-child {
  margin-bottom: 96px;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section-title {
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--space-2);
}

.about-body {
  font-size: var(--text-xs);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}

.about-body p {
  margin-bottom: var(--space-2);
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-list {
  list-style: none;
}

.about-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-xs);
  line-height: 1.65;
}

.about-list li:first-child {
  padding-top: 0;
}

.about-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-list strong {
  color: #FFFFFF;
  font-weight: 500;
}

.about-meta {
  font-size: var(--text-2xs);
  color: rgba(255, 255, 255, 0.72);
  margin-left: auto;
}

.about-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.about-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-xs);
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.about-link:hover {
  background: var(--color-accent);
  color: #FFFFFF;
  border-color: transparent;
}


/* ----------------------------------------
   10. ANIMATIONS
   ---------------------------------------- */

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

/* ----------------------------------------
   11. RESPONSIVE — TABLET (768px+)
   ---------------------------------------- */

@media (min-width: 768px) {
  .sidebar {
    padding: var(--space-12) var(--space-10) var(--space-10);
  }

  /* 3-Zone Sidebar — Tablet */
  .sidebar-upper {
    flex: 0 0 55%;
    padding-top: var(--space-6);
  }

  .sidebar-logo {
    width: 85%;
    max-width: 320px;
  }


  /* Panels — Tablet with padding */
  .panel {
    padding: var(--space-8);
  }

  .panel-projects {
    padding-bottom: var(--space-16);
  }

  .cases {
    gap: var(--space-4);
    max-width: 720px;
    margin: 0 auto;
  }

  /* Cards — Tablet style with rounded corners and shadow */
  .case {
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.03),
      0 2px 6px rgba(0, 0, 0, 0.03);
  }

  .case:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.06),
      0 8px 20px rgba(0, 0, 0, 0.04);
  }

  .case:active {
    transform: translateY(-1px) scale(1.01);
    background: #FFFFFF;
  }

  .case-tag {
    position: absolute;
    top: var(--space-8);
    right: var(--space-8);
  }

  .case-title {
    max-width: 70%;
  }

  .case-inner {
    gap: var(--space-6);
  }

  .case-title {
    font-size: clamp(var(--display-sm), 4.5vw, var(--display-lg));
  }

  .case-meta-row {
    gap: var(--space-6);
  }

  .case-description {
    font-size: var(--text-xs);
    max-width: 70%;
  }

  /* Arrow — Tablet */
  .case-arrow {
    width: 40px;
    height: 40px;
    background: var(--color-accent-subtle);
  }

  .case-arrow svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
  }

  .case:hover .case-arrow {
    background: var(--color-accent);
  }

  .case:hover .case-arrow svg {
    transform: translateX(1px);
    color: var(--color-card);
  }

  /* Modal — Tablet */
  .modal-header {
    padding: var(--space-10) var(--space-10) var(--space-4);
  }

  .modal-title {
    font-size: var(--display-lg);
  }

  .modal-col-text,
  .modal-col-images {
    padding: var(--space-10);
    padding-top: var(--space-6);
  }

  .modal-close {
    top: var(--space-6);
    right: var(--space-6);
  }

  /* About — Tablet */
  .about-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-8);
  }

  .about-title {
    font-size: var(--display-3xl);
  }
}


/* ----------------------------------------
   12. RESPONSIVE — DESKTOP (1024px+)
   ---------------------------------------- */

@media (min-width: 1024px) {
  body {
    overflow: hidden;
  }

  .container {
    flex-direction: row;
    height: 100vh;
    height: 100dvh;
  }

  /* Sidebar — Premium fixed, 3-Zone Layout */
  .sidebar {
    order: 1;
    width: 45%;
    min-width: 45%;
    max-width: 45%;
    height: 100vh;
    height: 100dvh;
    min-height: auto;
    display: flex;
    flex-direction: column;
    padding: var(--space-16);
    position: sticky;
    top: 0;
  }

  .sidebar-upper {
    margin-bottom: 0;
  }

  /* 3-Zone Sidebar — Desktop */
  .sidebar-upper {
    flex: 0 0 58%;
    padding-top: var(--space-8);
    align-items: flex-start;
    justify-content: flex-start;
  }

  .sidebar-logo {
    width: 85%;
    max-width: 374px;
  }

  .sidebar-middle {
    flex: 1;
  }

  .sidebar-lower {
    flex: 0 0 auto;
    padding-bottom: var(--space-6);
  }


  /* Vertical Divider — With Tab Switcher */
  .v-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
    width: 1px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-divider);
    position: relative;
  }

  /* Tab Switcher — Vertical pills on divider */
  .tab-switcher {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    z-index: 20;
  }

  .tab {
    padding: 16px 8px;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 500;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    border-radius: 20px;
    transition:
      background var(--duration-fast) var(--ease-out-quart),
      color var(--duration-fast) var(--ease-out-quart);
  }

  /* Inactive tab — White pill (same as cards) */
  .tab {
    background: #FFFFFF;
    color: #888888;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .tab:hover:not(.is-active) {
    background: #FFFFFF;
    color: #555555;
  }

  /* Active tab — Accent pill */
  .tab.is-active {
    background: var(--color-accent);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .tab:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
    z-index: 1;
  }

  .tab:active:not(.is-active) {
    transform: rotate(180deg) scale(0.96);
  }

  /* Main — Scrollable container for panels */
  .main {
    order: 3;
    flex: 1;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  .main > .panel {
    scroll-behavior: smooth;
    overscroll-behavior: contain;

    /* Premium scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
  }

  .main > .panel::-webkit-scrollbar {
    width: 8px;
  }

  .main > .panel::-webkit-scrollbar-track {
    background: transparent;
  }

  .main > .panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
  }

  .main > .panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
  }

  /* Panels — Desktop positioning (full height, edge to edge) */
  .main > .panel {
    position: absolute;
    inset: 0;
    padding: 0 var(--space-16);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main > .panel.is-active {
    position: relative;
    height: 100%;
  }

  .cases {
    padding-top: var(--space-12);
  }

  /* About — Desktop */
  .about-wrapper {
    max-width: 800px;
    padding: var(--space-12) 0;
  }

  .about-title {
    font-size: var(--display-4xl);
  }

  .about-body {
    font-size: var(--text-sm);
    line-height: 1.65;
  }

  .about-list li {
    font-size: var(--text-sm);
    line-height: 1.65;
  }

  /* Cases — Desktop */
  .cases {
    max-width: 800px;
    margin: 0 auto;
    gap: var(--space-4);
    padding-bottom: 8vh;
  }

  .case {
    padding: var(--space-10) var(--space-12);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.03),
      0 2px 8px rgba(0, 0, 0, 0.03);
  }

  .case:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.06),
      0 8px 24px rgba(0, 0, 0, 0.05);
  }

  .case:active {
    transform: translateY(-2px) scale(1.01);
    background: #FFFFFF;
  }

  .case-inner {
    gap: var(--space-6);
  }

  .case-title {
    font-size: clamp(var(--display-md), 3.5vw, var(--display-xl));
  }

  .case-tag {
    top: var(--space-10);
    right: var(--space-12);
    padding: 4px 16px;
  }

  .case-description {
    font-size: var(--text-xs);
    max-width: 60%;
  }

  /* Arrow — Desktop */
  .case-arrow {
    width: 48px;
    height: 48px;
    background: var(--color-accent-subtle);
  }

  .case-arrow svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
  }

  .case:hover .case-arrow {
    background: var(--color-accent);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.15),
      0 4px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
  }

  .case:hover .case-arrow svg {
    transform: translateX(2px);
    color: var(--color-card);
  }

  .case:active .case-arrow {
    transform: scale(0.96);
    transition-duration: var(--duration-instant);
  }

  .footer {
    display: none;
  }

  /* Modal — Desktop */
  .modal-header {
    padding: var(--space-12) var(--space-12) var(--space-4);
  }

  .modal-title {
    font-size: var(--display-2xl);
  }

  .modal-subtitle {
    font-size: var(--text-md);
  }

  .modal-col-text,
  .modal-col-images {
    padding: var(--space-12);
    padding-top: var(--space-6);
  }

  .modal-section-title {
    font-size: var(--text-lg);
  }

  .modal-section p,
  .modal-list li {
    font-size: var(--text-base);
    line-height: 1.6;
  }

  .modal-close {
    top: var(--space-8);
    right: var(--space-8);
    width: 48px;
    height: 48px;
  }

  .modal-close svg {
    width: 24px;
    height: 24px;
  }
}


/* ----------------------------------------
   13. RESPONSIVE — LARGE (1280px+)
   ---------------------------------------- */

@media (min-width: 1280px) {
  .sidebar {
    padding: var(--space-20);
  }

  /* 3-Zone Sidebar — Large */
  .sidebar-upper {
    flex: 0 0 58%;
    padding-top: var(--space-10);
  }

  .sidebar-logo {
    width: 88%;
    max-width: 418px;
  }

  .sidebar-lower {
    padding-bottom: var(--space-8);
  }

  .main > .panel {
    padding: 0 var(--space-20);
  }

  .cases {
    max-width: 860px;
    gap: var(--space-6);
    padding-top: var(--space-12);
  }

  .case {
    padding: var(--space-10) var(--space-12);
    border-radius: var(--radius-2xl);
  }

  .case-inner {
    gap: var(--space-6);
  }

  .case-title {
    font-size: var(--display-lg);
  }

  .case-description {
    max-width: 55%;
  }

  /* About — Large */
  .about-wrapper {
    max-width: 860px;
  }

  .about-title {
    font-size: var(--display-5xl);
  }
}


/* ----------------------------------------
   14. MOBILE EXPANDED
   ---------------------------------------- */

@media (max-width: 767px) {
  /* Tab Switcher — Mobile: Horizontal overlapping divider */
  .v-divider {
    display: block;
    height: 0;
    position: relative;
    z-index: 10;
  }

  .tab-switcher {
    display: flex;
    flex-direction: row;
    gap: 4px;
    position: absolute;
    top: 50%;
    right: var(--space-4);
    transform: translateY(-50%);
  }

  .tab {
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 500;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 16px;
    background: #FFFFFF;
    color: #888888;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    writing-mode: horizontal-tb;
    transform: none;
  }

  .tab.is-active {
    background: var(--color-accent);
    color: #FFFFFF;
  }

  /* Modal — Mobile full screen */
  .modal-container {
    border-radius: 0 !important;
  }

  .modal-header {
    padding: var(--space-16) var(--space-4) var(--space-2);
  }

  .modal-title {
    font-size: var(--display-sm);
  }

  .modal-subtitle {
    font-size: var(--text-xs);
  }

  /* Stack columns vertically on mobile */
  .modal-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-col-text,
  .modal-col-images {
    flex: none;
    overflow: visible;
    padding: var(--space-4);
    padding-top: var(--space-2);
  }

  .modal-col-images {
    border-left: none;
  }

  .modal-section {
    margin-bottom: var(--space-6);
  }

  .modal-close {
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
  }

  .modal-close svg {
    width: 16px;
    height: 16px;
  }

  /* About — Mobile */
  .about-title {
    font-size: clamp(var(--display-lg), 10vw, var(--display-3xl));
  }

  .about-body {
    font-size: var(--text-xs);
  }

  .about-list li {
    font-size: var(--text-xs);
  }

  .about-link {
    font-size: var(--text-2xs);
  }
}


/* ----------------------------------------
   16. ANIMATION SYSTEM (GSAP)
   ---------------------------------------- */

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1000;
  opacity: 0.12;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .scroll-progress {
    left: calc(45% + 1px);
  }
}

/* GSAP: Disable CSS entrance animations (GSAP handles them) */
html.js-gsap .sidebar-upper,
html.js-gsap .sidebar-lower {
  animation: none;
  opacity: 1;
}

/* Cards visible immediately (no scroll reveal) */
html.js-gsap .case {
  opacity: 1;
  transform: none;
}

/* Card hide/show during modal — fast fade-in on reappear */
html.js-gsap .case.is-selected {
  opacity: 0;
  pointer-events: none;
  transition: opacity 20ms ease-out;
}

/* Char spans for text split animation */
.char {
  display: inline-block;
}

