﻿/* ===== VARIÁVEIS ===== */
:root {
  --bg: #f7faf8;
  --bg-white: #ffffff;
  --bg-alt: #edf4ef;
  --text: #183247;
  --text-secondary: #486579;
  --text-muted: #73889a;
  --accent: #287c8e;
  --accent-dark: #1e5e6d;
  --accent-soft: #dff1ed;
  --accent-warm: #d49a44;
  --accent-green: #4f8f72;
  --border: #d8e5e0;
  --border-light: #edf4f1;
  --border-strong: #9ebeb5;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --shadow: 0 14px 34px rgba(24, 50, 71, 0.08);
  --shadow-lg: 0 24px 70px rgba(24, 50, 71, 0.16);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --max-w: 1200px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: #fbfdfc;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(40, 124, 142, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(79, 143, 114, 0.03) 1px, transparent 1px),
    linear-gradient(115deg, rgba(255, 255, 255, 0.96) 0 28%, rgba(224, 248, 239, 0.58) 28% 66%, rgba(237, 249, 255, 0.72) 66% 100%);
  background-size: 92px 92px, 92px 92px, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 48px 60px;
  min-height: 85vh;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 10px;
  max-width: 480px;
  text-align: left;
}

.hero-note {
  font-size: 0.98rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 118, 157, 0.22);
}

.btn-outline {
  background: transparent;
  color: var(--text);
}

.btn-outline:hover {
  background: var(--text);
  color: #fff;
  transform: translateY(-2px);
}

.hero-socials {
  display: flex;
  gap: 18px;
}

.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.hero-socials a:hover {
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Hero image */
.hero-image {
  position: relative;
  flex-shrink: 0;
}

.hero-photo-wrapper {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--accent);
  box-shadow: var(--shadow-lg);
}

.hero-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 10px;
  right: -20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

.badge-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.badge-text {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
}

/* ===== SECTIONS ===== */
.section {
  padding: 80px 48px;
}

.section-alt {
  background: var(--bg-white);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== SOBRE ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text);
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.highlight-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.highlight-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.highlight-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.academic-matrix {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.academic-matrix-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.academic-label,
.academic-card-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.academic-matrix-head h3 {
  margin: 8px 0 10px;
  font-size: 1.25rem;
  color: var(--text);
}

.academic-matrix-head p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.academic-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.academic-card {
  min-height: 190px;
  padding: 22px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.academic-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.academic-card h4 {
  margin: 8px 0 10px;
  font-size: 1rem;
  color: var(--text);
}

.academic-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== PROJETOS SHOWCASE ===== */
.project-showcase {
  overflow: hidden;
}

.project-showcase-shell {
  padding: 44px;
  border: 1px solid rgba(47, 118, 157, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(560px 220px at 50% -10%, rgba(47, 118, 157, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 254, 0.98));
  box-shadow: 0 20px 50px rgba(28, 86, 120, 0.08);
}

.project-showcase-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.project-showcase-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-showcase-breadcrumb span:last-child {
  color: var(--accent);
}

.project-showcase-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: #163d58;
  margin-bottom: 12px;
}

.project-showcase-intro {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.8;
}

.project-showcase-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.project-search-field {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.project-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.project-search-field input {
  width: 100%;
  height: 54px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.project-search-field input:focus {
  border-color: rgba(47, 118, 157, 0.46);
  box-shadow: 0 0 0 4px rgba(47, 118, 157, 0.1);
}



.project-gallery-layout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.project-gallery-main {
  min-width: 0;
}

.project-gallery-nav {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #66727a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.project-gallery-nav:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #4e5961;
}

.project-gallery-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.project-gallery-grid {
  display: flex;
  gap: 18px;
  overflow: hidden;
  scroll-behavior: smooth;
}

.project-gallery-grid > .project-showcase-card {
  min-width: calc((100% - 36px) / 3);
  max-width: calc((100% - 36px) / 3);
  flex-shrink: 0;
}

.project-showcase-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(28, 86, 120, 0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-showcase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 118, 157, 0.24);
  box-shadow: 0 22px 48px rgba(28, 86, 120, 0.12);
}

.project-showcase-preview {
  padding: 14px;
  height: 188px;
  min-height: 188px;
  border-bottom: 1px solid rgba(47, 118, 157, 0.08);
}

.project-showcase-preview-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(145deg, #d7edf8, #eff7fc);
}

.project-showcase-preview-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(145deg, #f7fbfe, #ffffff);
}

.project-showcase-logo {
  display: block;
  width: min(100%, 300px);
  max-height: 148px;
  object-fit: contain;
}

.project-showcase-shot {
  display: block;
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(22, 61, 88, 0.18);
}

.project-showcase-shot-main {
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.project-showcase-shot-overlay {
  position: absolute;
  right: 24px;
  bottom: 18px;
  width: 34%;
  min-width: 112px;
  max-width: 156px;
  border: 4px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 26px rgba(22, 61, 88, 0.22);
}

.preview-software {
  background: linear-gradient(145deg, #dff0fa, #eef7fc);
}

.preview-web {
  background: linear-gradient(145deg, #edf6ff, #f7fbff);
}

.preview-automation {
  background: linear-gradient(145deg, #e5f4f8, #f2fafc);
}

.preview-data {
  background: linear-gradient(145deg, #edf3ff, #f7faff);
}

.preview-design {
  background: linear-gradient(145deg, #fff3e9, #fff9f4);
}

.project-preview-chrome {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.project-preview-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(22, 61, 88, 0.28);
}

.project-preview-dashboard,
.project-preview-site,
.project-preview-flow,
.project-preview-analytics,
.project-preview-flyer {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(22, 61, 88, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.project-preview-dashboard {
  display: grid;
  grid-template-columns: 54px 1fr;
  min-height: 132px;
}

.preview-sidebar {
  display: grid;
  gap: 10px;
  padding: 16px 12px;
  background: rgba(22, 61, 88, 0.92);
}

.preview-sidebar span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.preview-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.preview-panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-panel-row span,
.preview-chart-table span,
.preview-flow-chip-row span {
  height: 24px;
  border-radius: 10px;
  background: rgba(47, 118, 157, 0.18);
}

.preview-panel-main {
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 118, 157, 0.2), rgba(22, 61, 88, 0.1));
}

.preview-panel-row-wide {
  grid-template-columns: 1.2fr 0.8fr;
}

.project-preview-site {
  padding: 14px;
  display: grid;
  gap: 12px;
  min-height: 132px;
}

.preview-site-hero {
  min-height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 118, 157, 0.22), rgba(47, 118, 157, 0.06));
}

.preview-site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preview-site-grid span {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(22, 61, 88, 0.08);
}

.preview-site-footer {
  min-height: 12px;
  border-radius: 999px;
  background: rgba(47, 118, 157, 0.14);
}

.project-preview-flow {
  min-height: 132px;
  padding: 16px;
  position: relative;
}

.preview-flow-bubble {
  width: 62%;
  height: 26px;
  border-radius: 14px;
  background: rgba(47, 118, 157, 0.18);
}

.preview-flow-bubble.right {
  margin-left: auto;
  width: 52%;
  background: rgba(22, 61, 88, 0.12);
}

.preview-flow-line {
  width: 2px;
  height: 36px;
  margin: 12px auto;
  background: linear-gradient(180deg, rgba(47, 118, 157, 0.35), rgba(47, 118, 157, 0));
}

.preview-flow-chip-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.project-preview-analytics {
  min-height: 132px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.preview-chart-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 54px;
}

.preview-chart-bars span {
  flex: 1;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, rgba(47, 118, 157, 0.8), rgba(47, 118, 157, 0.28));
}

.preview-chart-bars span:nth-child(1) { height: 52%; }
.preview-chart-bars span:nth-child(2) { height: 82%; }
.preview-chart-bars span:nth-child(3) { height: 68%; }
.preview-chart-bars span:nth-child(4) { height: 92%; }

.preview-chart-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-chart-line span {
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 61, 88, 0.14);
}

.preview-chart-table {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}

.project-preview-flyer {
  min-height: 132px;
  padding: 16px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
}

.preview-flyer-card {
  width: 72px;
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f39f5a, #f6c27e);
  box-shadow: 0 10px 20px rgba(243, 159, 90, 0.22);
}

.preview-flyer-line {
  width: 80%;
  height: 10px;
  border-radius: 999px;
  background: rgba(22, 61, 88, 0.12);
}

.preview-flyer-line.short {
  width: 56%;
}

/* To-Do List preview */
.preview-todo {
  background: linear-gradient(145deg, #e8f4f0, #f2faf7);
}

.project-preview-todo {
  min-height: 132px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(22, 61, 88, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.preview-todo-icon {
  opacity: 0.85;
}

.preview-todo-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 80%;
}

.preview-todo-item {
  height: 10px;
  border-radius: 999px;
  background: rgba(47, 118, 157, 0.14);
}

.preview-todo-item.checked {
  background: rgba(47, 118, 157, 0.32);
  position: relative;
}

.preview-todo-item.checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10%;
  width: 60%;
  height: 2px;
  background: rgba(47, 118, 157, 0.5);
  transform: translateY(-50%);
}

/* "Em breve" badge */
.badge-soon {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(47, 118, 157, 0.12);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Disabled link for coming soon projects */
.project-showcase-link--disabled {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

.project-showcase-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  flex: 1;
}

.project-showcase-type {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-showcase-name {
  font-size: 1.02rem;
  line-height: 1.35;
  color: #163d58;
}

.project-showcase-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-showcase-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
}

.project-showcase-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  transition: letter-spacing var(--transition), color var(--transition);
}

.project-showcase-link:hover {
  color: var(--accent-dark);
  letter-spacing: 0.02em;
}

.project-gallery-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 42px 20px;
  border: 1px dashed rgba(47, 118, 157, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-secondary);
  text-align: center;
}

.project-gallery-empty strong {
  color: var(--text);
}

.project-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.project-gallery-count {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.project-gallery-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-gallery-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: rgba(47, 118, 157, 0.22);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}

.project-gallery-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

@media (max-width: 1040px) {
  .project-showcase-shell {
    padding: 32px 24px;
  }

  .project-gallery-grid > .project-showcase-card {
    min-width: calc((100% - 18px) / 2);
    max-width: calc((100% - 18px) / 2);
  }
}

@media (max-width: 760px) {
  .project-gallery-layout {
    grid-template-columns: 1fr;
  }

  .project-gallery-nav {
    width: 100%;
    height: 48px;
    border-radius: 16px;
  }

  .project-gallery-grid > .project-showcase-card {
    min-width: 100%;
    max-width: 100%;
  }

  .project-gallery-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-showcase-shot-overlay {
    width: 40%;
    right: 18px;
    bottom: 16px;
  }
}

/* ===== PROJETOS ===== */
.project-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.project-section-head .section-title {
  margin-bottom: 0;
}

.project-carousel {
  position: relative;
}

.project-carousel-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.project-carousel-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}

.project-carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.project-carousel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.project-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
}

.project-grid::-webkit-scrollbar {
  display: none;
}

.project-card {
  flex: 0 0 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  scroll-snap-align: start;
  min-width: 0;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.project-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(47, 118, 157, 0.12);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icon {
  font-size: 1.6rem;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.project-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
}

.project-link:hover {
  letter-spacing: 0.02em;
}

.project-link-muted {
  color: var(--text-muted);
  letter-spacing: normal;
  cursor: default;
}

.project-link-muted:hover {
  letter-spacing: normal;
}

.project-carousel-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.skill-category {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.skill-cat-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

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

.skill-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all var(--transition);
}

.skill-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ===== CONTATO ===== */
.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.contact-card svg {
  flex-shrink: 0;
  color: var(--accent);
}

.contact-card:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-card:hover svg {
  color: #fff;
}

/* ===== CURRICULO MODAL ===== */
.cv-modal[hidden] {
  display: none;
}

.cv-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(9, 23, 35, 0.78);
  backdrop-filter: blur(12px);
}

.cv-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
}

.cv-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: #f8fbfd;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.cv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
}

.cv-modal-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-modal-header h2 {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.2;
}

.cv-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cv-modal-download,
.cv-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.cv-modal-download {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.86rem;
}

.cv-modal-download:hover,
.cv-modal-download:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.cv-modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.cv-modal-close:hover,
.cv-modal-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.cv-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #e7eef4;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  z-index: 300;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(24, 50, 71, 0.16);
}

.nav-separator {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg);
}

.nav-cta {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: all var(--transition);
  flex-shrink: 0;
}

.nav-cta:hover {
  color: var(--text);
}

.nav-cta-primary {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
}

.nav-cta-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ===== FOOTER ===== */
footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 280;
  text-align: center;
  padding: 10px 48px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(24, 50, 71, 0.1);
  box-shadow: 0 -12px 30px rgba(24, 50, 71, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ===== PORTFOLIO REDESIGN ===== */
body:not(.project-detail-page) .hero {
  position: relative;
  isolation: isolate;
  max-width: min(1012px, 100%);
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 72px 24px 58px;
}

body:not(.project-detail-page) .hero::before {
  display: none;
}

body:not(.project-detail-page) .hero-content {
  padding-left: 10px;
  max-width: 610px;
}

body:not(.project-detail-page) .hero-label,
.project-showcase-breadcrumb,
.academic-label,
.academic-card-kicker,
.project-showcase-type {
  letter-spacing: 0.16em;
}

body:not(.project-detail-page) .hero-title {
  max-width: 680px;
  font-size: clamp(2.85rem, 5vw, 3.7rem);
  margin-bottom: 18px;
  color: #142c3f;
}

body:not(.project-detail-page) .hero-title em {
  color: var(--accent);
}

body:not(.project-detail-page) .hero-photo-wrapper {
  width: 300px;
  height: 300px;
  border: 0;
  border-radius: 24px;
  transform: rotate(2deg);
  box-shadow: 0 22px 54px rgba(24, 50, 71, 0.16);
}

body:not(.project-detail-page) .hero-photo-wrapper img {
  transform: scale(1.04);
}

body:not(.project-detail-page) .hero-image.scroll-motion,
body:not(.project-detail-page) .hero-badge.scroll-motion {
  translate: 0 var(--scroll-shift, 0px);
  will-change: translate;
}

body:not(.project-detail-page) .hero-badge {
  right: -24px;
  bottom: 26px;
  border-radius: 16px;
  padding: 12px 18px;
  border-color: rgba(40, 124, 142, 0.18);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

body:not(.project-detail-page) .hero-label {
  margin-bottom: 16px;
}

body:not(.project-detail-page) .hero-desc {
  margin-bottom: 8px;
}

body:not(.project-detail-page) .hero-note {
  margin-bottom: 20px;
}

body:not(.project-detail-page) .hero-buttons {
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 18px;
}

body:not(.project-detail-page) .btn {
  min-height: 44px;
  padding: 11px 22px;
}

.btn {
  min-height: 48px;
}

.btn-primary,
.nav-cta-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-green));
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(40, 124, 142, 0.18);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(24, 50, 71, 0.14);
  backdrop-filter: blur(12px);
}

.section {
  position: relative;
}

.section-carousel-enabled {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

body:not(.project-detail-page) .page-slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body:not(.project-detail-page) .section.page-slide {
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: 94px;
  padding-bottom: 58px;
}

body:not(.project-detail-page) .page-slide > .section-inner,
body:not(.project-detail-page) .hero-content,
body:not(.project-detail-page) .hero-image {
  transition:
    opacity 0.5s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.5s ease;
}

body:not(.project-detail-page) .page-slide:not(.is-slide-active) > .section-inner {
  opacity: 0;
  filter: blur(10px) saturate(0.86);
  pointer-events: none;
  transform: translate3d(0, 32px, 0) scale(0.965);
}

body:not(.project-detail-page) .hero.page-slide:not(.is-slide-active) .hero-content,
body:not(.project-detail-page) .hero.page-slide:not(.is-slide-active) .hero-image {
  opacity: 0;
  filter: blur(10px) saturate(0.86);
  pointer-events: none;
  transform: translate3d(0, 32px, 0) scale(0.965);
}

body:not(.project-detail-page) .page-slide.is-slide-active > .section-inner,
body:not(.project-detail-page) .hero.page-slide.is-slide-active .hero-content,
body:not(.project-detail-page) .hero.page-slide.is-slide-active .hero-image {
  opacity: 1;
  filter: saturate(1);
  transform: translate3d(0, 0, 0) scale(1);
}

body:not(.project-detail-page) .section.page-slide > .section-inner {
  width: 100%;
}

body:not(.project-detail-page) .section.page-slide::before {
  content: "";
  position: absolute;
  inset: 24px 32px;
  z-index: -1;
  border: 1px solid rgba(24, 50, 71, 0.055);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.5s ease, transform 0.65s ease;
  pointer-events: none;
}

body:not(.project-detail-page) .section.page-slide.is-slide-active::before {
  opacity: 1;
  transform: scale(1);
}

.section-alt {
  background: transparent;
}

.section-title {
  color: #142c3f;
}

.section-title::after {
  width: 54px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.about-text,
.about-highlights,
.academic-matrix,
.skills-grid,
.contact-intro,
.contact-grid {
  position: relative;
}

.highlight-card,
.academic-card,
.skill-category,
.contact-card {
  border-color: rgba(24, 50, 71, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(24, 50, 71, 0.06);
  backdrop-filter: blur(14px);
}

.highlight-card:hover,
.academic-card:hover,
.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(24, 50, 71, 0.1);
}

.project-showcase {
  background: transparent;
}

.project-showcase-shell {
  position: relative;
  overflow: hidden;
  border-color: rgba(24, 50, 71, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
  box-shadow: 0 34px 90px rgba(24, 50, 71, 0.12);
}

.project-showcase-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(40, 124, 142, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(40, 124, 142, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

.project-showcase-shell > * {
  position: relative;
  z-index: 1;
}

.project-showcase-title {
  color: #142c3f;
}

.project-search-field input {
  border-color: rgba(24, 50, 71, 0.12);
  box-shadow: 0 14px 30px rgba(24, 50, 71, 0.06);
}

.project-gallery-nav {
  background: #183247;
  box-shadow: 0 16px 30px rgba(24, 50, 71, 0.14);
}

.project-gallery-nav:hover:not(:disabled) {
  background: var(--accent);
}

.project-showcase-card {
  --scroll-shift: 0px;
  --scroll-tilt: 0deg;
  border-color: rgba(24, 50, 71, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 52px rgba(24, 50, 71, 0.1);
  transform: translate3d(0, var(--scroll-shift), 0) rotate(var(--scroll-tilt));
  will-change: transform;
}

.project-showcase-card:hover {
  transform: translate3d(0, calc(var(--scroll-shift) - 8px), 0) rotate(var(--scroll-tilt));
  border-color: rgba(40, 124, 142, 0.28);
  box-shadow: 0 30px 70px rgba(24, 50, 71, 0.16);
}

.project-showcase-card:nth-child(2n) {
  --scroll-tilt: -0.35deg;
}

.project-showcase-card:nth-child(2n + 1) {
  --scroll-tilt: 0.35deg;
}

.project-showcase-preview {
  overflow: hidden;
  background: linear-gradient(145deg, #eef8f4, #ffffff);
}

.project-showcase-preview-media {
  background:
    linear-gradient(135deg, rgba(40, 124, 142, 0.18), rgba(79, 143, 114, 0.13)),
    #f4faf7;
}

.project-showcase-preview-brand {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 243, 0.9)),
    linear-gradient(90deg, rgba(212, 154, 68, 0.14), transparent);
}

.project-showcase-preview img,
.project-preview-todo {
  transform: translate3d(0, calc(var(--scroll-shift, 0px) * -0.45), 0);
  transition: transform 0.45s ease;
}

.project-showcase-tags span,
.skill-pill {
  border-color: rgba(40, 124, 142, 0.12);
  background: rgba(40, 124, 142, 0.08);
}

.contact-card:hover,
.skill-pill:hover {
  background: #183247;
  border-color: #183247;
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.76);
  border-bottom-color: rgba(24, 50, 71, 0.11);
  box-shadow: 0 16px 40px rgba(24, 50, 71, 0.08);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(40, 124, 142, 0.1);
}

.reveal-item {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 0.72s ease,
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.project-showcase-card.reveal-item {
  transform: translate3d(0, calc(28px + var(--scroll-shift, 0px)), 0) rotate(var(--scroll-tilt, 0deg));
}

.project-showcase-card.reveal-item.is-visible {
  transform: translate3d(0, var(--scroll-shift, 0px), 0) rotate(var(--scroll-tilt, 0deg));
}

.project-showcase-card.reveal-item.is-visible:hover {
  transform: translate3d(0, calc(var(--scroll-shift, 0px) - 8px), 0) rotate(var(--scroll-tilt, 0deg));
}

/* Compact project slide so it fits inside the vertical section carousel. */
body:not(.project-detail-page) #projetos.section.page-slide {
  padding-top: 72px;
  padding-bottom: 42px;
}

body:not(.project-detail-page) #projetos .section-inner {
  max-width: 1120px;
}

body:not(.project-detail-page) #projetos .project-showcase-shell {
  padding: 20px 34px 18px;
  border-radius: 24px;
}

body:not(.project-detail-page) #projetos .project-showcase-head {
  margin-bottom: 14px;
}

body:not(.project-detail-page) #projetos .project-showcase-breadcrumb {
  margin-bottom: 8px;
}

body:not(.project-detail-page) #projetos .project-showcase-title {
  margin-bottom: 6px;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
}

body:not(.project-detail-page) #projetos .project-showcase-intro {
  max-width: 560px;
  font-size: 0.92rem;
  line-height: 1.55;
}

body:not(.project-detail-page) #projetos .project-showcase-toolbar {
  margin-bottom: 14px;
}

body:not(.project-detail-page) #projetos .project-search-field input {
  height: 46px;
}

body:not(.project-detail-page) #projetos .project-gallery-layout {
  gap: 14px;
}

body:not(.project-detail-page) #projetos .project-gallery-nav {
  width: 48px;
  height: 48px;
}

body:not(.project-detail-page) #projetos .project-showcase-preview {
  height: 118px;
  min-height: 118px;
  padding: 10px;
}

body:not(.project-detail-page) #projetos .project-showcase-logo {
  max-height: 96px;
}

body:not(.project-detail-page) #projetos .project-showcase-shot-overlay {
  min-width: 86px;
  max-width: 118px;
  right: 16px;
  bottom: 12px;
}

body:not(.project-detail-page) #projetos .project-showcase-content {
  gap: 7px;
  padding: 14px 16px;
}

body:not(.project-detail-page) #projetos .project-showcase-name {
  font-size: 0.96rem;
}

body:not(.project-detail-page) #projetos .project-showcase-desc {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body:not(.project-detail-page) #projetos .project-gallery-grid {
  padding-bottom: 2px;
}

body:not(.project-detail-page) #projetos .project-showcase-tags {
  gap: 6px;
}

body:not(.project-detail-page) #projetos .project-showcase-tags span {
  padding: 4px 8px;
  font-size: 0.7rem;
}

body:not(.project-detail-page) #projetos .project-gallery-footer {
  margin-top: 14px;
}

/* ===== ANIMATIONS ===== */
@keyframes ambientGradient {
  0% {
    background-position: 0% 40%, 100% 20%, 50% 100%, 0 0;
  }
  100% {
    background-position: 24% 18%, 78% 42%, 64% 76%, 0 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

.section {
  animation: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 48px 24px 40px;
    min-height: auto;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-desc {
    text-align: center;
  }

  .hero-note {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .hero-photo-wrapper {
    width: 260px;
    height: 260px;
  }

  .hero-badge {
    right: -10px;
    bottom: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .academic-matrix {
    margin-top: 36px;
  }

  .academic-matrix-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 24px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .project-section-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .project-carousel-controls {
    width: 100%;
    justify-content: space-between;
  }

  .project-card {
    padding: 24px;
  }

  .bottom-nav {
    padding: 0 16px;
  }

  .nav-inner {
    gap: 12px;
    overflow-x: auto;
  }

  .nav-links a {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  footer {
    padding: 8px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-photo-wrapper {
    width: 200px;
    height: 200px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .academic-card {
    min-height: auto;
    padding: 20px;
  }
}

@media (max-width: 900px) {
  body:not(.project-detail-page) .hero {
    gap: 26px;
    min-height: 100svh;
    justify-content: center;
    padding: 86px 24px 52px;
  }

  body:not(.project-detail-page) .hero::before {
    display: none;
  }

  body:not(.project-detail-page) .hero-content {
    padding-left: 0;
  }

  body:not(.project-detail-page) .hero-label {
    margin-bottom: 16px;
  }

  body:not(.project-detail-page) .hero-title {
    margin-bottom: 18px;
  }

  body:not(.project-detail-page) .hero-note {
    margin-bottom: 22px;
  }

  .section-carousel-enabled {
    scroll-snap-type: y proximity;
    scroll-padding-top: 0;
  }

  body:not(.project-detail-page) .section.page-slide {
    min-height: 100svh;
    padding-top: 86px;
    padding-bottom: 52px;
  }

  body:not(.project-detail-page) .section.page-slide::before {
    inset: 12px 14px;
    border-radius: 24px;
  }

  body:not(.project-detail-page) .page-slide:not(.is-slide-active) > .section-inner {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.97);
  }
}

@media (max-width: 480px) {
  body:not(.project-detail-page) .hero {
    padding: 82px 24px 46px;
  }

  body:not(.project-detail-page) .hero-photo-wrapper {
    width: 160px;
    height: 200px;
    border-radius: 24px;
  }

  body:not(.project-detail-page) .hero-badge {
    right: -16px;
    bottom: 16px;
    padding: 12px 16px;
  }

  body:not(.project-detail-page) .hero-title {
    font-size: 2rem;
  }

  body:not(.project-detail-page) .hero-desc {
    font-size: 0.96rem;
    line-height: 1.65;
  }

  body:not(.project-detail-page) .hero-buttons {
    gap: 10px;
    margin-bottom: 24px;
  }

  body:not(.project-detail-page) .btn {
    min-height: 44px;
    padding: 11px 18px;
  }
}

@media (max-width: 980px) {
  .cv-container {
    grid-template-columns: 1fr;
    margin: 20px 14px;
  }

  .cv-sidebar {
    align-items: stretch;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #profile-pic {
    align-self: center;
  }

  .cv-name,
  .cv-role {
    text-align: center;
  }

  .cv-nav,
  .sidebar-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cv-main {
    padding: 22px;
  }

  .cv-section {
    padding: 18px;
  }

  .cv-nav,
  .sidebar-links {
    grid-template-columns: 1fr;
  }

  #profile-pic {
    width: 94px;
    height: 94px;
  }

  .cv-name {
    font-size: 1.14rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .section-carousel-enabled {
    scroll-snap-type: none;
  }
}

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  :root {
    --text: #0f172a;
    --muted: #475569;
    --border: rgba(15, 23, 42, 0.12);
    --border-strong: rgba(15, 23, 42, 0.22);
  }

  html {
    scroll-behavior: auto;
  }

  body {
    zoom: 100%;
    min-height: auto;
    color: var(--text);
    line-height: 1.45;
    background: #ffffff !important;
  }

  body::before,
  body::after,
  .sidebar-links {
    display: none !important;
  }

  .cv-container {
    max-width: none;
    margin: 0;
    grid-template-columns: 1fr;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    backdrop-filter: none;
  }

  .cv-container::before,
  .project-card::after {
    display: none;
  }

  .cv-sidebar {
    padding: 0 0 8mm;
    align-items: flex-start;
    gap: 4mm;
    background: transparent;
    border-bottom: 1px solid #cbd5e1;
    break-after: avoid-page;
  }

  #profile-pic {
    width: 24mm;
    height: 24mm;
    border-color: #cbd5e1;
  }

  .cv-name {
    font-size: 18pt;
    color: #020617;
    text-align: left;
  }

  .cv-role {
    text-align: left;
    gap: 1mm;
  }

  .cv-role-main {
    color: #0f172a;
    font-size: 10.5pt;
  }

  .cv-role-sub,
  .cv-role-note,
  footer {
    color: #475569;
  }

  .cv-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2mm;
  }

  .cv-nav a,
  .cv-nav a.active {
    padding: 2mm 3.5mm;
    border-radius: 999px;
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    transform: none;
  }

  .cv-main {
    padding: 8mm 0 0;
    gap: 5mm;
  }

  .cv-section {
    display: block !important;
    overflow: visible;
    background: transparent;
    border-color: #e2e8f0;
    border-radius: 12px;
    padding: 5mm;
    box-shadow: none;
    animation: none;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .cv-section::before {
    height: 1px;
    background: linear-gradient(90deg, transparent, #94a3b8, transparent);
  }

  .cv-section-title {
    margin-bottom: 3mm;
    color: #0f172a;
    font-size: 11pt;
  }

  .cv-section-content,
  .contact-links,
  .project-grid,
  .rpg-skills {
    gap: 3mm;
  }

  .cv-section-content p,
  .project-details li,
  .contact-link,
  .skill-name {
    color: #334155;
  }

  .project-grid,
  .rpg-skills {
    grid-template-columns: 1fr;
  }

  .project-card,
  .skill-card,
  .contact-link,
  .button-link {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
    transform: none;
  }

  .project-title,
  .project-details strong {
    color: #0f172a;
  }

  .project-details li {
    border-left-color: #94a3b8;
  }

  .button-link,
  .contact-link {
    align-self: flex-start;
  }

  .button-link[href^="http"]::after,
  .contact-link[href^="http"]::after {
    content: " " attr(href);
    display: block;
    margin-top: 2mm;
    font-size: 8pt;
    font-weight: 500;
    color: #64748b;
    word-break: break-all;
  }

  footer {
    padding: 5mm 0 0;
    font-size: 9pt;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

body.pdf-export {
  zoom: 100%;
  padding: 24px 0 40px;
  background: #020617;
}

body.pdf-export::before,
body.pdf-export::after {
  display: none;
}

.pdf-document {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pdf-page {
  width: 297mm;
  height: 210mm;
  margin: 0 auto;
  padding: 11mm;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(2, 6, 23, 0.48) 0%, rgba(5, 12, 30, 0.56) 45%, rgba(6, 15, 36, 0.62) 100%),
    radial-gradient(900px 560px at -5% -10%, rgba(34, 211, 238, 0.12), transparent 56%),
    radial-gradient(980px 600px at 105% 0%, rgba(56, 189, 248, 0.1), transparent 52%),
    url("background-export.jpg") center center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

body.pdf-export .pdf-page-frame {
  flex: 0 0 auto;
}

body.pdf-export .cv-container {
  width: 1180px;
  max-width: 1180px;
  margin: 0;
  transform-origin: top left;
}

body.pdf-export .cv-section {
  display: block !important;
}

body.pdf-export .sidebar-links,
body.pdf-export footer {
  display: none !important;
}

@media print {
  body.pdf-export {
    padding: 0;
    background: #020617 !important;
    color: var(--text);
  }

  body.pdf-export .pdf-document {
    gap: 0;
  }

  body.pdf-export .pdf-page {
    width: 297mm;
    height: 210mm;
    margin: 0;
    padding: 11mm;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  body.pdf-export .pdf-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  body.pdf-export .cv-container {
    grid-template-columns: 280px 1fr;
    background: linear-gradient(155deg, rgba(10, 20, 40, 0.9), rgba(8, 15, 30, 0.82));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(14px);
  }

  body.pdf-export .cv-container::before {
    display: block;
  }

  body.pdf-export .cv-sidebar {
    padding: 18px 10px;
    align-items: center;
    gap: 10px;
    background: rgba(10, 30, 56, 0.82);
    border-bottom: none;
  }

  body.pdf-export #profile-pic {
    width: 72px;
    height: 72px;
    border-color: rgba(34, 211, 238, 0.32);
  }

  body.pdf-export .cv-name,
  body.pdf-export .cv-role {
    text-align: center;
  }

  body.pdf-export .cv-name {
    font-size: 1.05rem;
    color: var(--text);
  }

  body.pdf-export .cv-role {
    gap: 4px;
  }

  body.pdf-export .cv-role-main {
    font-size: 0.85rem;
    color: #c8f7ff;
  }

  body.pdf-export .cv-role-sub,
  body.pdf-export .cv-role-note {
    color: #8be9ff;
  }

  body.pdf-export .cv-nav {
    display: grid;
    gap: 10px;
  }

  body.pdf-export .cv-nav a,
  body.pdf-export .cv-nav a.active {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(8, 18, 38, 0.58);
    color: var(--text);
    transform: none;
  }

  body.pdf-export .cv-nav a.active {
    background: linear-gradient(120deg, rgba(6, 182, 212, 0.2), rgba(56, 189, 248, 0.18));
    border-color: var(--border-strong);
  }

  body.pdf-export .cv-main {
    padding: 32px 34px;
    gap: 22px;
  }

  body.pdf-export .cv-section {
    overflow: hidden;
    background: linear-gradient(145deg, rgba(10, 20, 40, 0.78), rgba(8, 15, 32, 0.68));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.38);
    animation: none;
    page-break-inside: avoid;
    break-inside: avoid-page;
  }

  body.pdf-export .cv-section::before {
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  }

  body.pdf-export .cv-section-title {
    margin-bottom: 12px;
    color: #9ee9f7;
    font-size: 1.05rem;
  }

  body.pdf-export .cv-section-content p,
  body.pdf-export .cv-section-content p {
    color: #c7d5e6;
  }

  body.pdf-export .project-title {
    color: #e3f4ff;
  }

  body.pdf-export .project-details li {
    color: var(--muted);
    border-left-color: rgba(56, 189, 248, 0.25);
  }

  body.pdf-export .project-details strong {
    color: #dceafd;
  }

  body.pdf-export .skill-name {
    color: #d8ebff;
  }

  body.pdf-export .contact-link {
    color: #d0deee;
  }

  body.pdf-export .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  body.pdf-export .rpg-skills {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  body.pdf-export .project-card,
  body.pdf-export .skill-card {
    box-shadow: none;
  }

  body.pdf-export .project-card {
    background: linear-gradient(150deg, rgba(8, 18, 38, 0.86), rgba(10, 25, 48, 0.7));
    border-color: rgba(56, 189, 248, 0.24);
  }

  body.pdf-export .skill-card {
    background: linear-gradient(150deg, rgba(8, 18, 38, 0.78), rgba(10, 20, 40, 0.64));
    border-color: rgba(56, 189, 248, 0.25);
  }

  body.pdf-export .contact-link {
    background: rgba(8, 18, 38, 0.68);
    border-color: rgba(56, 189, 248, 0.28);
  }

  body.pdf-export .button-link {
    background: linear-gradient(120deg, rgba(6, 182, 212, 0.24), rgba(56, 189, 248, 0.16));
    border-color: rgba(34, 211, 238, 0.45);
  }

  body.pdf-export .button-link[href^="http"]::after,
body.pdf-export .contact-link[href^="http"]::after {
    display: none;
  }
}

/* ===== SUBPAGINAS DE PROJETOS ===== */
body.project-detail-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 10% 0%, rgba(47, 118, 157, 0.1), transparent 55%),
    linear-gradient(180deg, #f7fbfe 0%, #edf5fa 100%);
}

.project-detail-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 48px 72px;
}

.project-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.project-detail-back,
.project-detail-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

.project-detail-back:hover,
.project-detail-contact:hover {
  background: var(--bg-white);
  border-color: var(--accent);
  color: var(--accent);
}

.project-detail-hero {
  position: relative;
  overflow: hidden;
  padding: 40px;
  border: 1px solid rgba(47, 118, 157, 0.14);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(237, 245, 250, 0.96)),
    url("background.png") center center / cover no-repeat;
  box-shadow: 0 24px 60px rgba(28, 86, 120, 0.12);
}

.project-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(237, 245, 250, 0.3));
  pointer-events: none;
}

.project-detail-hero > * {
  position: relative;
  z-index: 1;
}

.project-detail-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-detail-breadcrumb span:last-child {
  color: var(--accent);
}

.project-detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(47, 118, 157, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-detail-title {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--text);
}

.project-detail-summary {
  max-width: 720px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.project-detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(47, 118, 157, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  margin-top: 28px;
}

.project-detail-column {
  display: grid;
  gap: 24px;
}

.detail-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 48px rgba(28, 86, 120, 0.08);
}

.detail-card-architecture {
  margin-top: 28px;
}

.detail-card-title {
  margin-bottom: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.detail-card p + p {
  margin-top: 12px;
}

.detail-card p,
.detail-card li {
  color: var(--text-secondary);
  line-height: 1.75;
}

.detail-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

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

.detail-stack span {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
}

.detail-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.detail-button-outline {
  background: transparent;
  color: var(--accent);
}

.detail-button-outline:hover {
  background: rgba(47, 118, 157, 0.08);
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.detail-highlight-list {
  display: grid;
  gap: 12px;
}

.detail-highlight-item {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(244, 248, 251, 0.9), rgba(255, 255, 255, 0.96));
  border: 1px solid var(--border);
}

.detail-highlight-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.95rem;
}

.project-shot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.project-shot-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-shot-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.project-shot-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 1.1rem;
  box-shadow: 0 12px 28px rgba(22, 61, 88, 0.08);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.project-shot-nav-button:hover,
.project-shot-nav-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(47, 118, 157, 0.28);
  color: var(--accent);
  box-shadow: 0 16px 34px rgba(22, 61, 88, 0.12);
}

.project-shot-nav-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.project-shot-carousel {
  display: grid;
  gap: 16px;
}

.project-shot-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.project-shot-grid::-webkit-scrollbar {
  display: none;
}

.project-shot-card {
  position: relative;
  flex: 0 0 100%;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(22, 61, 88, 0.08);
}

.project-shot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.project-shot-card.is-zoomable img {
  cursor: zoom-in;
}

.project-shot-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(18, 33, 50, 0.72);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.project-shot-expand:hover,
.project-shot-expand:focus-visible {
  transform: translateY(-1px);
  background: rgba(23, 63, 92, 0.9);
  border-color: rgba(255, 255, 255, 1);
}

.project-shot-card figcaption {
  padding: 14px 16px 16px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.65;
}

.project-shot-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.project-shot-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(47, 118, 157, 0.18);
  transition: transform var(--transition), background var(--transition);
}

.project-shot-dot.is-active {
  transform: scale(1.1);
  background: var(--accent);
}

.project-lightbox[hidden] {
  display: none;
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(9, 23, 35, 0.8);
  backdrop-filter: blur(12px);
}

.project-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
}

.project-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(8, 18, 28, 0.9);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.28);
}

.project-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-lightbox-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-lightbox-nav,
.project-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.project-lightbox-close {
  font-size: 1.6rem;
}

.project-lightbox-nav:hover,
.project-lightbox-nav:focus-visible,
.project-lightbox-close:hover,
.project-lightbox-close:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
}

.project-lightbox-nav[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.project-lightbox-figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.project-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 20px;
  background: #eef4f9;
}

.project-lightbox-caption {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
  line-height: 1.65;
}

.lightbox-open {
  overflow: hidden;
}

.detail-related {
  margin-top: 28px;
}

.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.detail-related-link {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition);
}

.detail-related-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.project-detail-footer {
  padding: 24px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .project-detail-shell {
    padding: 24px 24px 56px;
  }

  .project-detail-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .project-detail-hero {
    padding: 28px 24px;
  }

  .project-detail-layout {
    grid-template-columns: 1fr;
  }

  .project-shot-header {
    flex-direction: column;
    align-items: stretch;
  }

  .project-shot-toolbar {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .project-detail-title {
    font-size: 2rem;
  }

  .project-detail-meta,
  .detail-links {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-button,
  .project-detail-back,
  .project-detail-contact {
    width: 100%;
  }

  .project-shot-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .project-shot-nav {
    justify-content: space-between;
  }

  .project-lightbox {
    padding: 16px;
  }

  .project-lightbox-dialog {
    padding: 14px;
    border-radius: 22px;
  }

  .project-lightbox-header {
    flex-wrap: wrap;
  }

  .project-lightbox-image {
    max-height: calc(100vh - 150px);
  }

  .cv-modal {
    padding: 12px;
  }

  .cv-modal-dialog {
    height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .cv-modal-header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .cv-modal-actions {
    justify-content: space-between;
  }

  .cv-modal-download {
    flex: 1;
  }
}

