/* Samuel Sampaio — refined modern portfolio */

.portfolio-page {
 --p-font: 'Plus Jakarta Sans', system-ui, sans-serif;
 --p-bg: #ffffff;
 --p-surface: #f8f8f8;
 --p-ink: #09090b;
 --p-muted: #71717a;
 --p-line: #e4e4e7;
 --p-accent: #0057ff;
 --p-section: clamp(5rem, 11vw, 7.5rem);
 font-family: var(--p-font);
 background: var(--p-bg);
 color: var(--p-ink);
 -webkit-font-smoothing: antialiased;
}

.portfolio-page .cursor-glow {
 display: none;
}

.portfolio-page *,
.portfolio-page *::before,
.portfolio-page *::after {
 font-family: inherit;
}

/* Nav */
.portfolio-nav {
 background: rgba(255, 255, 255, 0.82);
 backdrop-filter: blur(14px);
 border-bottom: 1px solid transparent;
 transition: border-color 0.3s ease, background 0.3s ease;
}

.portfolio-nav.scrolled {
 border-bottom-color: var(--p-line);
 background: rgba(255, 255, 255, 0.95);
}

.portfolio-brand {
 display: inline-flex;
 align-items: center;
 gap: 0.75rem;
 text-decoration: none;
 color: var(--p-ink);
}

.portfolio-brand__mark {
 display: grid;
 place-items: center;
 width: 2rem;
 height: 2rem;
 font-size: 0.625rem;
 font-weight: 700;
 letter-spacing: -0.04em;
 color: #fff;
 background: var(--p-ink);
 border-radius: 7px;
 flex-shrink: 0;
}

.portfolio-brand__name {
 font-size: 0.875rem;
 font-weight: 600;
 letter-spacing: -0.02em;
}

@media (max-width: 640px) {
 .portfolio-brand__name {
  display: none;
 }
}

.portfolio-nav .nav__links {
 align-items: center;
 gap: 1.5rem;
}

.portfolio-nav .nav__links a:not(.p-btn) {
 position: relative;
 font-size: 0.8125rem;
 font-weight: 500;
 color: var(--p-muted);
 text-decoration: none;
 padding-bottom: 0.2rem;
 transition: color 0.2s ease;
}

.portfolio-nav .nav__links a:not(.p-btn)::after {
 content: '';
 position: absolute;
 left: 0;
 bottom: 0;
 width: 100%;
 height: 1.5px;
 background: var(--p-ink);
 transform: scaleX(0);
 transform-origin: left;
 transition: transform 0.25s ease;
}

.portfolio-nav .nav__links a:not(.p-btn):hover,
.portfolio-nav .nav__links a:not(.p-btn).is-active {
 color: var(--p-ink);
}

.portfolio-nav .nav__links a:not(.p-btn).is-active::after {
 transform: scaleX(1);
}

.portfolio-nav .nav__links a.p-btn {
 margin-left: 0.25rem;
 box-shadow: none;
}

.portfolio-nav .nav__links a.p-btn.p-btn--dark {
 color: #fff;
 background: var(--p-ink);
}

.portfolio-nav .nav__links a.p-btn.p-btn--dark:hover,
.portfolio-nav .nav__links a.p-btn.p-btn--dark:active {
 color: #fff;
 background: #27272a;
}

@media (max-width: 768px) {
 .portfolio-nav .nav__links a.p-btn {
  margin-top: 0.375rem;
  margin-left: 0;
  width: 100%;
  opacity: 1;
  transform: none;
 }

 .portfolio-nav .nav__links.open a.p-btn {
  opacity: 1;
  transform: none;
 }
}

/* Buttons */
.p-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-height: 2.75rem;
 padding: 0 1.35rem;
 font-size: 0.875rem;
 font-weight: 600;
 text-decoration: none;
 border-radius: 999px;
 border: 1px solid transparent;
 transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
 cursor: pointer;
}

.p-btn:active {
 transform: scale(0.98);
}

.p-btn--sm {
 min-height: 2.25rem;
 padding: 0 1rem;
 font-size: 0.8125rem;
}

.p-btn--dark {
 background: var(--p-ink);
 color: #fff;
}

.p-btn--dark:hover {
 background: #27272a;
 color: #fff;
}

.p-btn--ghost {
 background: #fff;
 color: var(--p-ink);
 border-color: var(--p-line);
}

.p-btn--ghost:hover {
 border-color: #a1a1aa;
}

.p-btn--full {
 width: 100%;
}

/* Hero — minimal, full viewport */
.p-hero {
 position: relative;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 min-height: 100svh;
 min-height: 100dvh;
 padding: calc(5rem + 48px) 0 clamp(4rem, 8vw, 5rem);
 overflow: hidden;
}

.p-hero__bg {
 position: absolute;
 inset: 0;
 pointer-events: none;
}

.p-hero__glow {
 position: absolute;
 width: min(640px, 88vw);
 height: min(640px, 88vw);
 top: 50%;
 left: 50%;
 transform: translate(-50%, -54%);
 border-radius: 50%;
 background: radial-gradient(circle, rgba(0, 87, 255, 0.07) 0%, transparent 68%);
 opacity: 0;
 animation: p-hero-glow-in 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes p-hero-glow-in {
 from { opacity: 0; transform: translate(-50%, -54%) scale(0.92); }
 to { opacity: 1; transform: translate(-50%, -54%) scale(1); }
}

.p-hero__stage {
 position: relative;
 z-index: 1;
 max-width: 54rem;
 text-align: center;
}

.p-hero__identity {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 0.85rem;
 margin-bottom: 1.35rem;
}

.p-hero__photo {
 width: 4.25rem;
 height: 4.25rem;
 border-radius: 50%;
 object-fit: cover;
 object-position: center 15%;
 border: 2px solid rgba(9, 9, 11, 0.06);
 box-shadow: 0 8px 24px rgba(9, 9, 11, 0.08);
}

.p-hero__name {
 margin: 0;
 font-size: clamp(1.125rem, 2.5vw, 1.375rem);
 font-weight: 600;
 letter-spacing: -0.03em;
 color: var(--p-ink);
}

.p-hero__role {
 margin: 0;
 font-size: 0.8125rem;
 font-weight: 500;
 color: var(--p-muted);
}

.p-hero__eyebrow {
 margin: 0 0 1.5rem;
 font-size: 0.6875rem;
 font-weight: 500;
 letter-spacing: 0.14em;
 text-transform: uppercase;
 color: var(--p-muted);
}

.p-hero__title {
 margin: 0;
 font-size: clamp(2.65rem, 7.5vw, 4.5rem);
 font-weight: 600;
 line-height: 1.04;
 letter-spacing: -0.045em;
 text-wrap: balance;
}

.p-hero__line {
 display: block;
}

.p-hero__em {
 font-style: normal;
 background: linear-gradient(120deg, var(--p-ink) 0%, var(--p-accent) 100%);
 -webkit-background-clip: text;
 background-clip: text;
 -webkit-text-fill-color: transparent;
}

.p-hero__lead {
 margin: 1.65rem auto 0;
 max-width: 30rem;
 font-size: clamp(1rem, 2vw, 1.0625rem);
 line-height: 1.75;
 color: var(--p-muted);
 text-wrap: pretty;
}

.p-hero__actions {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 justify-content: center;
 gap: 0.75rem 1.25rem;
 margin-top: 2rem;
}

.p-hero__link {
 display: inline-flex;
 align-items: center;
 font-size: 0.875rem;
 font-weight: 500;
 color: var(--p-muted);
 text-decoration: none;
 transition: color 0.3s ease, gap 0.3s ease;
}

.p-hero__link:hover {
 color: var(--p-ink);
}

.portfolio-page [data-hero] {
 opacity: 0;
 transform: translateY(36px);
 filter: blur(12px);
 transition:
  opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1),
  transform 1.15s cubic-bezier(0.16, 1, 0.3, 1),
  filter 1.15s cubic-bezier(0.16, 1, 0.3, 1);
 transition-delay: var(--hero-delay, 0ms);
}

.portfolio-page [data-hero].is-visible {
 opacity: 1;
 transform: none;
 filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
 .p-hero__glow {
  animation: none;
  opacity: 1;
 }

 .portfolio-page [data-hero] {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
 }
}

/* Sections */
.p-section {
 padding-block: var(--p-section);
}

.p-section__top {
 display: flex;
 flex-direction: column;
 gap: 0.75rem;
 margin-bottom: 2.75rem;
}

@media (min-width: 768px) {
 .p-section__top {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
 }
}

.p-section__label {
 margin: 0 0 0.5rem;
 font-size: 0.75rem;
 font-weight: 600;
 letter-spacing: 0.08em;
 text-transform: uppercase;
 color: var(--p-muted);
}

.p-section__label--light {
 color: #71717a;
}

.p-section__top h2 {
 margin: 0;
 font-size: clamp(1.625rem, 3vw, 2.25rem);
 font-weight: 700;
 letter-spacing: -0.03em;
 line-height: 1.1;
}

.p-section__top > p {
 margin: 0;
 font-size: 0.9375rem;
 line-height: 1.6;
 color: var(--p-muted);
 max-width: 22rem;
}

.p-section__top a {
 color: var(--p-ink);
 font-weight: 500;
 text-decoration: underline;
 text-underline-offset: 3px;
 text-decoration-color: rgba(9, 9, 11, 0.2);
}

.p-section__top a:hover {
 text-decoration-color: var(--p-accent);
 color: var(--p-accent);
}

/* Work */
.p-section--work {
 background: var(--p-surface);
}

.p-work-grid {
 gap: 0.85rem;
}

.theme-samuel .work-item {
 border-radius: 14px;
 border-color: rgba(0, 0, 0, 0.06);
 background: #fff;
 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
 transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.theme-samuel .work-item:hover {
 border-color: rgba(0, 0, 0, 0.12);
 transform: translateY(-4px);
 box-shadow: 0 20px 44px rgba(0, 0, 0, 0.08);
}

.theme-samuel .work-item__name {
 padding: 0.85rem 1rem;
 font-weight: 600;
 font-size: 0.8125rem;
}

/* Services */
.p-section--services {
 background: #fff;
}

.p-offer {
 display: grid;
 gap: 1rem;
}

@media (min-width: 768px) {
 .p-offer {
  grid-template-columns: 1fr 1fr;
 }
}

.p-offer__card {
 position: relative;
 padding: clamp(1.75rem, 3vw, 2.25rem);
 border: 1px solid var(--p-line);
 border-radius: 20px;
 background: #fff;
 overflow: hidden;
 transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.p-offer__card:hover {
 border-color: #d4d4d8;
 box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.p-offer__card--fill {
 background: var(--p-ink);
 border-color: var(--p-ink);
 color: #fafafa;
}

.p-offer__card--fill:hover {
 border-color: #27272a;
 box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.p-offer__index {
 position: absolute;
 top: 1.25rem;
 right: 1.5rem;
 font-size: 3rem;
 font-weight: 700;
 line-height: 1;
 letter-spacing: -0.04em;
 color: rgba(0, 0, 0, 0.04);
 pointer-events: none;
}

.p-offer__card--fill .p-offer__index {
 color: rgba(255, 255, 255, 0.08);
}

.p-offer__card h3 {
 margin: 0 0 0.65rem;
 font-size: 1.25rem;
 font-weight: 700;
 letter-spacing: -0.02em;
}

.p-offer__card > p {
 margin: 0 0 1.25rem;
 font-size: 0.9375rem;
 line-height: 1.6;
 color: var(--p-muted);
 max-width: 26ch;
}

.p-offer__card--fill > p {
 color: #a1a1aa;
}

.p-offer__card ul {
 margin: 0 0 1.5rem;
 padding: 1.25rem 0 0;
 list-style: none;
 display: grid;
 gap: 0.45rem;
 border-top: 1px solid var(--p-line);
}

.p-offer__card--fill ul {
 border-top-color: rgba(255, 255, 255, 0.1);
}

.p-offer__card li {
 font-size: 0.8125rem;
 color: #52525b;
 line-height: 1.5;
}

.p-offer__card--fill li {
 color: #d4d4d8;
}

.p-offer__link {
 font-size: 0.8125rem;
 font-weight: 600;
 color: var(--p-ink);
 text-decoration: none;
}

.p-offer__link:hover {
 color: var(--p-accent);
}

.p-offer__card--fill .p-offer__link {
 color: #fff;
}

.p-offer__card--fill .p-offer__link:hover {
 opacity: 0.8;
 color: #fff;
}

/* About — typographic ledger */
.p-section--about {
 background: var(--p-ink);
 color: #fafafa;
}

.p-about {
 display: grid;
 gap: 2.5rem;
}

@media (min-width: 900px) {
 .p-about {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: start;
 }
}

.p-about__intro {
 max-width: 34rem;
}

.p-about__head {
 display: flex;
 align-items: center;
 gap: 1.25rem;
 margin-bottom: 1.25rem;
}

.p-about__photo {
 width: 5.5rem;
 height: 5.5rem;
 border-radius: 50%;
 object-fit: cover;
 object-position: center 15%;
 flex-shrink: 0;
 border: 2px solid rgba(255, 255, 255, 0.1);
}

.p-about__head h2 {
 margin: 0;
 font-size: clamp(1.625rem, 3vw, 2.25rem);
 font-weight: 700;
 letter-spacing: -0.03em;
}

.p-about__head .p-section__label {
 margin: 0 0 0.35rem;
}

.p-about__intro > p {
 margin: 0;
 font-size: 0.9375rem;
 line-height: 1.7;
 color: #a1a1aa;
}

.p-social {
 display: flex;
 flex-wrap: wrap;
 gap: 0.5rem 1.25rem;
 margin-top: 1.25rem;
}

.p-social a {
 font-size: 0.8125rem;
 font-weight: 500;
 text-decoration: none;
 transition: color 0.2s ease;
}

.p-social--light a {
 color: #a1a1aa;
}

.p-social--light a:hover {
 color: #fafafa;
}

.p-record {
 display: grid;
 gap: 2rem;
}

.p-record__label {
 margin: 0 0 0.85rem;
 font-size: 0.6875rem;
 font-weight: 600;
 letter-spacing: 0.1em;
 text-transform: uppercase;
 color: #52525b;
}

.p-record__section--edu .p-record__label {
 color: #71717a;
}

.p-record__list {
 margin: 0;
 padding: 0;
}

.p-record__row {
 display: grid;
 grid-template-columns: 5.75rem minmax(0, 1fr);
 gap: 1.25rem;
 padding: 0.95rem 0;
 border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.p-record__row:first-child {
 border-top: none;
 padding-top: 0;
}

.p-record__row:last-child {
 padding-bottom: 0;
}

.p-record__dur {
 margin: 0;
 font-size: 0.8125rem;
 font-weight: 600;
 font-variant-numeric: tabular-nums;
 letter-spacing: -0.02em;
 color: #fafafa;
 line-height: 1.4;
 padding-top: 0.1rem;
}

.p-record__section--edu .p-record__dur {
 color: #d4d4d8;
}

.p-record__body {
 min-width: 0;
}

.p-record__title {
 margin: 0;
 font-size: 0.9375rem;
 font-weight: 600;
 letter-spacing: -0.01em;
 color: #fafafa;
 line-height: 1.35;
}

.p-record__meta {
 margin: 0.2rem 0 0;
 font-size: 0.75rem;
 line-height: 1.5;
 color: #71717a;
}

.p-record__split {
 margin: 0.55rem 0 0;
 padding: 0.55rem 0 0 0.65rem;
 list-style: none;
 border-left: 1px solid rgba(255, 255, 255, 0.12);
 display: grid;
 gap: 0.35rem;
}

.p-record__split li {
 display: flex;
 flex-wrap: wrap;
 align-items: baseline;
 gap: 0.35rem 0.5rem;
 font-size: 0.75rem;
 color: #a1a1aa;
 line-height: 1.45;
}

.p-record__split li span:first-child {
 font-weight: 500;
 color: #d4d4d8;
}

.p-record__split strong {
 font-weight: 700;
 font-variant-numeric: tabular-nums;
 color: #fafafa;
}

.p-record__range {
 color: #52525b;
 font-size: 0.6875rem;
}

.p-record__section--edu {
 padding-top: 0.5rem;
 border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
 .p-record__row {
  grid-template-columns: 1fr;
  gap: 0.35rem;
 }

 .p-record__dur {
  font-size: 0.75rem;
  color: #a1a1aa;
 }
}

/* Contact */
.p-section--contact {
 background: var(--p-surface);
}

.p-contact {
 display: grid;
 gap: 2.5rem;
}

@media (min-width: 900px) {
 .p-contact {
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: start;
 }
}

.p-contact__info h2 {
 margin: 0 0 0.75rem;
 font-size: clamp(1.625rem, 3vw, 2.25rem);
 font-weight: 700;
 letter-spacing: -0.03em;
 line-height: 1.1;
}

.p-contact__info > p {
 margin: 0 0 1.5rem;
 font-size: 0.9375rem;
 line-height: 1.65;
 color: var(--p-muted);
 max-width: 20rem;
}

.p-contact__links {
 display: flex;
 flex-direction: column;
 gap: 0.65rem;
}

.p-contact__email {
 font-size: 0.9375rem !important;
 font-weight: 600 !important;
 color: var(--p-ink) !important;
}

.p-contact__links a {
 font-size: 0.875rem;
 font-weight: 500;
 color: var(--p-muted);
 text-decoration: none;
 transition: color 0.2s ease;
}

.p-contact__links a:hover {
 color: var(--p-accent);
}

/* Form */
.p-form {
 padding: clamp(1.25rem, 3vw, 1.75rem);
 background: #fff;
 border: 1px solid var(--p-line);
 border-radius: 20px;
 box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
 display: grid;
 gap: 1rem;
}

.p-form label {
 display: grid;
 gap: 0.45rem;
 font-size: 0.6875rem;
 font-weight: 600;
 color: var(--p-muted);
 text-transform: uppercase;
 letter-spacing: 0.06em;
}

.p-form__row {
 display: grid;
 gap: 1rem;
}

.p-form__row--2 {
 grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
 .p-form__row--2 {
  grid-template-columns: 1fr;
 }
}

.p-form input,
.p-form select,
.p-form textarea {
 width: 100%;
 padding: 0.8rem 0.9rem;
 font-size: 0.9375rem;
 font-weight: 500;
 color: var(--p-ink);
 background: var(--p-surface);
 border: 1px solid transparent;
 border-radius: 12px;
 outline: none;
 transition: border-color 0.2s ease, background 0.2s ease;
 text-transform: none;
 letter-spacing: normal;
}

.p-form input:focus,
.p-form select:focus,
.p-form textarea:focus {
 background: #fff;
 border-color: var(--p-line);
 box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.08);
}

.p-form textarea {
 resize: vertical;
 min-height: 7rem;
}

/* Footer */
.portfolio-footer {
 padding: 1.75rem 0 2.75rem;
 background: #fff;
 border-top: 1px solid var(--p-line);
}

.portfolio-footer__inner {
 display: flex;
 flex-wrap: wrap;
 justify-content: space-between;
 gap: 0.35rem 1.5rem;
 font-size: 0.8125rem;
 color: var(--p-muted);
}

.portfolio-footer__inner p {
 margin: 0;
}

.portfolio-footer a {
 color: var(--p-ink);
 font-weight: 500;
 text-decoration: none;
}

.portfolio-footer a:hover {
 color: var(--p-accent);
}

/* Motion */
.portfolio-page [data-reveal] {
 opacity: 0;
 transform: translateY(14px);
 filter: none;
 transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-page [data-reveal].is-visible {
 opacity: 1;
 transform: none;
}

@media (prefers-reduced-motion: reduce) {
 .portfolio-page [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
 }

 .theme-samuel .work-item:hover,
 .p-btn:active {
  transform: none;
 }
}
