/* ===================================================
   Avik Ganguly — Portfolio Styles
   =================================================== */

/* --- 1. Custom Properties --- */
:root {
  /* Palette */
  --bg:          #FAF8F5;
  --bg-alt:      #F2EDE6;
  --ink:         #1A1A1A;
  --ink-2:       #4A4540;
  --ink-3:       #8A857E;
  --accent-eng:  #B85C38;
  --accent-pm:   #2E7D8C;
  --accent:      var(--accent-eng);
  --border:      #E5DFD8;
  --surface:     #FFFFFF;
  --surface-h:   #FDFBF8;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-py: clamp(80px, 10vw, 140px);
  --container:  1200px;
  --gutter:     clamp(20px, 4vw, 48px);

  /* Motion */
  --ease:     cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(0, 0, .2, 1);
  --dur:      0.5s;
  --dur-fast: 0.3s;
}

[data-lens="pm"] { --accent: var(--accent-pm); }

/* --- 2. Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #fff; }

/* --- 3. Typography --- */
.t-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.t-heading {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.t-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.t-body { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.t-small { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* --- 4. Layout --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}
.section--alt { background: var(--surface); }
.section--dark { background: var(--ink); color: var(--bg); }
.section--dark .t-label { color: var(--ink-3); }

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-header h2 {
  font-size: clamp(32px, 4vw, 48px);
}
.section-header p {
  margin-top: 12px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 600px;
}

/* --- 5. Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 60px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.hero__name {
  font-size: clamp(48px, 6vw, 80px);
  margin-bottom: 20px;
}
.hero__headline {
  font-size: clamp(26px, 3.2vw, 40px);
  margin-bottom: 16px;
  min-height: 2.2em;
}
.hero__pitch {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 560px;
  min-height: 3.2em;
}
.hero__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.metric-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.metric-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px oklch(0.5 0.1 30 / 0.08);
}
.metric-chip__value { color: var(--accent); font-weight: 700; }
.hero__ctas {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Photo */
.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__photo {
  width: clamp(340px, 46vw, 560px);
  height: auto;            /* follow the image's own ratio — no crop, no squeeze */
  object-fit: contain;
  border-radius: 24px;
  display: block;
  position: relative;
  z-index: 1;
}
.hero__photo-accent {
  position: absolute;
  inset: -12px;
  border-radius: 32px;
  border: 2px solid var(--accent);
  opacity: 0.25;
  transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
  z-index: 0;
}
.hero__photo-wrap:hover .hero__photo-accent { opacity: 0.5; }

/* --- 6. Lens Toggle --- */
.lens-toggle {
  display: inline-flex;
  position: relative;
  gap: 0;
  margin-bottom: 28px;
}
.lens-toggle__btn {
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease);
  position: relative;
  white-space: nowrap;
}
.lens-toggle__btn:first-child { margin-right: 32px; }
.lens-toggle__btn--active { color: var(--accent); }
.lens-toggle__bar {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: left var(--dur) var(--ease-out), width var(--dur) var(--ease-out), background var(--dur) var(--ease);
}

/* Mini toggle (nav) */
.lens-toggle--mini .lens-toggle__btn { font-size: 14px; padding: 6px 0; }
.lens-toggle--mini .lens-toggle__btn:first-child { margin-right: 20px; }
.lens-toggle--mini .lens-toggle__bar { height: 2px; }

/* --- 7. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 16px oklch(0.5 0.15 30 / 0.2); }
.btn--secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--dark { background: var(--bg); color: var(--ink); }
.btn--dark:hover { background: #fff; }

/* --- 8. Sticky Nav --- */
.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: oklch(0.98 0.005 80 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform var(--dur) var(--ease);
}
.sticky-nav--visible { transform: translateY(0); }
.sticky-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.sticky-nav__left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.sticky-nav__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sticky-nav__links {
  display: flex;
  gap: 24px;
}
.sticky-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease);
}
.sticky-nav__links a:hover { color: var(--accent); }

/* --- 9. Skill Cards --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 32px oklch(0.3 0.02 60 / 0.08); }
.skill-card:hover::before { transform: scaleX(1); }
.skill-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: oklch(from var(--accent) l c h / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.skill-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.skill-card__essence {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.skill-card__details {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), margin var(--dur) var(--ease);
}
.skill-card__details--open {
  max-height: 500px;
  opacity: 1;
  margin-top: 16px;
}
.skill-card__points { display: flex; flex-direction: column; gap: 8px; }
.skill-card__points li {
  font-size: 15px;
  color: var(--ink-2);
  padding-left: 16px;
  position: relative;
}
.skill-card__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: background var(--dur) var(--ease);
}
.skill-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--dur-fast) var(--ease);
}
.skill-card__link:hover { gap: 10px; }
.skill-card__expand-hint {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 8px;
  transition: opacity var(--dur-fast) var(--ease);
}

/* Section header with inline view toggle */
.section-header--with-toggle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-header--with-toggle > div { flex: 0 0 auto; }

/* Density toggle (Highlights | Full map) — pill style, accent-aware */
.view-toggle {
  display: inline-flex;
  background: var(--surface-h);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 6px;
}
.view-toggle__btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  border-radius: 100px;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.view-toggle__btn--active {
  color: #fff;
  background: var(--accent);
}

/* Treemap — clustered, blocks grow by role weight */
.skills-treemap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.tm-tile {
  flex: var(--tm-grow, 1) 1 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.tm-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
}
.tm-tile--w3 { background: oklch(from var(--accent) l c h / 0.04); }
.tm-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 32px oklch(0.3 0.02 60 / 0.08); }
.tm-tile__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tm-tile__icon {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: oklch(from var(--accent) l c h / 0.1);
  color: var(--accent);
  flex-shrink: 0;
}
.tm-tile__icon svg { width: 18px; height: 18px; }
.tm-tile__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}
.tm-tile__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: oklch(from var(--accent) l c h / 0.1);
  border-radius: 100px;
  padding: 2px 9px;
}
.tm-tile__skills {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.tm-tile__skills li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.tm-tile__skills li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.tm-tile__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.tm-tile__link:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .tm-tile { flex-basis: 100%; }
}

/* --- 10. Case Studies --- */
.cs-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cs-filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--ink-3);
  transition: all var(--dur-fast) var(--ease);
}
.cs-filter-btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cs-filter-btn:hover:not(.cs-filter-btn--active) { border-color: var(--accent); color: var(--accent); }

.cs-list { display: flex; flex-direction: column; gap: 16px; }
.cs-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--dur-fast) var(--ease);
}
.cs-card:hover { border-color: oklch(from var(--accent) l c h / 0.4); }
.cs-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  cursor: pointer;
  gap: 16px;
}
.cs-card__left { flex: 1; min-width: 0; }
.cs-card__client {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.cs-card__outcome { font-size: 15px; color: var(--ink-2); }
.cs-card__tags { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.cs-tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.cs-tag--eng { background: oklch(from var(--accent-eng) l c h / 0.12); color: var(--accent-eng); }
.cs-tag--pm  { background: oklch(from var(--accent-pm) l c h / 0.12); color: var(--accent-pm); }
.cs-card__chevron {
  width: 24px;
  height: 24px;
  color: var(--ink-3);
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.cs-card__chevron--open { transform: rotate(180deg); }

.cs-card__body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.cs-card__body--open {
  max-height: 2000px;
  opacity: 1;
}
.cs-card__content {
  padding: 0 32px 32px;
  border-top: 1px solid var(--border);
}
.cs-spine {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px 24px;
  padding-top: 24px;
}
.cs-spine__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.cs-spine__value { font-size: 16px; color: var(--ink-2); line-height: 1.6; }
.cs-outcome-callout {
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: oklch(from var(--accent) l c h / 0.05);
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

/* --- 10b. Experience Timeline --- */
.xp-timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
}
.xp-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.xp-item {
  position: relative;
  padding-bottom: 36px;
}
.xp-item:last-child { padding-bottom: 0; }
.xp-item__node {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: border-color var(--dur) var(--ease);
}
.xp-item__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.xp-item__logo {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.xp-item__logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
/* Monogram fallback behind the img: visible when no logo or when img errors out */
.xp-item__logo::after {
  content: attr(data-mono);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  z-index: 0;
}
.xp-item__logo img { position: relative; z-index: 1; }
.xp-item__headtext {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.xp-item__org {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.xp-item__date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}
.xp-item__role {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
  padding-left: 58px;
  transition: color var(--dur) var(--ease);
}
.xp-item__blurb {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 6px;
  padding-left: 58px;
}
.xp-item__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  margin-left: 58px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--dur-fast) var(--ease), color var(--dur) var(--ease);
}
.xp-item__link:hover { gap: 9px; }

/* --- 11. Designs --- */
.designs-era { margin-bottom: 64px; }
.designs-era:last-child { margin-bottom: 0; }
.designs-era__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
}
.designs-era__desc {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 24px;
  max-width: 600px;
}
.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.design-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  transition: all var(--dur-fast) var(--ease);
}
.design-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 32px oklch(0.3 0.02 60 / 0.08); }
.design-card__poster {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.design-card__poster-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: oklch(from var(--accent) l c h / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.design-card:hover .design-card__poster-icon { transform: scale(1.1); background: var(--accent); color: #fff; }
/* Prototype poster: full-bleed SVG preview instead of a centered icon */
.design-card__poster--proto { padding: 0; }
.design-card__poster--proto > svg { width: 100%; height: 100%; transition: transform var(--dur-fast) var(--ease); }
.design-card:hover .design-card__poster--proto > svg { transform: scale(1.03); }
.design-card__poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;   /* show the hook at the top of the screenshot */
  transition: transform var(--dur) var(--ease);
}
.design-card:hover .design-card__poster-img { transform: scale(1.03); }
.design-card__poster-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: oklch(0 0 0 / 0.5);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.design-card:hover .design-card__poster-badge { opacity: 1; transform: translateY(0); }
.design-card__info { padding: 20px; }
.design-card__title { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.design-card__desc { font-size: 14px; color: var(--ink-2); }

/* --- 12. Selected Work --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.work-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 16px oklch(0.3 0.02 60 / 0.06); }
.work-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: oklch(from var(--accent) l c h / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.work-card__title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.work-card__desc { font-size: 13px; color: var(--ink-3); }
/* Poster variant: relevant-section thumbnail on top, text below */
.work-card--poster {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.work-card__thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  overflow: hidden;
}
.work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform var(--dur) var(--ease);
}
.work-card--poster:hover .work-card__thumb img { transform: scale(1.03); }
.work-card__body { padding: 16px 20px 20px; }
.design-card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}
.design-card__play-overlay svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 8px oklch(0 0 0 / 0.5)); transition: transform var(--dur-fast) var(--ease); }
.design-card:hover .design-card__play-overlay svg { transform: scale(1.15); }

/* --- 13. Proof & Presence --- */
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.proof-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
}
.proof-chip__label { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.proof-subsection { margin-bottom: 40px; }
.proof-subsection:last-child { margin-bottom: 0; }
.proof-subsection__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

/* --- Credentials grid (logo wall) --- */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.cred-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.cred-card--clickable { cursor: pointer; }
.cred-card--clickable:hover {
  border-color: var(--cred-tint, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 28px oklch(0.3 0.02 60 / 0.1);
}
.cred-card__media {
  position: relative;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Logo-only cards: centered mark on a clean light tile with a soft tinted edge,
   so even light/outline badges (Oracle) read crisply instead of washing out. */
.cred-card__media--logo {
  padding: 16px;
  background:
    radial-gradient(circle at 50% 35%,
      color-mix(in srgb, var(--cred-tint, #888) 10%, transparent),
      transparent 72%),
    #ffffff;
}
.cred-card__logo {
  max-height: 92px;
  max-width: 88%;
  object-fit: contain;
}
/* Cert cards: the certificate image itself is the poster (cropped to the top) */
.cred-card__media--cert { background: var(--bg-alt); }
.cred-card__cert {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--dur-fast) var(--ease);
}
.cred-card--clickable:hover .cred-card__cert { transform: scale(1.04); }
.cred-card__view {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, oklch(0 0 0 / 0.72), oklch(0 0 0 / 0));
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.cred-card--clickable:hover .cred-card__view { opacity: 1; }
.cred-card__info {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.cred-card__title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.cred-card__value { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

/* Certificate lightbox */
.cert-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.1 0.01 60 / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: proto-fade-in 0.25s var(--ease-out);
}
.cert-lightbox {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px oklch(0.1 0.02 60 / 0.4);
}
.cert-lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
}
.cert-lightbox__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 4px 2px;
}
.cert-lightbox__caption strong { font-size: 15px; }
.cert-lightbox__caption span { font-size: 13px; color: var(--ink-2); }
.cert-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  box-shadow: 0 4px 16px oklch(0.1 0.02 60 / 0.2);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.cert-lightbox__close:hover { color: var(--ink); background: var(--bg-alt); }

.ref-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ref-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.ref-card__name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.ref-card__role { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.ref-card__avail { font-size: 13px; color: var(--ink-3); font-style: italic; }

/* Person reference card: avatar + details, links to LinkedIn */
.ref-card--person {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
a.ref-card--person:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px oklch(0.3 0.02 60 / 0.1);
}
.ref-card__avatar {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: oklch(from var(--accent) l c h / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Initials fallback sits absolutely centered behind the photo (out of flex flow,
   so it never shifts the image); if the img fails/has no src it shows through. */
.ref-card__avatar::after {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  z-index: 0;
}
.ref-card__avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ref-card__body { min-width: 0; }
.ref-card--person .ref-card__avail { margin-top: 2px; }

/* --- 14. Contact --- */
.contact-section { text-align: center; }
.contact-section .section-header { max-width: 700px; margin-left: auto; margin-right: auto; }
.contact-section .section-header p { margin-left: auto; margin-right: auto; color: oklch(0.75 0.01 80); }
.contact-section h2 { color: var(--bg); }
.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: oklch(0.8 0.01 80);
  transition: color var(--dur-fast) var(--ease);
}
.contact-link:hover { color: var(--accent); }

.contact-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: oklch(0.75 0.01 80);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid oklch(0.35 0.01 60);
  border-radius: 10px;
  background: oklch(0.15 0.01 60);
  color: var(--bg);
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid oklch(0.25 0.01 60);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: 13px;
  color: oklch(0.55 0.01 80);
  transition: color var(--dur-fast) var(--ease);
}
.footer__links a:hover { color: var(--accent); }
.footer__copy { font-size: 13px; color: oklch(0.45 0.01 80); }

/* --- 15. Animations --- */
.anim-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-in--visible {
  opacity: 1;
  transform: translateY(0);
}
.anim-in--stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.anim-in--stagger.anim-in--visible > * {
  opacity: 1;
  transform: translateY(0);
}
.anim-in--stagger.anim-in--visible > *:nth-child(1) { transition-delay: 0s; }
.anim-in--stagger.anim-in--visible > *:nth-child(2) { transition-delay: 0.08s; }
.anim-in--stagger.anim-in--visible > *:nth-child(3) { transition-delay: 0.16s; }
.anim-in--stagger.anim-in--visible > *:nth-child(4) { transition-delay: 0.24s; }
.anim-in--stagger.anim-in--visible > *:nth-child(5) { transition-delay: 0.32s; }
.anim-in--stagger.anim-in--visible > *:nth-child(6) { transition-delay: 0.4s; }
.anim-in--stagger.anim-in--visible > *:nth-child(7) { transition-delay: 0.48s; }

/* Lens crossfade */
.lens-fade { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.lens-fade--out { opacity: 0; transform: translateY(6px); position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; }
.lens-fade--in  { opacity: 1; transform: translateY(0); position: relative; }

/* --- 16. Responsive --- */
@media (max-width: 768px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__photo-wrap { order: -1; margin-bottom: 24px; }
  .hero__pitch { margin-left: auto; margin-right: auto; }
  .hero__metrics { justify-content: center; }
  .hero__ctas { justify-content: center; }
  .lens-toggle { justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
  .sticky-nav__links { display: none; }
  .cs-spine { grid-template-columns: 1fr; }
  .cs-spine__label { padding-top: 0; }
}
@media (max-width: 640px) {
  .hero__name { font-size: 40px; }
  .hero__headline { font-size: 24px; }
  .metric-chip { font-size: 13px; padding: 8px 14px; }
  .cs-card__header { padding: 20px; flex-direction: column; align-items: flex-start; }
  .cs-card__content { padding: 0 20px 20px; }
  .work-grid { grid-template-columns: 1fr; }
  .designs-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
}

/* --- 17. Hero Role Badge (locked lens) --- */
.hero__role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  background: oklch(from var(--accent) l c h / 0.08);
  border: 1.5px solid oklch(from var(--accent) l c h / 0.2);
  margin-bottom: 28px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hero__role-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: background var(--dur) var(--ease);
}
.hero__alt-lens {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease);
}
.hero__alt-lens:hover { color: var(--accent); }

.sticky-nav__role {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* --- 18. Prototype Viewer --- */
.proto-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.1 0.01 60 / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: proto-fade-in 0.3s var(--ease-out);
}
@keyframes proto-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.proto-viewer {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px oklch(0.1 0.02 60 / 0.4);
  animation: proto-slide-up 0.35s var(--ease-out);
}
@keyframes proto-slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.proto-viewer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 16px;
  gap: 16px;
}
.proto-viewer__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.proto-viewer__desc {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}
.proto-viewer__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.proto-viewer__close:hover { background: var(--bg-alt); color: var(--ink); }
.proto-viewer__open {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.proto-viewer__open:hover { background: var(--bg-alt); color: var(--accent); }

.proto-viewer__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  flex: 1;
  min-height: 0;
}
.proto-viewer__screen {
  flex: 1;
  aspect-ratio: 4 / 3;
  max-height: 50vh;
  border-radius: 12px;
  overflow: hidden;
}
/* Live prototype iframe — let it fill far more of the modal */
.proto-viewer__screen--live {
  aspect-ratio: auto;
  max-height: none;
  height: 100%;
  align-self: stretch;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.proto-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease);
}
.proto-nav:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.proto-nav:disabled { opacity: 0.3; cursor: default; }

.proto-viewer__screens {
  display: flex;
  gap: 6px;
  padding: 16px 28px 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.proto-screen-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  border: 1.5px solid var(--border);
  transition: all var(--dur-fast) var(--ease);
}
.proto-screen-btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.proto-screen-btn:hover:not(.proto-screen-btn--active) {
  border-color: var(--accent);
  color: var(--accent);
}

.proto-viewer__strip {
  display: flex;
  gap: 8px;
  padding: 12px 28px;
  border-top: 1px solid var(--border);
  justify-content: center;
}
.proto-thumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.proto-thumb:hover { background: var(--bg-alt); color: var(--ink); }
.proto-thumb--active {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
}
.proto-thumb__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--thumb-color, var(--accent));
}
.proto-thumb__label {}

.proto-viewer__hint {
  text-align: center;
  padding: 8px 28px 16px;
  font-size: 12px;
  color: var(--ink-3);
}

/* --- 19. Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .anim-in { opacity: 1; transform: none; }
  .anim-in--stagger > * { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* --- GitHub Contribution Wall --- */
.gh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gh-year {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.gh-year:hover { box-shadow: 0 8px 28px oklch(0.3 0.02 60 / 0.12); transform: translateY(-2px); }
.gh-year--peak { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.gh-year__map {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  background: #0d1117;
}
.gh-year__meta { display: flex; justify-content: space-between; align-items: baseline; }
.gh-year__num { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.gh-year__count { color: var(--ink-3); font-size: .85rem; font-variant-numeric: tabular-nums; }
.gh-year--peak .gh-year__count { color: var(--accent); font-weight: 600; }

/* Full-width transition band between year groups */
.gh-band {
  position: relative;
  margin: 22px 0;
  padding: 18px 22px 18px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.gh-band__span { color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .02em; }
.gh-band__title { font-weight: 700; color: var(--ink); font-size: 1.15rem; line-height: 1.25; margin: 2px 0 6px; }
.gh-band__note { color: var(--ink-2); font-size: .92rem; line-height: 1.5; max-width: 70ch; }

@media (max-width: 600px) {
  .gh-grid { grid-template-columns: 1fr; }
  .gh-band__title { font-size: 1.05rem; }
}
