/* Pradeep Reddy — personal portfolio (v2)
   Hand-rolled CSS, no framework, no external requests, no web fonts.
   Light is the default/home-base theme; dark is opt-in via [data-theme="dark"]
   on <html>, set by an inline head script (see index.html) to avoid a
   flash of the wrong theme. Palette verified for WCAG AA text contrast in
   both themes — see the contrast check referenced in DESIGN-NOTES.md. */

:root {
  /* ---- Light theme (default / home base) ---- */
  --bg: #fbfcfe;
  --bg-elevated: #f3f4f8;
  --card: #ffffffb3;
  --card-solid: #ffffff;
  --border: rgba(15, 17, 30, 0.09);
  --border-strong: rgba(15, 17, 30, 0.16);
  --text: #14161f;
  --text-dim: #454a5e;
  --text-dimmer: #62677c;

  /* text-safe ("ink") accents — meet 4.5:1 on both --bg and --card-solid */
  --accent: #0f766e;
  --accent-2: #6d28d9;
  /* decorative ("vivid") accents — gradients, glows, orbs; never used as text */
  --accent-vivid: #34e5df;
  --accent-2-vivid: #8f7bff;
  --on-accent: #04121a;

  --gradient: linear-gradient(135deg, var(--accent-vivid) 0%, var(--accent-2-vivid) 100%);
  /* gradient for TEXT uses the ink pair in light mode — the vivid teal end is ~1.5:1 on --bg */
  --gradient-text: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --grid-line: rgba(15, 17, 30, 0.05);
  --logo-tile-bg: #ffffff;

  --radius: 18px;
  --radius-sm: 11px;
  --maxw: 1180px;
  --measure: 62ch;
  --shadow-lg: 0 30px 80px -30px rgba(20, 22, 40, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #07080d;
  --bg-elevated: #0d0f1a;
  --card: #12152580;
  --card-solid: #131627;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #edeff8;
  --text-dim: #a3a8c2;
  --text-dimmer: #8288ad;

  --accent: #63e6e2;
  --accent-2: #8f7bff;
  --accent-vivid: #63e6e2;
  --accent-2-vivid: #8f7bff;
  --on-accent: #04121a;

  --gradient-text: var(--gradient);
  --grid-line: rgba(255, 255, 255, 0.035);
  --logo-tile-bg: #f4f5f9;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.025em;
  color: var(--text);
}

p { margin: 0 0 1.1em; color: var(--text-dim); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

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

ul { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--text-dimmer); font-size: 0.94em; }

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--accent-vivid);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -10px rgba(52, 229, 223, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(52, 229, 223, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 0.5em 1.2em;
  font-size: 0.85rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gradient);
  color: var(--on-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-name { font-size: 1rem; }

.nav-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
  position: relative;
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--text);
}
.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -26px;
  height: 2px;
  background: var(--gradient);
}
.nav-cta {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
}
.nav-cta:hover {
  border-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  flex: none;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-group { gap: 10px; }
  .primary-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 28px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .primary-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
  }
  .primary-nav a.active::after { display: none; }
  .nav-cta {
    margin-top: 10px;
    text-align: center;
    border: 1px solid var(--border-strong);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 132px 0 108px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.28;
  will-change: transform;
}
:root[data-theme="dark"] .orb { opacity: 0.35; }
.orb-a {
  width: 520px;
  height: 520px;
  background: var(--accent-vivid);
  top: -180px;
  left: -120px;
  animation: float-a 22s ease-in-out infinite;
}
.orb-b {
  width: 460px;
  height: 460px;
  background: var(--accent-2-vivid);
  top: 40px;
  right: -160px;
  animation: float-b 26s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 60px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, 40px); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
}
.hero-greeting {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5em 1.25em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.eyebrow a { color: var(--accent); font-weight: 600; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  margin-bottom: 24px;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 38px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 72px;
}
.hero-actions-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-dimmer);
  line-height: 1.35;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 1;
}
.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (max-width: 640px) {
  .hero { padding: 104px 0 76px; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .scroll-cue { display: none; }
}

/* ---------- Sections ---------- */
.section {
  padding: 132px 0;
}
.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}
.section h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  max-width: 780px;
}
.section-lede {
  font-size: 1.06rem;
  max-width: 680px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .section { padding: 76px 0; }
}

/* ---------- Reveal animation ----------
   Content is ALWAYS fully opaque — never gated behind JS/IntersectionObserver
   support, so it stays visible for no-JS clients, crawlers, and screenshot/print
   tooling that never fires a real scroll event. Only a small position-settle
   animates in as an enhancement. */
[data-reveal] {
  opacity: 1;
  transform: translateY(16px);
  transition: transform 0.7s var(--ease);
}
[data-reveal].in-view {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transform: none; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 52px;
  margin-top: 44px;
  align-items: start;
}
.about-copy p { font-size: 1.03rem; }
.about-langs {
  color: var(--text-dimmer);
  font-size: 0.9rem;
  font-style: italic;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.about-card h3 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dimmer);
  margin-bottom: 10px;
}
.about-card p { font-size: 0.95rem; color: var(--text); }
.about-card-divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- About: Ventures (collapsible project detail list) ---------- */
.about-ventures {
  margin-top: 52px;
}
.about-ventures-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.about-ventures-head h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.about-ventures-lede {
  color: var(--text-dimmer);
  font-size: 0.92rem;
  max-width: 56ch;
  margin: 0;
}
.ventures-toggle-all {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55em 1.2em;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.ventures-toggle-all:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

.venture-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venture-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.venture-item:hover {
  border-color: var(--border-strong);
}
.venture-item[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.venture-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.venture-summary::-webkit-details-marker { display: none; }
.venture-summary::marker { content: ""; }

.venture-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.venture-summary-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  min-width: 0;
}
.venture-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.venture-tagline {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.venture-chevron {
  flex-shrink: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-dimmer);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.venture-item[open] .venture-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.venture-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--border);
}
.venture-body p {
  font-size: 0.95rem;
  padding-top: 18px;
  margin-bottom: 0.9em;
}
.venture-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 20px;
}
.venture-jump:hover { text-decoration: underline; }

.venture-item[open] > .venture-body {
  animation: ventureReveal 0.35s var(--ease);
}
@keyframes ventureReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .venture-summary { padding: 15px 16px; gap: 12px; }
  .venture-name { font-size: 0.95rem; }
  .venture-tagline { font-size: 0.8rem; }
  .venture-body { padding: 0 16px 18px; }
  .about-ventures-head { align-items: flex-start; }
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.skill-card-featured {
  grid-column: span 3;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-vivid) 12%, transparent), color-mix(in srgb, var(--accent-2-vivid) 10%, transparent));
  border-color: color-mix(in srgb, var(--accent-vivid) 35%, transparent);
}
.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-list li {
  font-size: 0.8rem;
  padding: 0.4em 0.85em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.skill-card-featured .chip-list li {
  background: color-mix(in srgb, var(--text) 4%, var(--card-solid));
  border-color: color-mix(in srgb, var(--accent-vivid) 30%, transparent);
  color: var(--text);
}
.skills-familiar {
  margin-top: 30px;
  color: var(--text-dimmer);
  font-size: 0.92rem;
}
.skills-familiar strong { color: var(--text-dim); }

@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-card-featured { grid-column: span 2; }
}
@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card-featured { grid-column: span 1; }
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin-top: 48px;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 52px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -39px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
}
.timeline-head h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.timeline-dates {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  white-space: nowrap;
}
.timeline-org {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.timeline-org a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.timeline-org a:hover { text-decoration-color: var(--accent); }
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.timeline-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.97rem;
  max-width: var(--measure);
}
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}
.timeline-list strong { color: var(--text); }
.client-ref {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px dashed var(--border-strong);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.client-ref:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .timeline { padding-left: 22px; }
  .timeline-marker { left: -29px; width: 12px; height: 12px; }
}

/* ---------- Client wall ---------- */
.client-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 44px;
}
.client-tile {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.client-tile:hover,
.client-tile:focus-within {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.client-tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  width: 100%;
  padding: 20px 16px 18px;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}
.client-tile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--logo-tile-bg);
  border: 1px solid var(--border);
}
.client-logo img {
  max-width: 100%;
  max-height: 34px;
  filter: grayscale(1) contrast(0.92);
  opacity: 0.82;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.client-tile:hover .client-logo img,
.client-tile:focus-within .client-logo img {
  filter: grayscale(0);
  opacity: 1;
}
/* Some agency marks are published white-on-transparent (for dark navbars);
   invert first so they read against this wall's light logo tile in both themes. */
.client-logo-invert img {
  filter: invert(1) grayscale(1) contrast(0.92);
}
.client-tile:hover .client-logo-invert img,
.client-tile:focus-within .client-logo-invert img {
  filter: invert(1) grayscale(0);
}
.client-badge {
  background: var(--logo-tile-bg);
}
.client-badge svg {
  width: 30px;
  height: 30px;
  color: var(--text-dimmer);
  transition: color 0.3s var(--ease);
}
.client-tile:hover .client-badge svg,
.client-tile:focus-within .client-badge svg {
  color: var(--accent);
}
.client-name {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.client-domain {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dimmer);
  line-height: 1.3;
}
.client-meta {
  font-size: 0.76rem;
  color: var(--text-dimmer);
  line-height: 1.35;
}
.client-wall-disclaimer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--text-dimmer);
  max-width: var(--measure);
}

@media (max-width: 560px) {
  .client-wall { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 44px;
}
.project-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.project-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.project-head h3 {
  font-size: 1.1rem;
  margin: 0;
}
.project-tagline {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 12px;
}
.project-card p:not(.project-tagline) {
  font-size: 0.93rem;
  flex-grow: 1;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 4px;
}
.tag-list li {
  font-size: 0.72rem;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-dimmer);
  border: 1px solid var(--border);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.project-link:hover {
  color: var(--accent);
  gap: 9px;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  margin-top: 44px;
}
.edu-col h3 {
  font-size: 1.05rem;
  margin-bottom: 22px;
}
.edu-subheading {
  margin-top: 28px;
}
.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin-bottom: 16px;
}
.edu-card h4 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}
.edu-meta {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin-bottom: 8px;
}
.pd-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pd-list li {
  font-size: 0.92rem;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.pd-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pd-list strong { color: var(--text); }

@media (max-width: 760px) {
  .edu-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Contact ---------- */
.section-contact {
  padding-top: 68px;
}
.contact-card {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 44px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse 120% 100% at 50% -10%, color-mix(in srgb, var(--accent-vivid) 12%, transparent), transparent 60%), var(--card-solid);
}
.contact-card h2 { max-width: 100%; }
.contact-card .section-lede { margin-left: auto; margin-right: auto; }
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 34px 0 20px;
}
.contact-location {
  color: var(--text-dimmer);
  font-size: 0.88rem;
}
.resume-downloads {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.resume-downloads-label {
  color: var(--text-dimmer);
  font-size: 0.85rem;
  margin-right: 2px;
}

@media (max-width: 600px) {
  .contact-card { padding: 44px 26px; }
}

/* ---------- Hobbies ---------- */
.hobbies-section {
  padding-bottom: 96px;
}
.hobby-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hobby-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
}
.hobby-chip span {
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .hobbies-section { padding-bottom: 76px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-dimmer);
  margin: 0;
}
.footer-inner p a { color: var(--text-dimmer); text-decoration: underline; text-decoration-color: var(--border-strong); }
.footer-inner p a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.footer-inner nav {
  display: flex;
  gap: 20px;
}
.footer-inner nav a {
  font-size: 0.85rem;
  color: var(--text-dimmer);
}
.footer-inner nav a:hover { color: var(--accent); }

/* ---------- Subpage header (Writing index + post pages) ---------- */
.page-head {
  padding-top: 152px;
}
.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  max-width: 780px;
  margin-bottom: 14px;
}
.page-head .section-lede {
  margin-top: 0;
}
@media (max-width: 640px) {
  .page-head { padding-top: 116px; }
}

/* ---------- Writing index ---------- */
.writing-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 44px;
}
.writing-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.writing-card:hover,
.writing-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.writing-card-link {
  display: block;
  padding: 30px 32px;
  color: inherit;
}
.writing-card-link:focus-visible {
  outline-offset: -3px;
}
.writing-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.writing-card h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.writing-excerpt {
  font-size: 0.98rem;
  margin-bottom: 16px;
}
.writing-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.writing-card:hover .writing-read,
.writing-card:focus-within .writing-read {
  color: var(--accent);
  gap: 9px;
}
.writing-empty {
  color: var(--text-dimmer);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .writing-card-link { padding: 24px 22px; }
}

/* ---------- Post ---------- */
.post-header {
  padding-top: 152px;
  padding-bottom: 8px;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dimmer);
  margin-bottom: 26px;
}
.post-back:hover { color: var(--accent); }
.post-header h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  max-width: 820px;
  margin-bottom: 16px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dimmer);
  font-size: 0.9rem;
}
.post-meta time { color: var(--text-dim); font-weight: 600; }

.post-body {
  padding-top: 8px;
}
.post-body .wrap {
  max-width: 760px;
}
.post-body h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}
.post-body p {
  font-size: 1.03rem;
  max-width: none;
}
.post-body ul {
  margin: 0 0 1.4em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-body ul li {
  padding-left: 20px;
  position: relative;
  color: var(--text-dim);
  font-size: 1rem;
}
.post-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.post-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 1.6em;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.post-links a {
  font-weight: 600;
  word-break: break-word;
}
.post-links a:hover { text-decoration: underline; }
.post-links .post-link-label {
  color: var(--text-dimmer);
  font-weight: 500;
  margin-right: 6px;
}

.post-crosslink {
  margin-top: 2.2em;
  padding-top: 1.8em;
  border-top: 1px solid var(--border);
  font-size: 0.98rem;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .post-header { padding-top: 116px; }
}
