html {
  font-family: "Inter", system-ui, sans-serif;
  overflow-y: scroll;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

code, pre {
  font-family: "Fira Code", monospace;
}

img {
  max-width: 100%;
  align-self: center;
}

p {
  line-height: 1.65;
}

/* =========================================================
   Theme Variables
========================================================= */

:root {
  --bg: #0d0d12;
  --text: #E8E4DD;
  --accent: #00D4CC;
  --platinum: #A8A8B8;
  --button-bg: var(--accent);
}

.scheme-wrapper {
  min-height: 100vh;
  color: var(--text);
  background: rgba(10, 10, 15, 0.75);
}

/* =========================================================
   Layout
========================================================= */

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: url('/static/background_hk.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center;
}

.container {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.content::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  backdrop-filter: blur(4px);
  z-index: 5;
}

.content {
  padding-top: 150px;
  z-index: 0;
}

.content h2,
.content h3 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}

.content p {
  margin-bottom: 1.35em;
}


.footer {
  margin-top: auto;
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: var(--platinum);
  font-size: 0.8rem;
}

.footer__copy {
  color: var(--platinum);
}

.footer__linkedin {
  color: var(--platinum);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__linkedin::before {
  content: "|";
  margin: 0 0.5rem;
  color: var(--platinum);
}

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

/* =========================================================
   Navbar
========================================================= */

.navbar {
  top: 0;
  width: 50rem;
  height: 80px;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.navbar__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  font-family: "Alta", serif;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.navbar__brand-sub {
  color: var(--platinum);
  font-size: 0.85em;
  letter-spacing: 0.18em;
}

.navbar__brand-est-wrap {
  display: block;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar__brand-est {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--platinum);
  text-transform: none;
  font-style: italic;
  padding-top: 3px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar__brand:hover .navbar__brand-est-wrap {
  max-height: 2em;
}

.navbar__brand:hover .navbar__brand-est {
  transform: translateY(0);
}

.navbar__right {
  display: flex;
  margin-top: 30px;
  list-style-type: none;
  padding: 0;
}

.navbar__link a {
  text-decoration: none;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 7.5px;
  margin-right: 7.5px;
  border-bottom: 2px solid transparent;
}

.navbar__link a:hover {
  border-bottom-color: var(--accent);
}

.navbar__link #active,
.navbar__link a:active,
.navbar__link a:focus {
  outline: none;
  border-bottom: 2px solid var(--button-bg);
}


/* =========================================================
   Hero
========================================================= */

.hero {
  min-height: calc(100vh - 230px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__typewriter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
  min-height: 1.2em;
}

.hero__typewriter-prompt {
  color: var(--text);
  opacity: 0.9;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.hero__typewriter-text::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background-color: var(--accent);
  margin-left: 2px;
  vertical-align: baseline;
  position: relative;
  bottom: -0.1em;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 4.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 0.75rem -0.04em;
}

.hero__accent {
  color: var(--accent);
}

.hero__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 36rem;
  margin: 0 0 2rem;
}

.hero__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.hero__link {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--platinum);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero__link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.hero__cta {
  display: block;
  margin-left: 1px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}

.hero__cta-arrow {
  display: inline-block;
  vertical-align: middle;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  margin-right: 0;
  transition: max-width 0.3s ease, opacity 0.25s ease, margin-right 0.3s ease;
}

.hero__cta-text {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.35s ease;
}

.hero__cta:hover .hero__cta-arrow {
  max-width: 1.5em;
  opacity: 1;
  margin-right: 0.4em;
}

.hero__cta:hover .hero__cta-text {
  transform: translateX(4px);
}

/* =========================================================
   Content images
========================================================= */

.content img:not([class]) {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

/* =========================================================
   Blockquotes
========================================================= */

blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--button-bg);
  font-style: italic;
  opacity: 0.85;
}

.content blockquote p {
  margin: 0;
}

.attributed-quote {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: default;
}

.attributed-quote__cite {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.attributed-quote:hover .attributed-quote__cite {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   Page intro highlight
========================================================= */

.page-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 1.1rem;
  margin: 1.5rem 0 2rem;
}

/* =========================================================
   Code blocks
========================================================= */

pre {
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

code {
  font-size: 0.9rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* =========================================================
   Work section
========================================================= */

.work-section {
  transition: opacity 0.2s ease;
  padding-bottom: 3.5rem;
}

.work-section h2 {
  margin-top: 0;
  margin-bottom: 3.5rem;
}

.work-section h3 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}

.work-section h3::before {
  content: "# ";
  color: var(--accent);
}

.work-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.work-section ul:not(.work-highlights):not(.work-technologies) {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-section ul:not(.work-highlights):not(.work-technologies) li::before {
  content: "- ";
  color: var(--accent);
}

.work-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 3.25rem;
}

.work-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 2rem;
}

.work-technologies li {
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(0, 212, 204, 0.35);
  border-radius: 4px;
  font-size: 0.85rem;
}

.work-technologies li::before {
  display: none;
}

.work-section .work-highlights li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.65rem;
}

/* =========================================================
   Profile photo
========================================================= */

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}

.founder-card {
  display: flex;
  align-items: stretch;
  gap: 1.75rem;
}

.founder-card__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.founder-card__text p {
  margin-top: 0;
  margin-bottom: 0;
}

.founder-card__photo-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
}

.founder-linkedin.founder-linkedin--mobile {
  display: none;
}

.founder-linkedin {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--platinum);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.founder-linkedin:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* =========================================================
   Contact
========================================================= */

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item,
.contact-address {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  font-style: normal;
  line-height: 1.7;
}

.contact-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  width: 5rem;
}

.contact-item a,
.contact-address a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  overflow-wrap: break-word;
  word-break: break-word;
}

.contact-item a:hover,
.contact-address a:hover {
  border-bottom-color: rgba(168, 168, 184, 0.4);
}

.contact-email-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn {
  all: unset;
  cursor: pointer;
  color: var(--platinum);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

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

.copy-btn__check {
  display: none;
}

.copy-btn.copied {
  color: var(--accent);
}

.copy-btn.copied .copy-btn__copy {
  display: none;
}

.copy-btn.copied .copy-btn__check {
  display: block;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form__field label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-form__field input,
.contact-form__field textarea {
  background: rgba(20, 20, 30, 0.85);
  border: 1px solid rgba(168, 168, 184, 0.2);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
  width: 100%;
  box-sizing: border-box;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--platinum);
  opacity: 0.5;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--accent);
}

.contact-form__submit {
  all: unset;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: flex-end;
}

.contact-form__submit .hero__cta-arrow {
  max-width: 0;
  opacity: 0;
  margin-right: 0;
}

.contact-form__submit:hover .hero__cta-arrow {
  max-width: 1.5em;
  opacity: 1;
  margin-right: 0.4em;
}

.contact-form__submit:hover .hero__cta-text {
  transform: translateX(4px);
}

/* =========================================================
   Services nav
========================================================= */

.services-nav {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(168, 168, 184, 0.2);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.services-nav a.active {
  border-bottom-color: var(--accent);
}

.services-nav__sep {
  flex: none;
  color: var(--accent);
}

.services-nav__num {
  color: var(--accent);
  font-size: 0.75em;
  font-weight: 400;
  letter-spacing: 0.12em;
  margin-right: 0.45em;
}

.services-section {
  transition: opacity 0.2s ease;
  padding-bottom: 3.5rem;
}

.services-section h2 {
  margin-top: 0;
  margin-bottom: 3.5rem;
}

.services-section h3 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}

.services-section h3::before {
  content: "# ";
  color: var(--accent);
}

.services-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.services-section ul:first-of-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 1.65rem;
}

.services-section ul:first-of-type li {
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(0, 212, 204, 0.35);
  border-radius: 4px;
  font-size: 0.85rem;
}

.services-section ul:last-of-type {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.services-section ul:last-of-type li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.65rem;
}

hr {
  border: none;
  border-top: 1px solid rgba(168, 168, 184, 0.2);
  margin: 2.5rem 0;
}

.work-section + hr,
.services-section + hr {
  margin-top: 0;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 55rem) {
  body {
    background-image: none;
  }

  .navbar__brand {
    font-size: 1rem;
  }

  .navbar__brand:hover .navbar__brand-est-wrap {
    max-height: 0;
  }

  .navbar__brand:hover .navbar__brand-est {
    transform: translateY(100%);
  }

  .navbar__link a {
    margin-left: 0;
    margin-right: 0;
  }

  .content {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    padding-top: 190px;
  }

  .content::before {
    height: 170px;
    backdrop-filter: blur(8px);
  }

  /* Navbar */
  .navbar {
    width: auto;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 1.25rem 1.5rem;
  }

  .navbar__right {
    margin-top: 3rem;
    width: 100%;
    justify-content: space-between;
    padding: 0;
  }

  /* Hero */
  .hero {
    min-height: calc(100vh - 450px);
  }

  .hero__title {
    font-size: 2.8rem;
  }

  .hero__cta {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__links .hero__cta {
    margin-left: 0;
    margin-right: 0;
    width: auto;
  }

  /* Services & work nav */
  .services-nav {
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2rem;
  }

  .services-nav a {
    flex: none;
    text-align: left;
  }

  .services-nav__sep {
    display: none;
  }

  /* Founder card */
  .founder-linkedin.founder-linkedin--desktop {
    display: none;
  }

  .founder-linkedin.founder-linkedin--mobile {
    display: inline-block;
  }

  .founder-card {
    flex-direction: column-reverse;
    gap: 1.25rem;
  }

  .founder-card__photo-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .profile-photo {
    width: 90px;
    height: 90px;
  }

  /* Contact */
  .contact-item,
  .contact-address {
    flex-direction: column;
    gap: 0.2rem;
  }

  .contact-label {
    width: auto;
  }

  .contact-email-wrap {
    flex-wrap: wrap;
  }

  /* Footer */
  .footer {
    margin-left: 1rem;
    margin-right: 1rem;
    overflow-wrap: break-word;
    padding-bottom: 1.5rem;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .footer__linkedin {
    order: -1;
  }

  .footer__linkedin::before {
    display: none;
  }
}
