:root {
  color-scheme: dark;
  /* Notion dark (published site–adjacent) */
  --bg: #191919;
  --bg-elevated: #202020;
  --paper: #252525;
  --paper-soft: #1f1f1f;
  --text: rgba(255, 255, 255, 0.87);
  --muted: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.09);
  --hover: rgba(255, 255, 255, 0.06);
  --accent: rgba(255, 255, 255, 0.92);
  --link: #6ea8fe;
  --chip-bg: rgba(255, 255, 255, 0.07);
  --chip-text: rgba(255, 255, 255, 0.65);
  --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.55), 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.32);
  --pad-card: clamp(28px, 5vw, 48px);
  --pad-panel-inline: 48px;
  --content-max: min(1200px, 100%);
}

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

html,
body {
  min-height: 100%;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    "Apple Color Emoji", sans-serif;
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  padding: 0;
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  width: 100%;
  flex-shrink: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px clamp(20px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-main {
  flex: 1;
  width: 100%;
  background: var(--bg);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e5e7eb, #9ca3af);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.header-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.87rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  transition: all 0.2s ease;
}

.header-nav a:hover {
  text-decoration: none;
  color: var(--text);
  background: var(--hover);
  border-color: var(--border);
}

.page-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 40px) 96px;
  min-width: 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.surface-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--paper) 0%, var(--paper-soft) 100%);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.surface-card:hover,
.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-card {
  grid-column: 1 / 2;
  padding: var(--pad-card);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.07;
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.subtitle {
  color: var(--muted);
  margin-top: 8px;
  font-size: 1.08rem;
  font-weight: 500;
}

.intro {
  margin-top: 18px;
  max-width: 64ch;
  line-height: 1.78;
}

.hero-links {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.hero-links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 500;
  background: var(--chip-bg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.hero-links a:hover {
  background: var(--hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.status-card {
  grid-column: 2 / 3;
  padding: var(--pad-card);
  display: grid;
  gap: 12px;
  align-content: start;
}

.micro-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.status-line {
  font-size: 0.98rem;
  line-height: 1.55;
}

.stack-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-list li {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--chip-text);
}

.about-card {
  grid-column: 1 / -1;
  padding: var(--pad-card);
}

.about-card p {
  line-height: 1.78;
}

.about-card p + p {
  margin-top: 14px;
}

.about-card p.about-card__subhead {
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-card__subhead strong {
  font-weight: 600;
  color: var(--text);
}

.about-card__list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: disc;
  line-height: 1.6;
  font-size: 0.95rem;
}

.about-card__list li {
  padding-left: 0.2rem;
}

.about-card__list li::marker {
  color: var(--muted);
}

.about-card__list strong {
  font-weight: 600;
  color: var(--text);
}

.case-study {
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 28px;
  max-width: 100%;
}

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

.case-study h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.case-study .case-context {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.case-study p {
  margin: 14px 0 0;
  line-height: 1.75;
}

.case-study p > strong:only-child {
  display: block;
  margin-top: 18px;
  margin-bottom: 4px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.case-study .timeline-card__list {
  margin: 10px 0 18px;
}

.interest-pills {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-pills span {
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--chip-text);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.sections {
  display: grid;
  gap: 20px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.panel-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 24px var(--pad-panel-inline) 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.panel-toggle:hover {
  background: var(--hover);
}

.panel-title {
  display: block;
  font-weight: 600;
  font-size: 1.08rem;
}

.panel-caption {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
  margin-top: 6px;
}

.panel-icon {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.26s ease;
}

.panel-toggle[aria-expanded="true"] .panel-icon {
  transform: rotate(45deg);
}

.panel-content {
  padding: 0 var(--pad-panel-inline);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.22s ease, padding 0.28s ease;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel-content.is-open {
  opacity: 1;
  padding-top: 24px;
  padding-bottom: 48px;
  overflow: visible;
}

.panel-content p + p {
  margin-top: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #2a2a2a;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.14);
}

.project-card:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.project-card__brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  min-height: 78px;
  background: rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid var(--border);
}

.project-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 16px;
  text-align: center;
  min-width: 0;
}

.project-card__logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.project-card__title,
.project-card h3 {
  font-size: 0.95rem;
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.3;
}

.project-card__body > p:not(.meta) {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.project-card .meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px 24px;
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
}

.timeline-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px;
  color: var(--text);
}

.timeline-card__org {
  margin: 0 0 6px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.45;
}

.timeline-card__dates {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.timeline-card__list {
  margin: 0;
  padding: 0 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.timeline-card__list li {
  padding-left: 0.2rem;
}

.timeline-card__list li::marker {
  color: var(--muted);
}

.contact-list {
  list-style: none;
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 22px 0 32px;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.site-footer__contact {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.site-footer__contact a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__contact a:hover {
  color: var(--link);
  text-decoration: underline;
}

.site-footer__sep {
  margin: 0 0.4em;
  user-select: none;
}

@media (max-width: 760px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .page-shell {
    padding: 32px 18px 72px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .status-card,
  .about-card {
    grid-column: auto;
  }

  .hero-links {
    flex-wrap: wrap;
  }
}

