@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

/* Equipment Modal (centering + non-stretch images + zoom) */
.equipment-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--zoom, 1));
  transform-origin: center;
  background: rgba(255, 251, 233, 0.62);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border-radius: 18px;
  box-shadow: 0 8px 32px #ffb7c533;
  padding: 2.2rem 2.2rem 1.2rem;
  width: clamp(320px, 84vw, 700px);
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalIn .18s cubic-bezier(.6,1.5,.5,1) both;
}
.carousel-slide { display:grid; place-items:center; text-align:center; }
.carousel-slide img,
.equipment-img {
  width: auto;
  height: auto;
  max-width: min(90%, 520px);
  max-height: min(48vh, 360px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 12px #0002;
  margin-bottom: 1rem;
}
@media (max-width: 600px) {
  .equipment-modal__content {
    padding: 1.1rem 0.7rem 0.9rem;
    max-width: 98vw;
    min-width: 0;
    border-radius: 12px;
  }
  .carousel-slide img,
  .equipment-img {
    max-width: 96vw !important;
    max-height: 40vh !important;
  }
}
/* Equipment Modal */
.equipment-modal { position:fixed; inset:0; z-index:9999; display:none; }
.equipment-modal.show { display:block; }
.equipment-modal__overlay { position:absolute; inset:0; background:rgba(255, 183, 197, 0.3); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); }
/* content centering defined above */
.equipment-modal__close { position:absolute; top:1.1rem; right:1.2rem; background:none; border:none; color:#e75480; font-size:1.7rem; cursor:pointer; transition:.2s color; }
.equipment-modal__close:hover { color:#ffb7c5; }
.equipment-carousel { display:flex; align-items:center; gap:0; position:relative; }
/* Spinner overlay */
.equipment-modal__spinner { position:absolute; inset:0; display:none; align-items:center; justify-content:center; background:rgba(255,251,233,0.55); backdrop-filter: blur(2px); border-radius:inherit; z-index:2; }
.equipment-modal__spinner.show { display:flex; }
.spinner { width:28px; height:28px; border-radius:50%; border:3px solid #ffb7c5; border-top-color:#e75480; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Arrows as static siblings to content (not scaled) */
.equipment-modal > .carousel-prev,
.equipment-modal > .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
}
.carousel-prev, .carousel-next { background:#ffb7c5; border:none; color:#e75480; font-size:1.5rem; border-radius:50%; width:36px; height:36px; display:grid; place-items:center; cursor:pointer; transition:.2s background,.2s color; box-shadow:0 2px 8px #0002; }
.carousel-prev:hover, .carousel-next:hover { background:#ffe5ec; color:#e75480; }
.carousel-slide { min-width:260px; }
.carousel-indicators { display:flex; gap:.4rem; justify-content:center; margin-top:1.1rem; }
.carousel-dot { width:10px; height:10px; border-radius:50%; background:#ffb7c5; border:1px solid #e75480; display:inline-block; cursor:pointer; transition:.18s background; }
.carousel-dot.active { background:#e75480; border-color:transparent; }
@keyframes modalIn { from { opacity:0; } to { opacity:1; } }

/* Zoom controls */
.equipment-zoom { display:flex; align-items:center; gap:.5rem; margin-top:.8rem; }
.equipment-zoom button { background:#ffb7c5; border:1px solid #e75480; color:#7c4a2d; width:28px; height:28px; border-radius:999px; display:grid; place-items:center; cursor:pointer; }
.equipment-zoom button:hover { background:#ffe5ec; }
.equipment-zoom input[type="range"] { width: 170px; accent-color:#e75480; }
/* Base Styles */
:root {
  --bg: #fffae2; /* pudding cream */
  --bg-alt: hsl(106, 23%, 71%); /* pastel apple green */
  --text: #ad7554; /* soft caramel brown */
  --text-dim: #b07d6b; /* lighter brown */
  --accent: #e78599; /* cherry blossom pink */
  --accent-grad: linear-gradient(135deg, #e9698b 0%, #d2ddcd 60%, #669189 100%); /* pastel pink -> apple -> cherry */
  --radius: 18px;
  --ring: 0 0 0 2px #fffbe9, 0 0 0 4px #ffb7c5;
  font-family: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--text); min-height:100vh; }
body { line-height:1.5; -webkit-font-smoothing: antialiased; }
body {
  /* subtle melon + cherry confetti */
  background-image:
    radial-gradient(circle at 10px 10px, #b6e2a133 1.5px, transparent 2px),
    radial-gradient(circle at 30px 25px, #ffb7c533 1.5px, transparent 2px);
  background-size: 40px 40px, 60px 60px;
}

/* Non-repeating, full-viewport illustration background */
/* Use a CSS variable so pages can override the image (and provide a tablet-specific alternative). */
body.has-illustration {
  /* Default wallpaper (can be overridden per page with --wallpaper-url) */
  background-image: var(--wallpaper-url, url('../images/projectwallpaper.png'));
  background-repeat: no-repeat;
  background-size: contain;     /* always show full image, no cropping */
  background-position: top center;
  /* When the image doesn't fill (e.g., contain on tablet), show the site background color */
  background-color: var(--bg);
}

/* Art page wallpaper */
body.has-illustration.art-bg {
  /* Provide the per-page image via variable */
  --wallpaper-url: url('../images/portfoliowallpaper.png');

}

/* 404 page wallpaper */
body.has-illustration.notfound-bg {
  --wallpaper-url: url('../images/404.jpg');
}

/* Optional: provide a mobile-specific image later if needed */

@media (min-width: 701px) {
  body.has-illustration {
    background-attachment: fixed; /* keep wallpaper steady while scrolling on desktop */
  }
}

/* iOS/iPadOS Safari has issues with background-attachment: fixed. Disable it there. */
@supports (-webkit-touch-callout: none) {
  body.has-illustration { background-attachment: scroll; }
}

/* Preserve wallpaper aspect ratio on tall/narrow viewports (e.g., iPad portrait) */
  /* mobile positions computed via JS */
  .carousel-prev, .carousel-next { width:32px; height:32px; font-size:1.3rem; }
@media (max-aspect-ratio: 3/4) {
  body.has-illustration {
    /* Prefer full image visibility on tall/narrow screens */
  background-image: var(--wallpaper-url-tablet, var(--wallpaper-url, url('../images/projectwallpaper.png')));
    background-size: contain;   /* no cropping; may letterbox */
    background-color: var(--bg); /* fill any side gaps softly */
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* avoid iOS/Safari glitches */
  }
}

/* Also prefer contain on tablets (incl. iPad Pro) in landscape to avoid aggressive cropping */
@media (max-width: 1366px) and (orientation: landscape) {
  body.has-illustration {
  background-image: var(--wallpaper-url-tablet, var(--wallpaper-url, url('../images/projectwallpaper.png')));
    background-attachment: scroll; /* avoid iPad repaint glitches */
    background-size: contain;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: var(--bg);
  }
}

/* Optional per-page controls */
body.has-illustration.bg-contain { background-size: contain !important; background-position: center center !important; background-attachment: scroll !important; }
body.has-illustration.bg-cover { background-size: cover !important; }
img { max-width:100%; display:block; }
a { color: var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; color:#e75480; }

/* Layout */
.site-header { position:sticky; top:0; backdrop-filter: blur(12px); background:rgba(255, 183, 197, 0.75); border-bottom:1px solid #ffb7c5; z-index:100; }
.nav { max-width:1100px; margin:0 auto; display:flex; align-items:center; gap:2rem; padding:0.75rem 1.25rem; }
.logo { font-weight:700; font-size:1.25rem; background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.logo span { color: var(--accent); }
.nav__toggle { display:none; background:none; border:1px solid #2a2d3b; color:var(--text); padding:0.4rem 0.75rem; border-radius:8px; font-size:1.05rem; cursor:pointer; }
.nav__menu { list-style:none; margin:0; padding:0; display:flex; gap:1rem; }
.nav__menu a { display:inline-block; padding:0.5rem 0.85rem; border-radius:8px; font-weight:500; color:var(--text-dim); }
.nav__menu a.active, .nav__menu a:hover { background:#ffe5ec; color:#e75480; text-decoration:none; }

@media (max-width: 760px) {
  .nav { flex-wrap:wrap; }
  .nav__toggle { display:block; margin-left:auto; }
  .nav__menu { width:100%; flex-direction:column; display:none; }
  .nav__menu.show { display:flex; }
}

main { max-width:1100px; margin:0 auto; padding:2.5rem 1.2rem 4rem; }
.hero { padding:5rem 0 3rem; display:grid; place-items:center; text-align:center; }
.hero__content { max-width:760px; }
.hero h1 { font-size:clamp(2.25rem,6vw,3.5rem); line-height:1.1; margin:0 0 1rem; position:relative; display:inline-block; }
.hero .accent { background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.lead { font-size:1.1rem; color:var(--text-dim); margin:0 0 1.75rem; }
.hero__actions { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }

.section-title, .page-title { font-size:2rem; margin:0 0 1rem; position:relative; display:inline-block; z-index:0; }
.section-title::before, .page-title::before {
  content: "";
  position:absolute;
  left:-36px;
  top:50%;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  background:url('../images/pudding.png') no-repeat center/contain;
}
.section-title.clover::before { background-image:url('../images/clover.svg'); }
.page-intro { color:var(--text-dim); margin-top:0; }
/* Icon that sits inline at the end of a title */
.page-title .title-icon, .section-title .title-icon, .hero h1 .title-icon {
  height: 1.5em; width: auto; object-fit: contain; vertical-align: -0.2em; margin-left: .1em; display: inline-block;
}

/* Readability helpers: improve contrast over busy wallpapers without dimming bg */
/* Utility you can add to any element: class="readsafe" or "readsafe-strong" */
.readsafe { text-shadow: -1px 0 var(--bg), 1px 0 var(--bg), 0 1px var(--bg), 0 -1px var(--bg), 0 0 8px rgba(255,251,233,.55); }
.readsafe-strong { text-shadow: -1.2px 0 var(--bg), 1.2px 0 var(--bg), 0 1.2px var(--bg), 0 -1.2px var(--bg), 0 0 10px rgba(255,251,233,.6); }
/* Apply a subtle halo to key texts when a wallpaper is present */
body.has-illustration .page-title,
body.has-illustration .section-title,
body.has-illustration .hero h1 {
  /* Centered glow + subtle under shadow for readability */
  text-shadow:
    0 0 10px rgba(255, 251, 233, .88),
    0 0 18px rgba(255, 251, 233, .65),
    0 2px 3px rgba(124, 74, 45, .30);
  -webkit-text-stroke: 0; /* no inner stroke */
}
body.has-illustration .page-intro,
body.has-illustration .lead {
  text-shadow:
    0 0 8px rgba(255, 251, 233, .75),
    0 0 14px rgba(255, 251, 233, .55);
}

/* Soft cream plate behind titles to boost legibility without dimming the page */
/* Removed heavy background plate for cleaner look */

/* Keep gradient text for highlighted name inside hero heading */
body.has-illustration .hero h1 .accent {
  -webkit-text-stroke: 0;             /* cancel parent stroke */
  text-shadow: none;                  /* cancel parent halo */
  background: var(--accent-grad);     /* ensure gradient */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn { --btn-bg: var(--bg-alt); position:relative; display:inline-flex; align-items:center; gap:.5rem; font-weight:600; padding:0.85rem 1.4rem; border-radius:999px; border:1px solid #ffb7c5; color:var(--text); text-decoration:none; font-size:.95rem; transition:.25s background, .25s transform; background:var(--bg-alt); }
.btn:hover { background:#ffe5ec; color:#e75480; text-decoration:none; }
.btn:active { transform:translateY(2px); }
.btn.primary { background:linear-gradient(135deg, #ffb7c5 0%, #b6e2a1 100%); border:none; color:#7c4a2d; }
.btn.primary:hover { filter:brightness(1.05); }
.btn.outline { background:transparent; border:1.5px solid #ffb7c5; color:#e75480; }
.btn.outline:hover { background:#ffe5ec; color:#e75480; }
.btn-private-repo {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.04rem;
  min-width: 165px;
  border: 1.6px dashed rgba(228, 104, 154, 0.72);
  border-radius: 14px;
  padding: 0.58rem 0.84rem 0.58rem 2.05rem;
  cursor: pointer;
  background: linear-gradient(130deg, rgba(255, 230, 242, 0.92), rgba(255, 242, 216, 0.92));
  color: #ab426e;
  line-height: 1.1;
  box-shadow: 0 8px 16px rgba(232, 132, 172, 0.17);
}
.btn-private-repo::before {
  content: "lock";
  position: absolute;
  left: 0.72rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.17rem 0.32rem;
  border-radius: 999px;
  font-size: 0.56rem;
  line-height: 1;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #9a3b63;
  background: rgba(255, 186, 211, 0.86);
  border: 1px solid rgba(227, 111, 161, 0.48);
}
.btn-private-repo .btn-private-repo__title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #9f3d66;
}
.btn-private-repo .btn-private-repo__hint {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15px;
  color: #b0704a;
}
.btn-private-repo:hover {
  background: linear-gradient(130deg, rgba(255, 208, 228, 0.96), rgba(255, 233, 194, 0.96));
  border-color: rgba(218, 93, 145, 0.82);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(231, 117, 161, 0.24);
}
.btn-private-repo:active {
  transform: translateY(1px);
}
.btn-private-repo.is-notified {
  animation: privateRepoPulse 0.42s ease;
}
@keyframes privateRepoPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.private-repo-toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(10px);
  z-index: 2147483647;
  max-width: min(92vw, 560px);
  background: rgba(255, 250, 241, 0.97);
  border: 1px solid rgba(255, 143, 185, 0.55);
  border-radius: 12px;
  padding: 0.62rem 0.88rem;
  color: #8a4f36;
  font-size: 0.87rem;
  box-shadow: 0 12px 22px rgba(232, 140, 174, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.private-repo-toast::before {
  content: "[private repo] ";
  color: #a13f68;
  font-weight: 800;
}
.private-repo-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Cards */
.cards { --gap:1.4rem; display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:var(--gap); margin-top:1.75rem; }
.card { position:relative; background:linear-gradient(145deg, rgba(255, 251, 233, 0.62) 60%, rgba(255, 229, 236, 0.62) 100%); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border:1.5px solid #ffb7c5; padding:1rem 1rem 1.15rem; border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; gap:.75rem; box-shadow:0 2px 12px #ffb7c533; }
.card::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 20% 15%,rgba(255,183,197,0.25),transparent 70%); opacity:0; transition:.5s opacity; }
.card:hover::before { opacity:1; }
.card h3 { font-size:1.05rem; margin:0; }
.card p { margin:0; font-size:.8rem; color:var(--text-dim); line-height:1.35; }
.card .tags { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:auto; }
.tag { font-size:.65rem; padding:.35rem .55rem; background:#ffb7c5; border-radius:999px; letter-spacing:.5px; text-transform:uppercase; font-weight:600; color:#e75480; }
.tag.alt { background:#5f665b; }

/* About */
.about__grid {
  column-count: 2;
  column-gap: 2rem;
  margin-top: 2rem;
}
.about__section {
  break-inside: avoid;
  margin-bottom: 2rem;
}
@media (max-width: 700px) {
  .about__grid {
    column-count: 1;
  }
}
.about__section { background:rgba(255, 229, 236, 0.62); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border:1.5px solid #ffb7c5; padding:1.25rem 1.35rem 1.5rem; border-radius:var(--radius); color:#7c4a2d; }
.about__section h2 { margin-top:0; font-size:1.15rem; }

/* Timeline */
.timeline { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:1rem; }
.timeline li { position:relative; padding-left:1.2rem; }
.timeline li::before { content:""; position:absolute; left:0; top:.55rem; width:.55rem; height:.55rem; background:var(--accent-grad); border-radius:50%; }
.timeline time { font-size:.7rem; text-transform:uppercase; letter-spacing:.5px; color:#e75480; font-weight:600; display:block; margin-bottom:.2rem; }

/* Skills */
.skill-list { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.5rem; }
.skill-list li { display:inline-flex; align-items:center; gap:.45rem; background:#e6f9e0; border:1px solid #b6e2a1; color:#7c4a2d; padding:.45rem .6rem; border-radius:10px; font-size:.7rem; font-weight:600; letter-spacing:.5px; line-height:1; }
/* Consistent icon sizing for svg/png/webp in skill pills */
.skill-icon { width:22px; height:22px; object-fit:contain; display:inline-block; border-radius:3px; background:transparent; padding:0; box-shadow:none; }

/* Skill groups */
.skill-groups { display:grid; gap:1.1rem; }
.skill-group { background:rgba(255, 251, 233, 0.62); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border:1.5px solid #b6e2a1; padding:1rem; border-radius:12px; }
.skill-group h3 { margin:0 0 .6rem; font-size:0.95rem; color:#7c4a2d; }
.skill-subgroups { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.skill-subgroup { background:linear-gradient(145deg, rgba(230, 249, 224, 0.62) 60%, rgba(255, 229, 236, 0.62) 100%); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border:1px solid #b6e2a1; padding:.9rem 1rem; border-radius:12px; }
.skill-subgroup h4 { margin:0 0 .55rem; font-size:.88rem; color:#7c4a2d; letter-spacing:.2px; }
.skill-subgroup .skill-list { gap:.4rem; }
.skill-subgroup .skill-list li { font-size:.68rem; padding:.45rem .6rem; border-radius:9px; }

/* Skills toolbar tabs */
.skills-toolbar { display:flex; justify-content:flex-end; }
.skills-dots { display:flex; gap:.4rem; margin:-.25rem 0 .5rem; }
.skills-tab { appearance:none; border:1px solid #c2c1a0; background:#e9e9d9; color:#5b7766; padding:.3rem .6rem; border-radius:999px; font-size:.75rem; font-weight:600; letter-spacing:.2px; cursor:pointer; transition:.18s background,.18s color,.18s transform; }
.skills-tab:hover { background:#ffe5ec; color:#e75480; transform:translateY(-1px); }
.skills-tab.active { background:#ffb7c5; border-color:transparent; color:#fff; box-shadow:0 0 0 2px #ffb7c5aa; }

/* Swap animation */
#skillGroups { transition:opacity .18s ease, transform .18s ease; will-change:opacity, transform; }
#skillGroups.swapping { opacity:0; transform:translateY(4px); }

/* Filters */
.filters { margin-top:1.5rem; display:flex; flex-wrap:wrap; gap:.6rem; }
.filter-btn { background:#fffbe9; border:1px solid #ffb7c5; padding:.55rem .9rem; border-radius:999px; font-size:.7rem; text-transform:uppercase; letter-spacing:.6px; font-weight:600; cursor:pointer; color:#7c4a2d; transition:.25s background,.25s color; }
.filter-btn.active, .filter-btn:hover { background:#ffb7c5; color:#e75480; border:none; }

/* Footer */
.site-footer { border-top:1px solid #ffb7c5; padding:2.5rem 1rem 4rem; text-align:center; color:#b07d6b; font-size:.75rem; background:#fffbe9; }
/* Contact Footer */
.contact-footer { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.icon-row { display:flex; gap:1.1rem; flex-wrap:wrap; justify-content:center; }
.icon-link { position:relative; width:48px; height:48px; display:grid; place-items:center; border-radius:999px; background:#ecd7c2; /* light brown */ border:1px solid #d6b79b; color:#7c4a2d; transition:.2s transform,.2s background; }
.icon-link img { width:24px; height:24px; object-fit:contain; filter:drop-shadow(0 0 0 rgba(0,0,0,0)); }
.icon-link:hover { transform:translateY(-2px); background:#ffb7c5; color:#e75480; text-decoration:none; }
.icon-link .tooltip { position:absolute; bottom:calc(100% + 8px); left:50%; transform:translate(-50%, 6px); background:#ffe5ec; color:#e75480; border:1px solid #ffb7c5; padding:.35rem .55rem; font-size:.7rem; border-radius:8px; white-space:nowrap; opacity:0; pointer-events:none; transition:.2s opacity,.2s transform; box-shadow:0 8px 18px #ffb7c533; }
.icon-link .tooltip::after { content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%); width:10px; height:10px; background:#ffe5ec; border-left:1px solid #ffb7c5; border-bottom:1px solid #ffb7c5; transform-origin:center; rotate:45deg; }
.icon-link:hover .tooltip { opacity:1; transform:translate(-50%, 0); }
.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; }

/* Accessibility focus */
:focus-visible { outline:none; box-shadow:var(--ring); }

/* Animations */
.fade-in { animation:fade .6s ease both; }
@keyframes fade { from { opacity:0; transform:translateY(6px);} to { opacity:1; transform:none; } }

/* Whimsy refresh */
:root {
  --bg: #fff8ec;
  --bg-alt: #dbf2d9;
  --text: #7b4c33;
  --text-dim: #9c6c52;
  --accent: #ff74a6;
  --accent-grad: linear-gradient(120deg, #ff8fb8 0%, #ffd79b 48%, #9edec1 100%);
  --radius: 22px;
  --ring: 0 0 0 2px #fff8ec, 0 0 0 5px rgba(255, 116, 166, 0.42);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255, 171, 196, 0.42) 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(183, 231, 208, 0.48) 0%, transparent 36%),
    radial-gradient(circle at 50% 125%, rgba(255, 217, 162, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.6) 1.3px, transparent 1.6px),
    radial-gradient(circle at 40px 34px, rgba(255, 130, 176, 0.2) 1.2px, transparent 1.7px);
  background-size: auto, auto, auto, 64px 64px, 84px 84px;
  background-attachment: fixed, fixed, fixed, scroll, scroll;
}

.logo,
.hero h1,
.section-title,
.page-title,
.btn,
.filter-btn,
.tag {
  font-family: 'Baloo 2', 'Nunito', 'Segoe UI', sans-serif;
}

.site-header {
  background: linear-gradient(100deg, rgba(255, 205, 221, 0.84), rgba(243, 247, 224, 0.84));
  border-bottom: 1px solid rgba(255, 149, 187, 0.4);
  box-shadow: 0 14px 32px rgba(244, 156, 184, 0.17);
}

.nav__menu a {
  border: 1px solid transparent;
  transition: background .26s ease, color .26s ease, transform .26s ease, border-color .26s ease;
}
.nav__menu a.active,
.nav__menu a:hover {
  background: rgba(255, 239, 218, 0.9);
  color: #c74679;
  border-color: rgba(255, 138, 179, 0.38);
  transform: translateY(-1px);
}

.btn {
  box-shadow: 0 8px 20px rgba(244, 146, 181, 0.22);
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease, background .24s ease, color .24s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(237, 134, 173, 0.28);
}

.card,
.about__section,
.skill-group,
.skill-subgroup,
.icon-link,
.filter-btn,
.tag {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease, color .28s ease;
}

.card {
  border-color: rgba(255, 143, 184, 0.6);
  background: linear-gradient(160deg, rgba(255, 251, 239, 0.74) 50%, rgba(255, 230, 239, 0.74) 100%);
  box-shadow: 0 10px 22px rgba(235, 145, 177, 0.2);
}
.card img {
  transition: transform .34s ease, filter .34s ease;
}
.card:hover {
  transform: translateY(-6px) rotate(-.3deg);
  box-shadow: 0 16px 30px rgba(233, 132, 170, 0.3);
}
.card:hover img {
  transform: scale(1.02);
  filter: saturate(1.06);
}

.tag {
  background: linear-gradient(115deg, rgba(255, 206, 226, 0.92), rgba(255, 235, 204, 0.92));
  color: #ca4e7e;
  border: 1px solid rgba(255, 148, 188, 0.55);
  text-transform: none;
  letter-spacing: .2px;
}

.about__section,
.skill-group,
.skill-subgroup {
  border-color: rgba(255, 154, 190, 0.45);
  box-shadow: 0 8px 20px rgba(247, 166, 195, 0.14);
}
.about__section:hover,
.skill-group:hover,
.skill-subgroup:hover {
  transform: translateY(-2px);
}

.filter-btn {
  border-color: rgba(255, 142, 181, 0.5);
  background: rgba(255, 250, 236, 0.86);
}
.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(110deg, #ffb6d1 0%, #ffd9a6 100%);
  color: #be3f6f;
  transform: translateY(-1px);
}

.search-input {
  display: none;
  margin-top: .8rem;
  width: 100%;
  max-width: 360px;
  padding: .62rem .95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 144, 183, 0.55);
  background: rgba(255, 249, 240, 0.9);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  box-shadow: 0 6px 14px rgba(230, 153, 184, 0.18);
}
.search-input::placeholder { color: #b88368; }
.search-input:focus {
  border-color: rgba(255, 116, 166, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 116, 166, 0.2);
}

.icon-link {
  background: linear-gradient(140deg, #efd9c6 0%, #f6edd5 100%);
  border-color: rgba(208, 173, 145, 0.9);
}
.icon-link:hover {
  background: linear-gradient(140deg, #ffbfd6 0%, #ffd8ac 100%);
}

.fade-in { animation: fadePop .62s cubic-bezier(.2, .75, .3, 1) both; }
.cards .fade-in:nth-child(2) { animation-delay: .04s; }
.cards .fade-in:nth-child(3) { animation-delay: .08s; }
.cards .fade-in:nth-child(4) { animation-delay: .12s; }
.cards .fade-in:nth-child(5) { animation-delay: .16s; }
.cards .fade-in:nth-child(6) { animation-delay: .2s; }
@keyframes fadePop {
  from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(1px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .about__section:hover, .skill-group:hover, .skill-subgroup:hover, .btn:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .card:hover { transform: none; }
  .site-header { box-shadow: 0 10px 20px rgba(241, 152, 184, 0.18); }
  body { background-attachment: scroll, scroll, scroll, scroll, scroll; }
}

/* ASCII cat page transition */
.pt-cats-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}
.pt-cats-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 174, 201, 0.12), transparent 40%),
    radial-gradient(circle at 82% 15%, rgba(177, 228, 206, 0.12), transparent 38%),
    linear-gradient(110deg, rgba(255, 253, 244, 0.26), rgba(255, 241, 226, 0.3));
  opacity: 0;
}
.pt-cats-overlay.pt-cats-active {
  opacity: 1;
  visibility: visible;
  transition: none;
}
.pt-cats-overlay.pt-cats-entering::before,
.pt-cats-overlay.pt-cats-leaving::before {
  animation: pt-cats-backdrop var(--pt-backdrop-ms, 1000ms) cubic-bezier(.2, .72, .3, 1) both;
}

.pt-cats-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.pt-cat {
  position: absolute;
  top: var(--pt-top, 50vh);
  left: -45vw;
  white-space: pre;
  font-family: "Courier New", Consolas, monospace;
  font-size: clamp(12px, 1.8vw, 19px);
  line-height: 1;
  letter-spacing: 0;
  color: #7c4a2d;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 1px 4px rgba(255, 139, 179, 0.45);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(var(--pt-tilt, 0deg));
  animation: pt-cat-fly var(--pt-duration, 760ms) cubic-bezier(.2, .72, .3, 1) var(--pt-delay, 0ms) both;
}
.pt-cat.rtl {
  left: auto;
  right: -45vw;
  animation-name: pt-cat-fly-rtl;
}

@keyframes pt-cat-fly {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--pt-tilt, 0deg));
  }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(160vw, -7px, 0) rotate(calc(var(--pt-tilt, 0deg) + 2deg));
  }
}

@keyframes pt-cat-fly-rtl {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--pt-tilt, 0deg));
  }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(-160vw, -7px, 0) rotate(calc(var(--pt-tilt, 0deg) - 2deg));
  }
}

@keyframes pt-cats-backdrop {
  0% { opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: .95; }
  100% { opacity: 0; }
}

body.pt-cats-enter main {
  animation: pt-main-in .56s cubic-bezier(.2, .72, .3, 1) both;
}
body.pt-cats-leave main {
  animation: pt-main-out .34s ease-in both;
}

@keyframes pt-main-in {
  from { opacity: 0; transform: translateY(10px) scale(.994); filter: blur(.35px) saturate(.95); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes pt-main-out {
  from { opacity: 1; transform: none; filter: none; }
  to { opacity: .62; transform: translateY(4px) scale(.992); filter: blur(.28px) saturate(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .pt-cats-overlay { display: none !important; }
  body.pt-cats-enter main,
  body.pt-cats-leave main {
    animation: none !important;
  }
}
