*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --black: #111;
      --mid: #555;
      --red: #f52929;
      --light: #aaa;
      --rule: #ddd;
      --bg: #fafaf8;
    }

    html { background: var(--bg); }

    body {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      font-weight: 300;
      line-height: 1.75;
      color: var(--black);
      background: var(--bg);
      max-width: 720px;
      margin: 0 auto;
      padding: 3rem 1.25rem 6rem;
    }

    a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
    a:hover { color: var(--mid); }

    /* ── topbar ── */
    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      border-bottom: 1px solid var(--rule);
      padding-bottom: 1rem;
      margin-bottom: 4rem;
      flex-wrap: wrap;
      gap: .5rem;
    }
    .topbar-name {
      font-family: 'DM Serif Display', Georgia, serif;
      font-size: 1rem;
      font-weight: 400;
    }
    .topbar-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
    .topbar-nav a {
      font-size: 11px;
      text-decoration: none;
      color: var(--mid);
      letter-spacing: .08em;
    }
    .topbar-nav a:hover { color: var(--black); }

    /* ── hero ── */
    .hero {
      display: flex;
      align-items: center;
      gap: 2rem;
      margin-bottom: 2.5rem;
      padding-top: 1rem;
      flex-wrap: wrap;
    }
    .hero-portrait {
      color: var(--black);

    }
    .hero-text { flex: 1; min-width: 200px; }
    .hero-text h1 {
      font-family: "Inter", sans-serif;
      font-weight: 400;
      font-size: clamp(1.8rem, 8vw, 3.6rem);
      line-height: 1.15;
      letter-spacing: -.01em;
      margin-bottom: .6rem;
      margin-left: 2rem;
    }
    .hero-text h1 em {
      font-style: italic;
      color: var(--red);
    }
    .hero-text .tagline {
      font-size: 12.5px;
      color: var(--mid);
      line-height: 1.7;
      max-width: 420px;
            margin-left: 2rem;

    }

    /* ── hero links row ── */
    .hero-links {
      display: flex;
      gap: 1rem 1.2rem;
      flex-wrap: wrap;
      margin-bottom: 3rem;
      align-items: center;
    }
    .hero-links a {
      font-size: 11px;
      letter-spacing: .06em;
      text-decoration: none;
      color: var(--mid);
      border-bottom: 1px solid var(--rule);
      padding-bottom: 1px;
      transition: color .15s, border-color .15s;
      /* Better tap target on mobile */
      padding-top: 4px;
      padding-bottom: 4px;
    }
    .hero-links a:hover { color: var(--black); border-bottom-color: var(--black); }

    /* ── carousel ── */
    .carousel-frame {
      width: 100%;
      aspect-ratio: 3/2;
      overflow: hidden;
      background: #e8e8e4;
      margin-bottom: .6rem;
    }
    .carousel-track {
      display: flex;
      height: 100%;
      transition: transform .5s cubic-bezier(.4,0,.2,1);
    }
    .slide { min-width: 100%; height: 100%; }
    .slide img {
      width: 100%; height: 100%;
      object-fit: cover; display: block;
      filter: grayscale(8%);
    }
    .carousel-footer {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 3.5rem;
      gap: .5rem;
      flex-wrap: wrap;
    }
    .carousel-caption {
      font-size: 11px;
      color: var(--light);
      font-style: italic;
      flex: 1;
      min-width: 0;
    }
    .carousel-right { display: flex; align-items: baseline; gap: 1.2rem; flex-shrink: 0; }
    .carousel-counter { font-size: 11px; color: var(--light); letter-spacing: .05em; }
    .carousel-controls button {
      background: none; border: none;
      font-family: 'DM Mono', monospace;
      font-size: 11px; color: var(--mid);
      cursor: pointer; padding: 4px 0;
      letter-spacing: .05em;
      /* Larger tap target */
      min-height: 32px;
    }
    .carousel-controls button:hover { color: var(--black); }

    /* ── section label ── */
    .section-label {
      font-size: 10px;
      letter-spacing: .15em;
      text-transform: uppercase;
      color: var(--light);
      border-top: 1px solid var(--rule);
      padding-top: 2.5rem;
      margin-bottom: 1.4rem;
    }
    /* Fix the inline flex used on work/index and sub-pages */
    .section-label[style*="display:flex"],
    .section-label[style*="display: flex"] {
      align-items: baseline;
      gap: 1rem;
    }
    /* Make the closing </p> inside the flex label not collapse layout */
    .section-label > a#back {
      margin-left: auto;
      flex-shrink: 0;
      font-size: 10px;
      letter-spacing: .1em;
      padding: 4px 0;
    }

    /* ── beliefs ── */
    .beliefs ul { list-style: none; padding: 0; }
    .beliefs ul li {
      font-size: 12.5px;
      line-height: 1.75;
      padding: .35rem 0;
      border-bottom: 1px solid var(--rule);
    }
    .beliefs ul li:last-child { border-bottom: none; }
    .aside {
      display: block;
      font-size: 11px;
      color: var(--light);
      font-style: italic;
      margin-top: .1rem;
    }

    /* ── projects ── */
    .project {
      padding: 1.4rem 0;
      border-bottom: 1px solid var(--rule);
    }
    .project:first-of-type { padding-top: 0; }
    .project-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: .5rem 1rem;
      margin-bottom: .5rem;
      flex-wrap: wrap;
    }
    .project-title {
      font-family: 'DM Serif Display', Georgia, serif;
      font-size: 1.05rem;
      font-weight: 400;
    }
    .project-tag {
      font-size: 10px;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--light);
      flex-shrink: 0;
    }
    .project-desc {
      font-size: 12px;
      color: var(--mid);
      line-height: 1.75;
      max-width: 560px;
    }
    .project-note {
      font-size: 11px;
      color: var(--light);
      font-style: italic;
      margin-top: .4rem;
    }

    /* ── friends ── */
    .friends-intro { font-size: 12.5px; color: var(--mid); margin-bottom: .8rem; }
    .friends-list {
      display: flex; flex-wrap: wrap;
      gap: .4rem 1.5rem;
      list-style: none; padding: 0;
    }
    .friends-list li { font-size: 12.5px; }
    .friends-list a { color: var(--mid); }
    .friends-list a:hover { color: var(--black); }

    /* ── contact ── */
    .contact-line { font-size: 12.5px; color: var(--mid); }

    /* ── footer ── */
    footer {
      margin-top: 4rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--rule);
      font-size: 11px;
      color: var(--light);
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: .5rem;
    }

    /* ── about page images ── */
    #herolamp {
      max-width: 100%;
      height: auto;
    }

    /* ── lamp page images ── */
    .lampimg {
      max-width: 100%;
      height: auto;
    }

    /* ── photos page ── */
    .photography {
      max-width: 100%;
      height: auto;
    }

/* stack both svgs */
.hero-portrait {
  position: relative;
  height: 7.4rem;
  width: calc(7.4rem * 109.49 / 120.64);
  flex-shrink: 0;
}

.hero-portrait svg {
  position: absolute;
  top: 0;
  left: 0;
  height: 140%;
  width: auto;
  display: block;
}

.icon-static { opacity: 1; }
.icon-hover  { opacity: 0; }

.hero-portrait:hover .icon-static { opacity: 0; }
.hero-portrait:hover .icon-hover  { opacity: 1; }

/* ── mobile breakpoint ── */
@media (max-width: 520px) {
  body {
    padding: 2rem 1rem 5rem;
  }

  /* Mobile hero: big text, face floats top-right */
  .hero {
    display: block;
    position: relative;
    padding-top: .5rem;
  }

  .hero-portrait {
    position: absolute;
    top: 0;
    margin-right: 1.5rem;
    right: 0;
    height: 4rem;
    width: calc(4rem * 109.49 / 120.64);
  }

  .hero-text h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
    padding-right: 6rem; /* keep text from overlapping face */
  }

  .hero-text .tagline {
    font-size: 12px;
    padding-right: 0;
  }

  /* Carousel caption can wrap below controls */
  .carousel-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }

  /* project tag drops below title on very narrow screens */
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }

  /* section label back link stays right */
  .section-label {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: baseline;
  }
  .hero-text h1 {
    margin-left: 0;
  }
  .hero-text .tagline{
    margin-left: 0;
  }
}