/* =============================================
   LUCAS COSTA — PORTFOLIO CV
   Retro-industrial / lo-fi tech aesthetic
   ============================================= */

:root {
  --bg-dark: #0b0d10;
  --bg-panel: #11161b;
  --bg-ink: #0e1116;
  --orange: #d9793c;
  --orange-bright: #f2a15b;
  --orange-glow: rgba(217, 121, 60, 0.23);
  --ivory: #f4efe8;
  --ivory-soft: #d7d2cb;
  --text-light: #f2f3f5;
  --text-muted: #a8adb6;
  --muted-strong: #c7ccd4;
  --parchment: #efe5d4;
  --parchment-dark: #d9cbb0;
  --paper-shadow: rgba(0, 0, 0, 0.38);
  --red-underline: #8d3f2d;
  --green-status: #56a56d;
  --sticky-yellow: #f1d972;
  --teal-soft: rgba(118, 174, 174, 0.15);
  --line-soft: rgba(255,255,255,0.08);
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --font-hand: 'Caveat', cursive;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ---- Grain & Scanlines Overlay ---- */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ---- Global Nav ---- */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 2.5rem;
  background: linear-gradient(to bottom, rgba(11, 13, 16, 0.9), rgba(11, 13, 16, 0.15) 70%, transparent);
  backdrop-filter: blur(8px);
}

.nav-logo {
  justify-self: start;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(217, 121, 60, 0.22);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.nav-right {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: min(100%, 520px);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  padding: 0.2rem 0.35rem;
  transition: color 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--orange);
}

.lang-sep {
  color: rgba(255,255,255,0.15);
  font-size: 0.65rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  position: relative;
  padding: 0.3rem 0.2rem;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange-bright);
  transform: translateY(-1px);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: auto 0 -10px 0;
  height: 1px;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

/* ---- Views ---- */
.view {
  min-height: 100vh;
  position: relative;
}

/* =============================================
   HOME / BIO
   ============================================= */
.view-home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
}

.home-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 25%, rgba(217, 121, 60, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(11, 13, 16, 0.94) 0%, rgba(11, 13, 16, 0.78) 40%, rgba(11, 13, 16, 0.9) 100%),
    url('https://images.unsplash.com/photo-1514567177094-4e6d5d534308?w=1920&q=80') center/cover no-repeat;
  filter: saturate(0.7) contrast(1.08) brightness(0.88);
}

.home-content {
  position: relative;
  max-width: 760px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--orange-bright);
  margin-bottom: 1.3rem;
  text-transform: uppercase;
}

.home-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: 0.05em;
  color: var(--ivory);
  margin-bottom: 0.75rem;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.home-role {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ivory-soft);
  letter-spacing: 0.12em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.home-bio {
  max-width: 630px;
  margin-bottom: 2rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(19, 24, 28, 0.44), rgba(18, 20, 22, 0.2));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.home-bio p {
  font-size: 0.96rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.home-bio p:last-child {
  margin-bottom: 0;
}

.home-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(242, 161, 91, 0.25);
  background: rgba(13, 17, 22, 0.28);
  color: var(--muted-strong);
  transition: all 0.2s ease;
}

.tag:hover {
  border-color: var(--orange);
  color: var(--orange-bright);
  box-shadow: 0 0 0 1px rgba(217, 121, 60, 0.2);
}

.home-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.social-link {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 18, 22, 0.6);
  color: var(--text-light);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 161, 91, 0.5);
  background: rgba(217, 121, 60, 0.06);
  box-shadow: 0 0 0 1px rgba(242, 161, 91, 0.14), 0 12px 24px rgba(0,0,0,0.18);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--orange-bright);
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(242, 161, 91, 0.35);
  background: rgba(217, 121, 60, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-cta:hover {
  color: var(--orange-bright);
  border-color: rgba(242, 161, 91, 0.7);
  box-shadow: 0 0 0 1px rgba(242, 161, 91, 0.12), 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.home-sticky {
  position: absolute;
  bottom: -2rem;
  right: -4rem;
  background: var(--sticky-yellow);
  color: #333;
  padding: 0.75rem 1rem;
  font-family: var(--font-hand);
  font-size: 1.1rem;
  line-height: 1.3;
  transform: rotate(3deg);
  box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
  max-width: 180px;
}

.sticky-star {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.view-projects {
  padding: 5rem 0 4rem;
}

/* =============================================
   BIO
   ============================================= */
.view-bio {
  padding: 5rem 0 4rem;
}

.bio-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(217, 121, 60, 0.16), transparent 20%),
    radial-gradient(circle at 80% 30%, rgba(94, 132, 161, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(9, 11, 14, 0.82) 0%, rgba(14, 16, 20, 0.88) 100%),
    url('https://images.unsplash.com/photo-1514567177094-4e6d5d534308?w=1920&q=80') center/cover no-repeat;
  filter: saturate(0.65) contrast(1.08) brightness(0.82);
  z-index: 0;
}

.bio-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.bio-header {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.2rem 0 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bio-header::before {
  content: '';
  position: absolute;
  inset: 0 18% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(242, 161, 91, 0.18), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}

.bio-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 1rem;
}

.bio-kicker::before {
  content: '';
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-bright), transparent);
}

.bio-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 6rem);
  letter-spacing: 0.06em;
  line-height: 0.88;
  color: var(--text-light);
  margin-bottom: 0.7rem;
  text-shadow: 0 18px 30px rgba(0,0,0,0.2);
}

.bio-subtitle {
  position: relative;
  max-width: 760px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
}

.bio-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 26, 31, 0.82), rgba(12, 15, 18, 0.88));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 26px;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 18px 48px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.bio-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(242, 161, 91, 0), rgba(242, 161, 91, 0.8), rgba(242, 161, 91, 0));
}

.bio-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 161, 91, 0.26);
  box-shadow: 0 22px 50px rgba(0,0,0,0.22), 0 0 25px rgba(217, 121, 60, 0.1);
}

.bio-card-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(23, 28, 34, 0.9), rgba(12, 17, 21, 0.88));
}

.bio-card-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  color: var(--orange-bright);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.bio-card-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-bright), #ffcf8f);
  box-shadow: 0 0 14px rgba(242, 161, 91, 0.5);
}

.bio-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

.bio-card p:last-child {
  margin-bottom: 0;
}

.bio-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.bio-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.bio-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange-bright);
}

.bio-list li:last-child {
  margin-bottom: 0;
}

.bio-list-logos li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bio-list-logos li:hover {
  background: rgba(242, 161, 91, 0.04);
  border-color: rgba(242, 161, 91, 0.18);
}

.bio-list-logos li::before {
  content: none;
}

.bio-timeline {
  display: grid;
  gap: 1rem;
}

.bio-job {
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 18px;
  padding: 1rem 1rem 0.95rem;
}

.bio-job::before {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(242,161,91,0.8), transparent);
}

.bio-job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.bio-job-role {
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.bio-job-date {
  color: var(--orange-bright);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.bio-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bio-stack-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  color: var(--text-light);
  border: 1px solid rgba(242, 161, 91, 0.22);
  background: linear-gradient(135deg, rgba(217, 121, 60, 0.08), rgba(255,255,255,0.02));
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(3px);
}

.bio-card:nth-child(1) {
  min-height: 260px;
}

.bio-card:nth-child(2) {
  min-height: 260px;
}

.bio-card:nth-child(4) {
  min-height: 280px;
}

.inline-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: rgba(8, 10, 18, 0.9);
  image-rendering: -webkit-optimize-contrast;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.22) inset,
    0 0 12px rgba(20, 140, 255, 0.18);
}

.bio-list-logos .inline-logo-img {
  width: 30px;
  height: 30px;
}

.logo-nestle-fine {
  width: 34px !important;
  height: 34px !important;
}

.projects-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.92) 100%),
    url('https://images.unsplash.com/photo-1514567177094-4e6d5d534308?w=1920&q=80') center/cover no-repeat;
  filter: saturate(0.5) contrast(1.15);
  z-index: 0;
}

.projects-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.projects-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--text-light);
}

.projects-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 520px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(240, 236, 228, 0.25);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--bg-dark);
  box-shadow: 0 0 12px var(--orange-glow);
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card.dimmed {
  opacity: 0.45;
}

.project-card.dimmed:hover {
  opacity: 0.85;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px var(--orange-glow);
}

.project-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.4) brightness(0.5);
  transition: filter 0.3s, transform 0.4s;
}

.project-card:hover .project-card-bg {
  filter: saturate(0.6) brightness(0.6);
  transform: scale(1.05);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.95) 0%,
    rgba(10,10,10,0.4) 50%,
    rgba(10,10,10,0.6) 100%
  );
}

.project-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.project-card-category {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: auto;
}

.project-card-category svg {
  width: 14px;
  height: 14px;
  fill: var(--orange);
}

.project-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-card-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-link {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--orange);
  transition: color 0.2s;
}

.project-card:hover .project-card-link {
  color: var(--orange-bright);
}

/* =============================================
   PROJECT DETAIL
   ============================================= */
.view-detail {
  padding: 4.5rem 0 3rem;
  min-height: 100vh;
}

.detail-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,10,10,0.93) 0%, rgba(15,12,10,0.96) 100%),
    url('https://images.unsplash.com/photo-1514567177094-4e6d5d534308?w=1920&q=80') center/cover no-repeat;
  filter: saturate(0.4);
  z-index: 0;
}

.detail-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.detail-back {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.detail-back:hover {
  color: var(--orange);
}

.detail-project-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.detail-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Sidebar */
.detail-sidebar {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-item {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 0.75rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  text-align: left;
  width: 100%;
}

.sidebar-item:hover {
  color: var(--text-light);
  border-color: rgba(196, 92, 38, 0.3);
}

.sidebar-item.active {
  color: var(--text-light);
  background: rgba(196, 92, 38, 0.15);
  border-color: var(--orange);
  box-shadow: inset 3px 0 0 var(--orange);
}

.sidebar-sticky {
  margin-top: 2rem;
  background: var(--sticky-yellow);
  color: #333;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-hand);
  font-size: 0.95rem;
  line-height: 1.3;
  transform: rotate(-2deg);
  box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
}

/* Paper / Dossier */
.detail-main {
  min-height: 600px;
}

.paper {
  position: relative;
  background: var(--parchment);
  color: #2a2520;
  padding: 3rem 3rem 4rem;
  min-height: 700px;
  box-shadow:
    0 4px 20px var(--paper-shadow),
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 0 60px rgba(180,160,130,0.15);
  clip-path: polygon(
    0% 8px, 2% 0%, 5% 6px, 8% 1px, 12% 7px, 16% 2px, 20% 8px,
    24% 1px, 28% 6px, 32% 0%, 36% 7px, 40% 2px, 44% 8px, 48% 1px,
    52% 6px, 56% 0%, 60% 7px, 64% 2px, 68% 8px, 72% 1px, 76% 6px,
    80% 0%, 84% 7px, 88% 2px, 92% 8px, 96% 1px, 100% 6px,
    100% 100%, 0% 100%
  );
}

.paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.paper-section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: #1a1510;
  margin-bottom: 0.25rem;
}

.paper-underline {
  width: 120px;
  height: 3px;
  background: var(--red-underline);
  margin: 0 auto 2rem;
  border-radius: 2px;
  opacity: 0.8;
}

.paper-text {
  max-width: 680px;
  margin: 0 auto 2rem;
}

.paper-text p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.8;
  color: #3a3530;
  margin-bottom: 1rem;
}

.paper-text ul {
  list-style: none;
  padding: 0;
}

.paper-text ul li {
  font-size: 0.88rem;
  line-height: 1.8;
  color: #3a3530;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.paper-text ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange);
}

/* Summary Grid */
.summary-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-align: center;
  color: #5a5550;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 680px;
  margin: 0 auto;
}

.summary-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(0,0,0,0.08);
}

.summary-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.summary-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #7a7570;
  margin-bottom: 0.15rem;
}

.summary-value {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #2a2520;
  font-weight: 500;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green-status);
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(61, 154, 80, 0.5);
}

/* Stamp Seal */
.paper-stamp {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  width: 100px;
  height: 100px;
  border: 3px solid rgba(139, 32, 32, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  opacity: 0.55;
}

.paper-stamp-inner {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.05em;
  color: rgba(139, 32, 32, 0.7);
  line-height: 1.5;
  text-transform: uppercase;
}

/* Polaroid */
.paper-polaroid {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: #fafafa;
  padding: 0.5rem 0.5rem 2.5rem;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.25);
  transform: rotate(4deg);
  width: 160px;
}

.polaroid-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 50px;
  height: 18px;
  background: rgba(255, 255, 200, 0.6);
  border: 1px solid rgba(0,0,0,0.08);
}

.polaroid-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  filter: saturate(0.7) sepia(0.2);
}

.polaroid-caption {
  position: absolute;
  bottom: 0.6rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: #444;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 180px 1fr;
  }
}

@media (max-width: 768px) {
  .global-nav {
    padding: 0.75rem 1.25rem;
  }

  .projects-header {
    flex-direction: column;
  }

  .projects-filters {
    max-width: 100%;
    justify-content: flex-start;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .sidebar-item {
    font-size: 0.55rem;
    padding: 0.4rem 0.5rem;
  }

  .sidebar-sticky {
    display: none;
  }

  .paper {
    padding: 2rem 1.5rem 3rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .paper-stamp,
  .paper-polaroid {
    display: none;
  }

  .home-sticky {
    position: static;
    margin-top: 2rem;
    transform: rotate(1deg);
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 1rem;
  }

  .filter-btn {
    font-size: 0.55rem;
    padding: 0.35rem 0.5rem;
  }
}
