:root{
  --bg:#0b0b0c;
  --bg-soft:#121214;
  --text:#f4f4f5;
  --muted:rgba(255,255,255,.68);
  --muted-2:rgba(255,255,255,.45);
  --line:rgba(255,255,255,.10);
  --line-strong:rgba(255,255,255,.16);
  --orange:#420000;
  --orange-2:#9e0000;
  --card:#ffffff;
  --card-text:#111111;
  --shadow:0 22px 70px rgba(0,0,0,.45);
  --radius:24px;
  --radius-sm:18px;
  --max:1240px;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(255,106,0,.11), transparent 60%),
    radial-gradient(700px 440px at 85% 15%, rgba(255,255,255,.06), transparent 62%),
    var(--bg);
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x:hidden;
}

a{
  text-decoration:none;
}

/* ================================================================
   CASCA GLOBAL
================================================================ */

.app-page{
  padding:28px 0 90px;
}

.app-shell{
  max-width:var(--max);
}

.view-container{
  min-width:0;
  transform-origin:center center;
  will-change:transform, filter, opacity;
  backface-visibility:hidden;
}

.view-container.is-transitioning{
  pointer-events:none;
}

/* ================================================================
   NAVBAR
================================================================ */

.topnav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom:28px;
}

.pill,
.btn-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:10px 14px;
  text-decoration:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  transition:.18s ease;
}

.pill:hover,
.btn-chip:hover{
  transform:translateY(-1px);
  color:var(--text);
  border-color:var(--line-strong);
  background:rgba(255,255,255,.06);
}

.pill.is-active{
  color:var(--text);
  border-color:rgba(214, 1, 1, 0.36);
  background:linear-gradient(135deg, rgba(214,1,1,.20), rgba(214,1,1,.10));
}

.lang-switch{
  margin-left:auto;
  min-width:164px;
  border-radius:999px;
  padding:10px 42px 10px 14px;
  color:var(--text);
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.72) 50%),
    linear-gradient(135deg, rgba(255,255,255,.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

.lang-switch option{
  color:#111;
}

/* ================================================================
   HOME
================================================================ */

.home-layout{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:42px;
  align-items:start;
}

.profile-card{
  position:sticky;
  top:96px;
  border-radius:var(--radius);
  background:var(--card);
  color:var(--card-text);
  padding:18px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.profile-photo{
  height:240px;
  border-radius:18px;
  overflow:hidden;
  background:#f1f1f1;
  position:relative;
}

.profile-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-badge{
  position:absolute;
  left:12px;
  bottom:12px;
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#fff;
  background:var(--orange);
  box-shadow:0 10px 25px rgba(255, 0, 0, 0.35);
}

.profile-name{
  font-size:2rem;
  font-weight:900;
  letter-spacing:-.04em;
  margin:16px 0 6px;
}

.profile-role{
  margin:0;
  font-weight:700;
  color:rgba(16,16,16,.72);
}

.profile-text{
  margin:10px 0 0;
  color:rgba(16,16,16,.62);
  line-height:1.65;
}

.profile-quick{
  display:grid;
  gap:10px;
  margin-top:18px;
}

.quick-item{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:.95rem;
  padding:10px 0;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.quick-item:last-child{
  border-bottom:0;
}

.quick-item span{
  color:rgba(16,16,16,.55);
}

.quick-item strong{
  font-size:.95rem;
  text-align:right;
}

.profile-actions{
  display:grid;
  gap:10px;
  margin-top:18px;
}

.profile-social{
  margin-top:16px;
  display:flex;
  gap:12px;
  justify-content:center;
}

.socialContainer{
  width:52px;
  height:52px;
  border-radius:5px;
  border:1px solid rgba(0,0,0,.10);
  background-color:rgb(44, 44, 44);
  color:#f1f1f1;
  display:grid;
  place-items:center;
  overflow:hidden;
  transition-duration:.3s;
}

.containerOne:hover{
  background-color:#d62976;
  transition-duration:.3s;
}

.containerTwo:hover{
  background-color:#00acee;
  transition-duration:.3s;
}

.containerThree:hover{
  background-color:#0072b1;
  transition-duration:.3s;
}

.containerFour:hover{
  background-color:green;
  transition-duration:.3s;
}

.socialContainer:active{
  transform:scale(.9);
  transition-duration:.3s;
}

.home-main{
  min-width:0;
}

.hero-home{
  padding:8px 0 16px;
}

.hero-kicker{
  margin:0 0 14px;
  color:rgba(255,255,255,.56);
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:.84rem;
}

.hero-title{
  margin:0;
  max-width:12ch;
  line-height:.96;
  font-size:clamp(2.8rem, 6vw, 6rem);
  font-weight:900;
  letter-spacing:-.06em;
  text-transform:uppercase;
}

.hero-title span{
  display:block;
  color:rgba(255,255,255,.18);
}

.hero-lead{
  max-width:68ch;
  margin:20px 0 0;
  color:var(--muted);
  line-height:1.75;
  font-size:1.04rem;
}

.hero-actions,
.section-cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.btn-main,
.btn-ghost{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:13px 18px;
  border-radius:16px;
  font-weight:800;
  transition:.18s ease;
}

.btn-main{
  background:linear-gradient(135deg, var(--orange), var(--orange-2));
  color:#fff;
  box-shadow:0 18px 42px rgba(255, 0, 0, 0.2);
}

.btn-main:hover{
  color:#fff;
  transform:translateY(-1px);
}

.btn-ghost{
  border:1px solid var(--line-strong);
  color:var(--text);
  background:rgba(255,255,255,.04);
}

.btn-ghost:hover{
  color:var(--text);
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
}

.hero-stats{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin-top:30px;
}

.stat-box{
  min-width:180px;
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px 18px 16px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
  box-shadow:0 16px 48px rgba(0,0,0,.18);
}

.stat-number{
  font-size:2rem;
  line-height:1;
  font-weight:900;
  letter-spacing:-.04em;
}

.stat-label{
  margin-top:8px;
  color:rgba(255,255,255,.5);
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.home-section{
  margin-top:54px;
}

.section-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
  color:rgba(255,255,255,.56);
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.78rem;
}

.section-eyebrow::before{
  content:"";
  width:34px;
  height:1px;
  background:linear-gradient(90deg, rgba(255, 0, 0, 0.9), transparent);
}

.section-title{
  margin:0;
  max-width:14ch;
  font-size:clamp(2rem, 4vw, 4.4rem);
  line-height:.98;
  font-weight:900;
  letter-spacing:-.05em;
  text-transform:uppercase;
}

.section-title span{
  color:rgba(255,255,255,.18);
}

.section-text{
  max-width:70ch;
  margin:14px 0 0;
  color:var(--muted);
  line-height:1.75;
}

.home-grid-2{
  margin-top:28px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
}

.info-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
  box-shadow:0 16px 48px rgba(0,0,0,.18);
}

.info-card h3{
  margin:14px 0 10px;
  font-size:1.12rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.info-card p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}

.info-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.07);
  color:var(--orange-2);
  font-size:1.2rem;
}

.card-blur {
  position: relative;
  overflow: hidden; /* corta o blur nas bordas */
}

.card-blur-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transform: scale(1.1); /* evita borda branca do blur */
}

.card-blur .info-icon,
.card-blur h3,
.card-blur p {
  position: relative;
  z-index: 1;
}

/* ================================================================
   PORTFOLIO
================================================================ */
.view-container[data-view="portfolio"]{
  max-width:1000px;
  margin:0 auto;
}

.portfolio-hero{
  padding:12px 0 10px;
}

.portfolio-title{
  margin:0;
  max-width:11ch;
  line-height:.96;
  font-size:clamp(2.7rem, 6vw, 5.6rem);
  font-weight:900;
  letter-spacing:-.06em;
  text-transform:uppercase;
}

.portfolio-title span{
  display:block;
  color:rgba(255,255,255,.18);
}

.portfolio-lead{
  max-width:72ch;
  margin:20px 0 0;
  color:var(--muted);
  line-height:1.75;
  font-size:1.02rem;
}

.portfolio-section{
  margin-top:42px;
}

.stack-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.stack-badge{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.86);
  font-size:.88rem;
}

.category-row{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
  margin-top:18px;
}

.mini-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow:0 16px 48px rgba(0,0,0,.18);
}

.mini-card h3{
  margin:14px 0 10px;
  font-size:1.08rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.mini-card p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}

.mini-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.07);
  color:var(--orange-2);
  font-size:1.15rem;
}

.filter-toolbar{
  display:grid;
  gap:14px;
  margin-top:16px;
}

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

.filter-btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  transition:.18s ease;
}

.filter-btn:hover{
  color:var(--text);
  border-color:var(--line-strong);
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
}

.filter-btn.is-active{
  color:var(--text);
  border-color:rgba(214, 1, 1,.36);
  background:linear-gradient(135deg, rgba(214, 1, 1,.20), rgba(214, 1, 1,.10));
}

.card-normalizer {
  position: relative;
  z-index: 1;
}

.projects-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
}

.project-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow:0 16px 48px rgba(0,0,0,.18);
  transition:.18s ease, opacity .2s ease;
}

.project-card:hover{
  transform:translateY(-2px);
  border-color:var(--line-strong);
}

.project-card.is-hidden{
  display:none;
}

.project-card-top{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

.project-overline{
  margin:0 0 8px;
  color:rgba(255,255,255,.5);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.74rem;
  font-weight:700;
}

.project-card-title{
  margin:0;
  font-size:1.35rem;
  font-weight:800;
  letter-spacing:-.03em;
}

.project-status{
  white-space:nowrap;
  border-radius:999px;
  padding:8px 11px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.8);
  font-size:.78rem;
  font-weight:700;
}

.project-card-text{
  margin:16px 0 0;
  color:var(--muted);
  line-height:1.72;
}

.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.tag-chip{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.84);
  font-size:.82rem;
}

.project-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

/* ================================================================
   PROJETO
================================================================ */

.project-view{
  max-width:1160px;
  margin:0 auto;
  transform-origin:center center;
  will-change:transform, opacity, filter;
}

.project-enter{
  animation:projectEnter .72s cubic-bezier(.22,.82,.19,1) both;
}

.project-hero{
  padding:8px 0 10px;
}

.project-hero-head{
  display:block;
}

.project-hero-copy{
  max-width:860px;
}

.project-kicker{
  margin:0 0 14px;
  color:rgba(255,255,255,.56);
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:.82rem;
}

.project-title{
  margin:0;
  line-height:.96;
  font-size:clamp(2.8rem, 6vw, 5.6rem);
  font-weight:900;
  letter-spacing:-.06em;
  text-transform:uppercase;
}

.project-subtitle{
  max-width:66ch;
  margin:18px 0 0;
  color:var(--muted);
  line-height:1.75;
  font-size:1.03rem;
}

.project-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.project-meta-pill{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 13px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.84);
  font-size:.84rem;
  line-height:1.25;
}

.project-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.project-showcase{
  margin-top: 28px;
}

/* ######### */

.project-carousel-shell{
  position: relative;
  width: 100%;
  padding-inline: 72px; /* reserva espaço pros botões */
  display: block;
}

.project-carousel-card{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  box-shadow: 0 18px 54px rgba(0,0,0,.24);
}

.project-carousel{
  position: relative;
}

.carousel-item{
  display: none;
}

.carousel-item.is-active{
  display: block;
}

.carousel-item img{
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.carousel-placeholder{
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255,255,255,.42);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.carousel-caption{
  margin: 0;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--muted);
  line-height: 1.68;
  font-size: .94rem;
}

.carousel-nav-outside{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: .18s ease;
  z-index: 3;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.carousel-nav-outside:hover{
  background: var(--orange-2);
  border-color: rgba(10, 1, 1, 0.514);
}

.carousel-nav-outside.prev{
  left: 8px;
}

.carousel-nav-outside.next{
  right: 8px;
}

@media (max-width: 768px){
  .project-carousel-shell{
    padding-inline: 52px;
  }

  .carousel-nav-outside{
    width: 42px;
    height: 42px;
  }

  .carousel-nav-outside.prev{
    left: 4px;
  }

  .carousel-nav-outside.next{
    right: 4px;
  }
}

@media (max-width: 560px){
  .project-carousel-shell{
    padding-inline: 0;
  }

  .carousel-nav-outside{
    top: auto;
    bottom: 14px;
    transform: none;
    width: 38px;
    height: 38px;
  }

  .carousel-nav-outside.prev{
    left: 14px;
  }

  .carousel-nav-outside.next{
    right: 14px;
  }
}




/* $$$$$$$$$$$$$ */

.project-stack{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.stack-pill{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:7px 13px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.88);
  font-size:.84rem;
  line-height:1.2;
}

.project-section{
  margin-top:56px;
}

.project-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:18px;
}

.summary-card,
.arch-block,
.security-card,
.timeline-step,
.code-card{
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
  box-shadow:0 16px 48px rgba(0,0,0,.18);
}

.summary-card h3,
.arch-block h3,
.security-card h3,
.timeline-step h3{
  margin:0 0 10px;
  font-size:1.04rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.summary-card p,
.arch-block p,
.security-card p,
.timeline-step p{
  margin:0;
  color:var(--muted);
  line-height:1.72;
}

.arch-block{
  display: flex;
  flex-direction: column;
}

.arch-block h3{
  margin: 0;
}

.arch-block .arch-head{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.arch-block .mini-icon{
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin: 0;
}

.arch-block p{
  margin: 0;
}

.project-two-col{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
}

.project-list{
  margin:14px 0 0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.8;
}

.architecture-grid,
.security-grid,
.code-gallery{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}

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

.timeline-step{
  position:relative;
  padding-left:84px;
}

.timeline-index{
  position:absolute;
  left:-50px;
  top:12px;
  font-size:1.35rem;
  font-weight:900;
  letter-spacing:-.04em;
  color:rgba(255,255,255,.16);
}

.code-card{
  margin:0;
  overflow:hidden;
  padding:0;
}

.code-card img{
  width:100%;
  display:block;
  aspect-ratio:9/16;
  object-fit:cover;
}

.code-card figcaption{
  padding:14px 16px 16px;
  color:var(--muted);
  line-height:1.68;
  font-size:.94rem;
}

.code-placeholder{
  aspect-ratio:9/16;
  display:grid;
  place-items:center;
  padding:24px;
  color:rgba(255,255,255,.42);
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
}

.project-nav{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  flex-wrap:wrap;
  padding-top:8px;
}

.project-nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

@keyframes projectEnter{
  0%{
    opacity:0;
    transform:translateY(26px) scale(.965);
    filter:blur(10px);
  }
  55%{
    opacity:1;
    transform:translateY(0) scale(1.008);
    filter:blur(0);
  }
  100%{
    opacity:1;
    transform:translateY(0) scale(1);
    filter:blur(0);
  }
}

@media (max-width: 992px){
  .project-summary-grid,
  .architecture-grid,
  .security-grid,
  .code-gallery,
  .project-two-col{
    grid-template-columns:1fr;
  }

  .project-title,
  .section-title{
    max-width:none;
  }

  .carousel-placeholder{
    min-height:280px;
  }
}

@media (max-width: 640px){
  .project-meta-row{
    flex-direction:column;
    align-items:stretch;
  }

  .carousel-nav{
    width:38px;
    height:38px;
    font-size:20px;
  }

  .summary-card,
  .arch-block,
  .security-card,
  .timeline-step{
    padding:18px;
  }

  .timeline-step{
    padding-left:68px;
  }

  .timeline-index{
    left:18px;
    top:18px;
  }
}

/* ================================================================
   FOOTER
================================================================ */

.footer-main{
  margin-top:58px;
  padding:28px 0 50px;
  border-top:1px solid var(--line);
  color:rgba(255,255,255,.38);
  font-size:.92rem;
}

/* ================================================================
   RESPONSIVO
================================================================ */

@media (max-width: 992px){
  .home-layout{
    grid-template-columns:1fr;
    gap:22px;
  }

  .profile-card{
    position:relative;
    top:0;
  }

  .hero-title,
  .section-title,
  .portfolio-title{
    max-width:none;
  }

  .home-grid-2,
  .category-row,
  .projects-grid{
    grid-template-columns:1fr;
  }

  .nav-main .container{
    flex-direction:column;
    align-items:flex-start !important;
    gap:12px;
    padding-top:14px;
    padding-bottom:14px;
  }

  .nav-links{
    width:100%;
    flex-wrap:wrap;
  }
}