.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(200px, 1fr);
  align-items: end;
  gap: clamp(20px, 4.2vw, 74px);
  padding-block: clamp(42px, 6.1vw, 94px);
}
.hero h1 {
  margin: 0;
  font-weight: 770;
  font-size: clamp(2.6rem, 6.25vw, 6rem);
  line-height: .99;
  letter-spacing: -.07em;
  text-wrap: balance;
}
.hero h1 em { display: block; font-style: normal; color: var(--accent); }
.hero-intro { border-left: 1px solid var(--border); padding: 0 0 3px clamp(18px, 2.6vw, 40px); }
.hero-intro p { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.27rem); max-width: 36ch; line-height: 1.52; }
.hero-actions { display: flex; align-items: center; gap: 11px 17px; flex-wrap: wrap; margin-top: 22px; }
.hero-contact { font-size: .88rem; color: var(--muted); }
.hero-contact:hover, .work-heading a:hover { color: var(--accent); }

.portfolio-section { border-top: 1px solid var(--border); padding-block: clamp(26px, 3.8vw, 54px); scroll-margin-top: 20px; }
.portfolio-section h2 { margin: 0 0 22px; font-size: clamp(2.05rem, 4vw, 3.55rem); line-height: 1.02; font-weight: 725; letter-spacing: -.062em; }
.work-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 22px; }
.work-heading h2 { margin: 0; }
.work-heading > a { font-size: .88rem; color: var(--muted); }
.work-heading > a span { margin-inline-start: 4px; color: var(--accent); }
.featured-work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 23px); }
.feature { min-width: 0; }
.feature-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #15161a; transition: border-color .2s; }
.feature-link:is(:hover, :focus-visible) { border-color: #777e45; }
.feature-art { position: relative; aspect-ratio: 1.66; overflow: hidden; border-bottom: 1px solid #ffffff1a; isolation: isolate; }
.feature-art--crosslet { background: radial-gradient(ellipse at 36% 20%, #7361a4, #383054 110%); }
.feature-art--log4u { background: radial-gradient(ellipse at 32% 20%, #536c84, #273544 110%); }
.feature-art--tunelab { background: radial-gradient(ellipse at 30% 12%, #62624b, #2b2e28 115%); }
.feature-app-icon, .feature-device, .feature-browser { position: absolute; height: auto; transition: transform .25s; }
.feature-app-icon { width: 22%; top: 30%; left: 13%; border-radius: 23%; box-shadow: 0 9px 21px #0004; }
.feature-device { width: 43%; top: 9%; left: 47%; border: clamp(3px, .43vw, 6px) solid #18191e; border-radius: 13% / 6%; box-shadow: 0 9px 38px #0007; }
.feature-browser { width: 89%; top: 13%; left: 5.5%; border: 1px solid #ffffff40; border-radius: 6px; box-shadow: 0 10px 35px #0008; }
.feature-link:hover :is(.feature-device, .feature-browser) { transform: translateY(-3px); }
.feature-copy { padding: clamp(13px, 1.6vw, 22px); }
.feature-type { margin: 0 0 8px; color: var(--muted); font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.feature-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.feature-heading h3 { margin: 0; font-size: clamp(1.45rem, 2.3vw, 2.3rem); letter-spacing: -.05em; line-height: 1.04; }
.feature-arrow { color: var(--accent); font-size: 1.25rem; }
.feature-copy > p:last-child { color: var(--muted); margin: 8px 0 0; font-size: .91rem; line-height: 1.5; }
.feature-link:hover .feature-heading h3 { color: var(--accent); }

.index-heading .site-kicker { margin-bottom: 12px; }
.index-heading h2 { font-size: clamp(2.7rem, 6.5vw, 5.8rem); letter-spacing: -.035em; margin-bottom: 26px; }
.index-heading h2 span { color: var(--accent); letter-spacing: normal; margin-inline-start: .085em; }
.project-filters { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.project-filter {
  display: grid;
  align-content: start;
  text-align: left;
  gap: 9px;
  padding: 14px clamp(8px, 1.55vw, 22px) 16px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  line-height: 1.15;
  transition: background .18s, color .18s;
}
.project-filter:last-child { border-right: 0; }
.project-filter-number, .project-meta, #project-count { font: 500 .71rem/1.2 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; }
.project-filter-label { font-weight: 630; font-size: clamp(.91rem, 1.55vw, 1.17rem); }
.project-filter:hover { background: var(--surface); color: var(--text); }
.project-filter[aria-pressed='true'] { color: var(--accent); background: #e5f17810; border-bottom-color: var(--accent); }
.project-filter:focus-visible { position: relative; z-index: 1; outline-offset: -4px; }
.project-category { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 18px; flex-wrap: wrap; margin-block: 26px 16px; }
.project-category h3 { margin: 0 0 4px; font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.045em; }
.project-category p { margin: 0; color: var(--muted); font-size: .94rem; }
.project-category-end { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: var(--muted); }
.project-category-end a, .project-links a, .profile-links a, .contact-email { color: var(--accent); font-size: .9rem; text-underline-offset: 4px; }
.project-category-end a:hover, .project-links a:hover, .profile-links a:hover, .contact-email:hover { text-decoration: underline; }
.link-arrow { margin-left: .35em; }

.project-list, .profile-links { margin: 0; padding: 0; list-style: none; }
.project-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 23px); }
.project-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 9px; background: #15161a; transition: border-color .2s; }
.project-card:focus-within, .project-card:hover { border-color: #62654c; }
.project-card-detail { display: flex; flex: 1; flex-direction: column; min-width: 0; border-radius: inherit; color: inherit; text-decoration: none; }
.project-card-detail:focus-visible { outline-offset: 4px; }
.project-detail-label { margin: auto 0 0; padding-top: 14px; color: var(--accent); font-size: .9rem; text-underline-offset: 4px; }
.project-card-detail:is(:hover, :focus-visible) .project-detail-label { text-decoration: underline; }
.project-art-link { display: block; border-radius: 8px 8px 0 0; }
.project-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 1.74;
  border-radius: 8px 8px 0 0;
  background: radial-gradient(ellipse at 75% 5%, var(--project-color), #191a20 115%);
}
.project-image { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.project-art--scene .project-image, .project-art--model .project-image { position: absolute; inset: 0; }
.project-art--model { aspect-ratio: 10 / 7; }
.project-art--model .project-image { object-fit: contain; }
.project-art--album { aspect-ratio: 1; }
.project-art--album .project-image { position: absolute; inset: 0; object-fit: contain; }
.project-art-link:hover .project-art--scene img { transform: scale(1.04); }
.project-art--phone {
  background-image: radial-gradient(ellipse at 75% 5%, transparent 10%, #131318b0 105%), repeating-linear-gradient(135deg, transparent 0 20px, #ffffff07 20px 21px);
  background-color: var(--project-color);
}
.project-art--phone .project-image {
  position: absolute;
  top: 8%;
  left: 49%;
  width: 43%;
  height: auto;
  border-radius: clamp(7px, 1.6vw, 20px);
  border: 4px solid #17171b;
  box-shadow: 0 12px 26px #0009;
  object-fit: contain;
}
.project-app-icon { position: absolute; left: 13%; width: 22%; height: auto; border-radius: 24%; box-shadow: 0 9px 22px #0005; }
.project-art--cover .project-image { position: absolute; top: 9%; width: auto; height: 83%; border-radius: 3px; object-fit: contain; box-shadow: 0 10px 25px #0007; }
.project-art--icon .project-image { width: 38%; height: 75%; object-fit: contain; }
.project-art--type { background: repeating-linear-gradient(135deg, transparent 0 28px, #ffffff09 28px 29px), linear-gradient(135deg, var(--project-color), #191a20); }
.project-wordmark { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 750; line-height: .97; letter-spacing: -.055em; max-width: 9ch; text-align: center; }
.project-card-body { display: flex; flex: 1; flex-direction: column; padding: clamp(13px, 1.5vw, 21px); }
.project-meta { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); margin: 0 0 8px; }
.project-title { margin: 0; font-size: clamp(1.17rem, 2vw, 1.6rem); line-height: 1.12; font-weight: 685; letter-spacing: -.04em; }
.project-description { line-height: 1.46; color: var(--muted); font-size: .9rem; margin: 7px 0 0; }
.project-links { display: flex; gap: 7px 16px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }

.about-contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 5vw, 64px); }
.about-contact > :last-child { border-left: 1px solid var(--border); padding-left: clamp(22px, 5vw, 64px); }
.about-contact h2 { font-size: clamp(1.8rem, 3.1vw, 2.7rem); margin-bottom: 13px; }
.about-contact p { color: var(--muted); font-size: 1rem; line-height: 1.58; margin: 0; max-width: 52ch; }
.contact-email { font-size: 1rem; overflow-wrap: anywhere; }
.profile-links { display: flex; gap: 10px 19px; flex-wrap: wrap; margin-top: 13px; }

@media (max-width: 900px) {
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .project-filters { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .project-filter { grid-column: span 3; padding: 10px 8px 12px; gap: 6px; }
  .project-filter:nth-child(n+5) { grid-column: span 4; }
  .project-filter:nth-child(4) { border-right: 0; }
  .project-filter:nth-child(-n+4):not([aria-pressed='true']) { border-bottom-color: var(--border); }
}
@media (max-width: 650px) {
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero h1 { font-size: clamp(2.6rem, 9.8vw, 4.4rem); text-wrap: initial; }
  .hero-intro { padding: 0; border-left: 0; }
  .hero-actions { margin-top: 17px; }
  .featured-work, .about-contact { grid-template-columns: 1fr; }
  .feature-copy { padding: 16px; }
  .about-contact > :last-child { border-left: 0; padding-left: 0; }
}

@media (max-width: 460px) {
  .project-list { grid-template-columns: 1fr; }
}

.index-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #15161a;
}
.index-subtab {
  min-height: 42px;
  padding-inline: clamp(9px, 1.3vw, 17px);
  border: 0;
  border-radius: 4px;
  font-size: .87rem;
  font-weight: 620;
  color: var(--muted);
  background: transparent;
}
.index-subtab:hover { color: var(--text); }
.index-subtab[aria-selected='true'] { background: var(--accent); color: #13150b; }
.index-subtab:focus-visible { outline-offset: 2px; }
#project-panel[role='tabpanel'] .project-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.playlist-project-section { grid-column: 1 / -1; }
.playlist-project-section + .playlist-project-section { margin-top: clamp(10px, 2vw, 22px); }
.playlist-project-heading {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
#project-panel[role='tabpanel'] .playlist-project-section .project-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr));
}
@media (max-width: 1000px) {
  #project-panel[role='tabpanel'] .project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  #project-panel[role='tabpanel'] .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #project-panel[role='tabpanel'] .playlist-project-section .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#project-panel[role='tabpanel'] .project-list--collection {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 182px), 1fr));
  gap: clamp(10px, 1.3vw, 18px);
}

.collection-game { min-width: 0; }

.collection-game-link {
  display: flex;
  flex-direction: column;
  min-height: 86px;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #15161a;
  transition: border-color .2s;
}

.collection-game-link:is(:hover, :focus-visible) { border-color: #777e45; }

.collection-game-art {
  position: relative;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border-bottom: 1px solid #ffffff1a;
  border-radius: 8px 8px 0 0;
  background: radial-gradient(ellipse at 50% 33%, #2f3035, #1a1b20 92%);
}

.collection-game-image {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px #0006);
  transition: transform .2s;
}

.collection-game-link:is(:hover, :focus-visible) .collection-game-image { transform: scale(1.04); }

.collection-game-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 12px clamp(9px, 1.1vw, 15px);
}

.collection-game-link:not(:has(.collection-game-art)) .collection-game-detail { margin-top: auto; }

.collection-game-detail h4 {
  margin: 0;
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.27;
  overflow-wrap: anywhere;
}

.collection-game-link:is(:hover, :focus-visible) h4 { color: var(--accent); }

.collection-game-year {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font: .73rem/1.2 var(--font-mono);
}

.collection-game-arrow { grid-column: 2; grid-row: 1; color: var(--accent); font-size: .85rem; }

@media (max-width: 600px) {
  #project-panel[role='tabpanel'] .project-list--collection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
