:root {
  color-scheme: dark;
  --bg: #202a32;
  --panel: #293640;
  --line: #43515a;
  --text: #e1e6e7;
  --muted: #b3c0c5;
  --accent: #9ebbc4;
  --focus: #bdd1d5;
  --link-hf: #e8d48a;
  --link-live: #a8d1b4;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(to bottom, var(--bg) 0%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 18%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 72%, var(--bg) 100%), url("assets/ocean-background.webp");
  background-repeat: no-repeat;
  background-size: 100% 220px, 100% 220px;
  background-position: center 94px, center 94px;
  background-attachment: fixed, fixed;
  color: var(--text);
}

body::before {
  display: none;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.wrap {
  width: min(100% - 36px, 1160px);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  pointer-events: none;
}

.site-header nav {
  display: flex;
  gap: 16px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  pointer-events: auto;
}

.site-header nav a:hover,
.social-links a:hover {
  color: var(--accent);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 48px 54px;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -.055em;
}

h1 {
  max-width: 920px;
  font-size: clamp(22px, 5vw, 48px);
  font-weight: 550;
  line-height: 1.06;
  margin-bottom: 12px;
}

.hero-name {
  display: inline;
  border: 0;
  padding: 0;
  background: none;
  color: var(--text);
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: center;
  cursor: pointer;
}

.hero-name:hover {
  color: var(--accent);
}

.sound-icon {
  width: 15px;
  height: 15px;
  vertical-align: middle;
  color: var(--accent);
}

.hero-role {
  max-width: 680px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.65vw, 17px);
  line-height: 1.4;
  text-shadow: 0 1px 5px rgba(0, 0, 0, var(--role-shadow, .42));
}

.hero-link,
.contact-action {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 13px 18px;
  background: var(--accent);
  color: #202a32;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 3px;
}

.hero-link:hover,
.contact-action:hover {
  background: #b1c9cf;
}

.hero-link {
  margin-top: 8px;
  padding: 11px 15px;
}

.hero-link-space {
  width: 120px;
  height: 37px;
  margin-top: 8px;
}

.section {
  border-top: 1px solid var(--line);
  padding-block: 54px 64px;
  display: grid;
  gap: 26px;
  scroll-margin-top: 24px;
}

#about {
  border-top: 0;
}

#about .section-content {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
}

.section-heading h2,
.contact h2 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 520;
  line-height: 1.12;
  margin: 0;
}

.section-content {
  max-width: 680px;
}

.prose {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.68;
}

.prose p {
  margin-bottom: 1.3em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: .19em;
}

.prose a:hover {
  color: var(--accent);
}

.project-grid {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-grid li {
  min-width: 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 18px 13px;
  border: 1px solid var(--line);
  background: #25313a;
}

.project-card:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.project-main {
  flex: 1;
}

.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project-links-top {
  flex-shrink: 0;
  gap: 2px;
}

.project-name {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 1.7vw, 18px);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.project-brand,
.project-trademark {
  color: var(--accent);
  background: linear-gradient(to bottom, var(--text) 0%, var(--focus) 33%, var(--accent) 66%, var(--link-live) 100%);
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--text) 80%, #45add1 20%) 0%,
    color-mix(in srgb, var(--focus) 80%, #45add1 20%) 33%,
    color-mix(in srgb, var(--accent) 80%, #45add1 20%) 66%,
    color-mix(in srgb, var(--link-live) 80%, #4bc98f 20%) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-trademark {
  margin-left: 1px;
  font-size: .6em;
  line-height: 0;
  vertical-align: super;
}

.project-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.project-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-tags li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.25;
}

.project-tags li.project-tags-more {
  padding: 0;
  border: 0;
}

.project-skills-toggle {
  display: block;
  min-width: 27px;
  min-height: 25px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 180ms ease;
}

.project-skills-toggle:hover,
.project-skills-toggle[aria-expanded="true"] {
  color: var(--text);
}

.project-skills-panel {
  height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    height 460ms cubic-bezier(.2, .75, .25, 1),
    margin-top 460ms cubic-bezier(.2, .75, .25, 1),
    opacity 780ms ease;
}

.project-skills-panel > .project-tags {
  opacity: 0;
  transition: opacity 900ms ease;
}

#products.skills-expanded .project-skills-panel {
  margin-top: 6px;
  opacity: 1;
}

#products.skills-expanded .project-skills-panel > .project-tags {
  opacity: 1;
}

.project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  text-align: right;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 24px;
  min-height: 18px;
  max-width: 100%;
  padding: 2px 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.project-footer .project-links {
  position: relative;
  top: 4px;
}

.project-links-inline {
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}

@media (max-width: 480px) {
  .project-footer .project-tags {
    position: relative;
    padding-right: 34px;
  }

  .project-footer .project-tags .project-tags-more {
    position: absolute;
    top: 0;
    left: var(--skills-toggle-left, auto);
    right: auto;
  }

  .project-footer-wave .project-links-inline {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
}

html.preserve-card-scroll {
  scroll-behavior: auto;
}

#products.preserve-card-focus {
  overflow-anchor: none;
}

.project-links a[href*="huggingface.co"] {
  color: var(--link-hf);
}

.project-links a[href*="blaqc.space"] {
  color: var(--link-live);
}

.project-badge {
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(180deg, #c3a8e6 45%, #a8d1b4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.article-list li {
  border-bottom: 1px solid var(--line);
}

.article-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 2px;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.35;
}

.article-list a:hover {
  color: var(--accent);
}

.article-list time {
  flex: none;
  color: var(--muted);
  font: 12px/1.4 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

.article-list a:hover time {
  color: var(--accent);
}

.contact {
  border-top: 1px solid var(--line);
  padding-block: 64px 80px;
  scroll-margin-top: 24px;
}

.contact-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.email-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 3.5vw, 26px);
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
}

.email-copy:hover {
  color: var(--accent);
}

.email-copy svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

#copy-status {
  min-width: 16px;
  color: var(--accent);
}

.contact-action {
  margin-top: 0;
}

.social-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  margin-top: 24px;
}

.social-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
}

.social-links a:last-child {
  padding-right: 10ch;
}

@media (max-width: 420px) {
  .site-header nav {
    gap: 11px;
  }
}

@media (max-width: 719px) {
  body {
    position: relative;
    isolation: isolate;
    padding-top: 42px;
    background-image: none;
  }

  body::before {
    content: "";
    display: block;
    position: fixed;
    z-index: -1;
    top: 136px;
    left: 0;
    width: 100%;
    height: 220px;
    background-image: linear-gradient(to bottom, var(--bg) 0%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 18%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 72%, var(--bg) 100%), url("assets/ocean-background.webp");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
  }

  .contact {
    text-align: center;
  }

  .contact-primary,
  .social-links {
    align-items: center;
  }

  .social-links a:last-child {
    padding-right: 0;
  }

  .contact-row {
    position: relative;
  }

  #copy-status {
    position: absolute;
    left: 100%;
    margin-left: 12px;
  }
}

@media (min-width: 720px) {
  #about .prose p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  }

  .wrap {
    width: min(100% - 70px, 1160px);
  }

  .site-header {
    min-height: 76px;
  }

  body {
    position: relative;
    isolation: isolate;
    background-image: none;
  }

  body::before {
    content: "";
    display: block;
    position: fixed;
    z-index: -1;
    top: 106px;
    left: 50%;
    width: min(100vw, 800px);
    aspect-ratio: 1800 / 799;
    transform: translateX(-50%);
    background-image: linear-gradient(to bottom, var(--bg) 0%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 18%, rgba(32, 42, 50, var(--ocean-overlay, .50)) 72%, var(--bg) 100%), url("assets/ocean-background.webp");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
  }

  .site-header nav {
    gap: 34px;
  }

  .site-header nav a {
    font-size: 13px;
  }

  .hero {
    padding-block: 72px 82px;
  }

  .section {
    padding-block: 72px 90px;
    grid-template-columns: minmax(220px, .77fr) minmax(0, 1.23fr);
    gap: 60px;
  }

  #about {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .contact {
    display: grid;
    grid-template-columns: minmax(220px, .77fr) minmax(0, 1.23fr);
    gap: 60px;
  }

  .contact-primary {
    grid-column: 1;
    grid-row: 1;
  }

  .contact-content {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 801px) {
  body::before {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .8) 2%, rgba(0, 0, 0, .96) 4%, #000 6%, #000 94%, rgba(0, 0, 0, .96) 96%, rgba(0, 0, 0, .8) 98%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .8) 2%, rgba(0, 0, 0, .96) 4%, #000 6%, #000 94%, rgba(0, 0, 0, .96) 96%, rgba(0, 0, 0, .8) 98%, transparent 100%);
  }
}

@media (min-width: 1100px) {
  #products {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  #products .section-content {
    max-width: none;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .project-skills-panel {
    transition: none;
  }

  .project-skills-toggle {
    transition: none;
  }
}
