/* Home and About refinements that preserve the Adobe Portfolio layout. */

:root {
  --timeline-year: 9.090909%;
  --timeline-line: rgba(255, 255, 255, 0.16);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  padding: 10px 14px;
  color: #000;
  background: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-header {
  border-bottom: 0;
}

.site-header .lang-btn.is-active,
.site-header .lang-btn.active {
  color: var(--text);
  font-weight: 700;
}

.logo-wrap img {
  aspect-ratio: 1;
  object-fit: contain;
}

.project-card-inner {
  background: #111;
}

.project-card-overlay {
  backdrop-filter: blur(1px);
}

.project-card--award {
  z-index: 1;
}

.project-card--award .project-card-inner {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.project-card--award .project-card-image {
  border-radius: inherit;
}

.project-card--award .project-card-award {
  position: absolute;
  display: block;
  z-index: 3;
  top: clamp(-14px, -0.8vw, -8px);
  right: clamp(-10px, -0.55vw, -5px);
  width: clamp(44px, 4.8vw, 72px);
  height: auto;
  max-width: none;
  margin: 0;
  outline: 0;
  filter:
    drop-shadow(0 7px 5px rgba(0, 0, 0, .34))
    drop-shadow(0 16px 15px rgba(0, 0, 0, .30));
  pointer-events: none;
  transform-origin: 58% 45%;
  transform-style: preserve-3d;
  will-change: transform;
  animation: project-award-float 5.8s ease-in-out infinite alternate;
  transition: filter 360ms cubic-bezier(.2, .8, .2, 1);
}

.project-card--award:hover .project-card-award,
.project-card--award:focus-visible .project-card-award {
  filter:
    drop-shadow(0 9px 7px rgba(0, 0, 0, .38))
    drop-shadow(0 21px 20px rgba(0, 0, 0, .34));
  animation-duration: 4.2s;
}

@keyframes project-award-float {
  from {
    transform: perspective(760px) translate3d(0, 1px, 12px) rotateX(5deg) rotateY(-12deg) rotateZ(-5deg) scale(.985);
  }

  to {
    transform: perspective(760px) translate3d(-2px, -5px, 24px) rotateX(1deg) rotateY(-5deg) rotateZ(-2deg) scale(1.015);
  }
}

.project-card--award .project-card-overlay {
  z-index: 2;
}

.project-card:focus-visible {
  outline-offset: -3px;
}

@media (max-width: 540px) {
  .project-card--award .project-card-award {
    top: -9px;
    right: 8px;
    width: clamp(48px, 15vw, 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card--award .project-card-award {
    animation: none;
    transform: perspective(760px) rotateX(3deg) rotateY(-8deg) rotateZ(-3deg);
    transition-duration: .01ms;
  }
}

.about-section {
  padding-bottom: 88px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(330px, 38%) minmax(0, 62%);
  gap: clamp(36px, 5vw, 88px);
  align-items: start;
}

.about-visual {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  min-width: 0;
}

.about-parallax {
  position: relative;
  width: min(80%, 460px);
  aspect-ratio: 3584 / 4800;
  margin-inline: auto;
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: transform;
}

.about-parallax-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

.about-parallax-layer img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  transition: opacity 500ms ease;
  -webkit-user-drag: none;
}

.about-parallax-layer img.is-loaded {
  opacity: 1;
}

.about-parallax-layer[data-shadow="true"] img {
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.about-text {
  padding-top: clamp(8px, 2vw, 24px);
}

.about-text .about-intro {
  max-width: none;
  font-size: clamp(40px, 3.35vw, 60px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.about-intro-line,
.experience-intro span {
  display: block;
}

.about-intro-line {
  white-space: nowrap;
}

.about-text p {
  max-width: 880px;
  text-wrap: pretty;
}

.about-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--timeline-line);
  font-size: 17px;
}

.experience-section {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--timeline-line);
}

.experience-heading {
  display: grid;
  grid-template-columns: minmax(310px, 38%) 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
}

.experience-heading h2 {
  font-size: clamp(34px, 4.25vw, 62px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.experience-heading p {
  max-width: 640px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.42;
  text-wrap: pretty;
}

.experience-ruler,
.experience-summary {
  display: grid;
  grid-template-columns: minmax(205px, 24%) minmax(205px, 25%) minmax(360px, 1fr) 40px;
  gap: 16px;
}

.experience-ruler {
  padding: 0 14px 9px;
  color: var(--text-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.experience-years {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
}

.experience-years span:last-child {
  text-align: right;
}

.experience-list {
  display: grid;
  gap: 6px;
}

.experience-item {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.experience-item:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.13), 0 12px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.experience-item[open] {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.13), 0 16px 42px rgba(0, 0, 0, 0.22);
}

.experience-summary {
  position: relative;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.experience-summary::-webkit-details-marker {
  display: none;
}

.experience-company {
  font-size: 17px;
  font-weight: 700;
  text-wrap: balance;
}

.experience-role {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
}

.experience-track {
  position: relative;
  height: 34px;
  overflow: hidden;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.012);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--timeline-year) - 1px),
    rgba(255, 255, 255, 0.06) calc(var(--timeline-year) - 1px),
    rgba(255, 255, 255, 0.06) var(--timeline-year)
  );
}

.experience-bar {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: calc(var(--from) * var(--timeline-year));
  width: calc(var(--span) * var(--timeline-year));
  min-width: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.experience-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-size: 20px;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.experience-item[open] .experience-toggle {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  transform: rotate(45deg);
}

.experience-summary:active .experience-toggle {
  transform: scale(0.96);
}

.experience-item[open] .experience-summary:active .experience-toggle {
  transform: rotate(45deg) scale(0.96);
}

.experience-item[open] .experience-bar,
.experience-summary:hover .experience-bar {
  background: linear-gradient(90deg, var(--accent), #6175ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 0 22px rgba(33, 60, 255, 0.28);
  transform: scaleY(1.08);
}

.experience-details {
  display: grid;
  grid-template-columns: minmax(205px, 24%) minmax(205px, 25%) minmax(360px, 1fr) 40px;
  gap: 16px;
  padding: 0 14px 16px;
}

.experience-details p {
  grid-column: 2 / 4;
  max-width: 760px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.experience-mobile-date {
  display: none;
}

.site-footer--compact {
  padding-top: 6px;
  padding-bottom: 32px;
}

.footer-social {
  gap: 10px;
}

.footer-social a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.footer-social a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  opacity: 1;
}

.footer-social a:active {
  transform: scale(0.96);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .about-layout {
    grid-template-columns: minmax(290px, 37%) minmax(0, 63%);
    gap: 36px;
  }

  .experience-ruler,
  .experience-summary,
  .experience-details {
    grid-template-columns: minmax(180px, 24%) minmax(190px, 27%) minmax(300px, 1fr) 40px;
  }
}

@media (max-width: 932px) {
  .mobile-nav .lang-toggle {
    display: flex;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-visual {
    position: relative;
    top: 0;
  }

  .about-parallax {
    width: min(66vw, 420px);
  }

  .about-text .about-intro {
    font-size: clamp(38px, 5.1vw, 48px);
  }

  .experience-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .experience-ruler {
    display: none;
  }

  .experience-summary {
    grid-template-columns: minmax(150px, 0.75fr) minmax(200px, 1fr) 1.4fr 40px;
  }

  .experience-details {
    grid-template-columns: minmax(150px, 0.75fr) minmax(200px, 1fr) 1.4fr 40px;
  }
}

@media (max-width: 640px) {
  .about-section {
    padding-bottom: 56px;
  }

  .about-parallax {
    width: min(70vw, 360px);
    margin-inline: auto;
  }

  .about-text .about-intro {
    font-size: 34px;
    line-height: 1.08;
  }

  .about-intro-line {
    white-space: normal;
  }

  .about-contact {
    display: grid;
    gap: 10px;
    font-size: 16px;
  }

  .experience-section {
    margin-top: 60px;
  }

  .experience-heading h2 {
    font-size: 42px;
  }

  .experience-summary {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
    min-height: 0;
    padding: 13px 14px;
  }

  .experience-company,
  .experience-role,
  .experience-mobile-date {
    grid-column: 1;
  }

  .experience-role {
    margin-top: 2px;
  }

  .experience-mobile-date {
    display: block;
    color: var(--text-subtle);
    font-size: 12px;
  }

  .experience-track {
    display: none;
  }

  .experience-toggle {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }

  .experience-details {
    display: block;
    padding: 0 56px 16px 14px;
  }

  .experience-details p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page-content,
  .about-parallax,
  .about-parallax-layer,
  .experience-bar,
  .experience-toggle,
  .experience-item,
  .footer-social a,
  .mobile-nav,
  .hamburger-btn span {
    animation: none !important;
    transition: none !important;
  }
}
