@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #e6e6e6;
  --background-section: #ffffff;
  --background-grey: #f3f5f7;
  --text-primary: #262628;
  --text-secondary: #767676;
  --text-tertiary: #767676;
  --primary: #f63b00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --background-section: #141414;
    --background-grey: #2b2c2e;
    --text-primary: #fff;
    --text-secondary: #7e7e7e;
    --text-tertiary: #979797;
    --primary: #f63b00;
  }
}

html {
  background: var(--background);
  box-sizing: border-box;
  min-height: 100%;
}
body {
  font-family: "Geist", sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  max-width: 1200px;
  margin: 0 auto;
  background: var(--background);
}
h1 {
  font-size: 3rem;
  margin: 1rem 0;
  font-weight: 400;
  letter-spacing: -0.3px;
}
h2 {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.6rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:visited {
  text-decoration: none;
}

p {
  line-height: 24px;
  margin-top: 0;
}
pre {
  font: 0.8rem/1.6rem "Monaco", "Menlo", "Consolas", monospace;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #1e1e1e;
  border-radius: 8px;
  color: #d4d4d4;
  white-space: pre-wrap;
}
code {
  display: block;
  white-space: pre-wrap;
  padding: 0;
}

.container {
  width: 96%;
  margin: 0 auto;
}
.section {
  background: var(--background-section);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 8px;
}
.section-title {
  margin: 0;
  font-size: 1.6rem;
}

@media only screen and (max-width: 768px) and (min-width: 481px) {
  .container {
    width: 90%;
  }
}
@media only screen and (max-width: 480px) {
  .container {
    width: 95%;
  }
  .section-title {
    padding: 1rem;
  }
}

/* -------- introduction -------- */
.introduction {
  margin-top: 6rem;
  background: transparent !important;
}
.introduction-text {
  width: 80%;
  font-size: 2rem;
  line-height: 2.8rem;
  margin-top: 1.5rem;
  letter-spacing: -0.03rem;
}
@media only screen and (max-width: 480px) {
  .introduction-text {
    width: 100%;
    font-size: 1.5rem;
    line-height: 2.3rem;
    margin-top: 1rem;
  }
  .section {
    padding: 0;
  }
}
.link {
  color: var(--primary) !important;
}
.link:hover {
  color: var(--text-primary) !important;
}

.header {
  position: relative;
  width: 100%;
}
.headerproject {
  display: flex;
  align-items: center;
  gap: 24px;
  border-radius: 16px;
}
.headerprojectbg {
  width: 300px;
  height: 225px !important;
}
@media only screen and (max-width: 768px) {
  .headerproject {
    flex-direction: column;
    gap: 4px;
  }
  .headerproject a {
    width: 100%;
  }
  .headerprojectbg {
    width: 100% !important;
    height: 280px !important;
  }
}

.social-links {
  display: flex;
  font-size: 0.8rem;
  align-items: center;
}
.social-link {
  color: var(--text-secondary);
}
.social-link:hover {
  color: var(--primary);
}
.typed {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.08rem;
  margin: 1rem 0;
  color: var(--text-primary);
}
.typed-cursor {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 600;
}
.social-icons {
  display: flex;
  gap: 8px;
}
.app-icon {
  border-radius: 10px;
  background: var(--background-section);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  transition: transform 0.2s;
}
.app-icon:hover .icon {
  transform: scale(1.1);
}
.icon {
  width: 16px;
  height: 16px;
  fill: var(--text-primary);
}
.app-icon:hover .icon {
  fill: var(--primary);
}
@media (prefers-color-scheme: dark) {
  .icon {
    filter: none;
  }
}

/* -------- Projects -------- */
.project {
  flex: 1 1 calc(50% - 80px);
  margin-bottom: 1rem;
}
@media only screen and (min-width: 768px) {
  .project {
    max-width: calc(50% - 80px);
  }
}

.grey-background {
  background: var(--background-grey);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 180px;
  height: 200px;
  position: relative;
  overflow: hidden;
}
@media only screen and (max-width: 480px) {
  .grey-background {
    height: 200px;
  }
}

.image-bottom {
  align-items: end !important;
}
.white-circle {
  width: 110px;
  height: 110px;
  background: var(--background);
  border-radius: 100px;
  position: absolute;
}
.project-image {
  max-width: 100%;
  height: auto;
  max-height: 280px;
  position: absolute;
  transition: transform 0.2s;
}
.project-text {
  padding: 0 0.5rem;
}
.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.project-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media only screen and (max-width: 480px) {
  .project-title {
    flex-direction: column;
    align-items: start;
    margin-bottom: 1rem;
  }
  .project-title h3 {
    margin-bottom: 0.5rem;
  }
}

.side-projects {
  position: relative;
  width: 100%;
}
.side-projects h2 {
  margin-bottom: 0;
}

.project-card {
  background: var(--background-section);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  position: relative;
  transition: background 0.3s;
  padding: 0;
  color: var(--text-primary);
}

/* hover background image – only defined, actual animation is inside media query */
.project-card.has-hover-image::after {
  content: "";
  position: absolute;
  bottom: -100%;
  right: 0;
  width: 70%;
  height: 70%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  z-index: 1;
  transition: 0.4s ease-out;
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  background-image: var(--hover-image);
}
.project-card.has-video::after {
  display: none !important;
}
.project-card .work-text,
.project-card-title,
.project-card-tag {
  position: relative;
  z-index: 2;
}

.title-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

.project-card-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  box-sizing: border-box;
  position: relative;
}
.project-card-image.snappos-image {
  padding: 0;
  align-items: flex-end;
  height: 100%;
}
.project-card-image.book-image {
  padding: 0;
  align-items: flex-end;
  height: 100%;
  position: relative;
}
.project-card-image.book-image img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 240px;
  height: auto !important;
}
.project-card-image.fullscreen-container {
  padding: 0;
  border-radius: 12px 12px 0 0;
}
.project-card-thumbnail {
  position: relative;
  z-index: 1;
  padding: 8px;
  height: calc(100% - 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.align-bottom {
  height: auto !important;
}
.padding-bottom-0 {
  padding-bottom: 0 !important;
}
.instrumentcluster {
  position: absolute !important;
  bottom: -10px;
  right: 0;
  padding: 0 !important;
  align-items: end;
}
.instrumentcluster img {
  height: auto !important;
}
.climatecontrolsimage {
  position: absolute;
  top: 0;
  max-height: 240px;
  height: auto !important;
}

@media only screen and (max-width: 480px) {
  .project-card-image {
    height: 180px;
    padding: 16px;
  }
  .project-card-thumbnail {
    height: 100%;
    padding: 8px;
  }
  .instrumentcluster {
    bottom: -4px;
  }
  .book-image img {
    position: absolute;
  }
}
@media only screen and (max-width: 380px) {
  .project-card-image.snappos-image img {
    position: absolute;
    bottom: -60px;
  }
}

/* video container */
.video-fullscreen video {
  object-fit: cover !important;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
}
.fullscreen-container {
  padding: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden;
}
.fullscreen-container .project-card-hover-media {
  padding: 0 !important;
}
.project-card:not(.large) .project-card-image.fullscreen-container {
  height: 280px !important;
}
.project-card.large .project-card-image.fullscreen-container {
  height: 580px !important;
}

.project-card-image img,
.project-card-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.3s;
}

.project-card-hover-media {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: inherit;
  box-sizing: border-box;
}
.project-card-hover-media img,
.project-card-hover-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.project-card-hover-media video {
  object-position: center;
}

.project-card-header {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.project-card-title,
.project-card-tag {
  font-size: 0.7rem;
  line-height: 0.9rem;
  font-weight: 300;
  margin: 0;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02rem;
  word-wrap: break-word;
}
.project-card-tag {
  text-align: end;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 50%;
}
.preview-container {
  position: sticky;
  top: 0;
  width: 50%;
  display: flex;
  align-items: center;
  position: relative;
}
.project-preview {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s;
  background: var(--background-grey);
  border-radius: 12px;
  visibility: hidden;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.project-preview img,
.project-preview video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

@media only screen and (max-width: 800px) {
  .projects {
    width: 100%;
  }
  .preview-container {
    display: none;
  }
}

.project-row {
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.project-row:hover .project-row-title,
.project-row:hover .project-tag {
  color: var(--primary);
}

.project-row-title {
  flex-grow: 1;
}
.project-row-sub-title {
  display: flex;
  gap: 8px;
}

/* -------------  KEYNOTES  ------------- */
.section-keynotes {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.section-keynotes h2 {
  grid-column: 1 / 4;
  margin-bottom: 0;
}

.keynotes {
  grid-column: 4 / 13;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.video {
  display: grid;
  grid-template-columns: 2fr 7fr;
  gap: 24px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure images appear in keynote section */
.image-background {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background-size: cover;
  background-position: center center;
  background-color: var(--background-grey);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.play {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 99px;
  background-color: var(--background);
  overflow: hidden;
  opacity: 0;
  will-change: transform opacity;
  transition: transform 450ms;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.play svg {
  color: var(--text-primary) !important;
}

.video:hover .play {
  transition: transform 125ms;
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

.video:visited {
  color: var(--text-primary);
}

.video-title {
  color: var(--text-primary);
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.video-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0px;
}

.video:hover .video-title {
  color: var(--primary);
}

.video-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.video:hover .video-description {
  color: var(--primary);
}

.bg1 {
  background-image: url("../img/screensthumbnail.png");
}

.bg2 {
  background-image: url("../img/droidcon23thumbnail.png");
}

.bg3 {
  background-image: url("../img/droidcon22thumbnail.png");
}

.bg4 {
  background-image: url("../img/interview.png");
}

.bg5 {
  background-image: url("../img/designmatters.png");
}

@media only screen and (max-width: 768px) {
  .section-keynotes {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .section-keynotes h2 {
    margin-bottom: 1rem;
  }

  .keynotes {
    width: 100%;
    padding: 12px;
  }

  .video {
    display: grid;
    grid-template-columns: 2fr 7fr;
    gap: 16px;
    align-items: center;
  }
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
  .video {
    grid-template-columns: 3fr 6fr;
    gap: 16px;
  }
}

/* -------------  WORK SECTION  ------------- */
/* -------------  WORK SECTION  ------------- */
.section-work {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: 24px;
}

.section-work h2 {
  grid-column: 1 / 4;
  grid-row: 1;
  margin-bottom: 0;
}

.section-work p.section-title {
  grid-column: 1 / 4;
  grid-row: 2;
  margin-bottom: 0;
  align-self: end;
  font-size: 2rem;
}

.work-items {
  grid-column: 4 / 13;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-item {
  display: grid;
  grid-template-columns: 3fr 6fr;
  gap: 24px;
  align-items: center;
}

.work-image-container {
  background-color: transparent;
  height: 160px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.work-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.work-title {
  color: var(--text-primary);
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.work-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

@media only screen and (max-width: 1050px) and (min-width: 769px) {
  .section-work {
    width: 100%;
  }
  .work-item {
    gap: 16px;
  }
}

@media only screen and (max-width: 768px) {
  .section-work {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .section-work h2 {
    margin-bottom: 0;
  }

  .section-work p.section-title {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  .work-items {
    width: 100%;
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .work-image-container {
    height: 200px;
  }
}

/* -------------  WRITINGS  ------------- */
.section-writings {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.section-writings h2 {
  grid-column: 1 / 4;
  margin-bottom: 0;
}

.section-writings p {
  margin-bottom: 0rem;
}

.writings {
  grid-column: 4 / 13;
  display: flex;
  flex-direction: column;
}

.article {
  display: grid;
  grid-template-columns: 2fr 8fr;
  gap: 24px;
  align-items: center;
  padding: 8px 0;
}

.article:visited {
  color: var(--text-primary);
}

.article-title {
  text-decoration: none;
  color: var(--text-primary);
}

.article-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: fit-content;
}

.article:hover .article-title {
  color: var(--primary) !important;
}

.article:hover .article-date {
  color: var(--primary) !important;
}

.arrow {
  text-align: right;
  color: var(--primary);
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.article:hover .arrow {
  opacity: 1;
}

/* Responsive styles for both sections */
@media only screen and (max-width: 768px) {
  .section-keynotes,
  .section-writings {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .section-keynotes h2,
  .section-writings h2 {
    margin-bottom: 1rem;
  }

  .keynotes,
  .writings {
    padding: 12px;
  }

  .video {
    display: grid;
    grid-template-columns: 2fr 7fr;
    gap: 16px;
    align-items: center;
  }

  .image-background {
    padding-bottom: 56.25%;
  }

  .article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .article-date {
    font-size: 12px;
  }

  .arrow {
    display: none;
  }
}

@media only screen and (min-width: 769px) and (max-width: 1024px) {
  .video {
    grid-template-columns: 3fr 6fr;
    gap: 16px;
  }

  .article {
    grid-template-columns: 3fr 6fr auto;
    gap: 16px;
  }
}

/* -------------  ARTICLE  ------------- */
.article-container {
  margin: auto;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 100px 20px;
  width: 100%;
  box-sizing: border-box;
}
.article-body {
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-sizing: border-box;
  background-color: var(--background-section);
  border-radius: 12px;
}

.article-content {
  width: 100%;
  max-width: 700px;
  margin-top: 8rem;
  margin-bottom: 8rem;
}

.article-image {
  max-height: 100%;
  max-width: 100%;
  height: auto;
}

.article-figure {
  width: 100%;
  margin: 0 0 2.5rem 0; /* Add margin below the figure for spacing */
  padding: 0;
}

.article-figure .article-image,
.article-figure video.article-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px; /* keep if you want rounded corners */
  object-fit: contain;
}

.article-figure figcaption {
  margin-top: 0.75rem;
  text-align: center;
  color: #666;
  font-size: 0.98em;
}

ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

ol li {
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

ul li {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.article-video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.article-h1 {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.03rem;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.article-h2 {
  font-size: 1.4rem;
  line-height: 1.6rem;
  margin-top: 4rem;
  font-weight: 500;
}

.article-h3 {
  font-size: 1.2rem;
  line-height: 1.6rem;
  margin-top: 2rem;
  font-weight: 500;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8rem;
}

.grey-background-article {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-width: 180px;
  height: 400px;
  position: relative;
  overflow: hidden;
}

@media only screen and (max-width: 480px) {
  .grey-background-article {
    height: 200px;
  }
}

@media only screen and (max-width: 768px) {
  .article-container {
    padding: 40px 0px;
    width: 100%;
    box-sizing: border-box;
  }

  .article-body {
    border-radius: 0px;
    width: 100%;
  }

  .article-content {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 12px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
  }

  .article-h1 {
    font-size: 1.8rem;
  }
}

/* Make code blocks in list items full width */
li pre {
  margin-left: -1.5rem; /* Counter the list item padding */
  margin-right: 0;
  width: calc(
    100% + 1.5rem
  ); /* Expand width to compensate for negative margin */
}

@media only screen and (max-width: 768px) {
  li pre {
    margin-left: -1.5rem;
    width: calc(100% + 1.5rem);
  }
}

.back-button {
  position: fixed;
  top: 2rem;
  left: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 100;
  white-space: nowrap;
}

.back-button svg,
.back-button .icon {
  fill: var(--primary) !important;
  stroke: var(--primary) !important; /* covers line-icons */
}

.back-button p {
  color: var(--text-primary);
  margin: 0px;
}

.back-button:hover p {
  color: var(--primary) !important;
}

@media only screen and (max-width: 768px) {
  .back-button {
    position: relative;
    display: inline-flex;
  }
}

@media only screen and (max-width: 768px) {
  .back-button {
    top: 1rem;
    left: 1rem;
  }
}

@media only screen and (max-width: 1200px) {
  .project-preview {
    width: 400px;
  }
}

@media only screen and (max-width: 768px) {
  .project-preview {
    display: none;
  }
}

@media only screen and (max-width: 1400px) {
  .project-preview {
    width: 500px;
  }
}

.work-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0px 24px;
  position: relative;
  z-index: 2;
}

::selection {
  background-color: var(--primary);
  color: white;
}

/* Critical fix for work-item layout */
.project-card.project-card-work.work-item {
  display: grid !important;
  grid-template-columns: 3fr 6fr !important;
  gap: 24px !important;
  align-items: center !important;
}

@media only screen and (max-width: 768px) {
  .project-card.project-card-work.work-item {
    grid-template-columns: 1fr !important;
  }
}

.project-card-hover-media.book-image {
  padding: 0;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card-hover-media.book-image img {
  height: auto !important;
  max-height: 240px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.mapimage img {
  max-height: 280px !important;
  width: 100%;
  object-fit: cover !important;
}

.footer {
  margin-top: 4rem;
  margin-bottom: 4rem;
  padding: 0px 32px;
}

.footer-content {
  border-top: 1px solid var(--text-secondary);
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 24px 0px;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.footer-content p {
  flex-grow: 1;
  margin-bottom: 0px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-scroll p {
  font-size: 1.6rem;
  margin: 0;
  line-height: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.footer-scroll {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 24px 0px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-scroll:hover p {
  color: var(--primary);
}

.footer-scroll:hover .section-arrow {
  color: var(--primary);
}

.section-arrow {
  color: var(--primary);
  font-size: 1.6rem;
  display: flex;
  align-items: center; /* Center vertically */
  height: 1.6rem; /* Match height of the heading */
}

@media only screen and (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    align-items: start;
    gap: 16px;
  }
}

/* Remove these specific breakpoints that were causing the width issues */
@media only screen and (max-width: 1067px) and (min-width: 496px) {
  .section-keynotes {
    width: 100%;
  }
}

@media only screen and (max-width: 670px) and (min-width: 496px) {
  .section-keynotes {
    width: 100%;
  }
}

/* ----------  hover-only rules ---------- */
@media (hover: hover) and (pointer: fine) {
  /* reveal media & hide thumbnail */
  .project-card:hover .project-card-hover-media {
    opacity: 1;
  }
  .project-card:hover .project-card-thumbnail {
    opacity: 0;
  }
  /* hide underlying image for book-image variant */
  .project-card:hover .project-card-hover-media ~ .project-card-image img,
  .project-card:hover
    .project-card-hover-media.book-image
    ~ .project-card-image.book-image
    img {
    opacity: 0;
  }

  /* background-image slide-in */
  .project-card.has-hover-image:hover::after {
    bottom: -10%;
    opacity: 1;
    transform: translateY(0);
  }

  /* text → white */
  .project-card:hover .work-title,
  .project-card:hover .work-description,
  .project-card:hover .project-card-title,
  .project-card:hover .project-card-tag {
    color: #fff !important;
  }

  /* coloured background variants */
  .project-card[data-hover-color="darkblue"]:hover,
  .project-card[data-hover-color="blue"]:hover {
    background: #12181c;
  }
  .project-card[data-hover-color="black"]:hover {
    background: #000;
  }
  .project-card[data-hover-color="aircall"]:hover {
    background: #009f75;
  }
  .project-card[data-hover-color="green"]:hover {
    background: #5f7f52;
  }
  .project-card[data-hover-color="purple"]:hover {
    background: rgba(156, 39, 176, 0.8);
  }
  .project-card[data-hover-color="orange"]:hover,
  .project-card[data-hover-color="snappos"]:hover {
    background: #ff5722;
  }
  .project-card[data-hover-color="cardesignhistory"]:hover {
    background: #42717b;
  }
  .project-card[data-hover-color="enzo"]:hover {
    background: #551c1e;
  }
  .project-card[data-hover-color="wikiexplore"]:hover {
    background: #e4b086;
  }
}

/* touch devices: explicitly cancel any accidental leftovers (defensive) */
@media (hover: none) {
  .project-card:hover * {
    opacity: 1 !important;
    color: inherit !important;
    transform: none !important;
  }
}

.projectintro {
  background-color: var(--background-grey);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.project-meta {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.project-meta td {
  padding: 0.5rem 0;
  vertical-align: top;
}

.project-meta td:first-child {
  font-weight: 500;
  width: 120px;
  color: var(--text-tertiary);
}

.project-meta tr:last-child td {
  padding-bottom: 0;
}

.project-meta ul {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.project-meta li {
  margin: 0;
  padding: 0;
}

@media only screen and (max-width: 768px) {
  .project-meta {
    display: block;
  }

  .project-meta tr {
    display: block;
    margin-bottom: 1rem;
  }

  .project-meta td {
    display: block;
    width: 100%;
    padding: 0.25rem 0;
  }

  .project-meta td:first-child {
    width: 100%;
    margin-bottom: 0.25rem;
  }
}
