@font-face {
    font-family: 'MyFont';
    src: url('fonts/Myfont-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --page-x: 10%;
    --section-top: 56px;
    --section-bottom: 80px;
    --content-max: 1120px;
    --accent: #d32b31;
    --paper: #fff4f4;
    --ink: #333;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --reveal-duration: 1s;
    --reveal-delay-scale: 1;
    --tip-duration: 8s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'MyFont', sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    z-index: 0;
    margin: 0;
    line-height: 1.35;
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    overflow-y: auto;
}

@supports not (overflow: clip) {
    body {
        overflow-x: hidden;
    }

    html {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

img {
    max-width: 100%;
}

.home-skeleton {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

html.is-skeleton-loading,
html.is-skeleton-loading body {
    overflow: hidden;
}

html.is-skeleton-loading body > :not(.main) {
    visibility: hidden;
}

.home-skeleton.is-hidden {
    opacity: 0;
    visibility: hidden;
}

html.is-skeleton-loading .main > .main-left,
html.is-skeleton-loading .main > .options {
    visibility: hidden;
    pointer-events: none;
}

.skeleton-welcome-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    display: inline-block;
    isolation: isolate;
    overflow: visible;
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(-50%, -50%, 0);
    backface-visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.home-skeleton.is-intro-active .skeleton-welcome-mark {
    opacity: 1;
    visibility: visible;
}

.skeleton-welcome-letters {
    position: relative;
    z-index: 0;
    display: inline-block;
}

.skeleton-welcome-orbit {
    position: absolute;
    z-index: 10;
    top: -0.85em;
    left: calc(100% - 2.3em);
    width: 2.7em;
    height: 2.7em;
    overflow: visible;
    transform-origin: 50% 50%;
    transform: rotate(0deg);
    will-change: transform;
}

.skeleton-welcome-dot {
    position: absolute;
    z-index: 1;
    top: 1.57em;
    left: 2.38em;
    width: 0.13em;
    height: 0.13em;
    border-radius: 50%;
    background-color: var(--accent);
    transform-origin: center;
    will-change: transform;
}

.skeleton-welcome-orbit.is-landing {
    z-index: 20;
    overflow: visible;
    clip-path: none;
    -webkit-mask-image: none;
    mask-image: none;
    contain: none;
}

.home-skeleton-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(48%, 520px);
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.home-skeleton-options {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    width: min(46%, 560px);
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.home-skeleton.is-skeleton-active .skeleton-welcome-mark {
    opacity: 0;
    visibility: hidden;
}

.home-skeleton.is-skeleton-active .home-skeleton-left,
.home-skeleton.is-skeleton-active .home-skeleton-options {
    opacity: 1;
    visibility: visible;
}

.skeleton-block {
    position: relative;
    display: block;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(211, 43, 49, 0.12);
}

.skeleton-block::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.68) 48%, transparent 76%);
    transform: translateX(-110%);
    animation: skeletonShimmer 1.35s ease-in-out infinite;
}

.skeleton-name {
    width: min(92%, 440px);
    height: 92px;
    margin-bottom: var(--space-4);
}

.skeleton-portrait {
    width: min(360px, 100%);
    aspect-ratio: 41 / 44;
    margin-bottom: var(--space-4);
    border-radius: 44% 44% 24% 24%;
}

.skeleton-title {
    width: min(92%, 420px);
    height: 48px;
    margin-bottom: var(--space-2);
}

.skeleton-location {
    width: min(62%, 250px);
    height: 34px;
}

.skeleton-copy {
    display: grid;
    gap: 11px;
}

.skeleton-line {
    height: 28px;
}

.skeleton-line-full {
    width: 100%;
}

.skeleton-line-medium {
    width: 74%;
}

.skeleton-line-short {
    width: 58%;
}

.skeleton-nav {
    display: grid;
    justify-items: center;
    align-self: center;
    gap: var(--space-3);
    width: min(100%, 300px);
    margin-top: var(--space-1);
}

.skeleton-nav-line {
    width: 210px;
    max-width: 82%;
    height: 52px;
}

.skeleton-button {
    align-self: center;
    width: min(255px, 80%);
    height: 52px;
}

@keyframes skeletonShimmer {
    to { transform: translateX(110%); }
}

.back-to-top {
    --scroll-offset: 0px;
    position: fixed;
    top: clamp(16px, 2.5vw, 28px);
    left: clamp(16px, 2.5vw, 28px);
    z-index: 20;
    width: 52px;
    height: 68px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, calc(var(--scroll-offset) + 12px), 0);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    will-change: transform;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, var(--scroll-offset), 0);
}

.back-to-top img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    max-width: none;
    height: 60px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease;
}

.back-to-top:hover img {
    transform: translate(-50%, -50%) scale(1.08);
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(211, 43, 49, 0.55);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-left,
.options,
.home-copy,
.home-nav,
.home-actions,
.project-card,
.project-info,
.project-link,
.sticker-sheet,
.design-sticker,
.about-row,
.about-row .description,
#timeline {
    min-width: 0;
}

.main-left h1,
.main-left h2,
.options p,
#lang_p,
.project-info h2,
.project-info p,
.project-link span,
#whoIam p,
#timeline .note {
    max-width: 100%;
    overflow-wrap: break-word;
}

.page-section {
    min-height: 100vh;
    padding: var(--section-top) var(--page-x) var(--section-bottom);
    overflow-x: clip;
}

@supports (min-height: 100svh) {
    .page-section {
        min-height: 100svh;
    }
}

.skills-section {
    position: relative;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
}

.projects-section,
.designs-section,
.about-section {
    position: relative;
    isolation: isolate;
}

.designs-section::before {
    content: "";
    position: absolute;
    inset: 36px 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(
            to right,
            transparent 0 7.5%,
            rgba(169, 30, 39, 0.28) 7.5% calc(7.5% + 2px),
            transparent calc(7.5% + 2px) 100%
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0 30px,
            rgba(45, 73, 104, 0.29) 30px 32px
        );
}

.section-wave {
    position: absolute;
    top: 0;
    left: var(--page-x);
    right: var(--page-x);
    z-index: 4;
    height: 32px;
    color: var(--accent);
    pointer-events: none;
    opacity: 0.72;
}

.section-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.section-wave path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.skills-section .notname,
.skills-section #skill_tip,
.projects-section .notname,
.projects-grid,
.sticker-sheet,
.about-section .notname,
.about-section h2,
.about-row {
    position: relative;
    z-index: 3;
}

.skills-section .notname,
.skills-section #skill_tip,
.projects-section .notname {
    margin-left: var(--page-x);
    margin-right: var(--page-x);
}

.skills-section .notname {
    margin-bottom: var(--space-2);
}

.about-section .notname {
    width: min(100%, var(--content-max));
    margin-left: auto;
    margin-right: auto;
}

.main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(var(--space-3), 4vw, var(--space-6));
    padding-top: clamp(24px, 5vh, var(--section-top));
    padding-bottom: clamp(24px, 5vh, var(--section-top));
}

.main-left {
    width: min(48%, 520px);
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    position: relative;
}

.main-left h1 {
    position: relative;
    max-width: 100%;
    font-size: 80px;
    margin: 0 0 var(--space-4);
    opacity: 0;
    transform: translateX(-50px);
}

#pf_img {
    position: relative;
    display: block;
    width: 360px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 0 var(--space-4);
    opacity: 0;
    transform: translateY(50px);
}

.main-left h2 {
    position: relative;
    width: fit-content;
    max-width: 100%;
    font-size: 40px;
    margin: 0;
}

#title {
    margin-bottom: var(--space-2);
}

#location {
    font-size: 28px;
    margin: 0;
}

.notname {
    margin: 0 0 var(--space-4);
    opacity: 0;
    transform: translateX(-50px);
}

h1 {
    font-size: 80px;
    margin: 0 0 var(--space-4);
}

h2 {
    width: fit-content;
    font-size: 40px;
    margin: 0 0 var(--space-3);
    opacity: 0;
    transform: translateX(50px);
}

#lang_t {
  font-size: 1.08em;
}

#lang_p {
    margin-top: 0;
    text-align: left;
    font-size: 26px;
}

#skill_tip {
    --skill-tip-size: 44px;
    appearance: none;
    position: relative;
    display: grid;
    place-items: center;
    width: max-content;
    max-width: calc(100vw - var(--page-x) - var(--page-x));
    min-width: 0;
    min-height: var(--skill-tip-size);
    padding: 4px 16px;
    overflow: hidden;
    border: 2px solid var(--accent);
    border-radius: 999px;
    background: rgba(255, 244, 244, 0.92);
    color: var(--ink);
    font-family: inherit;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.005em;
    margin: 0;
    opacity: 0;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    box-shadow: none;
    isolation: isolate;
    will-change: width, height;
    transition:
      background-color 180ms ease,
      box-shadow 220ms ease;
}

.skill-tip-copy {
    grid-area: 1 / 1;
    display: block;
    min-width: 0;
    opacity: 1;
    text-align: center;
    transform: translateX(0) scale(1);
    transform-origin: center;
    transition:
      opacity 150ms ease 540ms,
      transform 320ms cubic-bezier(.22, 1, .36, 1) 540ms;
}

.skill-tip-question {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--accent);
    font-family: 'MyFont', sans-serif;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    opacity: 0;
    transform: scale(0.72);
    transform-origin: center;
    transition:
      opacity 130ms ease,
      transform 300ms cubic-bezier(.22, 1, .36, 1);
}

#skill_tip.is-collapsed {
    width: var(--skill-tip-size);
    height: var(--skill-tip-size);
    min-width: var(--skill-tip-size);
    min-height: var(--skill-tip-size);
    background-color: rgba(255, 244, 244, 0.96);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 3px 10px rgba(211, 43, 49, 0.12);
}

#skill_tip.is-collapsed .skill-tip-copy {
    opacity: 0;
    transform: translateX(-8px) scale(0.98);
    transition-delay: 0ms, 0ms;
}

#skill_tip.is-collapsed .skill-tip-question {
    opacity: 1;
    transform: scale(1);
    transition-delay: 540ms, 540ms;
}

#skill_tip.is-collapsed:hover {
    background-color: rgba(211, 43, 49, 0.07);
    box-shadow: 0 5px 14px rgba(211, 43, 49, 0.18);
}

#skill_tip.is-collapsed:focus-visible {
    outline: 3px solid rgba(211, 43, 49, 0.32);
    outline-offset: 3px;
}

.options {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(46%, 560px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}

.home-copy {
  display: grid;
  gap: var(--space-2);
  width: 100%;
}

.home-nav {
  display: grid;
  justify-items: center;
  align-self: center;
  gap: var(--space-3);
  width: fit-content;
  min-width: min(100%, 300px);
  margin: var(--space-1) 0 0;
}

.home-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.options p {
  font-weight: bold;
  text-align: left;
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: 30px;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translateX(-50px);
}

/*
 * Keep the complete home composition inside shorter desktop viewports.
 * Width-based sizing alone made the portrait, type and fixed spacing taller
 * than the visible page, so the final controls fell below the initial fold.
 */
@media (min-width: 993px) {
  .main-left h1 {
    font-size: clamp(56px, 9.8vh, 80px);
    margin-bottom: clamp(12px, 3vh, var(--space-4));
  }

  #pf_img {
    width: clamp(240px, 46vh, 360px);
    margin-bottom: clamp(12px, 3vh, var(--space-4));
  }

  .main-left h2 {
    font-size: clamp(28px, 5vh, 40px);
  }

  #title {
    margin-bottom: clamp(4px, 1.2vh, var(--space-2));
  }

  #location {
    font-size: clamp(22px, 3.5vh, 28px);
  }

  .options {
    gap: clamp(var(--space-2), 3vh, var(--space-4));
  }

  .home-copy {
    gap: clamp(var(--space-1), 1.5vh, var(--space-2));
  }

  .home-nav {
    gap: clamp(var(--space-1), 2vh, var(--space-3));
    margin-top: 0;
  }

  .options p {
    font-size: clamp(21px, 3.7vh, 30px);
  }

  #lang_p {
    font-size: clamp(19px, 3.2vh, 26px);
  }

}

/* Consolidated h3 rules */
.options h3 {
  position: relative;
  margin: 0;
  font-size: 45px;

  /* starting state */
  opacity: 0;
  transform: translateX(50px);

  /* allow hover scale once animation finishes */
  transition: transform 0.18s ease, opacity 0.18s ease;
  will-change: transform, opacity;
}

@media (hover: hover) and (pointer: fine) {
  .options h3:hover,
  .options h3.animation-finished:hover {
    transform: translateX(0) scale(1.05) !important;
  }
}

/* Class added by JS after animation completes — locks final state */
.options h3.animation-finished {
  animation: none !important;
  transform: translateX(0) !important;
  opacity: 1 !important;
}

.page-section.is-visible .main-left h1 {
    animation: slideInLeft var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.2s * var(--reveal-delay-scale));
}

.page-section.is-visible #pf_img {
    animation: slideInUp var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.4s * var(--reveal-delay-scale));
}

.page-section.is-visible h2 {
    animation: slideInRight var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.6s * var(--reveal-delay-scale));
}

.page-section.is-visible .notname {
    animation: slideInLeft var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.3s * var(--reveal-delay-scale));
}

.page-section.is-visible #skill_tip {
    animation: fadeInAndStay var(--tip-duration) ease-in-out forwards;
    animation-delay: calc(0.7s * var(--reveal-delay-scale));
}

.page-section.is-visible .options p {
    animation: slideInLeft var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.8s * var(--reveal-delay-scale));
}

.page-section.is-visible .options h3 {
    animation: slideInRight var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(1s * var(--reveal-delay-scale));
}

.page-section.is-visible .cv-wrap {
    animation: slideInUp var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(1.2s * var(--reveal-delay-scale));
}

.page-section.is-visible .project-card {
    animation: slideInUp var(--reveal-duration) cubic-bezier(.22,1,.36,1) forwards;
    animation-delay: calc(0.45s * var(--reveal-delay-scale));
}

.page-section.is-visible .design-sticker {
    opacity: 1;
    transform: rotate(var(--sticker-rotate)) scale(1);
}

/* links inside the h3 */
.options h3 a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
  padding-bottom: 4px;
  -webkit-tap-highlight-color: transparent;
}

/* Wavy underline effect */
.options h3 a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 10'%3E%3Cpath d='M0 5 C4 1.8 10 1.8 14 5 S24 8.2 28 5' fill='none' stroke='%23d32b31' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 28px 10px;
  transition: width 0.3s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .options h3:hover a {
    color: var(--accent);
  }

  .options h3:hover a::after {
    width: 100%;
  }

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


/* CV button: slide-in then hover scale works */
.cv-wrap {
  display: inline-block; /* necessary for transform to behave nicely */
  align-self: center;
  transform: translateY(50px);
  opacity: 0;
  /* keep wrapper from stealing pointer events from the button */
  -webkit-tap-highlight-color: transparent;
}

.cv-download {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}

.cv-download:focus-visible {
  outline: 3px solid rgba(211, 43, 49, 0.45);
  outline-offset: 5px;
}

/* button itself only handles hover scale (no sliding translate here) */
#cv_button {
  display: inline-block;
  font-family: 'MyFont', sans-serif;
  width: fit-content;
  margin-top: 0;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  padding: 12px;
  cursor: pointer;
  border: 2px solid #191919;
  border-radius: 8px;
  background-color: var(--accent);
  color: white;
  transition: transform 0.18s ease;
  transform-origin: center;
}

@media (min-width: 993px) {
  .options h3 {
    font-size: clamp(30px, 5.5vh, 45px);
  }

  #cv_button {
    padding: clamp(8px, 1.8vh, 12px);
    font-size: clamp(17px, 2.7vh, 20px);
  }
}

/* hover scales only the button */
.cv-wrap:hover #cv_button,
#cv_button:hover {
  transform: scale(1.1);
}

.red_txt{
  color: var(--accent);
}

.projects-grid {
  width: min(100%, var(--content-max));
  margin: var(--space-4) auto 0;
  display: grid;
  row-gap: clamp(64px, 7vw, 96px);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(240px, 1fr);
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  opacity: 0;
  transform: translateY(50px);
}

.project-card-large {
  grid-template-columns: minmax(320px, 600px) minmax(240px, 1fr);
}

.project-card-reverse {
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 400px);
}

.project-card-reverse.project-card-large {
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 600px);
}

.project-card-reverse .project-info {
  order: 1;
}

.project-card-reverse .project-media {
  order: 2;
  max-width: 400px;
  justify-self: end;
}

.project-card-large .project-media {
  max-width: 600px;
}

.project-media {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  box-sizing: border-box;
  overflow: hidden;
}

.project-media.is-image-loading,
.project-carousel-slide.is-image-loading {
    background-color: rgba(211, 43, 49, 0.09);
    background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.62) 48%, transparent 76%);
    background-repeat: no-repeat;
    background-size: 220% 100%;
    animation: projectImageShimmer 1.35s ease-in-out infinite;
}

.project-media.is-image-loading .project-img:not(.is-image-ready),
.project-carousel-slide.is-image-loading .project-img:not(.is-image-ready) {
    opacity: 0;
}

.project-img {
    transition: opacity 0.24s ease;
}

@keyframes projectImageShimmer {
    from { background-position: 180% 0; }
    to { background-position: -120% 0; }
}

.project-expand-trigger {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.project-expand-trigger:focus-visible {
  outline: 3px solid rgba(211, 43, 49, 0.7);
  outline-offset: 4px;
}

html.project-lightbox-open,
html.project-lightbox-open body {
  overflow: hidden;
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: clamp(56px, 7vw, 88px) clamp(12px, 4vw, 56px) clamp(20px, 4vw, 48px);
  background: rgba(22, 18, 18, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.project-lightbox[hidden] {
  display: none;
}

.project-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.project-lightbox-image {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - clamp(90px, 12vw, 140px));
  max-height: calc(100dvh - clamp(90px, 12vw, 140px));
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: center;
  will-change: transform;
}

.project-lightbox-image.is-zoomed {
  cursor: grab;
}

.project-lightbox-image.is-zoomed:active {
  cursor: grabbing;
}

.project-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(44px, 5vw, 58px);
  height: clamp(58px, 7vw, 76px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.project-lightbox-nav[hidden] {
  display: none;
}

.project-lightbox-prev {
  left: max(6px, env(safe-area-inset-left));
}

.project-lightbox-next {
  right: max(6px, env(safe-area-inset-right));
}

.project-lightbox-nav svg {
  width: 28px;
  height: 28px;
}

.project-lightbox-nav:hover {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.62);
  transform: translateY(-50%) scale(1.08);
}

.project-lightbox-nav:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.project-lightbox-status {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 2;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
}

.project-lightbox-status[hidden] {
  display: none;
}

.project-lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.project-lightbox-close svg {
  width: 24px;
  height: 24px;
}

.project-lightbox-close:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

.project-lightbox-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.project-media-wide {
  aspect-ratio: 16 / 9;
}

.project-media-doodle {
  aspect-ratio: 6 / 5;
}

.doodle-reveal {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-media-doodle .project-img {
  object-fit: cover;
  object-position: center;
}

.project-carousel {
  isolation: isolate;
  background: rgba(51, 51, 51, 0.08);
}

.project-carousel-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.project-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.project-carousel-track.is-resetting {
  transition: none;
}

.project-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
}

.project-carousel-tts .project-img {
  object-fit: cover;
}

[data-carousel-natural-size] .project-img {
  object-fit: contain;
}

[data-carousel-natural-size] {
  background: transparent;
  max-height: min(70vh, 480px);
}

.project-carousel-tts .project-img-align-top {
  object-position: center top;
}

.project-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95));
  transform: translateY(-50%) scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.project-carousel-prev {
  left: 10px;
}

.project-carousel-next {
  right: 10px;
}

.project-carousel-button svg {
  width: 24px;
  height: 24px;
}

.project-carousel-button:hover {
  transform: translateY(-50%) scale(1.12);
}

.project-carousel:hover .project-carousel-button,
.project-carousel-button:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.project-carousel:hover .project-carousel-button:hover {
  transform: translateY(-50%) scale(1.12);
}

.project-carousel-button:focus-visible,
.project-carousel-dot:focus-visible {
  outline: 3px solid rgba(211, 43, 49, 0.55);
  outline-offset: 3px;
}

.project-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(51, 51, 51, 0.72);
  transform: translateX(-50%);
}

.project-carousel-dot {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.project-carousel-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.project-carousel-dot[aria-current="true"]::before {
  background: var(--paper);
  transform: translate(-50%, -50%) scale(1.2);
}

.project-carousel:not(.is-ready) .project-carousel-button,
.project-carousel:not(.is-ready) .project-carousel-dots {
  visibility: hidden;
}

@media (hover: none) {
  .project-carousel-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
  }
}

.project-original-img {
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  mask-image: radial-gradient(circle 0 at 50% 50%, #000 0, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 0 at 50% 50%, #000 0, transparent 100%);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.doodle-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.doodle-reveal.is-doodle-reveal-ready .doodle-canvas {
  opacity: 1;
}

.doodle-reveal.is-image-loading .doodle-canvas {
  opacity: 0;
}

.project-info {
  border-left: 5px solid var(--accent);
  padding-left: var(--space-3);
  min-width: 0;
}

.project-info h2 {
  margin-bottom: var(--space-2);
}

.project-info p {
  margin: 0;
  font-size: 28px;
  color: #242424;
  overflow-wrap: break-word;
}

.project-stack {
  display: grid;
  gap: 10px;
  margin: var(--space-2) 0 0;
}

.project-stack-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.project-stack dt {
  padding-top: 7px;
  color: var(--accent);
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-stack dd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.project-stack dd span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 11px;
  border: 1px solid rgba(211, 43, 49, 0.5);
  border-radius: 999px;
  background: rgba(211, 43, 49, 0.13);
  color: #7d171b;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(211, 43, 49, 0.1);
}

.project-stack-row:first-child dd span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 8px rgba(211, 43, 49, 0.22);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  max-width: 100%;
  margin-top: var(--space-2);
  color: var(--ink);
  font-size: 22px;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.project-info > .project-link {
  margin-left: 0;
  margin-right: 0;
}

.project-link img,
.project-link svg {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.external-link-icon {
  color: var(--ink);
}

.project-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.project-link:focus-visible {
  outline: 3px solid rgba(211, 43, 49, 0.45);
  outline-offset: 4px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: var(--space-1) var(--space-3);
}

.sticker-sheet {
  position: relative;
  width: min(100%, var(--content-max));
  height: clamp(610px, calc(100svh - var(--section-top) - var(--section-bottom)), 820px);
  margin: 0 auto;
  isolation: isolate;
}

.design-sticker {
  --sticker-rotate: 0deg;
  --sticker-art-tilt-x: 0deg;
  --sticker-art-tilt-y: 0deg;
  --sticker-art-lift: 0px;
  position: absolute;
  display: block;
  min-width: 0;
  margin: 0;
  opacity: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: rotate(var(--sticker-rotate)) scale(0.86);
  transform-origin: center;
  perspective: 900px;
  filter:
    drop-shadow(3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(-3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 -3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 10px 8px rgba(72, 28, 34, 0.18));
  transition:
    opacity 460ms ease,
    transform 560ms cubic-bezier(.22, 1, .36, 1),
    filter 360ms ease;
}

.design-sticker > img {
  display: block;
  width: 100%;
  height: auto;
  transform:
    rotateX(var(--sticker-art-tilt-x))
    rotateY(var(--sticker-art-tilt-y))
    translateZ(var(--sticker-art-lift));
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 520ms cubic-bezier(.16, 1, .3, 1);
}

.design-sticker.is-art-tilting {
  --sticker-art-lift: 12px;
}

.design-sticker.is-art-tilting > img {
  transition-duration: 70ms;
}

.design-sticker.is-dragging > img {
  transform: none;
  transition-duration: 120ms;
}

.design-sticker-painter {
  --sticker-rotate: -8deg;
  top: 2%;
  left: -1%;
  z-index: 2;
  width: 36%;
  transition-delay: calc(0.08s * var(--reveal-delay-scale));
}

.design-sticker-billy {
  --sticker-rotate: -1.5deg;
  top: 12%;
  left: 21%;
  z-index: 3;
  width: 61%;
  transition-delay: calc(0.16s * var(--reveal-delay-scale));
}

.design-sticker-hand {
  --sticker-rotate: 9deg;
  top: 1%;
  right: 1%;
  z-index: 5;
  width: 20%;
  transition-delay: calc(0.2s * var(--reveal-delay-scale));
}

.design-sticker-flower {
  --sticker-rotate: -5deg;
  bottom: 7%;
  left: 38%;
  z-index: 5;
  width: 23%;
  transition-delay: calc(0.28s * var(--reveal-delay-scale));
}

.design-sticker-billy {
  filter: none;
}

.design-sticker-demon {
  --sticker-rotate: 7deg;
  bottom: 3%;
  left: 4%;
  z-index: 4;
  width: 25%;
  transition-delay: calc(0.24s * var(--reveal-delay-scale));
}

.design-sticker-joy {
  --sticker-rotate: -7deg;
  right: 3%;
  bottom: 3%;
  z-index: 4;
  width: 26%;
  transition-delay: calc(0.32s * var(--reveal-delay-scale));
}

@media (hover: hover) and (pointer: fine) {
  .page-section.is-visible .design-sticker:hover {
    z-index: 6;
    transform: translateY(-8px) rotate(var(--sticker-rotate)) scale(1.045);
    filter:
      drop-shadow(3px 0 0 #fff)
      drop-shadow(-3px 0 0 #fff)
      drop-shadow(0 3px 0 #fff)
      drop-shadow(0 -3px 0 #fff)
      drop-shadow(0 16px 11px rgba(72, 28, 34, 0.24));
  }

  .page-section.is-visible .design-sticker-billy:hover {
    filter: none;
  }
}

.design-sticker.is-drag-pending,
.design-sticker.is-dragging,
.design-sticker.is-drag-pending .ink-sketch-reveal,
.design-sticker.is-dragging .ink-sketch-reveal {
  cursor: grabbing;
}

.page-section.is-visible .design-sticker.is-dragging {
  z-index: 10;
  transform: translateY(-16px) rotate(0deg) scale(1.075);
  filter:
    drop-shadow(3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(-3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 -3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 24px 14px rgba(72, 28, 34, 0.3))
    brightness(1.03);
  transition-duration: 120ms;
  transition-delay: 0s;
}

.page-section.is-visible .design-sticker-billy.is-dragging {
  filter: drop-shadow(0 24px 14px rgba(72, 28, 34, 0.3)) brightness(1.03);
}

.page-section.is-visible .design-sticker.is-resticking {
  z-index: 9;
  animation: stickerRestick 440ms cubic-bezier(.2, .85, .3, 1) both;
  transition-delay: 0s;
}

@keyframes stickerRestick {
  0% {
    transform: translateY(-12px) rotate(0deg) scale(1.06);
  }
  58% {
    transform: translateY(3px) rotate(var(--sticker-rotate)) scale(0.97);
  }
  100% {
    transform: rotate(var(--sticker-rotate)) scale(1);
  }
}

.ink-sketch-reveal {
  --design-surface-color: transparent;
  --drawing-tilt-x: 0deg;
  --drawing-tilt-y: 0deg;
  --drawing-lift: 0px;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  border: 0;
  border-radius: 0;
  background-color: var(--design-surface-color);
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  perspective: 900px;
}

.ink-sketch-reveal.is-image-loading {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.72) 48%, transparent 76%);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  animation: projectImageShimmer 1.35s ease-in-out infinite;
}

.ink-sketch-reveal:focus-visible {
  outline: 4px solid rgba(211, 43, 49, 0.62);
  outline-offset: 5px;
}

.design-art,
.ink-sketch-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform:
    rotateX(var(--drawing-tilt-x))
    rotateY(var(--drawing-tilt-y))
    translateZ(var(--drawing-lift));
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.design-art {
  z-index: 1;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.design-ink-art {
  filter:
    drop-shadow(3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(-3px 0 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 -3px 0 rgba(255, 255, 255, 0.96))
    drop-shadow(0 10px 8px rgba(72, 28, 34, 0.18));
}

.ink-sketch-reveal.is-tilting {
  --drawing-lift: 12px;
}

.ink-sketch-reveal.is-tilting .design-art,
.ink-sketch-reveal.is-tilting .ink-sketch-canvas {
  transition-duration: 70ms;
}

.ink-sketch-reveal.is-image-loading .design-ink-art:not(.is-image-ready) {
  opacity: 0;
}

.ink-sketch-reveal.is-canvas-composited .design-ink-art {
  opacity: 0;
}

.design-sketch-source {
  visibility: hidden;
}

.ink-sketch-canvas {
  z-index: 2;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .design-art,
  .ink-sketch-canvas {
    transform: none;
    transition: opacity 0.24s ease;
  }
}

@media (max-width: 900px) {
  .design-sticker-painter {
    left: -3%;
    width: 42%;
  }

  .design-sticker-billy {
    left: 17%;
    width: 68%;
  }

  .design-sticker-hand {
    right: -2%;
    width: 23%;
  }

  .design-sticker-flower {
    bottom: 8%;
    left: 38%;
    width: 27%;
  }

  .design-sticker-demon {
    left: 2%;
    width: 29%;
  }

  .design-sticker-joy {
    right: 1%;
    width: 30%;
  }
}

@media (max-width: 600px) {
  .sticker-sheet {
    height: clamp(720px, 190vw, 860px);
    min-height: 0;
  }

  .design-sticker-painter {
    --sticker-rotate: -10deg;
    top: 1%;
    left: -10%;
    width: 62%;
  }

  .design-sticker-billy {
    --sticker-rotate: -1deg;
    top: 18%;
    left: 1%;
    width: 98%;
  }

  .design-sticker-hand {
    --sticker-rotate: 11deg;
    top: 1%;
    right: -9%;
    width: 36%;
  }

  .design-sticker-flower {
    --sticker-rotate: -6deg;
    bottom: 21%;
    left: 32%;
    width: 43%;
  }

  .design-sticker-demon {
    --sticker-rotate: 8deg;
    bottom: 2%;
    left: -8%;
    width: 47%;
  }

  .design-sticker-joy {
    --sticker-rotate: -8deg;
    right: -6%;
    bottom: 2%;
    width: 48%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .design-sticker {
    opacity: 1;
    transform: rotate(var(--sticker-rotate));
    transition: none;
  }

  .design-sticker > img {
    transform: none;
    transition: none;
  }
}

#location_icon {
    display: inline-block;
    font-size: 2rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: 
      transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
      filter 0.15s ease,
      text-shadow 0.15s ease;
    transform-origin: center bottom; /* makes transform pivot from bottom point */
  }

  #location_icon:focus-visible {
    outline: 3px solid rgba(211, 43, 49, 0.45);
    outline-offset: 4px;
    border-radius: 6px;
  }

@media (hover: hover) and (pointer: fine) {
  #location_icon:hover {
    animation: bounce;
    transform: scaleY(0.85) scaleX(1.1) translateY(2px); /* squish down slightly */
    filter: brightness(0.9); /* make it look pressed */
    text-shadow: 0 1px 0 #00000033; /* subtle depth shadow */
  }
}

#location_icon.animate {
  animation: bounce 0.3s ease-in-out 2;
}

@keyframes bounce {
  0% {
    transform: scaleY(1) scaleX(1) translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: scaleY(0.85) scaleX(1.1) translateY(2px);
    filter: brightness(0.9);
    text-shadow: 0 1px 0 #00000033;
  }
  100% {
    transform: scaleY(1) scaleX(1) translateY(0);
    filter: brightness(1);
  }
}

.about-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: flex-start;
  gap: var(--space-6);
  width: min(100%, var(--content-max));
  margin: 0 auto;
}

.about-row .description {
  min-width: 0;
  max-width: 900px;
}

#timeline {
  margin: 0;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

#timeline h2 {
  margin: 0 0 var(--space-2);
  text-align: center;
  width: 100%;
}

#timeline .note {
  margin: 0;
  text-align: center;
  font-size: 19px;
  line-height: 1.25;
  max-width: 300px;
}

#timeline .year {
  display: block;
  font-size: 16px;
  font-weight: bold;
}

#timeline .arrow {
  font-size: 33px;
  line-height: 1;
}

/* RESPONSIVE: Stack vertically on smaller screens */
@media (max-width: 1000px) {
  .about-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .about-row .description {
    max-width: 100%;
  }

  #timeline {
    margin-top: 0;
    width: min(100%, 320px);
  }

  #timeline .note {
    white-space: normal;
  }
}

#whoIam p {
    width: 100%;
    color: #242424;
    font-size: 26px;
    margin: 0 0 var(--space-3);
}


#skill_images {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
    gap: var(--space-3); /* space between images */
    justify-items: center; /* center images in each column */
    float: left;
    margin: 2%;
}

.skill_img {
    width: 50px;  /* adjust as needed */
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.skill_img:hover {
    transform: scale(1.2);
}


footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #333;
    color: white;
    display: flex;
    padding: 0 2%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

footer.footer-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

footer p {
    margin: 0;
    font-size: 16px;
}

.floating-contacts {
    position: fixed;
    top: 18px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    z-index: 20;
}

.floating-contacts .tooltip {
    margin-right: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

.floating-contacts .tooltip-text {
    bottom: auto;
    top: 125%;
    pointer-events: none;
    text-decoration: none;
}

.contact-action-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
    width: 18px;
    height: 18px;
    overflow: visible;
    color: var(--ink);
    stroke-width: 2.6;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-2px, 2px) scale(0.82);
    transform-origin: center;
    transition:
      opacity 0.16s ease,
      transform 0.16s ease,
      visibility 0s linear 0.16s;
}

.floating-contacts .tooltip:hover .contact-action-icon {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0) scale(1);
    transition-delay: 0s;
}

.floating-contacts .logos {
    filter: none;
}

.logos {
    width: 30px;
    height: auto;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.5));

}

.logos:hover {
    transform: scale(1.2);
}

#phone_logo {
    filter: invert(1);
}

.tooltip {
  margin-right: 15%;
    position: relative;
    display: inline-block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.18s ease, visibility 0s linear 0.18s;
    font-size: 20px;
    white-space: nowrap;
    z-index: 1;
}

.tooltip-text.show {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

#splatterCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

#skillsCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#skillPopup {
    display: none;
    position: absolute;
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-sizing: border-box;
    max-width: 300px;
    line-height: 1.25;
    overflow-wrap: break-word;
    z-index: 4;
}

#return {
    width: 70px;
    height: auto;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#return:hover {
    transform: scale(1.2);
}


/*Moving I*/
.letter-container {
  position: relative;
  display: inline-block;
  font-size: 1.1em; /* relative to h1 */
  vertical-align: 0.14em;
  z-index: 0;
}

.letter-container::before {
  content: "";
  position: absolute;
  left: -0.2em;
  top: -1.12em;
  width: 0.7em;
  height: 1.35em;
  pointer-events: auto;
  z-index: 4;
}

.dot_trunk,
.trunk_dot {
  position: absolute;
  pointer-events: none; /* so hover works on dot */
}

/* size & position relative to container */
.dot_trunk {
  width: 0.3em;
  height: 0.43em;
  transform: translate(-0.07em, -0.66em);
  z-index: 3;
  background-color: var(--paper);
}

.trunk_dot {
  width: 0.3em;
  height: 0.25em;
  transform: translate(-0.1em, -0.36em);
  z-index: 1;
  background-color: var(--paper);
}

/* moving dot */
.dot {
  position: absolute;
  transform: translate(-0.07em, -0.9em) rotate(180deg);
  z-index: 2;
}

/* optional trunk if you want visual trunk */
.trunk {
  position: absolute;
  transform: translate(-0.07em, -0.8em);
  z-index: 0;
}

@keyframes moveUp {
  0%   { transform: translate(-0.07em, -0.90em) rotate(180deg); }
  20%  { transform: translate(-0.12em, -0.95em) rotate(180deg); }
  40%  { transform: translate( -0.02em, -1.00em) rotate(180deg); }
  60%  { transform: translate(-0.1em, -1.05em) rotate(180deg); }
  80%  { transform: translate( 0.00em, -1.08em) rotate(180deg); }
  100% { transform: translate(-0.07em, -1.10em) rotate(180deg); }
}

@keyframes moveTrunk {
  0%   { transform: translate(-0.07em, -0.65em); }
  20%  { transform: translate(-0.12em, -0.71em); }
  40%  { transform: translate( -0.02em, -0.76em); }
  60%  { transform: translate(-0.1em, -0.81em); }
  80%  { transform: translate( 0.0em, -0.84em); }
  100% { transform: translate(-0.07em, -0.86em); }
}



/*Keyframes for animations*/

@keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInAndStay {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 1; }
}

@media (max-width: 992px) {
  :root {
    --page-x: 7%;
    --section-top: 44px;
  }

  .main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-5);
  }

  .home-skeleton {
    text-align: center;
  }

  .skeleton-welcome-mark {
    font-size: 42px;
  }

  .home-skeleton-left {
    width: 100%;
  }

  .home-skeleton-options {
    width: min(100%, 560px);
    align-items: center;
    gap: var(--space-3);
  }

  .skeleton-copy {
    width: 100%;
  }

  .main-left {
    width: 100%;
  }

  .main-left h1 {
    font-size: 60px;
  }

  .main-left h2 {
    font-size: 32px;
  }

  #pf_img {
    width: 320px;
  }

  .options p {
    text-align: left;
  }

  .options {
    width: min(100%, 560px);
    align-items: center;
    gap: var(--space-3);
  }

  .home-copy {
    width: min(100%, 560px);
  }

  .home-nav {
    gap: var(--space-2);
    margin-top: 0;
  }

  #lang_p {
    text-align: center;
  }

  .options h3 {
    font-size: 36px;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    justify-items: center;
    width: 100%;
  }

  .project-card-large,
  .project-card-reverse,
  .project-card-reverse.project-card-large {
    grid-template-columns: 1fr;
  }

  .project-card-reverse .project-media,
  .project-card .project-media {
    order: 1;
    justify-self: center;
  }

  .project-card-reverse .project-info,
  .project-card .project-info {
    order: 2;
  }

  .project-info {
    width: min(100%, 560px);
    padding-left: var(--space-3);
  }

  #timeline {
    margin-top: 0;
    width: min(100%, 320px);
  }

  /* Footer stays visible but smaller */
  footer {
    height: 45px;
    font-size: 14px;
  }
}


/* =======================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ======================================= */
@media (max-width: 768px) {
  :root {
    --page-x: 6%;
    --section-top: 34px;
    --section-bottom: 58px;
    --space-4: 28px;
    --space-5: 40px;
  }

  body {
    font-size: 14px;
  }

  .floating-contacts {
    top: 12px;
    right: 16px;
    gap: 12px;
  }

  .floating-contacts .tooltip {
    width: 36px;
    height: 36px;
  }

  .floating-contacts .tooltip-text {
    left: auto;
    right: 0;
    transform: none;
    max-width: calc(100vw - 32px);
    white-space: normal;
    font-size: 14px;
  }

  .logos {
    width: 28px;
  }

  .contact-action-icon {
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
  }

  .main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: var(--space-2);
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .home-skeleton {
    place-items: center;
    padding: 0;
  }

  .skeleton-name {
    width: min(76%, 360px);
    height: 52px;
    margin-bottom: var(--space-2);
  }

  .skeleton-portrait {
    width: 260px;
    margin-bottom: var(--space-3);
  }

  .skeleton-title {
    width: min(78%, 340px);
    height: 34px;
    margin-bottom: var(--space-1);
  }

  .skeleton-location {
    width: min(52%, 220px);
    height: 28px;
  }

  .home-skeleton-options {
    width: 100%;
  }

  .skeleton-copy {
    width: min(100%, 430px);
  }

  .skeleton-line {
    height: 22px;
  }

  .skeleton-nav {
    gap: var(--space-2);
    margin-top: 0;
  }

  .skeleton-nav-line {
    width: 170px;
    height: 38px;
  }

  .skeleton-button {
    height: 48px;
  }

  h1 {
    font-size: clamp(52px, 16vw, 72px);
    margin-bottom: var(--space-3);
  }

  .notname {
    margin-bottom: var(--space-3);
  }

  .main-left h1 {
    font-size: clamp(32px, 9.8vw, 48px);
    white-space: nowrap;
    margin-bottom: var(--space-1);
  }

  .main-left h2 {
    font-size: 28px;
  }

  #pf_img {
    width: 260px;
    margin-bottom: var(--space-2);
  }

  #title {
    margin-bottom: var(--space-1);
  }

  #location {
    font-size: 22px;
  }

  /* Stack main-left above options */
  .options {
    width: 100%;
    margin-top: 0;
    gap: var(--space-2);
  }

  .home-copy {
    justify-items: center;
    gap: var(--space-1);
  }

  .options p {
    font-size: 24px;
    text-align: left;
    width: min(100%, 430px);
  }

  .options h3 {
    font-size: 32px;
  }

  #lang_p {
    font-size: 22px;
    text-align: center;
  }

  .project-info p {
    font-size: 23px;
  }

  .projects-grid {
    width: 100%;
    max-width: 560px;
    margin-top: var(--space-4);
    row-gap: clamp(88px, 18vw, 120px);
  }

  .project-card,
  .project-card-large,
  .project-card-reverse,
  .project-card-reverse.project-card-large {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    justify-items: stretch;
    overflow: hidden;
  }

  .project-card-reverse .project-info,
  .project-card .project-info,
  .project-card-reverse .project-media,
  .project-card .project-media {
    order: initial;
  }

  .project-info {
    width: 100%;
    max-width: 100%;
    padding-left: var(--space-2);
  }

  .project-link {
    font-size: 20px;
    min-height: 44px;
  }

  .project-link span {
    min-width: 0;
  }

  .project-card .project-media,
  .project-card-reverse .project-media {
    width: 100%;
    max-width: min(100%, 340px);
    justify-self: center;
  }

  .project-card-large .project-media {
    max-width: min(100%, 520px);
  }

  .project-actions {
    width: 100%;
    justify-content: flex-start;
    gap: var(--space-1) var(--space-2);
  }

  #skill_tip {
    max-width: calc(100vw - var(--page-x) - var(--page-x));
    padding-inline: 14px;
    font-size: 18px;
    line-height: 1.3;
  }

  .skills-section,
  #skillsCanvas {
    touch-action: pan-y pinch-zoom;
  }

  #skillPopup {
    max-width: min(280px, calc(100vw - 32px));
    padding: 12px;
    font-size: 18px;
  }

  #whoIam p {
    font-size: 22px;
    margin-bottom: var(--space-2);
  }

  /* Sticky note moves BELOW text */
  .about-row {
    grid-template-columns: 1fr;
  }

  #timeline {
    order: 2;       /* forces it BELOW the text */
    width: min(100%, 300px);
    margin-top: 0;
    justify-self: center;
  }

  /* One-column skill grid */
  #skill_images {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .skill_img {
    width: 40px;
  }

  /* Footer becomes STATIC (no covering content) */
  footer {
    position: static;
    height: 45px;
    margin-top: var(--space-4);
  }

  .back-to-top {
    top: auto;
    bottom: 57px;
    left: 14px;
    width: 44px;
    height: 54px;
    transform: translateY(12px);
    will-change: auto;
  }

  .back-to-top.is-visible {
    transform: translateY(0);
  }

  .back-to-top img {
    height: 46px;
  }
}

/* =======================================
   SMALL MOBILE (max-width: 480px)
   ======================================= */
@media (max-width: 480px) {

  .skeleton-name {
    height: 44px;
  }

  .skeleton-portrait {
    width: 220px;
  }

  .skeleton-title {
    height: 30px;
  }

  .skeleton-line {
    height: 18px;
  }

  .skeleton-nav-line {
    width: 150px;
    height: 32px;
  }

  .main-left h1 {
    font-size: clamp(29px, 9.4vw, 38px);
  }

  .main-left h2 {
    font-size: 24px;
  }

  #pf_img {
    width: 220px;
  }

  .project-card .project-media,
  .project-card-reverse .project-media {
    max-width: min(100%, 300px);
  }

  .project-info {
    padding-left: var(--space-2);
  }

  .project-info p {
    font-size: 21px;
  }

  #timeline {
    width: min(100%, 260px);
  }

  .options h3 {
    font-size: 28px;
  }

  .home-nav {
    gap: 12px;
  }

  .options p {
    font-size: 20px;
  }

  #lang_p {
    font-size: 19px;
  }

  #cv_button {
    max-width: calc(100vw - 40px);
    font-size: 18px;
    white-space: normal;
  }

  .skill_img {
    width: 34px;
  }

  #whoIam p {
    font-size: 20px;
  }

  footer {
    font-size: 12px;
    height: 40px;
  }

  .back-to-top {
    bottom: 52px;
  }
}

@media (max-width: 768px) and (max-height: 900px) {
  .main {
    gap: 12px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .main-left h1 {
    margin-bottom: 6px;
  }

  .main-left h2 {
    font-size: clamp(20px, 3vh, 24px);
    line-height: 1.2;
  }

  #pf_img {
    width: clamp(180px, 25vh, 220px);
    margin-bottom: 8px;
  }

  #title {
    margin-bottom: 4px;
  }

  #location {
    font-size: clamp(18px, 2.7vh, 22px);
  }

  .options {
    gap: 12px;
  }

  .home-copy {
    gap: 6px;
  }

  .options p,
  #lang_p {
    font-size: clamp(17px, 2.4vh, 20px);
    line-height: 1.25;
  }

  .options h3 {
    font-size: clamp(24px, 3.3vh, 28px);
  }

  .home-nav {
    gap: 6px;
  }

  #cv_button {
    padding: 9px 11px;
    font-size: 17px;
  }
}

@media (max-width: 768px) and (max-height: 720px) {
  .main {
    gap: 8px;
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .main-left h1 {
    font-size: clamp(29px, 8.8vw, 36px);
  }

  #pf_img {
    width: clamp(156px, 24vh, 180px);
    margin-bottom: 6px;
  }

  .main-left h2 {
    font-size: clamp(18px, 2.8vh, 21px);
  }

  #location {
    font-size: clamp(17px, 2.6vh, 19px);
  }

  .options {
    gap: 8px;
  }

  .home-copy {
    gap: 4px;
  }

  .options p,
  #lang_p {
    font-size: clamp(15px, 2.4vh, 17px);
  }

  .options h3 {
    font-size: clamp(21px, 3.3vh, 24px);
  }

  .home-nav {
    gap: 4px;
  }

  #cv_button {
    padding: 7px 10px;
    font-size: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .skeleton-block::after {
    display: none;
  }

  .main-left h1,
  #pf_img,
  h2,
  .notname,
  #skill_tip,
  .options p,
  .options h3,
  .cv-wrap,
  .project-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
