@font-face {
  font-family: "Alpha Lyrae";
  src: url("./fonts/AlphaLyrae-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #ffffff;
  --text-color: #334155; /* Slate 700 */
  --heading-color: #334155; /* Slate 700 for main header */
  --label-color: #64748b; /* Slate 500, 5.6:1 contrast ratio */
  --link-color: #64748b; /* Slate for links */
  --border-color: #e2e8f0;

  --spacing-unit: 1rem;
  --font-family:
    "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --label-font: "Geist Mono", monospace;
  --heading-font: "Alpha Lyrae", "Geist", sans-serif;

  --max-width: 600px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.4;
  font-size: 14px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-unit);
}

header {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h1 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-size: 30px; /* Scaled up from 28px */
  font-weight: 500;
  margin-bottom: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h6,
.label {
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--label-color);
  font-family: var(--label-font);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 0;
}

p {
  margin-bottom: var(--spacing-unit);
  color: var(--text-color);
  line-height: 1.4;
}

ul,
ol {
  margin-bottom: var(--spacing-unit);
}

li {
  /* margin-bottom: 8px; */
  line-height: 1.4;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 600px;
  margin-top: 0;
  line-height: 1.35;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px; /* Closer to text than border-bottom */
  transition: text-decoration-color 0.2s ease-in-out;
}

a:hover {
  color: var(--heading-color);
  text-decoration-color: var(--heading-color);
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--heading-color);
  outline-offset: 2px;
}

a:focus-visible {
  text-decoration-color: var(--heading-color);
}

.card:focus-visible {
  border-color: var(--heading-color);
  outline: none;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--heading-color);
  color: var(--bg-color);
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.muted,
.mono {
  color: var(--label-color);
}

.mono {
  font-family: var(--label-font);
  font-size: 0.85rem;
}

/* Resume Layout Utilities */
.resume-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 24px; /* Tighter spacing per Framer snippet */
}

.resume-label {
  width: 120px;
  flex-shrink: 0;
  padding-top: 0.2rem; /* Adjusted for 1.5 line-height */
}

.resume-content {
  flex: 1;
}

.resume-content ul {
  list-style-type: disc;
  padding-left: 1.2rem;
  margin: 0;
}

/* Project List specific overrides */

.project-title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px; /* Closer to text than border-bottom */
  transition: text-decoration-color 0.2s ease-in-out;
}

.project-title:hover {
  text-decoration-color: var(--text-color);
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .resume-row {
    flex-direction: column;
    gap: 8px;
  }

  .resume-label {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Utility */
.text-secondary {
  color: var(--link-color);
}

/* Logo List (Worked At/On) */
.logo-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px; /* Row gap 24px, Column gap 32px */
  align-items: center;
  justify-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.logo-list li {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 0; /* Override general li margin */
}

.logo-list img {
  display: block;
  height: 20px; /* Fixed height to keep them consistent */
  width: auto; /* Width auto to maintain aspect ratio */
  object-fit: contain;
  opacity: 0.8;
  transition: all 0.3s ease-in-out;
}

/* Social List (Find Me) */
.social-list {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-list a {
  display: inline-block;
  width: 20px; /* Slightly smaller to match icons */
  height: 20px;
  color: var(--label-color);
  transition: color 0.2s ease-in-out;
}

.social-list a:hover {
  color: var(--heading-color);
}

.social-list svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Card Layout (Bookmarks) */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.2s ease-in-out;
  background-color: var(--bg-color);
}

.card:hover {
  background-color: #fafafa;
  transform: translateY(-2px);
}

.card a {
  display: block;
  font-weight: 500;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
}

.card-title {
  font-weight: 500;
  color: var(--link-color);
}

.card-header a:hover {
  text-decoration-color: transparent;
}

.card .mono {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.7;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.favicon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Case Study Layouts */
.section {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.case-study-item {
  margin-bottom: var(--spacing-unit);
}

.case-study-item h4 {
  margin-bottom: 1rem;
  color: var(--heading-color);
  line-height: 1.3;
}

.comparison-grid {
  display: flex;
  gap: 32px;
  margin-top: 1.5rem;
}

.comparison-grid > div {
  flex: 1;
}

.comparison-grid img {
  margin-bottom: 0.75rem;
}

.comparison-grid h6 {
  margin-bottom: 0;
}

.comparison-grid p {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  margin-top: 0;
}

.key-learning-list {
  padding-inline-start: 1rem;
}

@media (max-width: 600px) {
  .comparison-grid {
    flex-direction: column;
    gap: 24px;
  }
}

/* Footer Styles */
.site-footer {
  width: 100%;
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  margin-top: 128px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem calc(var(--spacing-unit) * 2);
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--label-color);
}

.before-after-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.before-after-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.carousel-grid {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  margin: 2rem 0;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carousel-grid .case-study-item {
  flex: 0 0 80%;
  margin-bottom: 0;
  scroll-snap-align: center;
}

.carousel-grid::-webkit-scrollbar {
  height: 4px;
}

.carousel-grid::-webkit-scrollbar-track {
  background: var(--border-color);
}

.carousel-grid::-webkit-scrollbar-thumb {
  background: var(--label-color);
  border-radius: 4px;
}

.caption {
  font-size: 12px;
  color: var(--label-color);
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1.4;
}

.boxed-section {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 48px;
  margin-top: 24px;
}

.boxed-section > *:first-child {
  margin-top: 0;
}

.boxed-section > *:last-child {
  margin-bottom: 0;
}

blockquote {
  margin: 0;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .before-after-grid {
    grid-template-columns: 1fr;
  }
  .carousel-grid .case-study-item {
    flex: 0 0 90%;
  }
}

/* ING Help Center Case Study Overrides */

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 24px;
}

.back-link h6 {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.back-link svg {
  color: var(--label-color);
}

.back-link:hover {
  color: var(--heading-color);
}

.case-study-title {
  margin-bottom: 48px;
}

.case-study-title p {
  font-size: 16px;
  color: var(--label-color);
  margin-top: 8px;
  line-height: 1.35;
}

.project-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 48px;
}

.summary-item .label {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  color: var(--label-color);
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
}

.summary-item p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.challenge-box {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin: 48px 0;
  background-color: transparent;
}

.challenge-box blockquote {
  font-size: 16px;
  font-style: italic;
  line-height: 1.4;
  text-align: left;
  margin: 0;
}

.image-container {
  margin: 24px 0;
  text-align: center;
}

.image-aspect-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  padding: 24px;
}

.image-aspect-box.white-bg {
  background-color: #fff;
}

.image-aspect-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-aspect-box.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-aspect-box.tall {
  height: auto;
  min-height: 406px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1.77778;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.mockup-container {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.mockup-container img {
  width: 200px;
  height: auto;
}

.case-study-content ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.case-study-content li {
  /* margin-bottom: 12px; */
  line-height: 1.4;
}

.case-study-content li p {
  margin-bottom: 0;
}

.case-study-content h3 {
  margin-top: 32px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
}

th {
  background-color: #f8fafc;
  font-weight: 500;
  color: var(--heading-color);
  font-family: var(--font-family);
}

.table-container {
  overflow-x: auto;
  margin: 24px 0;
}

.table-container table {
  margin: 0;
}

.tradeoff-table .selected-row {
  background-color: #f0fdf4;
}

.tradeoff-table .selected-row td {
  border-color: #86efac;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
