@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Pointer Cursor for Clickable Elements */
a,
button,
[role="button"],
.project-card,
.back-nav,
.playground-card,
.about-link,
.about-link-btn,
.email-copy-btn,
.btn-primary,
.play-btn,
.btn-control,
.playlist-item {
  cursor: pointer;
}

:root {
  /* Colors - Light Mode Defaults */
  --bg-color: #ffffff;
  --text-primary: #000000;
  --text-p-grey: #404040;
  --text-secondary: #898989;
  --text-nav-inactive: #A09E9E;
  --link-blue: #3C77CA;
  --border-color: #E6E6E6;
  --border-dark: #8E8E8E;

  /* Component Colors */
  --card-bg: #FAFAFA;
  --hero-card-bg: #ffffff;
  --hero-overlay: rgba(0, 0, 0, 0.03);
  --music-player-bg: #1E1B4B;
  /* Deep indigo - premium audio vibe */
  --bg-claim-link: #ffffff;


  /* Fonts */
  --font-primary: 'Outfit', sans-serif;
  --font-nav: 'Outfit', sans-serif;
  /* Changed from Roboto */
  --font-ui: 'Outfit', sans-serif;
  /* Changed from Inter */
  --font-body: 'Outfit', sans-serif;
  /* Define body font as Outfit */

  /* Dimensions */
  --content-width: 1200px;
  --page-padding-top: 120px;
  /* Aligned with design absolute top */
}

[data-theme="dark"] {
  --bg-color: #0A0A0A;
  --text-primary: #EEEEEE;
  --text-p-grey: #CCCCCC;
  --text-secondary: #A0A0A0;
  --text-nav-inactive: #888888;
  --link-blue: #60A5FA;
  --border-color: #333333;
  --border-dark: #555555;

  --card-bg: #1A1A1A;
  --hero-card-bg: #1A1A1A;
  --hero-overlay: rgba(255, 255, 255, 0.05);
  --music-player-bg: #0F0F23;
  /* Near-black with hint of blue */
  --bg-claim-link: #F0F0F0;

}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Clean edges */
}

.container {
  width: 100%;
  max-width: 1200px;
  /* Match Pencil design width */
  padding: 0 20px;
  /* Match Pencil Frame padding:[0,20] */
  position: relative;
  margin: 0 auto;
  /* Center container (creates 120px margins on 1440px+ viewports) */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header - 801:157 */
header {
  height: 64px;
  width: 100%;
  /* Full width of container (which has padding) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 20px;
  /* 20px padding on both sides */
  z-index: 10;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 28px;
  color: var(--text-primary);
  text-decoration: none;
  text-align: center;
}

nav {
  display: flex;
  gap: 56px;
  align-items: center;
  /* From Figma context gap-[56px] */
}

nav a {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.1px;
  color: var(--text-nav-inactive);
  /* Inactive color from Figma */
  text-decoration: none;
}

nav a.active,
nav a:hover {
  color: var(--text-primary);
}

/* Footer - 801:169 */
footer {
  width: 100%;
  /* Full width of container */
  position: relative;
  top: auto;
  margin-top: auto;
  /* Sticky Bottom */
  border-top: 1px solid var(--border-color);
  padding: 49px 20px 48px;
  /* Vertical padding + 20px horizontal */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 32px;
  /* Inferred from frame width */
}

.social-links a {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social-links a:hover {
  opacity: 0.7;
}

/* Home Layout */
.home-content {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Optimized: 64px header + 16px breathing room (8px grid) */
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex: 1;
  margin-bottom: 64px;
  /* Optimized: 8 * 8px grid for footer spacing */
  gap: 102px;
  /* Fixed gap maintains spacing */
}

.hero-left {
  width: 49%;
  /* Responsive width (588/1200 ≈ 49%) */
  max-width: 588px;
  /* Cap at Pencil design size */
  height: 630px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background-color: var(--hero-card-bg);
  flex-shrink: 0;
  /* Prevent compression */
}

/* Hero image container for project previews */
.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0 20px;
  /* 20px padding on left and right */
  background-origin: content-box;
  /* Ensures background respects padding */
  background-color: var(--hero-overlay);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

/* Aurora shader background transition */
#auroraShaderBg {
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* New style for the tagline text */
.hero-tagline {
  position: absolute;
  left: 32px;
  bottom: 32px;
  width: calc(100% - 64px);
  /* Responsive to parent */
  max-width: 540px;
  font-family: var(--font-primary);
  /* Outfit */
  font-weight: 500;
  font-size: 40px;
  color: #FFFFFF;
  line-height: 1.1;
  z-index: 1;
  /* Above the shader (0), but below the project preview layer (2) */
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.project-list-right {
  width: 42.5%;
  /* Responsive width (510/1200 ≈ 42.5%) */
  max-width: 510px;
  /* Cap at Pencil design size */
  display: flex;
  flex-direction: column;
  gap: 36px;
  /* From Figma gap-[36px] */
  flex-shrink: 0;
  /* Prevent compression */
}

/* Individual Project Item */
.project-card {
  width: 100%;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: none;
  height: auto;
  cursor: pointer;
  padding: 16px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.project-card:hover {
  background-color: var(--card-bg);
}

.company-name {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.1px;
  color: var(--text-secondary);
}

.project-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.project-title-text {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.15px;
  color: var(--text-primary);
  flex: 1;
  /* Allow to grow and take available space */
  min-width: 0;
  /* Allow text to shrink if needed */
}

.project-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  /* Push to right */
  flex-shrink: 0;
  /* Never compress tags and arrow */
}

.project-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1px;
  color: var(--text-secondary);
  white-space: nowrap;
  /* Keep tags on one line */
}

.arrow-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  /* Never compress arrow */
  color: var(--text-secondary);
}

/* About Layout */
.about-content {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Optimized spacing */
  width: 100%;
  margin-bottom: 64px;
  /* Consistent with other sections (8 * 8px grid) */
  flex: 1;
}

/* Playground Layout */
.playground-grid {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Optimized spacing */
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
  /* Prevent footer overlap */
  flex: 1;
}

.playground-item {
  height: 200px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

/* Playground Layout */
.playground-layout {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Optimized spacing */
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin-bottom: 64px;
  /* Prevent footer overlap */
  flex: 1;
}

/* Playground Intro Section */
.playground-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.playground-title {
  font-family: var(--font-primary);
  font-size: 48px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
}

.playground-description {
  font-family: var(--font-primary);
  font-size: 18px;
  color: var(--text-p-grey);
  line-height: 1.5;
  max-width: 600px;
  margin: 0;
}

.playground-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

.playground-card {
  height: 298px;
  background-color: var(--card-bg);
  /* Or gradient as per pencil? Pencil showed gradient fills but disabled? showing white usually. Let's stick to gray placeholder */
  border: 1px solid var(--border-color);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.playground-row-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.playground-row-secondary .playground-card {
  width: 100% !important;
  height: 360px;
}

.playground-card-ai-skill {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.social-observation-card-body {
  min-height: 0;
}

.social-observation-cta {
  margin-top: auto !important;
}

.ai-skill-card-body {
  flex: 1;
  min-height: 0;
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.ai-skill-copy {
  max-width: 520px;
}

.ai-skill-copy h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.ai-skill-copy p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-p-grey);
  margin: 0;
}

.ai-skill-code-snippet {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-skill-code-snippet code {
  flex: 1;
  font-family: "SFMono-Regular", "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #4F46E5;
  white-space: nowrap;
  overflow-x: auto;
}

.ai-skill-code-row {
  display: flex;
  align-items: center;
}

.snippet-copy-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #4F46E5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.snippet-copy-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.github-cta {
  width: 40px;
  height: 40px;
  margin-left: 32px;
  flex-shrink: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  z-index: 11;
}

.github-cta:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.14);
}

.github-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

[data-theme="dark"] .ai-skill-code-snippet {
  background: rgba(165, 180, 252, 0.08);
  border-color: rgba(165, 180, 252, 0.18);
}

[data-theme="dark"] .ai-skill-code-snippet code {
  color: #C7D2FE;
}

[data-theme="dark"] .snippet-copy-btn {
  color: #C7D2FE;
}

[data-theme="dark"] .github-cta {
  background: rgba(26, 26, 26, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .github-cta:hover {
  background: rgba(26, 26, 26, 0.95);
  border-color: rgba(255, 255, 255, 0.16);
}

/* About Layout */
.about-layout {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Optimized spacing */
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 64px;
  /* Prevent footer overlap */
  flex: 1;
  gap: 102px;
  /* Fixed gap maintains spacing */
}

.about-left-col {
  width: 57.5%;
  /* Responsive width (690/1200 ≈ 57.5%) */
  max-width: 690px;
  /* Cap at Pencil design size */
  display: flex;
  flex-direction: column;
  gap: 48px;
  flex-shrink: 0;
  /* Prevent compression */
}

/* About Layout */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-text {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-p-grey);
  margin-bottom: 24px;
}

.about-links-row {
  display: flex;
  gap: 80px;
  margin-top: 0;
}

.about-link {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 16px;
  color: var(--link-blue);
  letter-spacing: 0.15px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.about-link:hover {
  opacity: 0.7;
}

/* About link button styling (for email copy button) */
.about-link-btn {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 16px;
  color: var(--link-blue);
  letter-spacing: 0.15px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.about-link-btn:hover {
  opacity: 0.7;
}

.about-experience-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.section-header {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: 0.15px;
}

/* Existing experience items... */
.about-experience-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-year {
  font-size: 16px;
  color: var(--text-primary);
}

.exp-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exp-company {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
}

.exp-role {
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 16px;
  color: #898989;
}


.exp-company-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exp-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 4px;
}

.about-right-col-image {
  width: 34%;
  /* Responsive width (408/1200 ≈ 34%) */
  max-width: 408px;
  /* Cap at Pencil design size */
  align-self: stretch;
  background-color: var(--card-bg);
  border-radius: 24px;
  flex-shrink: 0;
  /* Prevent compression */
  overflow: hidden;
}

/* Work Detail Layout (800:000) */
.work-detail-layout {
  position: relative;
  top: auto;
  margin-top: 80px;
  /* Aligned with other page layouts */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-bottom: 64px;
  /* Consistent with other pages */
  flex: 1;
  /* Sticky footer push */
}

.back-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-nav);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
  width: fit-content;
}

.back-nav:hover {
  color: var(--text-primary);
}

.work-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  background-color: transparent;
  /* Full container width */
}

.work-icon {
  width: 64px;
  height: 64px;
  background-color: #ffffff;
  flex-shrink: 0;
  object-fit: contain;
}

.work-icon.huawei-icon {
  padding: 8px;
  border-radius: 8px;
}

.work-icon.imtoken-icon {
  background-color: transparent;
}

.work-icon.ibm-icon {
  background-color: transparent;
}

.work-icon.antom-icon {
  border-radius: 12px;
}

.work-icon.alipay-icon {
  border-radius: 12px;
}

.work-title {
  font-family: var(--font-primary);
  font-size: 48px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
  max-width: 960px;
}

.work-desc {
  font-family: var(--font-primary);
  font-size: 20px;
  color: var(--text-p-grey);
  line-height: 1.4;
  max-width: 960px;
}

.work-desc.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.work-content {
  display: flex;
  flex-direction: column;
  gap: 80px;
  width: 100%;
  /* Full container width */
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.content-section h2,
.content-section h3,
.content-section h4,
.content-section p,
.content-section ul,
.content-section ol {
  max-width: 960px;
  width: 100%;
}

.content-section h2 {
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  color: var(--text-primary);
}

.content-section h3 {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.content-section h4 {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.content-section p {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-p-grey);
  margin: 0;
}

.content-section ul,
.content-section ol {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-p-grey);
  margin: 0 0 0 20px;
  /* Left margin for bullets */
  padding: 0;
}

.content-section li {
  margin-bottom: 8px;
  /* Breathing room between items */
}

.content-section li:last-child {
  margin-bottom: 0;
}

/* Style for work tags formerly inline */
.work-tags {
  font-family: var(--font-primary);
  font-size: 0.9em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.media-box {
  width: 100%;
  /* Full container width for impact */
  height: 500px;
  background-color: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-family: var(--font-nav);
}

/* Alipay Intl Hero Media Box */
.alipay-intl-hero-media {
  height: auto;
  padding: 24px 24px 0;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.alipay-intl-hero-media img {
  flex: 1;
  min-width: 0;
  max-width: calc(33.333% - 11px);
  height: auto;
  object-fit: contain;
  border-radius: 12px 12px 0 0;
  display: block;
}

.project-highlight-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: text-bottom;
  color: var(--text-secondary);
}

/* Weblink Preview Card */
.weblink-preview:hover {
  border-color: var(--border-dark);
}

.weblink-preview:hover .weblink-arrow {
  color: var(--text-primary);
}

/* Webapp Splash Video - Responsive Width */
.webapp-splash-video {
  width: 100%;
  /* Mobile: full width (20px padding from container) */
  display: block;
  margin: 24px auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .webapp-splash-video {
    width: 80%;
    /* Desktop/Tablet: 80% width */
  }
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-top: 24px;
  display: block;
  object-fit: contain;
  /* Changed from cover to contain for better UI mockup fitting */
}

/* Image Grid for side-by-side screenshots */
.image-grid {
  display: flex;
  gap: 24px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.image-grid .content-image {
  margin-top: 0;
  flex: 1;
  min-width: 280px;
  max-width: calc(50% - 12px);
  /* Default to 2 columns if space allows */
}

@media (max-width: 768px) {
  .image-grid .content-image {
    max-width: 100%;
  }
}

/* Desktop Responsive Optimization (1025px+) */
@media (min-width: 1025px) {
  /* Container padding and max-width are handled in base .container class */

  /* Ensure responsive widths work properly */
  .home-content {
    width: 100%;
    align-items: flex-start;
  }

  .hero-left {
    position: sticky;
    top: 80px;
    height: calc(100vh - 104px);
  }

  .about-layout {
    width: 100%;
  }

  /* Playground responsive grid */
  .playground-layout {
    width: 100%;
  }

  .playground-row {
    width: 100%;
  }

  /* Work Detail responsive width */
  .work-detail-layout {
    width: 100%;
  }
}

/* =========================================
   Responsive Design (UI UX Pro Max Skill)
   ========================================= */

/* Tablet (iPad / Portrait Tablets) */
@media (max-width: 1024px) {
  :root {
    --content-width: 100%;
    /* Fluid width */
  }

  .container {
    width: 100%;
    padding: 0 20px;
    /* Consistent 20px padding across tablet and mobile */
  }

  header,
  footer {
    width: 100%;
    /* Full width of container (which has padding) */
    left: 0;
    /* Align to container edge */
  }

  nav {
    gap: 32px;
    /* Slightly reduced from desktop */
  }

  /* Home Tablet - Mobile-style stacked */
  .home-content {
    flex-direction: column;
    /* Stack like mobile */
    gap: 48px;
    align-items: flex-start;
    padding-bottom: 60px;
  }

  .hero-left {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    height: 500px;
    /* Taller than mobile but not full desktop */
  }

  .hero-tagline {
    font-size: 48px;
    /* Between mobile and desktop */
    width: calc(100% - 48px);
    left: 24px;
    top: auto;
    bottom: 48px;
  }

  .project-list-right {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
  }

  /* About Tablet - Mobile-style stacked */
  .about-layout {
    flex-direction: column;
    gap: 48px;
  }

  .about-right-col-image {
    order: -1;
    /* Image on top */
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    height: 500px;
  }

  .about-left-col {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    order: 1;
  }

  /* Playground Tablet: 2 items per row */
  .playground-row {
    flex-wrap: wrap;
    gap: 24px;
  }

  .playground-card {
    width: calc(50% - 12px) !important;
    /* 2 per row with gap */
    min-width: 300px;
    /* Prevent too narrow */
  }

  /* Large cards (AI Tool, Music Player) - Full width on tablet */
  .playground-card.large,
  .music-player-card {
    width: 100% !important;
    min-width: unset;
  }

  .playlist-panel {
    width: 180px;
  }

  .player-main {
    padding-top: 20px;
    /* Space for the MUSIC chip tag */
  }

  /* Work Detail Tablet */
  .work-detail-layout {
    gap: 48px;
    margin-bottom: 48px;
  }

  .work-title {
    font-size: 40px;
    max-width: 100%;
  }

  .work-desc {
    font-size: 18px;
    max-width: 100%;
  }

  .work-content {
    gap: 64px;
  }

  .content-section p {
    max-width: 100%;
  }

  .media-box {
    height: 400px;
  }

  /* Footer adjustments */
  footer {
    position: relative;
    flex-direction: row;
    /* Keep horizontal on tablet */
  }
}

/* Mobile (Phone) */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
    /* Maintain base padding on mobile */
  }

  header,
  footer {
    width: 100%;
    /* Full width of container (which has padding) */
    left: 0;
    /* Align to container edge */
    position: absolute;
  }

  /* Keep Nav visible, no drawer */
  nav {
    gap: 20px;
  }

  /* Home Mobile */
  .home-content {
    flex-direction: column;
    /* Rectangle (Hero) on top, List below */
    gap: 40px;
    align-items: flex-start;
    padding-bottom: 40px;
  }

  .hero-left {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    height: 60vh;
    /* "Do not occupy full screen", visual breath */
    max-height: 500px;
  }

  .hero-tagline {
    font-size: 32px;
    /* Scale down font */
    width: calc(100% - 48px);
    left: 24px;
    top: auto;
    bottom: 40px;
    /* Position relative to bottom of card */
  }

  .project-list-right {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
  }

  footer {
    position: relative;
    /* Flow after content */
    flex-direction: column;
    gap: 24px;
    margin-top: 60px;
    align-items: flex-start;
  }

  /* About Mobile */
  .about-layout {
    flex-direction: column;
    position: relative;
    /* Switch to flow */
    padding-bottom: 40px;
    gap: 40px;
    margin-top: 100px;
    /* Push down below absolute header */
  }

  .about-right-col-image {
    /* "Place rectangle on top" */
    order: -1;
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    height: 400px;
  }

  .about-left-col {
    width: 100% !important;
    /* Override desktop percentage */
    max-width: none;
    /* Remove cap */
    order: 1;
    /* Follows image */
  }

  /* Playground Mobile */
  .playground-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    margin-top: 100px;
  }

  .playground-layout .playground-intro {
    order: 0;
  }

  .playground-row {
    display: contents;
  }

  .playground-row-secondary {
    display: contents;
  }

  .playground-row-secondary .playground-card {
    height: auto !important;
    min-height: 298px;
  }

  .ai-skill-code-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .github-cta {
    margin-left: 0;
  }

  /* Specific Card Ordering on Mobile */
  .mobile-order-1 {
    order: 1;
  }

  /* Mini App */
  .mobile-order-2 {
    order: 2;
  }

  /* AI Skill */
  .mobile-order-3 {
    order: 3;
  }

  /* Music */
  .mobile-order-4 {
    order: 4;
  }

  /* Social */
  .mobile-order-5 {
    order: 5;
  }

  /* More Coming */

  .playground-card,
  .playground-card.small,
  .playground-card.large,
  .playground-card.medium {
    width: 100% !important;
    /* One card per row */
  }

  /* Music Player Mobile - Stack layout */
  .music-player-card {
    width: 100% !important;
    height: auto !important;
    min-height: 350px;
  }

  .custom-audio-player {
    padding: 24px;
  }

  .player-layout {
    flex-direction: column;
    gap: 20px;
  }

  .playlist-panel {
    width: 100% !important;
    order: 2;
    /* Playlist below controls on mobile */
  }

  .playlist-header {
    margin-bottom: 8px;
  }

  .playlist-items {
    max-height: 120px;
  }

  .player-main {
    width: 100%;
    order: 1;
    /* Controls on top */
    padding-top: 40px;
    /* Space for the MUSIC chip tag */
  }

  .player-info {
    margin-bottom: 16px;
  }

  .song-title {
    font-size: 20px;
  }

  .artist-name {
    font-size: 14px;
  }

  /* Work Detail Mobile */
  .work-detail-layout {
    margin-top: 100px;
    /* Push below fixed header like other pages */
    gap: 40px;
    margin-bottom: 40px;
  }

  .work-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .work-title {
    font-size: 32px;
  }

  .work-desc {
    font-size: 16px;
  }

  .work-content {
    gap: 48px;
  }

  .content-section {
    gap: 20px;
  }

  .content-section h2 {
    font-size: 20px;
  }

  .media-box {
    height: 280px;
    border-radius: 16px;
  }

  .alipay-intl-hero-media {
    height: auto;
    padding: 16px 16px 0;
    gap: 8px;
  }

  .alipay-intl-hero-media img {
    max-width: calc(33.333% - 6px);
    border-radius: 8px 8px 0 0;
  }

  .back-nav {
    font-size: 13px;
  }

  /* Resume Mobile */
  .resume-layout {
    position: relative;
    top: auto;
    margin-top: 100px;
    /* Below fixed header */
    padding-bottom: 40px;
    width: 100%;
  }

  .resume-name {
    font-size: 32px;
  }

  .resume-contact {
    flex-direction: column;
    gap: 8px;
  }

  .resume-desc {
    font-size: 16px;
  }

  .resume-role {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  /* Phone mocks reduced size on mobile - use actual max-width reduction instead of scale */
  .phone-wrapper {
    max-width: 140px !important;
    min-width: 80px !important;
  }

  .phone-mock-container .phone-wrapper,
  .side-by-side-mocks .phone-wrapper {
    max-width: 140px !important;
    min-width: 80px !important;
  }

  /* Side-by-side mocks container adjustments for mobile */
  .side-by-side-mocks .mock-item {
    min-width: 140px !important;
    max-width: 180px !important;
  }
}

/* =========================================
   Toast Notification Component
   ========================================= */

.toast-container {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-icon {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
}

.toast-message {
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.1px;
}

/* Email button styling (matches footer anchor links exactly) */
.email-copy-btn {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.email-copy-btn:hover {
  opacity: 0.7;
}

/* Components added for Playground Content */
.btn-primary {
  display: inline-block;
  background-color: var(--text-primary);
  color: var(--bg-color);
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.tag {
  background-color: var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

/* Custom Audio Player Styles */
.custom-audio-player {
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  /* Aligned with other cards on the page */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  position: relative;
}

/* Audio Visualizer Canvas */
.audio-visualizer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.audio-visualizer-canvas.active {
  opacity: 1;
}

/* Music Player Card Sizing */
.music-player-card {
  width: 690px;
  height: 298px;
}

/* Large Card Sizing (AI Tool, etc.) */
.playground-card.large {
  width: 690px;
}

/* Player Layout - Two Column Grid */
.player-layout {
  display: flex;
  gap: 24px;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Playlist Panel */
.playlist-panel {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.playlist-title {
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
}

.playlist-count {
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 12px;
}

.playlist-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  /* Firefox scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.playlist-items:hover {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Webkit scrollbar - hidden by default, shows on hover */
.playlist-items::-webkit-scrollbar {
  width: 4px;
}

.playlist-items::-webkit-scrollbar-track {
  background: transparent;
}

.playlist-items::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.playlist-items:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.playlist-item:hover {
  background: rgba(128, 128, 128, 0.08);
}

.playlist-item.active {
  background: rgba(128, 128, 128, 0.12);
}

[data-theme="dark"] .playlist-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .playlist-item.active {
  background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active .track-name {
  color: var(--text-primary);
}

.track-number {
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 12px;
  width: 16px;
  flex-shrink: 0;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track-name {
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player Main - Right Side */
.player-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.player-info {
  margin-bottom: 24px;
  z-index: 2;
}

.song-title {
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}

.artist-name {
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 16px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

.play-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.play-btn svg path {
  fill: var(--bg-color);
}

.play-btn:hover {
  transform: scale(1.05);
}

.progress-container {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-bar {
  width: 30%;
  /* Demo progress */
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  position: relative;
}

.time-stamp {
  color: var(--text-secondary);
  font-size: 12px;
  font-family: monospace;
}

.btn-control {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-control:hover {
  opacity: 1;
}

.btn-control svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Tag/Chip System - Liquid Glass Aesthetic */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  width: fit-content;

  /* Glassmorphism Base */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);

  /* Positioning */
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  margin: 0;
}

/* AI Tool - Indigo Tint Glass */
.chip-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #6366F1;
  border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .chip-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #A5B4FC;
  border-color: rgba(165, 180, 252, 0.2);
}

/* Music - Aurora Gradient Glass */
.chip-music {
  background: linear-gradient(135deg, rgba(107, 143, 175, 0.25) 0%, rgba(155, 143, 187, 0.2) 100%);
  color: #6B8FAF;
  border-color: rgba(107, 143, 175, 0.2);
  animation: chip-shimmer 3s ease-in-out infinite;
}

[data-theme="dark"] .chip-music {
  background: linear-gradient(135deg, rgba(107, 143, 175, 0.3) 0%, rgba(155, 143, 187, 0.25) 100%);
  color: #A5C4E0;
  border-color: rgba(165, 196, 224, 0.25);
}

@keyframes chip-shimmer {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }
}

/* Social - Teal/Calm Blue Glass */
.chip-social {
  background: rgba(13, 148, 136, 0.9);
  /* Solid Teal */
  color: #FFFFFF;
  border-color: transparent;
}

[data-theme="dark"] .chip-social {
  background: rgba(20, 184, 166, 0.9);
  /* Lighter Teal */
  color: #FFFFFF;
  border-color: transparent;
}

/* =========================================
   Monitor Mockup Component
   ========================================= */
.monitor-wrapper {
  perspective: 1000px;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.monitor-frame {
  background: #111;
  border-radius: clamp(8px, 1.5%, 14px);
  padding: clamp(4px, 1%, 10px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 100%;
  z-index: 10;
  transition: transform 0.3s ease;
}

.monitor-frame:hover {
  transform: translateY(-5px);
}

.monitor-screen {
  background: #000;
  border-radius: clamp(4px, 0.8%, 6px);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1508 / 828;
  /* Matched to GIF dimensions */
  width: 100%;
}

.monitor-screen img,
.monitor-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.monitor-stand {
  background: linear-gradient(180deg, #8E8E93 0%, #5E5E63 100%);
  width: 120px;
  height: 40px;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.monitor-base {
  background: linear-gradient(90deg, #E5E5EA 0%, #C7C7CC 100%);
  width: 200px;
  height: 6px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
}

/* Dark mode adjustments */
[data-theme="dark"] .monitor-stand {
  background: linear-gradient(180deg, #444 0%, #222 100%);
}

[data-theme="dark"] .monitor-base {
  background: linear-gradient(90deg, #555 0%, #333 100%);
}

/* Mobile Phone Mockup */
.phone-wrapper {
  perspective: 1000px;
  width: 260px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.phone-frame {
  background: #111;
  border-radius: clamp(12px, 8%, 20px);
  padding: clamp(2px, 1.5%, 4px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  border: clamp(1px, 0.8%, 2px) solid #222;
  overflow: hidden;
}

.phone-screen {
  background: #000;
  border-radius: clamp(8px, 6%, 16px);
  overflow: hidden;
  position: relative;
  width: 100%;
  height: auto;
}

.phone-screen video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Speaker/Notch area - hidden for cleaner look */
.phone-frame::after {
  display: none;
}

/* =========================================
   Content Grid Layouts
   ========================================= */
.content-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  margin: 24px 0;
}

@media (min-width: 768px) {
  .content-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: block;
}

/* Custom class for interactive dialog scaling */
.interactive-dialog-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: block;
}

@media (min-width: 768px) {
  .interactive-dialog-img {
    width: 60%;
  }
}

/* .project-cover styles moved from work-huawei-mobile.html */
.project-cover {
  width: 100%;
  aspect-ratio: 2.1 / 1;
  background-color: var(--card-bg);
  border-radius: 24px;
  overflow: hidden;
  margin: 40px 0;
  position: relative;
  display: flex;
  justify-content: center;
}

.project-cover img {
  width: 90%;
  height: auto;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 12px;
}



/* Centered Layout for Content Sections */
.content-section.centered-layout {
  align-items: center;
}

.content-section.centered-layout>* {
  max-width: 960px;
  width: 100%;
}

/* Carousel Navigation */
.carousel-wrapper {
  position: relative;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
  border-color: transparent;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.carousel-nav.prev {
  left: 10px;
}

.carousel-nav.next {
  right: 10px;
}

@media (min-width: 1024px) {
  .carousel-nav {
    display: flex;
  }

  .carousel-nav.prev {
    left: -24px;
  }

  .carousel-nav.next {
    right: -24px;
  }
}

/* ============================================
   Pinterest Masonry Feed
   ============================================ */
.pinterest-feed-container {
  background: rgba(240, 240, 235, 0.6);
  border-radius: 20px;
  padding: 24px;
  margin: 24px 0;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .pinterest-feed-container {
  background: rgba(40, 40, 40, 0.5);
}

.pinterest-feed {
  display: flex;
  gap: 12px;
  position: relative;
  /* Default mobile: 2 columns, auto height */
  height: auto;
}

.pinterest-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Device-proportional column widths: web > pad > mobile */
.pinterest-column.col-web {
  flex: 5;
}

.pinterest-column.col-pad {
  flex: 3.5;
}

.pinterest-column.col-mobile {
  flex: 2;
}

/* Column animation - scrolling vertically - REMOVED */
.pinterest-column-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Scroll down - REMOVED */
/* Scroll up - REMOVED */
/* Speed variations - REMOVED */

/* Keyframes removed */

.pinterest-item {
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.pinterest-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}



/* Mobile: 2 columns (pad + mobile), compact height */
@media (max-width: 767px) {
  .pinterest-column.col-web {
    display: none;
  }

  /* Pad 70%, Mobile 30% on small screens */
  .pinterest-column.col-pad {
    flex: 7;
  }

  .pinterest-column.col-mobile {
    flex: 3;
  }

  .pinterest-feed-container {
    padding: 12px;
    border-radius: 16px;
  }

  .pinterest-feed {
    gap: 8px;
    height: auto;
  }

  .pinterest-column-inner {
    gap: 8px;
  }

  .pinterest-item {
    border-radius: 8px;
  }

  .pinterest-item img {
    border-radius: 8px;
  }
}

/* Tablet: 3 columns, mid-range height */
@media (min-width: 768px) and (max-width: 1023px) {
  .pinterest-feed {
    height: auto;
    gap: 10px;
  }

  .pinterest-column-inner {
    gap: 10px;
  }

  .pinterest-feed-container {
    padding: 16px;
  }
}

/* Desktop: 3 columns, generous height */
@media (min-width: 1024px) {
  .pinterest-feed {
    height: auto;
  }
}

/* Responsive Video Container for YouTube Embeds */
.video-embed-container {
  width: 100%;
  max-width: 960px;
  margin: 48px auto;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.video-aspect-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.video-aspect-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Magic Paper Toys card — mobile stacked layout */
@media (max-width: 768px) {
  .playground-card.large {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0 0 24px 0 !important;
    gap: 20px !important;
    height: auto !important;
    overflow: hidden;
  }

  /* Image fills full width at top, fixed height on mobile */
  .playground-card.large>div:first-of-type {
    width: 100% !important;
    height: 160px !important;
    border-radius: 0 !important;
    justify-content: center;
    overflow: hidden;
  }

  .playground-card.large>div:first-of-type img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Text/button block gets side padding */
  .playground-card.large .card-content {
    padding: 0 24px !important;
  }
}

/* Magic Paper Toys card — description width adjustment for pad and mobile */
@media (max-width: 1024px) {
  .playground-card.large .card-content p {
    max-width: 100% !important;
  }
}