/* joshuakaplan.com — rebuilt from the Webflow original.
   One typeface, 12px Arial; hairline rows; green #cdff8b accents. */

:root {
  --ink: rgba(0, 0, 0, 0.75);
  --ink-strong: rgba(0, 0, 0, 0.8);
  --line: rgba(0, 0, 0, 0.7);
  --line-strong: rgba(0, 0, 0, 0.75);
  --green: #cdff8b;
  --pill-gray: rgba(37, 37, 37, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 12px/14px Arial, "Helvetica Neue", Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
p, h2, figure, ul { margin: 0; padding: 0; }

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 8px 8px 0;
}

section { scroll-margin-top: 8px; }

/* ---------- header ---------- */

.header {
  display: flex;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.header .cell {
  width: 20%;
  padding: 0 8px;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 15px;
}

.header nav.menu {
  padding: 0;
  margin-top: -8px;
  font-weight: 400;
  color: var(--ink);
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-right: 8px;
  border-bottom: 1px solid var(--line-strong);
  line-height: 14px;
}

.menu-link:hover { background: var(--green); }
.menu-link.clear { border-bottom: none; }

/* ---------- section titles ---------- */

.section-title {
  border-top: 1px solid var(--line);
  padding: 8px;
  font-size: inherit;
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 15px;
}

/* ---------- projects ---------- */

.project {
  display: flex;
  align-items: flex-start;
  border-top: 1px solid var(--line);
}

.project:hover { background: var(--green); }

.project:first-of-type { margin-top: 0; }

.project .cell { width: 20%; padding: 8px; }

.project .pname {
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 15px;
  white-space: nowrap;
}

.project .pdate {
  padding-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project .proles { display: flex; gap: 8px; }

.project .plabels {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 8px 0 0;
  min-width: 0;
}

.acquired {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--green);
  border-radius: 20px;
  padding: 4px 8px 4px 4px;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: normal;
  white-space: nowrap;
  color: var(--ink);
}

.acquired img { display: block; opacity: 0.75; }

/* ---------- patents ---------- */

.patent {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line-strong);
}

.patent:hover { background: var(--green); }

.patent .cell { width: 20%; padding: 8px; }

.patent .pno {
  font-weight: 700;
  color: var(--ink-strong);
  line-height: 15px;
  white-space: nowrap;
}

.patent .pstatus {
  flex: none;
  width: auto;
  min-width: 120px;
  padding: 0 8px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 14px;
  letter-spacing: normal;
  margin-right: 4px;
  white-space: nowrap;
}

.pill.active { background: var(--green); }
.pill.inactive { background: var(--pill-gray); }

.patent .pdesc {
  flex: 1;
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- logos ---------- */

.logo-grid {
  display: flex;
  flex-wrap: wrap;
}

.logo-tile {
  position: relative;
  width: 20%;
  background: #fff;
  border-top: 1px solid var(--line-strong);
}

.logo-tile img {
  display: block;
  width: 100%;
  height: 20vw;
  padding: 8px;
  object-fit: contain;
}

.logo-tile .bitmap {
  image-rendering: pixelated;
}

/* the untreated logo, revealed on hover (or while pressed, on touch) */
.logo-tile .original {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
}

.logo-tile:hover .original,
.logo-tile:active .original {
  opacity: 1;
}

/* ---------- clients ---------- */

.client-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.client { width: 20%; }

.client span {
  display: block;
  border-top: 1px solid var(--line-strong);
  padding: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client span:hover { background: var(--green); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 8px 100px;
}

/* ---------- fixed chrome ---------- */

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom));
}

.pillbar {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #000;
  border-radius: 1000px;
  padding: 6px 14px;
  white-space: nowrap;
}

.pillbar a {
  color: #fff;
  padding: 14px 4px;
  font-size: 13px;
  line-height: 1;
}

.to-top {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 300px;
  background: #fff url("/assets/up-arrow.png") 50% 50% / contain no-repeat;
}

.to-top:hover { background-color: #ebebeb; }

/* ---------- breakpoints ---------- */

@media (min-width: 1280px) {
  .container { min-width: 1280px; }
  .logo-tile img { height: 20vh; }
  .to-top { display: block; }
}

@media (max-width: 991px) {
  .logo-tile { width: 33.333%; }
  .logo-tile img { height: 33.33vw; }
}

@media (max-width: 767px) {
  .logo-tile { width: 50%; }
  .logo-tile img { height: 50vw; }
  .client { width: 25%; }
  .mobile-nav { display: flex; }
  .footer { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
}

@media (max-width: 479px) {
  body {
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: 0.03em;
  }

  .header .name { flex: none; width: 80px; white-space: normal; }
  .header .role { flex: none; width: 120px; }
  .header .loc { display: none; }
  .header nav.menu { flex: 1; width: auto; }

  .project .num { flex: none; width: 80px; }
  .project .pname { flex: none; width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .project .pdate { flex: 1; width: auto; min-width: 0; }
  .project .proles { display: none; }
  .project .plabels { flex: none; width: auto; }

  .patent .pletter { flex: none; width: 80px; }
  .patent .pno { flex: none; width: auto; min-width: 120px; }
  .patent .psite { display: none; }
  .patent .pstatus { display: none; }
  .patent .pdesc { align-self: flex-start; padding-top: 8px; white-space: normal; }
  .patent { align-items: flex-start; }

  .client { width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
