@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-semibold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #f3f4ef;
  --surface: #fafbf7;
  --surface-hover: #e9ede4;
  --ink: #25392d;
  --muted: #637066;
  --line: #dce1d7;
  --accent: #344d3c;
  --accent-hover: #263c2d;
  --on-accent: #f7f8f0;
  --on-accent-muted: #d7e0d4;
  --radius: 12px;
  font-family: Manrope, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--background);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a, summary { touch-action: manipulation; }
img { display: block; max-width: 100%; }
p, h1, h2 { margin: 0; }
::selection { background: #cfdbc6; color: #25392d; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

.skip-link { position: fixed; left: 20px; top: -100px; z-index: 1; padding: 14px 20px; border-radius: var(--radius); color: var(--on-accent); background: var(--accent); }
.skip-link:focus { top: 16px; }
.site-shell { width: min(1184px, calc(100% - 112px)); min-height: 100dvh; margin-inline: auto; display: flex; flex-direction: column; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.social-links { display: flex; align-items: center; gap: 32px; }
.social-links a { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; }
.social-links img { width: 17px; height: 17px; object-fit: contain; opacity: .8; }
.email-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }

.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(48px, 6.6vw, 96px); align-items: start; padding-block: 40px 45px; }
.profile-column { min-width: 0; }
.portrait { display: block; }
.hero-photo { width: 100%; height: 390px; object-fit: cover; object-position: 50% 34%; border-radius: var(--radius); background: var(--line); }
.about { margin-top: 27px; }
.about h2 { font-size: 18px; font-weight: 600; letter-spacing: -.5px; line-height: 1.4; }
.about p { color: var(--muted); margin-top: 12px; font-size: 14px; line-height: 1.85; letter-spacing: -.12px; }
.about p + p { margin-top: 10px; }
h1 { font-size: clamp(44px, 4.6vw, 64px); font-weight: 600; line-height: 1.15; letter-spacing: -.065em; }
.bio { margin-top: 17px; color: var(--muted); font-size: 15px; line-height: 1.85; letter-spacing: -.2px; }
.mobile-avatar, .mobile-title, .mobile-social-links { display: none; }
.links-heading { margin-top: 33px; font-size: 13px; font-weight: 600; letter-spacing: -.15px; line-height: 1.6; }

.link-list { display: grid; gap: 10px; margin-top: 14px; scroll-margin-top: 24px; }
.feature-link { min-width: 0; min-height: 78px; padding: 14px 18px; display: flex; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.link-image { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; overflow: hidden; background: #eceee8; }
.link-image img { width: 100%; height: 100%; object-fit: cover; }
.link-copy { display: grid; gap: 4px; min-width: 0; }
.link-title { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.link-description { font-size: 12px; line-height: 1.5; color: var(--muted); }
.primary-link { min-height: 88px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.primary-link .link-description { color: var(--on-accent-muted); }
.amazon-image { display: grid; place-items: center; background: #f3f1e7; }
.amazon-image img { width: 29px; height: 29px; object-fit: contain; }
.spark-image img { object-fit: contain; }

.beyond-coffee { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.beyond-coffee h2 { font-size: 13px; font-weight: 600; line-height: 1.6; }
.beyond-coffee p { margin-top: 7px; max-width: 46ch; color: var(--muted); font-size: 12px; line-height: 1.85; }
.beyond-coffee a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }

@media (hover: hover) {
  .social-links a:hover span { text-decoration: underline; text-underline-offset: 5px; }
  .email-link:hover { text-decoration-color: var(--ink); }
  .feature-link:hover { background: var(--surface-hover); transform: translateY(-2px); }
  .primary-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .disclosure summary:hover { color: var(--ink); }
  .mobile-social-links a:hover { background: var(--surface-hover); }
  .beyond-coffee a:hover { text-decoration-color: var(--ink); }
}
.feature-link:active { transform: scale(.99); }

.site-footer { margin-top: auto; padding-block: 20px 24px; border-top: 1px solid var(--line); display: flex; align-items: start; justify-content: space-between; gap: 36px; font-size: 10px; line-height: 1.8; color: var(--muted); }
.copyright { flex-shrink: 0; }
.disclosure { max-width: 520px; text-align: right; }
.disclosure summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 24px; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary span { font-size: 16px; line-height: 1; }
.disclosure[open] summary span { transform: rotate(45deg); }
.disclosure p { margin-top: 10px; text-align: left; line-height: 1.85; }

@media (min-width: 1440px) {
  .site-shell { width: min(1240px, calc(100% - 160px)); }
  .hero-photo { height: 410px; }
  .about p { font-size: 15px; }
  .home { padding-top: 44px; }
}

@media (min-width: 768px) and (max-width: 1050px) {
  .site-shell { width: calc(100% - 64px); }
  .social-links { gap: 23px; }
  .social-links a { font-size: 12px; gap: 7px; }
  .email-link { font-size: 12px; }
  .home { gap: 36px; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); padding-top: 32px; }
  .hero-photo { height: 345px; }
  h1 { font-size: 43px; }
  .bio { font-size: 13px; }
  .feature-link { padding-inline: 13px; gap: 12px; }
  .link-title { font-size: 14px; }
  .link-description { font-size: 11px; }
  .about p { font-size: 13px; }
}

@media (min-width: 768px) and (max-height: 800px) {
  .site-header { min-height: 72px; }
  .home { padding-block: 27px 30px; }
  .hero-photo { height: 310px; }
  .about { margin-top: 21px; }
  .about h2 { font-size: 17px; }
  .about p { font-size: 13px; line-height: 1.8; margin-top: 10px; }
  h1 { font-size: 49px; }
  .bio { font-size: 14px; line-height: 1.7; margin-top: 12px; }
  .links-heading { margin-top: 23px; }
  .link-list { margin-top: 12px; gap: 8px; }
  .feature-link { min-height: 62px; padding: 9px 15px; gap: 14px; }
  .link-image { width: 42px; height: 42px; flex-basis: 42px; }
  .primary-link { min-height: 70px; }
  .beyond-coffee { margin-top: 22px; padding-top: 17px; }
  .link-title { font-size: 14px; }
  .site-footer { padding-block: 15px 18px; }
}

@media (min-width: 768px) and (max-width: 1050px) and (max-height: 800px) {
  h1 { font-size: 42px; }
}

@media (max-width: 767px) {
  .site-shell { width: min(430px, calc(100% - 40px)); }
  .site-header { display: none; }
  .home { display: block; padding: max(32px, env(safe-area-inset-top)) 0 28px; }
  .profile-column { display: none; }
  .intro { text-align: center; }
  .mobile-avatar { display: block; width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; }
  .desktop-title { display: none; }
  .mobile-title { display: inline; }
  h1 { font-size: 31px; line-height: 1.2; letter-spacing: -1.4px; }
  .bio { margin: 12px auto 0; font-size: 13px; line-height: 1.8; }
  .mobile-social-links { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
  .mobile-social-links a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .mobile-social-links img { object-fit: contain; opacity: .8; }
  .links-heading { display: none; }
  .link-list { margin-top: 28px; gap: 10px; }
  .feature-link { min-height: 77px; padding: 12px 15px; gap: 15px; text-align: left; }
  .link-image { width: 44px; height: 44px; flex-basis: 44px; }
  .link-title { font-size: 14px; }
  .link-description { font-size: 11px; }
  .beyond-coffee { margin-top: 25px; padding-top: 21px; text-align: center; }
  .beyond-coffee p { margin-inline: auto; font-size: 12px; }
  .site-footer { border-top: 0; padding: 0 0 max(25px, env(safe-area-inset-bottom)); flex-direction: column-reverse; align-items: center; justify-content: start; gap: 10px; font-size: 9px; }
  .disclosure { text-align: center; }
  .disclosure p { font-size: 10px; }
}

@media (max-width: 360px) {
  .site-shell { width: calc(100% - 28px); }
  .feature-link { gap: 12px; padding-inline: 12px; }
  .link-description { font-size: 10px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #17221c;
    --surface: #202e25;
    --surface-hover: #2a3a2e;
    --ink: #edf0e5;
    --muted: #a6b4a7;
    --line: #354438;
    --accent: #d5e3c7;
    --accent-hover: #e5efd9;
    --on-accent: #233829;
    --on-accent-muted: #40553e;
  }
  .social-links img, .mobile-social-links img { filter: invert(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .feature-link { transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease; }
}

/* noahstern.com: icon thumbnails for links without a brand image */
.icon-image { display: grid; place-items: center; background: #eceee8; }
.icon-image img { width: 22px; height: 22px; object-fit: contain; opacity: .8; }
.logo-image { display: grid; place-items: center; background: #f3f4ef; }
.logo-image img { width: 34px; height: 34px; object-fit: contain; }
@media (prefers-color-scheme: dark) { .icon-image { background: #2a3a2e; } .icon-image img { filter: invert(1); opacity: 1; } }
