/* TeamCraft design system — milk parchment, muted earth, dirt-red accent */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --background: #e6dfd1;
  --foreground: #1a1814;
  --card: #f0ebe2;
  --card-border: rgba(26, 24, 20, 0.1);
  --muted: #7a7268;
  --border: rgba(26, 24, 20, 0.1);
  --nav-bg: rgba(240, 235, 226, 0.88);

  --dirt-red: #6b443c;
  --dirt-red-hover: #7d524a;
  --dirt-red-deep: #5a382f;
  --ink: rgba(107, 68, 60, 0.14);
  --terracotta: #9b5a4a;
  --ochre: #a68b3d;
  --umber: #6e5c4d;
  --sage: #5c6356;

  --accent: var(--dirt-red);
  --accent-hover: var(--dirt-red-hover);
  --accent-soft: rgba(107, 68, 60, 0.12);
  --accent-on: #f0ebe2;

  --bg: var(--background);
  --bg-elevated: var(--card);
  --paper: var(--card);
  --paper-soft: #faf7f2;
  --text: var(--foreground);
  --hover: var(--accent-soft);
  --link: var(--dirt-red);
  --chip-bg: rgba(107, 68, 60, 0.08);
  --chip-text: var(--dirt-red-deep);

  --radius-pill: 9999px;
  --radius-card: 1.5rem;
  --radius-metric: 1.75rem;
  --shadow-xl: none;
  --shadow-lg: none;
  --shadow-md: none;
  --shadow-sm: none;
  --pad-card: clamp(28px, 5vw, 48px);
  --pad-panel-inline: clamp(24px, 4vw, 48px);
  --content-max: min(72rem, 100%);
  --header-height: 3.75rem;

  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --noise-svg: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html,
body {
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-sans);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#about,
.panel {
  scroll-margin-top: calc(var(--header-height, 4.5rem) + 16px);
}

body {
  position: relative;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: var(--noise-svg);
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

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

a:hover {
  color: var(--dirt-red-hover);
  text-decoration: underline;
}

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

.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px 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: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--accent-on);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-on);
}

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

.header-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-on);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-nav a:hover {
  text-decoration: none;
  color: var(--dirt-red-deep);
  background: var(--accent-on);
}

.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: var(--radius-card);
  border: 1px solid var(--card-border);
  background: var(--card);
  transition: border-color 0.15s ease;
}

.surface-card:hover,
.panel:hover {
  border-color: rgba(26, 24, 20, 0.16);
}

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

.eyebrow {
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 0.95;
  margin-top: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--foreground);
}

.subtitle {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

.intro {
  margin-top: 18px;
  max-width: 64ch;
  line-height: 1.78;
  font-weight: 500;
  color: var(--muted);
}

.hero-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-contact a {
  color: var(--dirt-red);
  font-weight: 600;
}

.hero-links {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 0.625rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.hero-links a:first-child {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--dirt-red);
  color: var(--accent-on);
}

.hero-links a:first-child:hover {
  background: var(--dirt-red-hover);
  color: var(--accent-on);
  text-decoration: none;
}

.hero-links a:not(:first-child) {
  border: 1px solid rgba(26, 24, 20, 0.2);
  background: transparent;
  color: var(--foreground);
}

.hero-links a:not(:first-child):hover {
  background: var(--dirt-red);
  border-color: var(--dirt-red);
  color: var(--accent-on);
  text-decoration: none;
}

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

.status-avatar {
  display: block;
  width: 100%;
  max-width: 160px;
  margin: 0 auto 4px;
  border-radius: 50%;
  aspect-ratio: 1;
  object-fit: cover;
}

.micro-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.status-line {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--foreground);
}

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

.stack-list li {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--chip-text);
}

.skill-accordions {
  display: grid;
  gap: 6px;
}

.skill-accordion {
  border-top: 1px solid var(--card-border);
  padding-top: 6px;
}

.skill-accordion:first-child {
  border-top: 0;
  padding-top: 0;
}

.skill-accordion__toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s ease;
}

.skill-accordion__toggle:hover {
  color: var(--foreground);
}

.skill-accordion__icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.22s ease, color 0.15s ease;
  flex-shrink: 0;
}

.skill-accordion__toggle[aria-expanded="true"] .skill-accordion__icon {
  transform: rotate(45deg);
  color: var(--dirt-red);
}

.skill-accordion__content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.25s ease;
}

.skill-accordion__content.is-open {
  opacity: 1;
  padding-bottom: 10px;
}

.skill-accordion__content .stack-list {
  padding-top: 4px;
}

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

.about-card p {
  line-height: 1.78;
  font-weight: 500;
  color: var(--muted);
}

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

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

.about-card__subhead strong {
  font-weight: 700;
  color: var(--muted);
}

.about-card__list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: disc;
  line-height: 1.65;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

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

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

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

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

a.case-study {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.case-study:hover {
  border-color: rgba(26, 24, 20, 0.18);
  background: #fffefb;
  text-decoration: none;
}

a.case-study:focus-visible {
  outline: 2px solid var(--dirt-red);
  outline-offset: 3px;
}

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

.case-study h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  color: var(--foreground);
}

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

.case-study p {
  margin: 14px 0 0;
  line-height: 1.75;
  font-weight: 500;
  color: var(--muted);
}

.case-study p > strong:only-child {
  display: block;
  margin-top: 18px;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.case-study .meta {
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

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

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

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

.panel {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s 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.15s ease;
}

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

.panel-title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

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

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

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

.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(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  justify-content: center;
}

.project-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.project-grid--compact .project-card__body {
  padding: 12px 14px 14px;
  text-align: left;
}

.project-grid--compact .project-card__title {
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.project-grid--compact .project-card__body > p:not(.meta) {
  font-size: 0.76rem;
  line-height: 1.45;
  margin-top: 6px;
}

.project-grid--compact .project-card .meta {
  margin-top: 0;
  font-size: 0.72rem;
}

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

  .project-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .project-grid--compact {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--paper-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.project-card:hover {
  border-color: rgba(26, 24, 20, 0.18);
  background: #fffefb;
  text-decoration: none;
}

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

.project-card__brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  min-height: 78px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--card-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: 700;
  line-height: 1.3;
  color: var(--foreground);
}

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

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

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

.timeline-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 22px 24px 24px;
  background: var(--paper-soft);
  min-width: 0;
}

.timeline-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 4px;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.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.82rem;
  color: var(--terracotta);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.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.6;
  font-weight: 500;
  color: var(--muted);
}

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

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

.contact-list {
  list-style: none;
  margin-top: 18px;
  display: grid;
  gap: 12px;
  font-weight: 500;
  color: var(--muted);
}

.contact-list a {
  color: var(--dirt-red);
  font-weight: 600;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--nav-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;
  font-weight: 600;
}

.site-footer__contact a:hover {
  color: var(--dirt-red);
  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;
  }
}
