/* All styles for the site. Each section styles one part of the page, and its
   tablet / phone versions sit right underneath it.

   Screen sizes used everywhere:
     Laptop  max-width: 1279px                  slightly tighter spacing
     Tablet  min-width: 768px and max-width: 1099px   icon-only sidebar
     Phone   max-width: 767px                   top bar with ☰ menu
     Small   max-width: 380px                   small phones
*/


/* ==========================================================
   Colours, sizes and fonts — change these to restyle the whole site
   ========================================================== */
:root {
  --bg: #f7f7f7;         /* page background */
  --surface: #ffffff;    /* cards */
  --text: #000000;
  --text-2: #555555;     /* body text */
  --text-3: #808080;     /* muted text */
  --icon: #666666;
  --border: #ececec;

  /* Home tiles: icon colour, label colour, soft background blob */
  --green: #00ff6f;  --green-text: #2c9a4b;  --green-tint: #f5fff9;
  --purple: #be4dff; --purple-text: #a740e3; --purple-tint: #fbf5ff;
  --blue: #02bae3;   --blue-text: #2a9ec0;   --blue-tint: #f5fdff;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;

  --sidebar-w: 256px;
  --gap: 24px;           /* space around the page */

  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* ==========================================================
   Basics
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { fill: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* ==========================================================
   Page layout: sidebar on the left, content on the right
   ========================================================== */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 48px;
  padding: var(--gap);
  max-width: 1440px;
  margin: 0 auto;
}
.main { padding: 24px 24px 0 0; min-width: 0; }

@media (max-width: 1279px) {
  .layout { gap: 32px; }
  .main { padding-right: 8px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  :root { --sidebar-w: 72px; }
  .layout { gap: 24px; }
  .main { padding: 16px 0 0; }
}
@media (max-width: 767px) {
  :root { --gap: 16px; }
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 76px; }  /* 12px gap + 64px top bar */
  .main { padding: 28px 0 0; }
}


/* ==========================================================
   Sidebar: profile, menu, eyes, social links
   (tablet: icons only with tooltips · phone: top bar + ☰ menu)
   ========================================================== */
.sidebar {
  position: sticky;
  top: var(--gap);
  height: calc(100vh - var(--gap) * 2);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 48px; }
.sidebar__panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.profile__name { display: block; font-size: 18px; font-weight: 500; line-height: 1.4; }
.profile__role { display: block; font-size: 12px; color: #888; line-height: 1.2; }

/* Menu links: icon, label, and an arrow that slides in on hover */
.menu { display: flex; flex-direction: column; }
.menu--social { margin-top: auto; }
.menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.menu__item span { flex: 1; }
.menu__icon { width: 20px; height: 20px; color: var(--icon); flex-shrink: 0; }
.menu__arrow {
  width: 14px; height: 14px; color: var(--text-3);
  opacity: 0; transform: translateX(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.menu__item:hover { background: var(--bg); color: var(--text); }
.menu__item:hover .menu__arrow { opacity: 1; transform: none; }
.menu__item--mobile { display: none; }  /* "View Resume / CV": phones only */

/* Current page: black text and icon, small dot instead of the arrow */
.menu__item.is-active,
.menu__item.is-active .menu__icon { color: var(--text); }
.menu__item.is-active .menu__arrow { display: none; }
.menu__item.is-active::after {
  content: "";
  width: 4px; height: 4px; margin-right: 5px;
  border-radius: 2px;
  background: var(--text);
}

/* ☰ button (phones only); turns into ✕ when the menu is open */
.menu-toggle {
  display: none;
  place-content: center;
  gap: 6px;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px; height: 1.5px;
  background: #000;
  border-radius: 2px;
  transition: transform .3s ease-in-out;
}
.sidebar.is-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.sidebar.is-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Eyes: black circles with a white dot that follows the cursor (see script.js).
   They blink every 3s, squashing to 30% height and back in 0.3s, like the Framer site. */
.eyes { display: flex; gap: 10px; margin: auto 0; padding: 32px 0 32px 12px; }
.eye { position: relative; width: 40px; height: 40px; border-radius: 50%; background: #000; animation: blink 3s ease-in-out infinite; }
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  93.5%, 96.5% { transform: scaleY(.3); }
}
.eye__pupil {
  position: absolute;
  top: 50%; left: 50%;
  width: 15px; height: 15px;
  margin: -7.5px 0 0 -7.5px;
  border-radius: 50%;
  background: #fff;
  transition: transform .12s ease-out;
}

@media (min-width: 768px) and (max-width: 1099px) {
  .sidebar { padding: 12px; align-items: center; overflow: visible; }
  .sidebar__head { margin-bottom: 32px; }
  .sidebar__panel { align-items: center; }
  .profile__text { display: none; }
  .menu__item { position: relative; justify-content: center; width: 48px; padding: 0; }
  .menu__arrow { display: none; }
  .menu__item.is-active::after { display: none; }
  /* The label becomes a black tooltip on hover */
  .menu__item span {
    position: absolute; z-index: 30;
    left: calc(100% + 12px); top: 50%;
    flex: none;
    padding: 6px 10px;
    border-radius: 6px;
    background: #000; color: #fff;
    font-size: 12px; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transform: translate(-4px, -50%);
    transition: opacity .15s var(--ease), transform .15s var(--ease);
  }
  .menu__item:hover span,
  .menu__item:focus-visible span { opacity: 1; transform: translate(0, -50%); }
  .eyes { flex-direction: column; gap: 6px; padding: 24px 0; }
}
@media (max-width: 767px) {
  /* Top bar (photo, name, ☰) floats over the page, so opening the menu doesn't push the content down */
  .sidebar {
    position: fixed; top: 12px; left: var(--gap); right: var(--gap); z-index: 20;
    height: 64px; max-height: calc(100dvh - 24px);
    padding: 12px 12px 12px 16px;
    overflow: hidden;
    transition: height .4s ease-in-out;
  }
  .sidebar__head { margin: 0; }
  .profile__avatar { width: 40px; height: 40px; }
  .profile__name { font-size: 16px; }
  .menu-toggle { display: grid; }
  .menu-toggle:focus-visible { outline: none; }  /* no ring after tapping */
  .eyes { display: none; }

  /* Open menu: the card grows to the screen height (scrolling inside on short screens) and the
     links fade in. Page links sit at the top, the divider + social links at the bottom. */
  .sidebar.is-open { height: calc(100dvh - 24px); overflow-y: auto; }
  body.menu-open { overflow: hidden; }  /* the page behind doesn't scroll */
  .sidebar__panel {
    flex: 1 0 auto; margin-top: 44px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease-in-out, transform .25s ease-in-out, visibility 0s .25s;
  }
  .sidebar.is-open .sidebar__panel {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .3s ease-in-out .12s, transform .3s ease-in-out .12s;
  }
  .menu:not(.menu--social) { padding-bottom: 36px; }  /* gap above the divider on short screens */
  .menu--social { padding-top: 36px; border-top: 1px solid var(--border); }
  .menu__item { height: 45px; padding: 0 8px 0 0; gap: 14px; font-size: 14px; }
  .menu__item:hover { background: transparent; }
  .menu__arrow { display: none; }
  .menu__item--mobile { display: flex; }
}
@media (max-width: 380px) {
  .profile__role { font-size: 11px; }
}
@media (hover: none) {
  .menu__arrow { opacity: .6; transform: none; }
}


/* ==========================================================
   Page headings, intros and white cards (used on every page)
   ========================================================== */
.page-title { font-size: 40px; line-height: 48px; font-weight: 400; margin-bottom: 24px; }
.page-title--with-intro { margin-bottom: 12px; }
.page-intro {
  max-width: 760px;
  margin-bottom: 32px;
  font-size: 20px; font-weight: 500; line-height: 28px;
  color: #888;
}
.section { margin-top: 64px; }
.section__title { font-size: 32px; font-weight: 500; line-height: 1.3; margin-bottom: 24px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; }

@media (min-width: 768px) and (max-width: 1099px) {
  .page-intro { font-size: 17px; line-height: 25px; margin-bottom: 24px; }
}
@media (max-width: 767px) {
  .page-title { font-size: 32px; line-height: 40px; margin-bottom: 16px; }
  .page-title--with-intro { margin-bottom: 10px; }
  .page-intro { font-size: 16px; line-height: 1.5; margin-bottom: 24px; }
  .section { margin-top: 48px; }
  .section__title { font-size: 26px; margin-bottom: 16px; }
  .card { padding: 16px; }
}


/* ==========================================================
   Home: greeting, Resume button and the three coloured tiles
   ========================================================== */
.hero__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.hero__title { font-size: 40px; line-height: 48px; font-weight: 400; }
.hero__intro { margin-top: 16px; max-width: 880px; font-size: 20px; line-height: 1.4; color: var(--text-3); }

/* Resume button: an arrow slides in on hover */
.btn-resume {
  display: inline-flex; align-items: center; gap: 0;
  height: 40px; padding: 0 24px;
  border-radius: 8px;
  background: #000; color: #fff;
  font-size: 14px;
  overflow: hidden;
  transition: gap .25s var(--ease), padding .25s var(--ease);
}
.btn-resume svg { width: 0; height: 14px; transition: width .25s var(--ease); }
.btn-resume:hover { gap: 8px; padding: 0 18px; }
.btn-resume:hover svg { width: 14px; }

/* Tiles: a solid tinted circle + icon at the top that fade out downwards (like Framer), then label and arrow */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 146px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
}
.tile__graphic {
  position: absolute; inset: 0 0 auto 0; z-index: -1;
  height: 122px;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
  pointer-events: none;
}
.tile__blob {
  position: absolute;
  width: 212px; height: 212px;
  left: -49px; top: -64px;
  border-radius: 50%;
  transition: transform .5s var(--ease);
}
.tile__icon { position: absolute; left: 24px; top: 8px; width: 67px; height: 65px; }
.tile__label { font-size: 18px; font-weight: 500; line-height: 1.4; padding-right: 32px; }
.tile__arrow {
  position: absolute; right: 24px; bottom: 24px;
  width: 19px; height: 19px; color: var(--icon);
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.tile:hover .tile__blob { transform: scale(1.6); }
.tile:hover .tile__arrow { transform: rotate(45deg); color: #000; }

.tile--green  .tile__blob { background: var(--green-tint); }
.tile--green  .tile__icon { color: var(--green); }
.tile--green  .tile__label { color: var(--green-text); }
.tile--purple .tile__blob { background: var(--purple-tint); }
.tile--purple .tile__icon { color: var(--purple); }
.tile--purple .tile__label { color: var(--purple-text); }
.tile--blue   .tile__blob { background: var(--blue-tint); }
.tile--blue   .tile__icon { color: var(--blue); }
.tile--blue   .tile__label { color: var(--blue-text); }

@media (max-width: 1279px) {
  .tile { padding: 20px; }
  .tile__label { font-size: 16px; }
  .tile__arrow { right: 20px; bottom: 20px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .tiles { gap: 16px; }
  .tile { min-height: 132px; padding: 16px; }
  .tile__graphic { height: 108px; }
  .tile__icon { left: 16px; width: 52px; height: 50px; }
  .tile__label { font-size: 15px; padding-right: 24px; }
  .tile__arrow { right: 16px; bottom: 16px; width: 16px; height: 16px; }
}
@media (max-width: 767px) {
  .hero__top { align-items: center; }
  .hero__title { font-size: 32px; line-height: 40px; }
  .hero__intro { margin-top: 12px; font-size: 17px; }
  .btn-resume { display: none; }  /* the menu has "View Resume / CV" instead */
  /* Tiles stack, with the icon beside the label */
  .tiles { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .tile { min-height: 72px; flex-direction: row; align-items: center; justify-content: flex-start; padding: 16px; }
  .tile__graphic { height: 100%; }
  .tile__icon { left: 16px; top: 50%; width: 42px; height: 40px; margin-top: -20px; }
  .tile__label { font-size: 16px; margin-left: 56px; }
  .tile__arrow { top: 50%; bottom: auto; right: 16px; margin-top: -9px; }
}
@media (max-width: 380px) {
  .hero__title { font-size: 28px; line-height: 36px; }
  .hero__intro { font-size: 16px; }
  .tile__label { font-size: 15px; }
}


/* ==========================================================
   Project cards (Home, Selected Work, Everything Design)
   ========================================================== */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.project { display: block; }
.project__media {
  position: relative;
  aspect-ratio: 5 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }

/* Hover: white gradient fades up from the bottom and a round arrow button appears */
.project__media::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 14%, rgba(255, 255, 255, .6) 100%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.project__open {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #000; color: #fff;
  opacity: 0; transform: scale(.6);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.project__open svg { width: 22px; height: 22px; }
.project:hover .project__media img { transform: scale(1.03); }
.project:hover .project__media::after { opacity: 1; }
.project:hover .project__open { opacity: 1; transform: none; }

.project__meta {
  margin-top: 16px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-3);
}
.project__meta i { font-style: normal; margin: 0 6px; }
.project__title { margin-top: 8px; font-size: 18px; font-weight: 500; line-height: 1.4; }
.project__desc { margin-top: 4px; font-size: 16px; line-height: 1.4; color: var(--text-3); }

/* "View All Projects →" / "View Full Stack →" links */
.more-link {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  width: max-content;
  margin: 32px 0 0 auto;
  font-size: 14px;
  color: var(--text-3);
  transition: color .2s var(--ease);
}
.more-link svg { width: 14px; height: 14px; opacity: 0; transform: translateX(-6px); transition: all .2s var(--ease); }
.more-link:hover { color: #000; }
.more-link:hover svg { opacity: 1; transform: none; }

@media (min-width: 768px) and (max-width: 1099px) {
  .projects { gap: 32px 20px; }
  .project__title { font-size: 16px; }
  .project__desc { font-size: 14px; }
}
@media (max-width: 767px) {
  .projects { grid-template-columns: 1fr; gap: 32px; }
  .project__meta { margin-top: 12px; font-size: 11px; }
  .project__title { font-size: 17px; }
  .project__desc { font-size: 15px; }
  .more-link { margin-top: 24px; }
}
/* Touch screens have no hover, so always show the arrow button */
@media (hover: none) {
  .project__open { opacity: 1; transform: none; width: 40px; height: 40px; top: 12px; right: 12px; }
  .project__open svg { width: 16px; height: 16px; }
  .more-link svg { opacity: 1; transform: none; }
}


/* ==========================================================
   Home: "I've designed for" scrolling logo strip
   ========================================================== */
.clients { margin-top: 48px; }
.clients__title { font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 24px; width: max-content; animation: marquee 30s linear infinite; }
.marquee__track img { width: 170px; height: 56px; flex-shrink: 0; object-fit: cover; background: #fff; }  /* same as the Framer frames */
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 767px) {
  .clients { margin-top: 32px; }
  .clients__title { font-size: 18px; }
  .marquee__track { gap: 16px; animation-duration: 22s; }
  .marquee__track img { width: 144px; height: 48px; }
}


/* ==========================================================
   Home: Skills & Stack card (icon tile + name)
   ========================================================== */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }
.skills li { display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--text-2); }
.skills__icon {
  display: grid; place-items: center;
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--bg);
}
.skills__icon img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

@media (min-width: 768px) and (max-width: 1099px) {
  .skills { gap: 12px 20px; }
  .skills li { font-size: 16px; gap: 12px; }
  .skills__icon { width: 56px; height: 56px; }
  .skills__icon img { width: 32px; height: 32px; }
}
@media (max-width: 767px) {
  .skills { grid-template-columns: 1fr; gap: 12px; }
  .skills li { font-size: 16px; gap: 12px; }
  .skills__icon { width: 52px; height: 52px; border-radius: 10px; }
  .skills__icon img { width: 30px; height: 30px; }
  .divider { margin: 20px 0; }
}


/* ==========================================================
   "Want to discuss an idea?" contact card (every page)
   ========================================================== */
.contact {
  position: relative;
  margin-top: 48px;
  display: flex; flex-direction: column; gap: 32px;
  padding: 48px 24px 24px;
  overflow: hidden;
  isolation: isolate;
}
.contact::before {  /* thin, tightly packed wavy lines that fade in towards the bottom */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("assets/images/contact-pattern.svg") repeat left top / 100px 14px;  /* one wave per 14px row */
  opacity: .22;
  -webkit-mask-image: linear-gradient(transparent 25%, #000 85%);
  mask-image: linear-gradient(transparent 25%, #000 85%);
}
.contact__text { font-size: 20px; font-weight: 600; line-height: 1.4; white-space: pre-line; }
.contact__mail { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.contact__email { font-size: 32px; font-weight: 500; line-height: 1.4; color: var(--blue); overflow-wrap: anywhere; }
.contact__email:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-copy {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: var(--bg);
  font: inherit; font-size: 13px; color: #000;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn-copy svg { width: 14px; height: 14px; }
.btn-copy:hover { background: #ececec; }
.btn-copy.is-copied { background: #0066ff; color: #fff; }

@media (min-width: 768px) and (max-width: 1099px) {
  .contact__email { font-size: 28px; }
}
@media (max-width: 767px) {
  .contact { margin-top: 32px; padding: 28px 16px 16px; gap: 24px; }
  .contact__text { font-size: 18px; }
  .contact__mail { align-items: flex-start; }
  .contact__email { font-size: 24px; }
}
@media (max-width: 380px) {
  .contact__email { font-size: 20px; }
}


/* ==========================================================
   Footer: copyright and live clock
   ========================================================== */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 32px 0;
  font-size: 12px;
  color: var(--text-3);
}
.footer__clock { font-family: var(--mono); font-size: 12px; color: #000; }

@media (max-width: 767px) {
  .footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 0; }
}


/* ==========================================================
   Skills & Stack page: groups of tools in two columns
   ========================================================== */
.stack-card { padding-top: 0; padding-bottom: 0; }
.stack-group { padding: 24px 0 40px; }
.stack-group + .stack-group { border-top: 1px solid var(--bg); padding-top: 40px; }
.stack-group:last-child { padding-bottom: 24px; }
.stack-group__title { font-size: 20px; font-weight: 500; line-height: 24px; margin-bottom: 24px; }
.stack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; align-items: start; }
.stack-item {  /* icon + name on one line, description underneath */
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  align-content: start;
  column-gap: 12px;
}
.stack-item__icon { border-radius: 8px; }
.stack-item__name { font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--text-2); }
.stack-item__desc { grid-column: 1 / -1; margin-top: 8px; font-size: 14px; line-height: 1.4; color: #888; }

@media (min-width: 768px) and (max-width: 1099px) {
  .stack-group { padding-bottom: 32px; }
  .stack-group + .stack-group { padding-top: 32px; }
  .stack-group__title { font-size: 16px; margin-bottom: 20px; }
  .stack-grid { gap: 20px 20px; }
  .stack-item { grid-template-columns: 56px minmax(0, 1fr); }
  .stack-item .skills__icon { width: 56px; height: 56px; }
  .stack-item .skills__icon img { width: 32px; height: 32px; }
  .stack-item__name { font-size: 15px; }
  .stack-item__desc { font-size: 13px; }
}
@media (max-width: 767px) {
  .stack-card { padding: 16px; }
  .stack-group { padding: 20px 0 28px; }
  .stack-group + .stack-group { padding-top: 28px; }
  .stack-group__title { font-size: 15px; margin-bottom: 16px; }
  .stack-grid { gap: 20px 16px; }
  /* Icon goes above the name */
  .stack-item { grid-template-columns: 1fr; align-items: start; row-gap: 8px; }
  .stack-item .skills__icon { width: 52px; height: 52px; border-radius: 10px; }
  .stack-item .skills__icon img { width: 30px; height: 30px; }
  .stack-item__name { font-size: 14px; line-height: 1.35; }
  .stack-item__desc { margin-top: 0; font-size: 12px; }
}


/* ==========================================================
   About page: bio + photo, illustration strip, Spotify playlists
   ========================================================== */
@font-face {
  font-family: "DM Retrograde";
  src: url("assets/fonts/dm-retrograde.woff2") format("woff2");
  font-display: swap;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  grid-template-areas: "title ." "bio photo";
  gap: 24px 40px;
  align-items: start;
}
.about-hero__title { grid-area: title; margin: 0; }
.about-bio { grid-area: bio; max-width: 450px; }
.about-hero__photo { grid-area: photo; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: #e9e9e9; }
.about-bio p { font-size: 20px; font-weight: 500; line-height: 36px; letter-spacing: -0.2px; color: var(--text-2); }
.about-bio p + p { margin-top: 36px; }

/* Bio text styles — written as [purple]…[/purple] etc. in Pages CMS */
.t-purple { font-family: "Black Han Sans", var(--font); font-weight: 400; color: #be4dff; }
.t-code   { font-family: "Google Sans Code", var(--mono); color: #00b34d; }
.t-hand   { font-family: "Gochi Hand", cursive; font-size: 1.1em; letter-spacing: .02em; color: #00b34d; }
.t-neon   { font-family: "Monoton", var(--font); font-weight: 400; color: #ffb700; word-spacing: .15em; }
.t-pixel  { font-family: "DM Retrograde", var(--mono); font-weight: 400; color: #02bae3; }

.about-card { margin-top: 48px; }
.about-card__title { font-size: 20px; font-weight: 500; line-height: 24px; margin-bottom: 24px; }

/* Illustration strip: each image's size/position comes from script.js; --s scales them all */
.playground { --s: 1; overflow: hidden; margin: 0 -24px -24px; padding: 0 24px 24px; }
.playground__track { display: flex; align-items: flex-start; width: max-content; height: calc(500px * var(--s)); animation: playground 45s linear infinite; }
.playground__item {
  flex-shrink: 0;
  width: calc(var(--w) * var(--s) * 1px);
  height: calc(var(--h) * var(--s) * 1px);
  margin-left: calc(var(--x) * var(--s) * 1px);
  margin-top: calc(var(--y) * var(--s) * 1px);
  object-fit: cover;
  border-radius: 10px;
}
.playground:hover .playground__track { animation-play-state: paused; }
@keyframes playground { to { transform: translateX(-50%); } }

.playlists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.playlist { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }

@media (min-width: 768px) and (max-width: 1099px) {
  .about-hero { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 16px 24px; }
  .about-bio p { font-size: 16px; line-height: 23px; letter-spacing: 0; }
  .about-bio p + p { margin-top: 23px; }
  .about-card { margin-top: 36px; }
  .about-card__title { font-size: 16px; }
  .playground { --s: .8; }
  .playlists { gap: 12px; }
}
@media (max-width: 767px) {
  /* Text first, photo underneath */
  .about-hero { grid-template-columns: 1fr; grid-template-areas: "title" "bio" "photo"; row-gap: 16px; }
  .about-hero__title { margin-bottom: 16px; }
  .about-hero__photo { width: min(100%, 280px); justify-self: center; margin-top: 16px; }
  .about-bio p { font-size: 15px; line-height: 1.6; letter-spacing: 0; }
  .about-bio p + p { margin-top: 1.2em; }
  .about-card { margin-top: 32px; }
  .about-card__title { font-size: 16px; line-height: 1.35; margin-bottom: 16px; }
  .playground { --s: .62; margin: 0 -16px -16px; padding: 0 16px 16px; }
  .playlists { grid-template-columns: 1fr; gap: 12px; }
}
