.timeline-hero {
  --tl-ink: #262c2b;
  --tl-muted: #747d79;
  --tl-line: #d5dbd5;
  --tl-teal: #40b5ad;
  --tl-teal-deep: #23776f;
  --tl-teal-soft: #d3ebe7;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-top: 24px;
  padding-bottom: clamp(56px, 8vw, 110px);
}
.tl-topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding-bottom: 0;
  color: var(--tl-muted);
  font-size: 13px;
  letter-spacing: .025em;
}
.tl-timecode {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 10px;
  color: var(--tl-ink);
  font: 13px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.tl-record {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tl-teal);
}
.tl-main {
  flex: initial;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 3vw, 48px) 0 0;
}
.timeline-hero h1 {
  max-width: 17em;
  margin: 0;
  color: var(--tl-ink);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.tl-line {
  display: block;
  position: relative;
  will-change: opacity, transform;
}
.timeline-hero.tl-is-live .tl-line {
  opacity: 0;
  transform: translateY(.26em);
}
.tl-highlight {
  color: #5ac0b8;
}
.tl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: clamp(22px, 3vh, 36px);
}
.tl-cta {
  display: inline-flex;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 6px;
  background: var(--tl-ink);
  color: var(--paper);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  transition: background .2s ease, transform .2s ease;
}
.tl-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(90, 192, 184, .42) 49%, transparent 64%);
  transform: translateX(-130%);
  animation: tl-cta-sheen 4.8s cubic-bezier(.45, 0, .2, 1) infinite;
}
.tl-cta svg,
.tl-cta span { position: relative; z-index: 1; }
@keyframes tl-cta-sheen {
  0%, 52% { transform: translateX(-130%); }
  76%, 100% { transform: translateX(130%); }
}
.tl-cta:hover {
  background: var(--tl-teal-deep);
  transform: translateY(-2px);
}
.tl-cta svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.tl-portfolio-link {
  color: var(--tl-ink);
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
.tl-cta:focus-visible,
.tl-portfolio-link:focus-visible {
  outline: 3px solid var(--tl-teal-deep);
  outline-offset: 4px;
}
.tl-timeline {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  padding-top: 18px;
  user-select: none;
}
.tl-ruler {
  grid-column: 2;
  position: relative;
  height: 22px;
  border-bottom: 1px solid var(--tl-line);
}
.tl-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 5px;
  background: var(--tl-muted);
  opacity: .6;
}
.tl-tick.tl-big { height: 10px; }
.tl-tick-label {
  position: absolute;
  bottom: 12px;
  transform: translateX(3px);
  color: var(--tl-muted);
  font: 10px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.tl-label {
  display: flex;
  align-items: center;
  height: 28px;
  color: var(--tl-muted);
  font: 11px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.tl-track {
  position: relative;
  height: 28px;
  margin: 3px 0;
}
.tl-layer {
  position: absolute;
  inset: 0;
}
.tl-layer.tl-ghost { opacity: .35; }
.tl-layer.tl-live { clip-path: inset(0 100% 0 0); }
.tl-clip {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
.tl-clip.tl-dark { background: var(--tl-ink); }
.tl-clip.tl-teal { background: var(--tl-teal); }
.tl-clip.tl-soft {
  background: var(--tl-teal-soft);
  box-shadow: inset 0 0 0 1px var(--tl-teal);
}
.tl-ghost .tl-clip {
  background: transparent !important;
  box-shadow: inset 0 0 0 1px var(--tl-muted);
}
.tl-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}
.tl-wave i {
  flex: 1;
  min-width: 1px;
  border-radius: 1px;
  background: var(--tl-teal-deep);
}
.tl-ghost .tl-wave i { background: var(--tl-muted); }
.tl-playhead-area {
  position: absolute;
  top: 22px;
  right: 0;
  bottom: 0;
  left: 38px;
  pointer-events: none;
}
.tl-playhead {
  position: absolute;
  top: -22px;
  bottom: 0;
  width: 0;
  will-change: transform;
}
.tl-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -.5px;
  width: 1px;
  background: var(--tl-teal-deep);
}
.tl-playhead::after {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  width: 12px;
  height: 12px;
  background: var(--tl-teal-deep);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
@media (max-width: 700px) {
  .timeline-hero {
    min-height: 0;
    padding-top: 18px;
    padding-bottom: 58px;
  }
  .tl-topbar {
    gap: 8px;
    font-size: clamp(10px, 2.6vw, 12px);
  }
  .tl-timecode {
    gap: 6px;
    font-size: clamp(10px, 2.6vw, 12px);
  }
  .tl-main {
    padding-top: 26px;
    padding-bottom: 0;
  }
  .timeline-hero h1 {
    font-size: clamp(2.05rem, 8.7vw, 3.8rem);
    line-height: 1.1;
    letter-spacing: -.03em;
  }
  .tl-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 17px;
    margin-top: 30px;
  }
  .tl-cta,
  .tl-portfolio-link {
    width: 100%;
    text-align: center;
  }
  .tl-portfolio-link { font-size: 14px; }
  .tl-timeline { padding-top: 12px; }
}
@media (max-width: 360px) {
  .tl-topbar { font-size: 10px; }
  .tl-timecode { font-size: 10px; }
  .timeline-hero h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-cta,
  .tl-cta::before { transition: none; animation: none; }
}

/* Keep the transition from the hero to the introduction compact. */
.timeline-hero {
  padding-bottom: clamp(34px, 4vw, 58px);
}
#about.about {
  padding-top: clamp(52px, 5vw, 62px);
}
@media (max-width: 700px) {
  .timeline-hero { padding-bottom: 38px; }
  #about.about { padding-top: 42px; }
}

/* Refine portrait scale and remove excessive vertical gaps between sections. */
#about .portrait {
  width: 175px;
  height: 205px;
}
#about.about { padding-bottom: 48px; }
#services.section {
  padding-top: 54px;
  padding-bottom: 48px;
}
#portfolio.portfolio {
  padding-top: 36px;
  padding-bottom: 48px;
}
.motion-design {
  padding-top: 56px;
}
@media (max-width: 700px) {
  #about .portrait {
    width: 94px;
    height: 107px;
  }
  #about.about { padding-bottom: 36px; }
  #services.section {
    padding-top: 44px;
    padding-bottom: 44px;
  }
  #portfolio.portfolio {
    padding-top: 32px;
    padding-bottom: 40px;
  }
  .motion-design { padding-top: 48px; }
}

/* Keep the transition from the Behance cases to pricing concise. */
.motion-design { padding-bottom: 48px; }
#pricing.pricing { padding-top: 48px; }
@media (max-width: 700px) {
  .motion-design { padding-bottom: 44px; }
  #pricing.pricing { padding-top: 36px; }
}

/* Service layout after removing numerical labels. */
.service {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
@media (max-width: 700px) {
  .service {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .service p { grid-column: 1; }
}

/* Mobile repair: services use distinct grid rows and the portrait precedes the introduction. */
@media (max-width: 700px) {
  #about.about { gap: 34px; }
  #about .about-side {
    align-items: flex-start;
    gap: 18px;
  }
  #about .portrait {
    width: 142px;
    height: 161px;
    flex: 0 0 auto;
  }
  .service {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 14px;
  }
  .service h3 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  .service p {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    max-width: none;
  }
}

/* Mobile alignment for the profile introduction and service list. */
@media (max-width: 700px) {
  #about.about { gap: 18px; }
  #about .about-side {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 18px;
  }
  .service {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 14px !important;
  }
  .service h3 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    max-width: none !important;
    white-space: nowrap;
  }
  .service p {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0;
  }
}

/* Showreel: use the supplied poster whenever playback is paused. */
.motion-reel:not(.is-playing) video {
  opacity: 0;
  pointer-events: none;
}
.motion-reel video {
  transition: opacity .24s ease;
}
.motion-main-play svg {
  padding: 15px;
  display: grid;
  place-items: center;
}
.motion-main-play svg path {
  transform: translateX(-1.5px);
  transform-origin: center;
}

/* Contact call to action: one typographic line and a refined Telegram control. */
#contact .contact-copy {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 22px;
}
#contact .contact-subtitle {
  color: #fff;
  white-space: nowrap;
}
#contact .telegram-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 58px;
  padding: 18px 26px;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: linear-gradient(118deg, #319f98 0%, #40b5ad 54%, #51c8bf 100%);
  color: #fff;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 10px 28px rgba(64,181,173,.22), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
#contact .telegram-cta::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255,255,255,.13), transparent 36%, rgba(255,255,255,.08));
}
#contact .telegram-cta:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 16px 36px rgba(64,181,173,.34), inset 0 1px 0 rgba(255,255,255,.34);
}
#contact .telegram-cta .telegram-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}
#contact .contact-behance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #bbc4bf;
}
@media (max-width: 700px) {
  #contact .contact-copy {
    gap: 6px 14px;
  }
  #contact .contact-subtitle {
    white-space: normal;
  }
  #contact .telegram-cta {
    min-height: 56px;
    padding: 17px 23px;
  }
}

/* Mobile: service titles and descriptions must occupy separate full-width rows. */
@media (max-width: 700px) {
  #services .service {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 14px !important;
  }
  #services .service h3 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
    max-width: none !important;
    white-space: normal;
  }
  #services .service p {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Services: remove the vacant number column at every screen width. */
#services .service {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  column-gap: 46px;
  row-gap: 18px;
}
#services .service h3 {
  grid-column: 1;
  max-width: none;
}
#services .service p {
  grid-column: 2;
  max-width: none;
}
@media (max-width: 700px) {
  #services .service {
    grid-template-columns: minmax(0, 1fr) !important;
    column-gap: 0;
    row-gap: 14px;
  }
  #services .service h3,
  #services .service p {
    grid-column: 1 !important;
  }
}

/* Three portfolio videos fill the carousel evenly after the empty fourth card was removed. */
@media (min-width: 701px) {
  #portfolio .portfolio-track {
    justify-content: center;
  }
  #portfolio .project {
    flex: 0 1 calc((100% - 44px) / 3);
    min-width: 0;
  }
}

/* Portfolio captions now sit directly above the player controls. */
#portfolio .project--showcase-video .project-info { bottom: 76px; }

/* Give the rear Behance image a distinct card edge against the dark background. */
#motion-design .behance-cover--back {
  outline: 8px solid #26312f;
  outline-offset: 5px;
  border: 1px solid rgba(143,207,201,.3);
}

/* Contact title uses a deliberate headline-and-response hierarchy. */
#contact .contact-copy {
  align-items: flex-end;
  gap: 0 18px;
}
#contact .contact-copy h2 {
  margin: 0;
  font-size: clamp(56px, 6.2vw, 92px);
}
#contact .contact-subtitle {
  padding-bottom: .14em;
  font-size: clamp(27px, 3.1vw, 46px);
  line-height: 1;
  letter-spacing: -.045em;
}
#contact .contact-behance svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
@media (max-width: 700px) {
  #portfolio .project--showcase-video .project-info { bottom: 76px; }
  #contact .contact-copy { align-items: baseline; gap: 8px 14px; }
  #contact .contact-subtitle { padding-bottom: 0; }
}
