/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --black:    #0c0c0c;
  --white:    #ffffff;
  --gray-100: #f6f6f6;
  --gray-200: #e5e5e5;
  --gray-400: #b0b0b0;
  --gray-600: #666666;
  --gray-800: #333333;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--black);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
  background: transparent;
  border: 1.5px solid var(--black);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  text-align: center;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

.btn-filled {
  background: var(--black);
  color: var(--white);
}

.btn-filled:hover {
  background: transparent;
  color: var(--black);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  transition: opacity 0.4s ease;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.loader-logo {
  height: 64px;
  width: auto;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.loader-logo.visible {
  opacity: 1;
  transform: scale(1);
}

.loader-tagline {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.loader-tagline.visible {
  opacity: 1;
}

/* ============================================================
   CARD WRAPPER
   ============================================================ */
#card {
  max-width: 560px;
  margin: 3rem auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#card.visible {
  opacity: 1;
}

/* ============================================================
   1. HEADER STRIP
   ============================================================ */
.card-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: var(--white);
  /* border-bottom replaced by SVG path so it can bend */
}

/* ---- SVG border line ---- */
.header-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;         /* just enough for the stroke; bends render via overflow */
  overflow: visible;
  pointer-events: none;
}

.header-fill-path {
  fill: var(--white);
  stroke: none;
}

.header-border-path {
  fill: none;
  stroke: #0c0c0c;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}


.header-logo {
  height: 48px;
  width: auto;
}

/* ---- Sticky header avatar ---- */
.header-avatar-wrap {
  position: absolute;
  right: 1.5rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  overflow: hidden; /* clips avatar to header height — keeps it behind the border line */
}

.header-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1.5px solid var(--gray-200);
  display: block;
  opacity: 0;
  transform: translateY(64px);
}

@keyframes avatarPopIn {
  0%   { transform: translateY(64px); opacity: 0; }
  55%  { transform: translateY(-6px); opacity: 1; }
  72%  { transform: translateY(3px);  }
  86%  { transform: translateY(-2px); }
  100% { transform: translateY(0);    opacity: 1; }
}

@keyframes avatarPopOut {
  0%   { transform: translateY(0);    opacity: 1; }
  100% { transform: translateY(64px); opacity: 0; }
}

.header-avatar.pop-in {
  animation: avatarPopIn 0.44s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.header-avatar.pop-out {
  animation: avatarPopOut 0.22s ease-in forwards;
}


/* ============================================================
   2. INTRO BAND
   ============================================================ */
.card-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.intro-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.15rem;
}

.intro-location {
  margin-bottom: 0.45rem;
}

.intro-name {
  font-size: 2.75rem;
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.intro-roles {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.intro-role-sep {
  color: var(--gray-400);
}

/* Avatar — circle crop; border-radius is intentional here */
.avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1.5px solid var(--gray-200);
}

/* ============================================================
   3. FREE-FORM UPDATE / ANNOUNCEMENT
   ============================================================ */
.card-update {
  padding: 1.35rem 1.5rem;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  border-left: 2px solid var(--black);
}

.update-label {
  margin-bottom: 0.4rem;
}

.update-title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.update-body {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============================================================
   4. ABOUT
   ============================================================ */
.card-about {
  border-top: 1px solid var(--gray-200);
}

.about-read-more {
  display: inline;
  margin-top: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--gray-600);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.about-read-more:hover {
  color: var(--black);
}

/* ---- About bottom sheet ---- */
.about-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 12, 12, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.about-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.about-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 60;
  width: min(560px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--white);
  border-top: 2px solid var(--black);
  transform: translateX(-50%) translateY(100%);
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
}

.about-sheet--open {
  transform: translateX(-50%) translateY(0);
}

.about-sheet-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.about-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  transition: color 0.15s ease;
}

.about-sheet-close:hover {
  color: var(--black);
}

.about-sheet-close svg {
  width: 18px;
  height: 18px;
}

.about-sheet-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-sheet-title {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.about-sheet-body p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.about-title {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.65rem;
  line-height: 1.2;
}

.about-body {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================================
   5. SOCIAL LINKS
   ============================================================ */
.card-section {
  padding: 1.5rem;
}

.section-label {
  margin-bottom: 1rem;
}

.card-social {
  border-top: 1px solid var(--gray-200);
}

.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  margin-bottom: 1rem;
}

.social-logo-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.18s ease;
}

.social-logo-link:hover {
  opacity: 1;
}

.social-logo {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}

.social-logo--svg {
  color: var(--black);
}


/* ============================================================
   6. BLOG / RECENT WRITING
   ============================================================ */
.card-blog {
  border-top: 1px solid var(--gray-200);
}

.blog-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.blog-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.blog-card:first-child {
  border-top: 1px solid var(--gray-200);
}

/* Blog thumbnail */
.blog-img {
  flex-shrink: 0;
  width: 90px;
  height: 68px;
  overflow: hidden;
  background: var(--gray-200); /* placeholder color when no image */
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Hide broken-image icon gracefully */
  color: transparent;
}

.blog-card-body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.blog-date {
  display: block;
  margin-bottom: 0.35rem;
}

.blog-title {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--black);
  line-height: 1.25;
  transition: color 0.15s ease;
}

.blog-card:hover .blog-title {
  color: var(--gray-600);
}

.blog-all-btn {
  width: 100%;
  text-align: center;
}

/* ============================================================
   7. CONTACT
   ============================================================ */
.card-contact {
  border-top: 1px solid var(--gray-200);
}

/* Screen-reader-only labels */
.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;
}

.contact-actions {
  margin-bottom: 0; /* panel handles its own spacing */
}

.contact-success {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
}

/* ---- Collapsible panel ---- */
.contact-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    max-height 320ms ease,
    opacity 240ms ease,
    transform 240ms ease;
}

.contact-panel--open {
  max-height: 480px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-top: 1rem;
}

.contact-panel--closing {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    max-height 320ms ease,
    opacity 300ms ease,
    transform 300ms ease;
}

/* ---- Form layout ---- */
.contact-form {
  display: grid;
  gap: 0.6rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
}

/* ---- Inputs ---- */
.contact-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--black);
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
}

.contact-input::placeholder {
  color: var(--gray-400);
}

.contact-input:focus {
  border-color: var(--black);
}

.contact-input--message {
  resize: none;
  overflow: hidden;
  min-height: 42px;
  max-height: 180px;
}

/* ---- Send button ---- */
.contact-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--black);
  border: 1.5px solid var(--black);
  color: var(--white);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.contact-send:hover {
  background: transparent;
  color: var(--black);
}

.contact-send svg {
  width: 16px;
  height: 16px;
}

/* ---- Hint / error line ---- */
.contact-hint {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--gray-400);
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

/* ---- Mobile: single-column inputs ---- */
@media (max-width: 480px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   8. CONTACT INFO BLOCK
   ============================================================ */
.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.contact-info-col {
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-info-col:first-child {
  border-right: 1px solid var(--gray-200);
}

.contact-info-label {
  margin-bottom: 0.3rem;
}

.contact-info-col p,
.contact-info-col a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.contact-info-col a {
  color: var(--gray-800);
  transition: color 0.15s ease;
}

.contact-info-col a:hover {
  color: var(--black);
}

/* ============================================================
   9. FOOTER STRIP
   ============================================================ */
.card-footer {
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  text-align: center;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--gray-400);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE — MOBILE (<600px)
   ============================================================ */
@media (max-width: 600px) {
  #card {
    margin: 0;
    border: none;
    max-width: 100%;
  }


}

/* ============================================================
   WHAT'S NEW FEED
   ============================================================ */

/* -- Homepage preview card -- */
.card-update {
  cursor: pointer;
  transition: background 0.15s ease;
  outline: none;
}

.card-update:hover,
.card-update:focus-visible {
  background: var(--gray-200);
}

.update-preview-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

/* Cancel the eyebrow element's own bottom margin inside the flex row */
.update-preview-eyebrow .update-label {
  margin-bottom: 0;
}

.update-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
  display: inline-block;
}

/* Float-based layout: image left, text wraps right at all breakpoints */
.update-preview-body {
  overflow: hidden; /* establishes BFC to contain float */
}

.update-preview-img {
  float: left;
  width: 80px;
  height: 80px;
  object-fit: cover;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.18);
  margin: 0 0.75rem 0.25rem 0;
  display: block;
  color: transparent; /* graceful broken-image */
}

.update-preview-date {
  display: block;
  margin-bottom: 0.25rem;
}

.update-preview-excerpt {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.update-read-more {
  display: block;
  margin-top: 0.65rem;
  color: var(--gray-400);
  transition: color 0.15s ease;
}

.card-update:hover .update-read-more,
.card-update:focus-visible .update-read-more {
  color: var(--black);
}

/* -- Shared backdrop -- */
.updates-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 12, 12, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.updates-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

/* -- Shared sheet shell (index + post reuse this class) -- */
.updates-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 60;
  width: min(560px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--white);
  border-top: 2px solid var(--black);
  transform: translateX(-50%) translateY(100%);
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
}

.updates-sheet--open {
  transform: translateX(-50%) translateY(0);
}

.updates-sheet-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

/* Close button — mirrors .about-sheet-close dimensions exactly */
.updates-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  transition: color 0.15s ease;
}

.updates-sheet-close:hover {
  color: var(--black);
}

.updates-sheet-close svg {
  width: 18px;
  height: 18px;
}

/* Back button (post sheet, top left) */
.updates-sheet-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  padding: 0;
  transition: color 0.15s ease;
}

.updates-sheet-back:hover {
  color: var(--black);
}

.updates-sheet-back svg {
  width: 16px;
  height: 16px;
}

/* Let the back button's color cascade to the eyebrow label inside it */
.updates-back-label {
  color: inherit;
}

.updates-sheet-body {
  padding: 0;
}

/* -- Index cards -- */
.updates-index-item {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background 0.15s ease;
}

.updates-index-item:last-child {
  border-bottom: none;
}

.updates-index-item:hover {
  background: var(--gray-100);
}

.updates-index-date {
  display: block;
  margin-bottom: 0.3rem;
}

.updates-index-headline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 0.5rem;
}

/* Float-based layout in index card — same pattern as preview */
.updates-index-body {
  overflow: hidden;
}

.updates-index-img {
  float: left;
  width: 80px;
  height: 80px;
  object-fit: cover;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.18);
  margin: 0 0.75rem 0.25rem 0;
  display: block;
  color: transparent;
}

.updates-index-excerpt {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- Post view -- */
.updates-post-body {
  padding: 1.5rem;
}

.updates-post-date {
  display: block;
  margin-bottom: 0.5rem;
}

.updates-post-headline {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 1rem;
}

.updates-post-text p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.updates-post-text p:last-child {
  margin-bottom: 0;
}

.updates-post-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  transition: text-decoration 0.15s ease;
}

.updates-post-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.updates-post-media {
  margin-top: 1rem;
}

.updates-post-media img,
.updates-post-media video {
  display: block;
  width: 100%;
  max-width: 100%;
}
