/* =============================================
   DESIGN TOKENS
============================================= */
:root {
  --color-bg: #0a0a0a;
  --color-bg-card: #111111;
  --color-bg-card-hover: #161616;
  --color-bg-surface: #141414;
  --color-border: rgba(255,255,255,0.07);
  --color-border-strong: rgba(255,255,255,0.12);
  --color-text-primary: #f0f0f0;
  --color-text-secondary: #888888;
  --color-text-tertiary: #555555;
  /* --color-accent: #4ade80; */
  --color-accent: #ABE253;
  --color-accent-dim: rgba(74,222,128,0.15);
  --color-accent-glow: rgba(74,222,128,0.08);
  --color-white: #ffffff;

  --color-bg-light: #f8f8f8;
  --color-bg-card-light: #ffffff;
  --color-bg-surface-light: #f2f2f2;
  --color-border-light: rgba(0,0,0,0.07);
  --color-border-strong-light: rgba(0,0,0,0.12);
  --color-text-primary-light: #0f0f0f;
  --color-text-secondary-light: #555555;
  --color-text-tertiary-light: #999999;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.28), 0 8px 20px rgba(0,0,0,0.16);
  --shadow-sm-light: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md-light: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg-light: 0 20px 48px rgba(0,0,0,0.10), 0 8px 20px rgba(0,0,0,0.06);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --space-1: 4px;  --space-2: 8px;   --space-3: 12px;
  --space-4: 16px; --space-5: 20px;  --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px;

  --radius-sm: 8px; --radius-md: 12px;
  --radius-lg: 16px; --radius-xl: 20px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --color-bg: var(--color-bg-light);
  --color-bg-card: var(--color-bg-card-light);
  --color-bg-card-hover: #f9f9f9;
  --color-bg-surface: var(--color-bg-surface-light);
  --color-border: var(--color-border-light);
  --color-border-strong: var(--color-border-strong-light);
  --color-text-primary: var(--color-text-primary-light);
  --color-text-secondary: var(--color-text-secondary-light);
  --color-text-tertiary: var(--color-text-tertiary-light);
  --color-accent: #67941E;
  --shadow-sm: var(--shadow-sm-light);
  --shadow-md: var(--shadow-md-light);
  --shadow-lg: var(--shadow-lg-light);
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* =============================================
   PAGE SWITCHING
============================================= */
.page { display: none; animation: fadeIn 0.35s cubic-bezier(0.4,0,0.2,1) forwards; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   LAYOUTS
============================================= */
.home-layout {
  max-width: 900px; margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-12);
}

.subpage-layout {
  max-width: 900px; margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-20);
}

/* =============================================
   PROFILE HEADER
============================================= */
.profile-header {
  display: flex; align-items: stretch;
  gap: var(--space-6); margin-bottom: var(--space-6);
  position: relative;
}

.profile-avatar {
  width: 165px;
  min-height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: opacity 0.25s ease, transform 0.25s ease; }
.profile-avatar { position: relative; cursor: pointer; }
.avatar-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 600; color: var(--color-accent); background: linear-gradient(135deg, #1a2a1a 0%, #0d1a0d 100%); transition: opacity 0.25s ease; pointer-events: none; }
.profile-avatar img:not([src]) + .avatar-placeholder { opacity: 1; }
.avatar-placeholder[aria-hidden="true"] { opacity: 0; }

.avatar-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a2a1a 0%, #0d1a0d 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 600; color: var(--color-accent);
}

.profile-info { flex: 1; }

.profile-name {
  font-family: var(--font-body);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600; letter-spacing: -0.5px;
  color: var(--color-text-primary);
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.verified-badge { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-accent); }

.profile-location {
  display: flex; align-items: center; gap: var(--space-1);
  color: var(--color-text-secondary); font-size: 13px; margin-bottom: var(--space-3);
}
.profile-location svg { width: 12px; height: 12px; flex-shrink: 0; }

.profile-tagline {
  color: var(--color-text-secondary); font-size: 14px;
  margin-bottom: var(--space-5); letter-spacing: 0.1px;
}

.profile-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 9px var(--space-5); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  transition: all var(--transition); white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--color-text-primary);
  color: var(--color-bg); box-shadow: var(--shadow-sm);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover { color: var(--color-text-primary); border-color: var(--color-text-tertiary); background: var(--color-bg-surface); }

/* Theme toggle */
.theme-toggle {
  position: absolute; top: 0; right: 0;
  display: flex; align-items: center; gap: var(--space-2);
  padding: 6px 10px; border-radius: 100px;
  background: var(--color-bg-surface); border: 1px solid var(--color-border);
  font-size: 11px; color: var(--color-text-secondary);
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--color-border-strong); color: var(--color-text-primary); }
.theme-toggle svg { width: 14px; height: 14px; }

/* =============================================
   TWO COLUMN — equal-height columns
============================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  align-items: stretch;
}

/* Left column: flex so toolkit card fills remaining height */
.two-col-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* About card stays natural height */
.two-col-left > .card:first-child {
  flex-shrink: 0;
}

/* Toolkit card expands to fill remaining left-column space */
.two-col-left > .card:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Sidebar: full-height flex column */
.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
}

/* Experience card expands to fill remaining sidebar space */
.sidebar-stack .experience-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Experience list fills the card's flex space */
.sidebar-stack .experience-card .experience-list {
  flex: 1;
}

/* Resume, clock, social stay natural height */
.sidebar-stack .resume-card,
.sidebar-stack .clock-card,
.sidebar-stack .social-card {
  flex-shrink: 0;
}

/* =============================================
   CARDS
============================================= */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}
.card:hover { border-color: var(--color-border-strong); }

.card-title {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-primary); margin-bottom: var(--space-4);
}

/* About */
.about-text { color: var(--color-text-secondary); font-size: 14px; line-height: 1.7; margin-bottom: var(--space-3); }
.about-text:last-child { margin-bottom: 0; }

/* Toolkit */
.toolkit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-5); }

.view-all-link {
  font-size: 12px; color: var(--color-text-secondary);
  display: flex; align-items: center; gap: 4px; transition: color var(--transition);
}
.view-all-link:hover { color: var(--color-accent); }
.view-all-link svg { width: 12px; height: 12px; }

.toolkit-category { margin-bottom: var(--space-4); }
.toolkit-category:last-child { margin-bottom: 0; }
.toolkit-category-label { font-size: 12px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-2); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 12px; color: var(--color-text-secondary);
  transition: all var(--transition);
}
.tag:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }

/* =============================================
   SIDEBAR
============================================= */
/* .sidebar-stack base rules are defined inside TWO COLUMN section above */

.resume-card { padding: var(--space-5); }
.resume-hint { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; margin-bottom: var(--space-4); }
.resume-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 13px; color: var(--color-accent); font-weight: 500; transition: opacity var(--transition);
}
.resume-link:hover { opacity: 0.8; }
.resume-link svg { width: 14px; height: 14px; }

.experience-card { padding: var(--space-5); }
.experience-item { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.experience-item:last-child { border-bottom: none; padding-bottom: 0; }
.exp-indicator { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.exp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-tertiary); flex-shrink: 0; transition: background var(--transition); }
.experience-item.active .exp-dot { background: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-dim); }
.exp-content { flex: 1; }
.exp-title { font-size: 13px; font-weight: 600; color: var(--color-text-primary); line-height: 1.3; }
.exp-subtitle { font-size: 12px; color: var(--color-text-secondary); line-height: 1.4; margin-top: 2px; }
.exp-sub-group { display: flex; flex-direction: row;}
.exp-year { font-size: 11px; color: var(--color-text-tertiary); font-variant-numeric: tabular-nums; padding-top: 4px; display: flex; justify-content: flex-end; align-items: flex-end; }

.clock-card { padding: var(--space-5); }
.clock-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.clock-header svg { width: 14px; height: 14px; color: var(--color-text-secondary); }
.clock-display { font-size: 28px; font-weight: 300; letter-spacing: -1px; color: var(--color-text-primary); font-variant-numeric: tabular-nums; margin-bottom: 4px; display: inline-flex; align-items: baseline; }
.clock-display .clock-time { display: inline-block; width: 130px; letter-spacing: 1px;}
.clock-display .clock-ampm {
  display: inline-block;
  /* margin-left: 8px; */
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 2.2ch;
  text-align: left;
}
.clock-info { display: flex; justify-content: space-between; align-items: center; }
.clock-date { font-size: 12px; color: var(--color-text-secondary); }
.clock-location { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--color-text-tertiary); }
.clock-location svg { width: 10px; height: 10px; }

.social-card { padding: var(--space-5); }
.social-links { display: flex; gap: var(--space-4); justify-content: center; }
.social-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-bg-surface); border: 1px solid var(--color-border);
  color: var(--color-text-secondary); transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.social-link:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.social-link svg { width: 16px; height: 16px; }

/* =============================================
   PROJECT GRID (HOME)
============================================= */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.section-title { font-size: 15px; font-weight: 600; color: var(--color-text-primary); }

.projects-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-3); }

.project-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all var(--transition);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }

.project-img { width: 100%; height: 130px; overflow: hidden; background: var(--color-bg-surface); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-img img { transform: scale(1.04); }
.project-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--color-bg-surface) 0%, var(--color-bg-card) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-tertiary); font-size: 24px;
}

.project-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.project-title { font-size: 12px; font-weight: 500; color: var(--color-text-primary); line-height: 1.45; margin-bottom: var(--space-2); }
.project-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.project-tag {
  font-size: 10px; padding: 2px 7px;
  background: var(--color-bg-surface); border: 1px solid var(--color-border);
  border-radius: 100px; color: var(--color-text-tertiary);
}

/* =============================================
   CONTACT
============================================= */
.contact-card { margin-top: var(--space-3); }
.contact-layout { display: flex; justify-content: space-between; align-items: center; gap: var(--space-8); }
.contact-copy { flex: 1; }
.contact-title { font-size: 15px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-2); }
.contact-desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; }
.contact-links { display: flex; gap: var(--space-8); flex-shrink: 0; padding-top: 30px;}
.contact-link-item { display: flex; flex-direction: column; gap: 2px; }
.contact-link-label { font-size: 11px; font-weight: 600; color: var(--color-text-secondary); letter-spacing: 0.05em; text-transform: uppercase; display: flex; align-items: center; gap: 4px; }
.contact-link-value {
  display: flex; 
  align-items: center; 
  gap: var(--space-3);
  font-size: 13px; 
  color: var(--color-text-primary);
  /* background: var(--color-bg-surface); 
  border: 1px solid var(--color-border); */
  border-radius: var(--radius-sm); 
  /* padding: 8px var(--space-4); */
  transition: all var(--transition);
}
.contact-link-value:hover { border-color: var(--color-border-strong); color: var(--color-accent); }
/* ensure the right-chevron icon matches the link color on hover */
.contact-link-value:hover svg { color: var(--color-accent); }

.contact-link-value svg { width: 12px; height: 12px; color: var(--color-text-tertiary); }

/* =============================================
   ICONS
============================================= */
.contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  /* icon color now inherits via currentColor, no filter needed */
}




/* Cal floating button styling */
.cal-floating-button {
  z-index: 999 !important;
  position: fixed !important;
}

/* make Cal floating button smaller on narrow screens */
@media (max-width: 640px) {
  .cal-floating-button {
    transform: scale(0.75) !important;
    bottom: 16px !important;
    right: 16px !important;
  }
}

/* hover state for Cal button */
.cal-floating-button:hover {
  transform: scale(1.08) !important;
  transition: transform 0.2s ease-in-out !important;
  color: var(--color-accent) !important;
}

.cal-floating-button:hover svg {
  color: var(--color-accent) !important;
  stroke: var(--color-accent) !important;
  fill: var(--color-accent) !important;
}
/* =============================================
   FOOTER
============================================= */
footer { border-top: 1px solid var(--color-border); padding: var(--space-8) var(--space-6); text-align: center; max-width: 900px; margin: 0 auto; }
.footer-text { font-size: 12px; color: var(--color-text-tertiary); }

/* =============================================
   SUBPAGE SHARED
============================================= */
.back-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 13px; color: var(--color-text-secondary);
  margin-bottom: var(--space-6); transition: color var(--transition);
}
.back-link:hover { color: var(--color-text-primary); }
.back-link svg { width: 14px; height: 14px; }

.page-title {
  font-size: clamp(28px, 5vw, 40px); font-weight: 600;
  letter-spacing: -1px; color: var(--color-text-primary);
  margin-bottom: var(--space-10);
}

/* =============================================
   ALL PROJECTS PAGE
============================================= */
.projects-grid-full { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-5); }

.project-card-full {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all var(--transition);
}
.project-card-full:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-border-strong); }

.project-img-full { width: 100%; height: 200px; overflow: hidden; background: var(--color-bg-surface); }
.project-img-full img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card-full:hover .project-img-full img { transform: scale(1.04); }

.project-body-full { padding: var(--space-5) var(--space-6) var(--space-6); }
.project-title-full { font-size: 15px; font-weight: 500; color: var(--color-text-primary); line-height: 1.45; margin-bottom: var(--space-3); }

/* =============================================
   TOOLKIT PAGE
============================================= */
.toolkit-section { margin-bottom: var(--space-10); }
.toolkit-section-title { font-size: 17px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-4); }
.tag-list-lg .tag { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }

/* =============================================
   CASE STUDY COMPONENTS
============================================= */
/* Hero banner */
.cs-hero {
  width: 100%; border-radius: var(--radius-sm); overflow: hidden;
  margin-bottom: var(--space-12); box-shadow: var(--shadow-lg);
  background: var(--color-bg-surface);
}
.cs-hero img { width: 100%; height: auto; display: block; object-fit: cover; }
.cs-hero-placeholder { width: 100%; height: 320px; display: flex; align-items: center; justify-content: center; font-size: 80px; }

/* Title */
.cs-title {
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 600; letter-spacing: -0.5px; line-height: 1.3;
  color: var(--color-text-primary); margin-bottom: var(--space-6); max-width: 680px;
}

/* Meta row */
.cs-meta {
  display: flex; gap: var(--space-8); flex-wrap: wrap;
  margin-bottom: var(--space-10); padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.cs-meta-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-tertiary); margin-bottom: 4px; }
.cs-meta-value { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }

/* Section label pill */
.cs-section-label {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}
.cs-section-label::before { content: ''; display: inline-block; width: 16px; height: 1px; background: var(--color-text-tertiary); }

/* Section heading */
.cs-section-heading {
  font-size: clamp(16px, 2.2vw, 20px); font-weight: 600;
  letter-spacing: -0.3px; line-height: 1.4;
  color: var(--color-text-primary); margin-bottom: var(--space-6); max-width: 640px;
}

.cs-body-text { font-size: 14px; line-height: 1.75; color: var(--color-text-secondary); margin-bottom: var(--space-4); max-width: 640px; }

/* Problem list */
.cs-problem-list { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-10); }
.cs-problem-item {
  display: flex; gap: var(--space-4); padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.cs-problem-num { font-size: 12px; font-weight: 600; color: var(--color-accent); flex-shrink: 0; padding-top: 2px; min-width: 20px; }
.cs-problem-text { font-size: 13px; line-height: 1.6; color: var(--color-text-secondary); }

/* Divider */
.cs-divider { height: 1px; background: var(--color-border); margin: var(--space-10) 0; }

/* Solution list */
.cs-solution-list { display: flex; flex-direction: column; margin-bottom: var(--space-10); }
.cs-solution-item {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.sol-content { display: flex; gap: var(--space-5); }
.cs-solution-item:last-child { border-bottom: none; }
.cs-solution-label { font-size: 12px; font-weight: 600; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4; padding-top: 2px; width: 10%; }
.cs-solution-heading { font-size: 14px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-2); line-height: 1.45; }
.cs-solution-detail { font-size: 13px; line-height: 1.65; color: var(--color-text-secondary); width: 90%; }

/* Mockup row */
.cs-mockup-row { margin: var(--space-10) 0; }
.cs-mockup-img { border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-surface); box-shadow: var(--shadow-md); }
.cs-mockup-img img { width: 100%; height: auto; display: block; }
/* .cs-mockup-placeholder { width: 100%; height: 220px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--color-text-tertiary); } */

/* Outcomes grid */
.cs-outcomes-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-4); margin-bottom: var(--space-10); }
.cs-outcome-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.cs-outcome-title { font-size: 13px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-2); }
.cs-outcome-text { font-size: 12px; line-height: 1.6; color: var(--color-text-secondary); }

/* Learnings grid */
.cs-learnings-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); margin-bottom: var(--space-10); }
.cs-learning-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.cs-learning-title { font-size: 13px; font-weight: 600; color: var(--color-text-primary); margin-bottom: var(--space-2); }
.cs-learning-text { font-size: 12px; line-height: 1.6; color: var(--color-text-secondary); }

/* Next project */
.cs-next-project { margin-top: var(--space-12); border-top: 1px solid var(--color-border); padding-top: var(--space-8); }
.cs-next-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-tertiary); margin-bottom: var(--space-3); }

.cs-next-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; flex-direction: row; gap: var(--space-5); padding: var(--space-5);
  width: 100%;
}
.cs-next-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.cs-next-thumb { width: 80px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-surface); flex-shrink: 0; }
.cs-next-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cs-next-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; }

.cs-next-content { display: flex; justify-content: space-between; width: 100%; align-items: center; gap: var(--space-5);}

.cs-next-info { flex: 1; text-align: left; }
.cs-next-eyebrow { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 4px; }
.cs-next-title { font-size: 14px; font-weight: 500; color: var(--color-text-primary); line-height: 1.4; }

.cs-next-arrow { color: var(--color-text-tertiary); flex-shrink: 0; transition: transform var(--transition), color var(--transition); }
.cs-next-card:hover .cs-next-arrow { transform: translateX(3px); color: var(--color-accent); }
.cs-next-arrow svg { width: 18px; height: 18px; }

/* =============================================
   ACCESSIBILITY
============================================= */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .two-col-left > .card:last-child {
    flex: none;
  }
  .sidebar-stack {
    /* display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto; */
    grid-template-columns: 1fr;
  }
  .sidebar-stack .experience-card {
    flex: none;
    grid-column: 1 / -1;
  }
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .cs-solution-item { grid-template-columns: 1fr; gap: var(--space-2); }
  .cs-learnings-grid { grid-template-columns: repeat(2,1fr); }
  .contact-links { padding-top: 20px; }

  .exp-sub-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

}

@media (max-width: 640px) {
  .profile-header { flex-wrap: wrap; }
  .theme-toggle { position: absolute; width: fit-content; margin-bottom: var(--space-3); }
  .sidebar-stack { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid-full { grid-template-columns: 1fr; }
  .contact-layout { flex-direction: column; align-items: flex-start; }
  .contact-links { flex-direction: column; width: 100%; padding-top: 0px; }
  .contact-link-value { width: 100%; justify-content: space-between; }
  .home-layout, .subpage-layout { padding-left: var(--space-4); padding-right: var(--space-4); }
  .cs-mockup-row { grid-template-columns: 1fr; }
  .cs-outcomes-grid { grid-template-columns: 1fr; }
  .cs-learnings-grid { grid-template-columns: 1fr; }
  .cs-meta { gap: var(--space-5); }

  .profile-header {
        /* flex-wrap: wrap; */
        /* display: flex; */
        flex-direction: column;
    }

    .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
    .two-col, .projects-grid, .projects-grid-full  { gap: var(--space-4); }
    .contact-card { margin-top: var(--space-4); }
}

@media (max-width: 420px) {
  .projects-grid { grid-template-columns: 1fr; }
  .cs-next-card { flex-direction: column; }
}
