* {
  box-sizing: border-box;
}

abbr {
  outline: none;
  border: none;
  text-decoration-color: var(--gray-77);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
}

body {
  background-color: var(--gray-100);
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  scrollbar-width: thin;
  margin: 0;
  padding: 0 0 32px 0;
  color: var(--gray-0-a6);
  font-size: 15px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: -0.25px;
  text-align: left;
}

[brand-list] {
  margin: 40px auto 12px auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: max-content max-content max-content;
  gap: 12px;
  justify-content: center;
  width: auto;
}

[brand-list] li {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 0;
}

[brand-list] img {
  background-color: var(--gray-100);
  height: 40px;
  width: 40px;
  padding: 4px;
  border-radius: 10000px;
}

[brand-summary] {
  margin-top: 32px;
  align-self: start;
}

[brand-title] {
  margin: 0 0 12px 0;
  padding: 0;
  color: var(--gray-16);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1.25px;
  line-height: 36px;
}

[bulleted-list] {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: disc;
}

[bulleted-list] li {
  margin: 4px 0 0 0;
  padding: 0;
  list-style: disc;
}

[copyright] {
  margin-top: 32px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.25px;
  text-align: center;
}

[description] {
  margin-bottom: 40px;
  position: relative;
  z-index: 3;
}

[external-links] {
  margin: 32px auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  justify-content: center;
  max-width: 280px;
}

[external-links] a {
  border-color: var(--gray-12);
  border-style: solid;
  border-width: 1px;
  color: var(--gray-100);
  padding: 8px 16px 8px 16px;
  display: inline-grid;
  grid-template-columns: max-content 1fr;
  gap: 8px;
  align-items: center;
  border-radius: 10000px;
  width: 100%;
  align-items: center;
  justify-content: center;
  line-height: 1em;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}

[external-links] a:link,
[external-links] a:visited,
[external-links] a:active,
[external-links] a:hover,
[external-links] a:focus {
  text-decoration: none;
  color: var(--gray-12);
}

[external-links] a:focus,
[external-links] a:hover {
  background-color: var(--gray-0-a2);
}

[external-links] a:active {
  background-color: var(--gray-0-a3);
}

[external-links] li {
  margin: 0;
  padding: 0;
  list-style: none;
}

[external-links] [icon] {
  height: 24px;
  width: 24px;
  fill: var(--gray-12);
}

[experience],
[skills] {
  align-self: center;
}

[experience] [brand-summary] {
  margin-top: 0;
}

[gradient-linear-1]::before {
  background-image: linear-gradient(var(--gray-89) 0%, var(--gray-0-a0) 100%);
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 128px;
  opacity: 0.65;
}

[gradient-radial-1]::after {
  background-image: radial-gradient(var(--gray-100) 0%, var(--gray-0-a0) 100%);
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 128px;
}

header {
  margin: 0 -16px 20px -16px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--gray-16);
}

html {
  scrollbar-color: var(--gray-89) transparent;
  scrollbar-width: thin;
  overflow: visible;
}

[illustration] {
  margin-top: 24px; 
  height: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  justify-content: end;
  position: relative;
  z-index: 2;
}

[illustration] img,
[illustration] video {
  margin: 0 auto;
  height: auto;
  width: 100%;
  border-radius: 8px;
}

[illustration="cover"] img {
  margin-bottom: 40px;
  height: auto;
  width: 540px;
  max-width: 100%;
  position: relative;
}

[illustration="cover"] img[meta-display-glasses-cover] {
  background-image: url(/assets/meta-wearables-interaction-model/devices-background.png);
  background-position: 0% 0%;
  background-size: cover;
  padding: 16px 16px 0 16px;
}

[line] {
  display: block;
}

[name] {
  border: 1px solid var(--gray-0-a1);
  font-size: 18px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.25px;
  margin: 0 auto;
  padding: 12px 24px 12px 12px;
  display: inline-grid;
  grid-template-columns: max-content 1fr;
  gap: 12px;
  width: auto;
  align-items: center;
  text-align: left;
  border-radius: 10000px;
  position: relative;

  background-image: linear-gradient(
    75deg,
    rgba(0, 191, 255, 0.03) 0%,   /* Translucent Aqua */
    rgba(173, 255, 47, 0.03) 50%,   /* Shimmering Limon */
    rgba(255, 223, 0, 0.03) 100%    /* Luminous Gold */
  );
  overflow: hidden;
}

p {
  margin: 0;
  padding: 0;
}

[project-name] {
  color: var(--gray-16);
  margin: 12px 0 4px 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1.25px;
  line-height: 36px;
}

[project-tagline] {
  margin: 0;
  font-size: 22px;
  font-weight: 200;
  line-height: 26px;
}

[scroll] {
  margin-left: -24px;
  margin-right: -24px;
  padding-bottom: 40px;
  overflow-x: auto;
  scrollbar-color: var(--gray-89) transparent;
  scrollbar-width: thin;
  display: flex;
  
  /* Enable horizontal scroll snapping */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  /*  Set equal padding on both sides if you want end-item padding */
  padding-left: 50vw;
  scroll-padding-inline: 0;
  position: relative;
  z-index: 3;
}

/* Force scroll space at the end */
[scroll]::after {
  content: "";
  flex: 0 0 50vw; /* Matches your 50vw padding */
  /* Or use min-width: 50vw; if not using flex */
}

section {
  margin: 12px 0;
  padding: 24px;
  overflow: hidden;
  text-align: center;
  position: relative;
}

section {
  position: relative;
}

section[about] {
  margin-top: 0;
  padding: 16px;

  background-image: linear-gradient(
    75deg,
    rgba(0, 191, 255, 0.05) 0%,   /* Translucent Aqua */
    rgba(173, 255, 47, 0.05) 50%,   /* Shimmering Limon */
    rgba(255, 223, 0, 0.05) 100%    /* Luminous Gold */
  );
}

section[about]::before {
  background-image: radial-gradient(var(--gray-89) 0%, var(--gray-0-a0) 50%);
  transform: translateX(25%);
  right: 72px;
  
}

section[about]::after {
  background-image: radial-gradient(var(--gray-89) 0%, var(--gray-0-a0) 50%);
  transform: translateX(-25%);
  top: auto;
  bottom: 0;
  left: 72px;
}

section[about]::before,
section[about]::after,
section[project="meta-wearables-interaction-model"]::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  z-index: 1;
  content: "";
}

section[project="google-assistant-framework"] [illustration] img {
   /* always white */
  background-color: #fff;
}

section[project="google-assistant-framework"] {
  background-color: transparent;
}

section[project="meta-wearables-interaction-model"]::before {
  background-image: url(/assets/meta-wearables-interaction-model/devices-background.png);
  background-position: 0% 0%;
  background-size: cover;
  opacity: 0.26;
}

[sections] {
  margin: 0 auto;
  border-top: 12px solid var(--gray-100);
  max-width: 2400px;
}

[self-portait] {
  border-radius: 10000px;
  height: 40px;
  width: 40px;
}

[experience-statement] em,
[skill-statement] em {
  color: var(--gray-16);
  font-style: normal;
  font-weight: 500;
}

[slug] {
  background-color: var(--gray-100);
  border-radius: 10000px;
  margin: 0 auto;
  padding: 8px 12px;
  display: inline-grid;
  grid-template-columns: max-content;
  align-items: center;
  justify-content: center;
  width: auto;
}

[slug] [logo] {
  height: 8px;
  width: auto;
}

[slug][google] {
  padding-top: 9px;
  padding-bottom: 9px;
}

[slug][google] img {
  height: 18px;
}

[work-example-description] {
  padding-top: 40px;
  position: relative;
  z-index: 3;
}

[work-example-metric] {
  background-color: var(--gray-100-fixed);
  color: var(--gray-0-fixed);
  border-radius: 10000px;
  position: absolute;
  top: 0;
  left: 50%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  transform: translate(-50%, -50%);
  box-shadow:
    /* these don't change in dark mode */
    var(--gray-0-a03-fixed) 0px 0px 0px 1px,
    var(--gray-0-a03-fixed) 0px 2px 2px 1px,
    var(--gray-0-a03-fixed) 0px 3px 3px 3px,
    var(--gray-0-a03-fixed) 0px 6px 6px -3px,
    var(--gray-0-a03-fixed) 0px 12px 12px -6px
  ;
  text-wrap: nowrap;
  white-space: nowrap;
}

[work-example-metric="google-yellow"] {
  background-color: #FBBC05;
  color: #fff;
}

[work-example-metric="google-blue"] {
  background-color: #0081FB;
  color: #fff;
}

[work-example-metric="google-green"] {
  background-color: #34A853;
  color: #fff;
}

[work-example-metric="google-red"] {
  background-color: #EA4335;
  color: #fff;
}

[work-example-metric="meta-blue"] {
  background-color: #017FF8;
  color: #fff;
}

[work-example-metric="meta-dark-blue"] {
  background-color: #1C2A33;
  color: #fff;
}

[work-examples-list] {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 20px;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 16px;
}

[work-examples-list-item] {
  background-color: var(--gray-97);
  margin: 0;
  padding: 24px;
  list-style: none;
  color: var(--gray-16);
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  border-radius: 24px;
  width: 80vw;
  max-width: 720px;
  display: grid;
  grid-template-rows: max-content 1fr;
  gap: 0;
  position: relative;

  /* Align the left edge of each item to the scroll container */
  scroll-snap-align: center;
  
  /* Prevents snapping from skipping items during fast flings */
  scroll-snap-stop: always;
}

[work-examples-list-item] img,
[work-examples-list-item] video {
  max-width: 100%;
  border-radius: 16px;
}

[work-examples-list][meta-wearables-interaction-model] [work-examples-list-item] {
  background-color: var(--gray-100-a4);
}

@media (prefers-color-scheme: dark) {
  [logo] [wordmark] {
    fill: var(--gray-16);
  }

  [work-examples-list][meta-wearables-interaction-model] [work-examples-list-item] {
    background-color: var(--gray-0-a2-fixed);
  }

  [work-examples-list][google-assistant-lgtv] [work-examples-list-item] {
    background-color: var(--gray-100-a02-fixed);
  }
}

@media (min-width: 700px) {
  [brand-list] img {
    height: 48px;
    width: 48px;
  }

  [experience] [brand-summary] {
    text-align: left;
  }

  header {
    margin: 0;
    padding: 0;
  }

  [illustration][google-assistant-framework] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    align-items: center;
    align-content: center;
    justify-content: center;
    height: 320px;
  }

  [illustration][google-assistant-framework] img {
    /* height: 100%; */
    /* width: 100%; */
    object-position: center;
    object-fit: contain;
  }

  [illustration][google-assistant-framework] img[smart-speaker] {
    display: none;
  }

  [project-name] {
    font-size: 44px;
    letter-spacing: -2px;
    line-height: 52px;
  }

  [sections] {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    grid-template-columns: 1fr;
    gap: 12px;
  }

  section {
    margin: 0;
  }

  section[about] {
    grid-column: -1 / 1;
    display: grid;
    /* grid-template-columns: repeat(24, minmax(0, 1fr)); */
  }

  section[about] [skills] {
    grid-column: 1 / 15;
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
  }

  section[about] [experience] {
    grid-column: 15 / 23;
  }

  section[about]::before {
    background-image: radial-gradient(var(--gray-97) 0%, var(--gray-0-a0) 50%);
  }

  section[about]::after {
    background-image: radial-gradient(var(--gray-97) 0%, var(--gray-0-a0) 50%);
  }

  section[project="google-assistant-lgtv"] {
    background-color: transparent;
  }

  [self-portait] {
    height: 52px;
    width: 52px;
  }

  [slug] {
    padding: 12px 16px;
  }
  
  [slug] [logo] {
    height: 12px;
    width: auto;
  }
  
  [slug][google] {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  
  [slug][google] img {
    height: 22px;
  }

}

@media (min-width: 2400px) {
  /* 1. Disable scrolling and center the flex container */
  [scroll] {
    overflow-x: visible;       /* Remove scrollbar capability */
    justify-content: center;   /* Center the items horizontally */
    padding-left: 0;           /* Reset the 50vw offset padding */
    margin-left: 0;            /* Reset negative outer margins */
    margin-right: 0;
  }

  /* 2. Hide the pseudo-element creating the right-side scroll spacer */
  [scroll]::after {
    display: none;
  }

  /* 3. Allow items to wrap or line up horizontally without forcing overflow */
  [work-examples-list] {
    display: flex;             /* Switch from grid to flex for easy wrapping/centering */
    justify-content: center;
    flex-wrap: wrap;           /* Wraps items if total width exceeds screen */
  }


}