:root {
  --profile-red: #d05549;
  --profile-red-dark: #ad473e;
  --profile-red-soft: #f0796d;
  --brand-red: var(--profile-red);
  --brand-red-dark: var(--profile-red-dark);
  --brand-red-light: var(--profile-red-soft);
}

.bg-brand-red,
.hover\:bg-brand-red:hover {
  background-color: var(--profile-red) !important;
}

.hover\:bg-red-dark:hover {
  background-color: var(--profile-red-dark) !important;
}

.text-brand-red,
.hover\:text-brand-red:hover,
.group-hover\:text-brand-red:is(:where(.group):hover *) {
  color: var(--profile-red) !important;
}

.border-brand-red,
.hover\:border-brand-red:hover,
.focus\:border-brand-red:focus {
  border-color: var(--profile-red) !important;
}

.border-brand-red\/20 {
  border-color: rgba(208, 85, 73, 0.24) !important;
}

.hover\:border-brand-red\/30:hover {
  border-color: rgba(208, 85, 73, 0.38) !important;
}

.bg-brand-red\/5 {
  background-color: rgba(208, 85, 73, 0.08) !important;
}

.bg-brand-red\/10 {
  background-color: rgba(208, 85, 73, 0.12) !important;
}

.decoration-brand-red\/30 {
  text-decoration-color: rgba(208, 85, 73, 0.35) !important;
}

.from-red-dark {
  --tw-gradient-from: var(--profile-red-dark) !important;
}

.from-red-light {
  --tw-gradient-from: var(--profile-red-soft) !important;
}

.to-brand-red {
  --tw-gradient-to: var(--profile-red) !important;
}

#cc-main {
  --cc-btn-primary-bg: var(--profile-red);
  --cc-btn-primary-border-color: var(--profile-red);
  --cc-btn-primary-hover-bg: var(--profile-red-dark);
  --cc-btn-primary-hover-border-color: var(--profile-red-dark);
  --cc-toggle-bg-on: var(--profile-red);
}

#cc-main a {
  color: var(--profile-red);
}

#cc-main a:hover {
  color: var(--profile-red-soft);
}

.service-item::before {
  background: var(--profile-red);
}

.nav-avatar {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 0.5rem;
  object-fit: cover;
  object-position: center top;
  background: var(--profile-red);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav-spacer {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.mobile-contact-link {
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.mobile-contact-link svg {
  width: 1.1rem;
  height: 1.1rem;
}

.nav-profile-link {
  grid-template-columns: 2.125rem max-content;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.32rem 0.7rem 0.32rem 0.32rem;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-profile-link:hover {
  border-color: rgba(208, 85, 73, 0.42);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.nav-profile-link img {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: var(--profile-red);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.nav-profile-link span {
  display: grid;
  gap: 0.06rem;
  line-height: 1.1;
}

.nav-profile-link strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-profile-link em {
  width: fit-content;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-jetbrains-mono), "JetBrains Mono", monospace;
  font-size: 0.48rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 48rem) {
  .nav-profile-link {
    display: inline-grid !important;
  }
}

.profile-section {
  scroll-margin-top: 4.5rem;
}

.profile-card {
  border: 1px solid #ececee;
  border-radius: 1.25rem;
  background: #fff;
  overflow: hidden;
}

.profile-head {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid #ececee;
  background: linear-gradient(135deg, #fff 0%, #f7f7f8 100%);
}

.profile-photo {
  width: min(100%, 15rem);
  aspect-ratio: 1;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: var(--profile-red);
  box-shadow: 0 0 0 8px #fff, 0 18px 50px rgba(0, 0, 0, 0.16);
}

.profile-intro {
  min-width: 0;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  font-family: var(--font-jetbrains-mono), "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #71717a;
}

.profile-links a,
.profile-links span {
  border: 1px solid #ececee;
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.profile-links a {
  color: var(--profile-red);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #ececee;
}

.profile-panel {
  padding: 2rem;
  border-right: 1px solid #ececee;
}

.profile-panel:last-child {
  border-right: 0;
}

.profile-panel h3 {
  margin-top: 0.85rem;
  color: #1a1a1a;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.profile-panel p:last-child {
  margin-top: 0.75rem;
  color: #71717a;
  font-size: 0.9rem;
  line-height: 1.65;
}

.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #ececee;
}

.profile-metric {
  padding: 1.5rem 2rem;
  border-right: 1px solid #ececee;
}

.profile-metric:last-child {
  border-right: 0;
}

.profile-metric strong {
  display: block;
  color: var(--profile-red);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.profile-metric span {
  display: block;
  margin-top: 0.65rem;
  color: #71717a;
  font-size: 0.85rem;
  line-height: 1.55;
}

.profile-history {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.profile-history h3 {
  margin-top: 0.85rem;
  max-width: 26rem;
  color: #1a1a1a;
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.profile-history-list {
  display: grid;
  gap: 1rem;
}

.profile-history-list p {
  color: #71717a;
  font-size: 0.92rem;
  line-height: 1.65;
}

.profile-history-list strong {
  color: #1a1a1a;
  font-weight: 600;
}

.hero-backdrop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.36) 34%, rgba(0, 0, 0, 0.56) 68%, rgba(0, 0, 0, 0.74) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.08) 38%, rgba(0, 0, 0, 0.42) 100%);
}

.hero-shell {
  height: 100vh;
  min-height: 44rem;
}

.personal-hero {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: end;
}

.personal-hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 48rem) minmax(17rem, 25rem);
  gap: clamp(2.5rem, 8vw, 9rem);
  align-items: end;
  width: 100%;
}

.personal-hero-copy {
  max-width: 48rem;
}

.hero-identity {
  position: relative;
  display: inline-grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  max-width: min(100%, 28rem);
  color: inherit;
  text-decoration: none;
}

.hero-identity img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  object-fit: cover;
  object-position: center top;
  background: var(--profile-red);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-identity-copy {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.hero-identity-kicker,
.hero-identity-action {
  font-family: var(--font-jetbrains-mono), "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.hero-identity-kicker {
  color: var(--profile-red);
}

.hero-identity strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.15;
}

.hero-identity-action {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(110deg, var(--profile-red-dark), var(--profile-red), var(--profile-red-soft), var(--profile-red));
  background-size: 220% 100%;
  padding: 0.22rem 0.46rem;
  color: #fff;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 18px rgba(208, 85, 73, 0.18);
  animation: profileActionFlow 4s ease-in-out infinite;
}

.hero-identity:hover img {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(208, 85, 73, 0.46), 0 20px 46px rgba(0, 0, 0, 0.28);
}

.hero-identity:hover .hero-identity-action {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 32px rgba(208, 85, 73, 0.34);
}

@keyframes profileActionFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero-actions {
  width: 100%;
}

.hero-founder {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  max-width: min(100%, 31rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.45rem 1rem 0.45rem 0.45rem;
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.hero-actions .hero-founder {
  margin-top: 0;
}

.hero-founder-inline {
  margin-top: 0.85rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
}

.hero-founder-inline img {
  width: 2.5rem;
  height: 2.5rem;
}

.hero-founder:hover {
  border-color: rgba(208, 85, 73, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.hero-founder img {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: var(--profile-red);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.hero-founder div {
  min-width: 0;
}

.hero-founder span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--font-jetbrains-mono), "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-founder strong {
  display: block;
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
}

.project-card-thumb {
  aspect-ratio: 2.05 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #ececee;
  background: #f7f7f8;
  padding: 0;
}

.project-card-thumb img {
  --project-thumb-scale: 1;
  --project-thumb-hover-scale: 1.015;
  --project-thumb-x: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateX(var(--project-thumb-x)) scale(var(--project-thumb-scale));
  transition: transform 500ms ease;
}

.group:hover .project-card-thumb img {
  transform: translateX(var(--project-thumb-x)) scale(var(--project-thumb-hover-scale));
}

.project-card[data-image-focus="wide-dashboard"] .project-card-thumb img {
  --project-thumb-scale: 1.45;
  --project-thumb-hover-scale: 1.47;
  --project-thumb-x: -3%;
}

.project-card[data-image-focus="dashboard-crop"] .project-card-thumb img {
  --project-thumb-scale: 1.22;
  --project-thumb-hover-scale: 1.24;
  --project-thumb-x: -5%;
}

.project-case-frame {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #0f1115;
  box-shadow: 0 30px 80px rgba(15, 17, 21, 0.16);
}

.project-case-frame img {
  display: block;
  width: 100%;
  height: auto;
}

main > section:not(:first-child) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

@media (min-width: 40rem) {
  .project-card-thumb {
    aspect-ratio: 2.05 / 1;
  }
}

@media (min-width: 64rem) {
  .project-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .project-grid > .project-card {
    grid-column: span 2 / span 2;
  }

  .project-grid > .project-card:nth-last-child(2):nth-child(3n + 1),
  .project-grid > .project-card:last-child:nth-child(3n + 2) {
    grid-column: span 3 / span 3;
  }
}

@media (max-width: 47.999rem) {
  .hero-shell {
    height: auto;
    min-height: 100svh;
  }

  .personal-hero {
    align-items: center;
    padding-top: 5.5rem !important;
    padding-bottom: 2.25rem !important;
  }

  .personal-hero-stage {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .hero-identity {
    order: -1;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.65rem;
    max-width: 100%;
  }

  .hero-identity img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
  }

  .hero-identity-copy {
    gap: 0.12rem;
  }

  .hero-identity-kicker,
  .hero-identity-action {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  .hero-identity-action {
    padding: 0.18rem 0.38rem;
    font-size: 0.5rem;
  }

  .hero-identity strong {
    font-size: 0.98rem;
  }

  .personal-hero-copy h1 {
    font-size: clamp(1.62rem, 8.4vw, 2rem) !important;
    line-height: 1.06 !important;
  }

  .personal-hero-copy p {
    margin-top: 0.9rem;
  }

  .hero-actions {
    margin-top: 1.5rem !important;
    gap: 0.75rem;
  }

  .profile-head,
  .profile-history {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 10rem;
  }

  .profile-grid,
  .profile-metric-grid {
    grid-template-columns: 1fr;
  }

  .profile-panel,
  .profile-metric {
    border-right: 0;
    border-bottom: 1px solid #ececee;
  }

  .profile-panel:last-child,
  .profile-metric:last-child {
    border-bottom: 0;
  }

  .hero-founder {
    align-items: flex-start;
    border-radius: 1rem;
    padding-right: 0.85rem;
  }

  .hero-actions .hero-founder {
    margin-left: 0;
  }
}
