/* ==========================================================================
   Presentation enhancements
   Base layout/theme: styles.css. Editable data/settings: ../js/content.js.
   ========================================================================== */

/* Restore the original natural portrait and deeper burnt-orange treatment. */
.portrait-orbit {
  top: 16%;
  background: radial-gradient(circle at 35% 20%, #ed7c50, var(--orange) 43%, #8f3927 92%);
  border: 0;
  box-shadow: 0 26px 40px rgba(0,0,0,.17);
  transform: translateZ(-35px) rotateY(-3deg);
}
.hero-art img {
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.2));
}
.portrait-ground {
  opacity: .4;
}

/* A fine reading line and a convenient return control. */
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 80;
  pointer-events: none;
}
.reading-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
}
.floating-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(233,99,63,.75);
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 5px 0 rgba(32,32,32,.12), 0 12px 24px rgba(32,32,32,.15);
  font-size: 23px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) rotate(-8deg);
  transition: opacity .25s, visibility .25s, transform .3s, background .2s;
}
.floating-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotate(0);
}
.floating-top:hover {
  background: var(--orange);
  color: var(--ink);
  transform: translateY(-4px);
}
.dialog-open .floating-top {
  visibility: hidden;
  opacity: 0;
}

/* Clear navigation and quiet, dimensional button feedback. */
.main-nav a {
  position: relative;
  padding-block: 7px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  height: 2px;
  inset: auto 0 0;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a[aria-current="location"]::after {
  transform: scaleX(1);
}
.main-nav a[aria-current="location"] {
  color: var(--paper);
}
.header-contact,
.button-orange {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button-orange {
  box-shadow: 0 4px 0 #ac452c;
}
.button-orange:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #ac452c, 0 16px 25px rgba(0,0,0,.15);
}
.button-orange:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #ac452c;
}
.button-orange::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.24) 48%, transparent 72%);
  transform: translateX(-130%);
  transition: transform .6s;
}
.button-orange:hover::before {
  transform: translateX(130%);
}
.button-orange > span,
.text-link > span,
.header-contact > span {
  transition: transform .25s ease;
}
.button-orange:hover > span,
.text-link:hover > span:last-child,
.header-contact:hover > span {
  transform: translate(2px,-2px);
}
.header-contact:hover {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px rgba(233,99,63,.15);
}

/* Project surfaces catch light as the cuboids respond to the pointer. */
.box-front::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--light-x, 28%) var(--light-y, 18%), rgba(255,255,255,.22), transparent 56%),
    linear-gradient(135deg, rgba(255,255,255,.07), transparent 45%, rgba(0,0,0,.025));
  opacity: .48;
  transition: opacity .3s;
}
.project-box:hover .box-front::after {
  opacity: .8;
}
.project-icon {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.project-box:hover .project-icon,
.project-box:focus-visible .project-icon {
  transform: translateY(-5px) rotate(2deg);
  box-shadow: 0 8px 0 rgba(32,32,32,.1), 0 20px 22px rgba(32,32,32,.15);
}

/* Tilt the containing planes, preserving the photography and original marks. */
.depth-card {
  --card-rx: 0deg;
  --card-ry: 0deg;
  --card-x: 0px;
  --card-y: 0px;
  transform: perspective(1000px) translate3d(var(--card-x),var(--card-y),0) rotateX(var(--card-rx)) rotateY(var(--card-ry));
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  backface-visibility: hidden;
}
.about-photo-wrap {
  box-shadow: 12px 16px 0 #e9e4da, 0 25px 40px rgba(32,32,32,.07);
}
.about-photo-wrap::after {
  content: '';
  position: absolute;
  top: -11px;
  right: -11px;
  width: 44px;
  height: 44px;
  border-top: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
  pointer-events: none;
  transform: translateZ(10px);
}
.photo-label {
  transform: translateZ(12px);
}
.about-facts > div {
  transition: border-color .25s;
}
.about-facts > div:hover {
  border-color: var(--orange);
}
.linkedin-profile-card {
  background: linear-gradient(135deg,#f1eee7,#e9e6de);
  box-shadow: 0 5px 0 #dedad1, 0 18px 30px rgba(32,32,32,.06);
}
.linkedin-profile-card .linkedin-icon,
.linkedin-profile-card .profile-arrow {
  transform: translateZ(16px);
}
.social-links a {
  transition: transform .25s,color .25s;
}
.social-links a:hover {
  transform: translateY(-3px);
}

/* Subtle technical graphics behind the toolkit, with readable foreground text. */
.expertise-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.expertise-section::before {
  content: '';
  position: absolute;
  inset: 0 0 0 35%;
  z-index: -1;
  opacity: .055;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247,245,241,.75) 1px,transparent 1px),
    linear-gradient(90deg,rgba(247,245,241,.75) 1px,transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 80% 20%,#000,transparent 73%);
  mask-image: radial-gradient(ellipse at 80% 20%,#000,transparent 73%);
}
.skill-group {
  transition: border-color .3s,transform .3s;
}
.skill-group:hover {
  border-color: rgba(233,99,63,.8);
  transform: translateY(-4px);
}
.skill-tags li {
  transition: transform .25s,border-color .25s,background .25s;
}
.skill-tags li:hover {
  transform: translateY(-2px);
  border-color: rgba(233,99,63,.7);
  background: rgba(247,245,241,.055);
}
.experience-entry {
  position: relative;
  padding-left: 26px;
}
.experience-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: var(--paper);
}
.experience-entry::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 43px;
  bottom: 20px;
  width: 1px;
  background: var(--line);
}

/* A decorative, code-native orbital check: quality engineering in motion. */
.process-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.process-section > .section-top,
.process-section > h2,
.process-section > .process-grid {
  position: relative;
  z-index: 1;
}
.process-section > h2 {
  max-width: 81%;
}
.orbital-art {
  position: absolute;
  width: 220px;
  height: 220px;
  right: 64px;
  top: 156px;
  perspective: 900px;
  pointer-events: none;
  opacity: .85;
}
.orbital-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateZ(-12deg);
}
.orbit-ring {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(233,99,63,.63);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(233,99,63,.07);
}
.orbit-ring-a {
  transform: rotateX(64deg) rotateY(-15deg);
  animation: orbit-a 22s linear infinite;
}
.orbit-ring-b {
  border-color: rgba(247,245,241,.42);
  transform: rotateX(-58deg) rotateY(47deg);
  animation: orbit-b 29s linear infinite;
}
.orbit-ring-c {
  border-color: rgba(233,99,63,.33);
  transform: rotateX(15deg) rotateY(75deg);
  animation: orbit-c 34s linear infinite;
}
.orbit-core {
  position: absolute;
  left: calc(50% - 34px);
  top: calc(50% - 34px);
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid #f6b29c;
  border-radius: 18px;
  color: var(--paper);
  background: linear-gradient(135deg,#f58763,#ce512e);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.3),8px 9px 0 rgba(145,51,30,.65),0 26px 30px rgba(0,0,0,.4);
  transform: translateZ(30px) rotateY(20deg) rotateX(-10deg);
  animation: core-float 6s ease-in-out infinite alternate;
}
.orbit-core svg {
  width: 43px;
  height: 43px;
}
.orbit-node {
  position: absolute;
  left: calc(50% - 4px);
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 15px rgba(233,99,63,.5);
}
.orbit-node-a {
  transform: rotateZ(25deg) translateX(104px);
  animation: node-orbit 24s linear infinite;
}
.orbit-node-b {
  width: 5px;
  height: 5px;
  background: var(--paper);
  transform: rotateZ(195deg) translateX(104px);
  animation: node-orbit-b 31s linear infinite reverse;
}
.orbital-art * {
  animation-play-state: paused;
}
.orbital-art.is-in-view * {
  animation-play-state: running;
}
.process-step {
  position: relative;
}
.process-step::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 26px;
  height: 3px;
  background: var(--orange);
  transition: width .4s;
}
.process-step:hover::before {
  width: 70px;
}

/* A tactile final call to action and a short project-opening transition. */
.contact-circle {
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 7px 0 #bd492f,0 20px 30px rgba(32,32,32,.12);
}
.contact-circle:hover {
  box-shadow: 0 12px 0 #bd492f,0 27px 35px rgba(32,32,32,.14);
}
.contact-circle:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #bd492f,0 10px 18px rgba(32,32,32,.1);
}
#project-dialog[open] .dialog-frame {
  animation: project-open .4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes project-open {
  from { opacity: 0; transform: perspective(1200px) translateY(15px) rotateX(3deg); }
  to { opacity: 1; transform: perspective(1200px) translateY(0) rotateX(0); }
}
@keyframes orbit-a {
  0% { transform: rotateX(64deg) rotateY(-15deg) rotateZ(0); }
  50% { transform: rotateX(50deg) rotateY(25deg) rotateZ(180deg); }
  100% { transform: rotateX(64deg) rotateY(-15deg) rotateZ(360deg); }
}
@keyframes orbit-b {
  0% { transform: rotateX(-58deg) rotateY(47deg) rotateZ(0); }
  50% { transform: rotateX(-44deg) rotateY(70deg) rotateZ(-180deg); }
  100% { transform: rotateX(-58deg) rotateY(47deg) rotateZ(-360deg); }
}
@keyframes orbit-c {
  0% { transform: rotateX(15deg) rotateY(75deg) rotateZ(0); }
  50% { transform: rotateX(45deg) rotateY(58deg) rotateZ(180deg); }
  100% { transform: rotateX(15deg) rotateY(75deg) rotateZ(360deg); }
}
@keyframes core-float {
  to { transform: translateZ(38px) translateY(-7px) rotateY(12deg) rotateX(-5deg); }
}
@keyframes node-orbit {
  to { transform: rotateZ(385deg) translateX(104px); }
}
@media (max-width: 1100px) {
  .orbital-art { width: 180px; height: 180px; right: 40px; top: 145px; }
}
@media (max-width: 800px) {
  .orbital-art { display: none; }
  .process-section > h2 { max-width: 100%; }
}
@media (max-width: 600px) {
  .portrait-orbit { top: 16%; }
  .floating-top { width: 38px; height: 38px; bottom: 16px; right: 15px; font-size: 20px; }
  .about-photo-wrap { box-shadow: 9px 12px 0 #e9e4da,0 20px 30px rgba(32,32,32,.06); }
  .about-photo-wrap::after { width: 34px; height: 34px; top: -9px; right: -9px; }
  .experience-entry { padding-left: 23px; }
}
html.no-motion *,
html.no-motion *::before,
html.no-motion *::after {
  animation: none !important;
  transition: none !important;
}
html.no-motion .depth-card {
  transform: none !important;
}
html.no-motion .skill-group:hover,
html.no-motion .skill-tags li:hover {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .depth-card { transform: none !important; }
  .orbital-art * { animation: none !important; }
  .skill-group:hover, .skill-tags li:hover { transform: none; }
}


@keyframes node-orbit-b {
  to { transform: rotateZ(555deg) translateX(104px); }
}
html.no-motion .box-shell {
  transform: rotateX(7deg) rotateY(-13deg) !important;
}
html.no-motion .project-box:hover .project-icon,
html.no-motion .project-box:focus-visible .project-icon {
  transform: rotate(-5deg);
}
html.no-motion .button-orange:hover,
html.no-motion .button-orange:active,
html.no-motion .button-orange:hover > span,
html.no-motion .header-contact:hover > span,
html.no-motion .text-link:hover > span:last-child,
html.no-motion .social-links a:hover,
html.no-motion .contact-circle:hover,
html.no-motion .contact-circle:active,
html.no-motion .floating-top:hover {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .project-box:hover .project-icon,
  .project-box:focus-visible .project-icon {
    transform: rotate(-5deg);
  }
  .button-orange:hover, .button-orange:active,
  .button-orange:hover > span, .header-contact:hover > span,
  .text-link:hover > span:last-child, .social-links a:hover,
  .contact-circle:hover, .contact-circle:active, .floating-top:hover {
    transform: none;
  }
}
