:root {
  --width: 720px;
  --font-main: Verdana, sans-serif;
  --font-secondary: Verdana, sans-serif;
  --font-scale: 1em;
  --background-color: #fff;
  --heading-color: #222;
  --text-color: #444;
  --link-color: #3273dc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

body {
  font-family: var(--font-secondary);
  font-size: var(--font-scale);
  margin: auto;
  padding: 20px;
  max-width: var(--width);
  text-align: left;
  background-color: var(--background-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--heading-color);
}

/* Bear Blog uses browser default heading sizes — keep them natural */
h1 { font-size: 2em; margin-bottom: 0.5em; }
h2 { font-size: 1.5em; margin-bottom: 0.5em; }
h3 { font-size: 1.17em; margin-bottom: 0.5em; }

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

a:hover {
  text-decoration: underline;
}

strong, b {
  color: var(--heading-color);
}

main {
  line-height: 1.6;
}

p {
  margin-bottom: 1em;
}

footer {
  padding: 25px 0;
  text-align: center;
}

/* ── Header / Nav ── */
.title {
  font-size: 1.5em;
}

.title a {
  color: var(--heading-color);
  text-decoration: none;
}

.title a:hover {
  text-decoration: none;
}

nav {
  margin-top: 4px;
}

nav a {
  margin-right: 8px;
}

nav a.active {
  text-decoration: underline;
}

/* ── Hero (home page) ── */
.hero {
  margin: 2em 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  overflow: hidden;
  margin-bottom: 1.5em;
  flex-shrink: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  flex: 1;
}

.hero-name {
  font-size: 2em;
  margin-bottom: 0.25em;
}

.hero-pronunciation {
  font-size: inherit;
  font-weight: inherit;
  color: var(--heading-color);
  white-space: nowrap;
}

.hero-body {
  font-size: 1.17em;
  margin-bottom: 0.5em;
}

.hero-now {
  margin-bottom: 0.75em;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* ── Logo Wall ── */
.logos {
  margin: 3em 0;
}

.logos-label {
  margin-bottom: 1.5em;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
  align-items: center;
  justify-items: center;
}

.logo-item {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 480px) {
  .logos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 40px;
  }
  .logo-item {
    height: 64px;
  }
}

.logo-item img {
  max-width: 70%;
  max-height: 100%;
  object-fit: contain;
}

@media (min-width: 480px) {
  .logo-item img {
    max-width: 75%;
  }
}

/* ── How I Work ── */
.how {
  margin: 3em 0;
}

.how-list {
  padding-left: 1.5em;
}

.how-list li {
  margin-bottom: 1.25em;
  line-height: 1.6;
}

.how-list li:last-child {
  margin-bottom: 0;
}

.how-list strong {
  display: block;
  margin-bottom: 0.25em;
}

/* ── Page content (Now, Portfolio) ── */
.page-content {
  margin: 2em 0;
}

.page-content ul {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.page-content li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

/* ── Portfolio grid ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  margin: 2em 0;
}

.portfolio-card {
  color: var(--text-color);
  text-decoration: none;
  display: block;
}

.portfolio-card:hover {
  text-decoration: none;
}

.portfolio-card:hover h2 {
  text-decoration: underline;
}

.portfolio-card h2 {
  margin-bottom: 0.15em;
}

.portfolio-card .card-org {
  color: #888;
  font-style: italic;
  margin-bottom: 0.5em;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 0.75em;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #eee;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder {
  background: #eee;
  border: 1px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #888;
  font-size: 0.9em;
  font-style: italic;
  padding: 1em;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Case study pages ── */
.case-study {
  margin: 2em 0;
}

.case-back {
  margin-bottom: 1.5em;
  font-size: 0.95em;
}

.case-kicker {
  color: #888;
  font-style: italic;
  margin-bottom: 0.25em;
}

.case-study h1 {
  margin-bottom: 0.25em;
}

.case-sub {
  color: #888;
  font-style: italic;
  margin-bottom: 1.5em;
}

.case-image {
  margin: 1.5em 0;
}

.case-image img {
  width: 100%;
  height: auto;
  display: block;
}

.case-image.placeholder {
  aspect-ratio: 16 / 9;
}

.case-image.framed {
  background: #fafafa;
  border: 1px solid #eee;
}

.case-meta {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5em;
}

.case-meta th,
.case-meta td {
  text-align: left;
  vertical-align: top;
  padding: 0.4em 0.75em 0.4em 0;
  border-bottom: 1px solid #eee;
}

.case-meta th {
  color: var(--heading-color);
  font-weight: bold;
  width: 9em;
}

.case-study ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.case-study ol li {
  margin-bottom: 0.75em;
  line-height: 1.6;
}

.case-study blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1em;
  margin: 1em 0;
  color: var(--heading-color);
  font-style: italic;
}

/* ── Desktop hero layout ── */
@media (min-width: 640px) {
  .hero-inner {
    flex-direction: row-reverse;
    align-items: center;
    gap: 2em;
  }

  .hero-photo {
    margin-bottom: 0;
    width: 220px;
    height: 220px;
  }
}
