/* Portfolio V3: premium editorial product-engineering presentation */

:root {
  --premium-max: 1180px;
  --premium-radius: 28px;
  --premium-border: color-mix(in oklab, var(--text) 9%, transparent);
  --premium-shadow: 0 24px 70px rgba(16, 18, 28, 0.11);
}

html[data-theme="light"] {
  --bg: #f5f6f9;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --text: #11131a;
  --muted: #61697a;
  --brand: #635bff;
  --brand-2: #2db9f0;
}

html[data-theme="dark"] {
  --bg: #090b10;
  --panel: #11141b;
  --panel-2: #171b24;
  --text: #f3f5f9;
  --muted: #9da6b6;
  --brand: #7c70ff;
  --brand-2: #3bc7ff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in oklab, var(--brand) 11%, transparent), transparent 32rem),
    radial-gradient(circle at 88% 12%, color-mix(in oklab, var(--brand-2) 9%, transparent), transparent 28rem),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: -0.01em;
}

.container {
  width: min(var(--premium-max), calc(100% - 40px));
}

header.nav {
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  background: color-mix(in oklab, var(--bg) 77%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--text) 7%, transparent);
}

.nav-inner {
  min-height: 74px;
  padding: .72rem 0;
}

.brand {
  font-weight: 800;
  letter-spacing: -.025em;
}

.brand .chip {
  margin-left: .35rem;
  font-size: .72rem;
  letter-spacing: .02em;
  background: color-mix(in oklab, var(--panel) 78%, var(--brand) 22%);
}

nav a {
  padding: .58rem .82rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
}

nav a.active,
nav a:hover {
  background: color-mix(in oklab, var(--panel-2) 82%, var(--brand) 18%);
}

.btn {
  border-radius: 999px;
  padding: .82rem 1.15rem;
  box-shadow: 0 12px 28px color-mix(in oklab, var(--brand) 18%, transparent);
}

.btn.secondary {
  background: color-mix(in oklab, var(--panel) 88%, transparent);
  border-color: var(--premium-border);
}

.icon-btn {
  border-radius: 14px;
}

/* HERO */
.hero {
  padding: 5.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, .96fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5.5rem);
}

.eyebrow,
.case-kicker {
  margin: 0 0 .8rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--text) 58%, var(--brand-2) 42%);
}

.hero-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 5.8vw, 5.7rem);
  line-height: .96;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 720px;
  margin: 1.55rem 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.78;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.6rem;
}

.hero-meta span {
  padding: .48rem .72rem;
  border: 1px solid var(--premium-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--panel) 88%, transparent);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.hero-actions {
  margin-top: 1.6rem;
}

.hero-showcase {
  position: relative;
  min-height: 520px;
}

.hero-showcase::before {
  content: "";
  position: absolute;
  inset: 10% 7% 4% 10%;
  border-radius: 42px;
  background: linear-gradient(145deg,
    color-mix(in oklab, var(--brand) 26%, var(--panel)),
    color-mix(in oklab, var(--brand-2) 18%, var(--panel)));
  filter: blur(.2px);
  opacity: .72;
}

.hero-shot {
  position: absolute;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, white 17%, transparent);
  background: #0d1016;
  box-shadow: 0 34px 75px rgba(9, 12, 22, .28);
}

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

.hero-shot span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: .42rem .65rem;
  border-radius: 999px;
  background: rgba(8, 10, 16, .78);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.hero-shot-main {
  inset: 0 9% 9% 5%;
  border-radius: 30px;
  transform: rotate(-1.3deg);
}

.hero-shot-small {
  width: 46%;
  height: 35%;
  border-radius: 22px;
}

.hero-shot-fidelity {
  right: -2%;
  bottom: 2%;
  transform: rotate(2deg);
}

.hero-shot-ai {
  right: -1%;
  top: 4%;
  transform: rotate(2.8deg);
}

.proof-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--premium-border);
  border-bottom: 1px solid var(--premium-border);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* SECTIONS */
.section {
  padding: 6.5rem 0 0;
  scroll-margin-top: 92px;
}

.section-heading {
  max-width: 830px;
  margin-bottom: 2.3rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.section-intro {
  margin: 1.15rem 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

/* PROJECT CASE STUDIES */
.project-case {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  min-height: 560px;
  margin-top: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--premium-border);
  border-radius: var(--premium-radius);
  background: color-mix(in oklab, var(--panel) 96%, transparent);
  box-shadow: var(--premium-shadow);
}

.project-case-reverse .project-visual {
  order: 2;
}

.project-visual {
  min-width: 0;
  padding: 1rem;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--brand) 23%, transparent), transparent 60%),
    linear-gradient(145deg, #11141c, #1a2030);
}

.visual-frame {
  width: 100%;
  height: 100%;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 20px;
  background: #0f1218;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.visual-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
}

.project-case:hover .visual-frame img {
  transform: scale(1.025);
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.6rem);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .45rem;
}

.project-topline .case-kicker {
  margin: 0;
}

.text-link {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  transition: color .2s ease;
}

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

.project-copy h3 {
  margin: .65rem 0 .2rem;
  font-size: clamp(2.1rem, 3.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.case-subtitle {
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}

.project-summary {
  margin: 1.35rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.project-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.45rem;
}

.project-points > div {
  padding: .9rem 1rem;
  border: 1px solid var(--premium-border);
  border-radius: 15px;
  background: color-mix(in oklab, var(--panel-2) 72%, transparent);
}

.project-points strong,
.project-points span {
  display: block;
}

.project-points strong {
  margin-bottom: .3rem;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-points span {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.decision-card {
  margin-top: 1.4rem;
  padding: 1.05rem 1.1rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 15px 15px 0;
  background: color-mix(in oklab, var(--panel-2) 75%, transparent);
}

.decision-card .decision-label {
  display: block;
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.decision-card strong {
  display: block;
  margin-bottom: .35rem;
}

.decision-card p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.62;
}

.pipeline-premium {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.pipeline-premium span {
  padding: .42rem .6rem;
  border: 1px solid var(--premium-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--panel-2) 76%, transparent);
}

.pipeline-premium i {
  font-style: normal;
  opacity: .55;
}

.project-footerline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--premium-border);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.status-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .45rem;
  border-radius: 50%;
  background: #34c985;
  box-shadow: 0 0 0 4px rgba(52,201,133,.12);
}

/* EARLIER WORK */
.earlier-heading {
  margin-top: 3.4rem;
}

.earlier-work {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.earlier-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.45rem;
  border: 1px solid var(--premium-border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
}

.earlier-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg,
    color-mix(in oklab, var(--brand) 18%, var(--panel-2)),
    color-mix(in oklab, var(--brand-2) 14%, var(--panel-2)));
}

.earlier-card h3 {
  margin: 0 0 .45rem;
  font-size: 1.05rem;
}

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

.earlier-card span {
  display: block;
  margin-top: .85rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

/* EXPERIENCE */
.experience-list {
  border-top: 1px solid var(--premium-border);
}

.experience-row {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.55fr);
  gap: 2rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--premium-border);
}

.experience-company {
  display: grid;
  align-content: start;
  gap: .35rem;
}

.experience-company strong {
  font-size: 1rem;
}

.experience-company span {
  color: var(--muted);
  font-size: .78rem;
}

.experience-detail h3 {
  margin: 0 0 .4rem;
  font-size: 1.08rem;
  letter-spacing: -.02em;
}

.experience-detail p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.65;
}

/* STACK */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.stack-card {
  grid-column: span 3;
  min-height: 178px;
  padding: 1.4rem;
  border: 1px solid var(--premium-border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
}

.stack-card.core {
  background:
    linear-gradient(145deg,
      color-mix(in oklab, var(--panel) 89%, var(--brand) 11%),
      color-mix(in oklab, var(--panel) 94%, transparent));
}

.stack-card:last-child {
  grid-column: span 6;
}

.stack-index {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.stack-card h3 {
  margin: 1.8rem 0 .45rem;
  font-size: 1.05rem;
}

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

/* CREDENTIALS */
.credentials-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.credential-card {
  padding: 1.65rem;
  border: 1px solid var(--premium-border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
}

.credential-card h3 {
  margin: 0;
  max-width: 560px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.credential-card p:last-child {
  margin: .85rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

/* CONTACT */
.contact-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3.3rem);
  overflow: hidden;
  position: relative;
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(65,201,255,.27), transparent 22rem),
    radial-gradient(circle at 5% 95%, rgba(124,92,255,.3), transparent 25rem),
    #10131b;
  color: #f8f9fc;
  box-shadow: 0 28px 80px rgba(9,12,20,.25);
}

.contact-premium .eyebrow {
  color: rgba(255,255,255,.64);
}

.contact-copy h2 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.contact-copy p:last-child {
  margin: 1rem 0 0;
  max-width: 650px;
  color: rgba(255,255,255,.68);
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .85rem;
}

.contact-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 15px;
  background: #fff;
  color: #11131a;
  font-weight: 800;
}

.contact-primary i {
  transition: transform .2s ease;
}

.contact-primary:hover i {
  transform: translateX(4px);
}

.contact-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}

.contact-secondary-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .92rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.9);
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: center;
  padding: 3rem 0 2.2rem;
  color: var(--muted);
  font-size: .8rem;
}

/* MOTION */
.reveal {
  translate: 0 18px;
  transition: opacity .7s ease, translate .7s cubic-bezier(.2,.7,.2,1);
}

.reveal.in-view {
  translate: 0 0;
}

/* RESPONSIVE */
@media (max-width: 1050px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 850px;
  }

  .hero-showcase {
    min-height: 470px;
    max-width: 760px;
  }

  .proof-rail {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .project-case-reverse .project-visual {
    order: 0;
  }

  .visual-frame {
    min-height: 390px;
    max-height: 520px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 3.7rem;
  }

  .section {
    padding-top: 5rem;
  }

  .experience-row,
  .contact-premium {
    grid-template-columns: 1fr;
  }

  .stack-card,
  .stack-card:last-child {
    grid-column: span 6;
  }

  .credentials-section,
  .earlier-work {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, var(--premium-max));
  }

  .hero {
    padding-top: 2.8rem;
  }

  .hero-title {
    font-size: clamp(2.55rem, 12vw, 4.2rem);
  }

  .hero-showcase {
    min-height: 390px;
  }

  .hero-shot-main {
    inset: 0 4% 12% 0;
  }

  .hero-shot-small {
    width: 50%;
    height: 31%;
  }

  .proof-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .project-copy {
    padding: 1.5rem;
  }

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

  .visual-frame {
    min-height: 290px;
  }

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

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

  .nav-inner {
    gap: .45rem;
  }

  .brand .chip {
    display: none;
  }

  .actions {
    gap: .25rem;
  }

  .actions .btn.cv {
    display: none;
  }
}
