:root {
  --color-primary: #000000;
  --color-primary-active: #000000;
  --color-ink: #000000;
  --color-body: #60646c;
  --color-muted: #8b8f98;
  --color-line: #e6e8eb;
  --color-line-soft: #f0f0f3;
  --color-canvas: #ffffff;
  --color-canvas-soft: #ffffff;
  --color-surface: #ffffff;
  --color-surface-strong: #ffffff;
  --color-dark: #171717;
  --color-dark-soft: #b0b4ba;
  --color-red: #e62d1f;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius-sm: 4px;
  --radius-md: 5px;
  --radius-lg: 6px;
  --shadow-soft: 0 14px 44px rgba(0, 0, 0, 0.08);
  --container: 1180px;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-md);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  background: #ffffff;
  backdrop-filter: blur(18px);
}

.header-inner,
.section,
.page-hero,
.article,
.footer-inner {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 4px;
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease, opacity 160ms ease;
}

.site-nav:hover a {
  color: #a4a7ae;
}

.site-nav a[aria-current="page"] {
  color: var(--color-ink);
  background: transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-ink);
  background: transparent;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--color-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.nav-toggle-line,
.nav-toggle-line::before,
.nav-toggle-line::after {
  display: block;
  width: 18px;
  height: 0;
  background: transparent;
  border-top: 1px solid currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
  content: "";
}

.nav-toggle-line::before {
  transform: translateY(-6px);
}

.nav-toggle-line::after {
  transform: translateY(5px);
}

.nav-open .nav-toggle-line {
  background: transparent;
  border-color: transparent;
}

.nav-open .nav-toggle-line::before {
  background: transparent;
  border-color: var(--color-ink);
  transform: translateY(1px) rotate(45deg);
}

.nav-open .nav-toggle-line::after {
  background: transparent;
  border-color: var(--color-ink);
  transform: translateY(0) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: auto;
  padding: 60px 0 44px;
  overflow: hidden;
  background: #ffffff;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 68%, transparent 96%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 56px;
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--color-ink);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 {
  font-size: 64px;
  font-weight: 600;
}

.hero-title {
  display: grid;
  gap: 4px;
}

.hero-title-static {
  font-size: 0.62em;
  line-height: 1.05;
}

.typing-line {
  display: inline-flex;
  align-items: baseline;
  width: max-content;
  min-width: 13ch;
  min-height: 1.12em;
  font-family: inherit;
  font-size: 1.12em;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 0.86em;
  margin-left: 0.08em;
  background: var(--color-ink);
  transform: translateY(0.08em);
  animation: typing-cursor-blink 920ms steps(1, end) infinite;
}


@keyframes typing-cursor-blink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}

.hero-lead {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--color-body);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button-primary {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.button-primary:hover {
  background: #1f1f1f;
  border-color: #1f1f1f;
  color: #ffffff;
}

.button-secondary {
  background: #f4f4f4;
  color: var(--color-ink);
  border-color: #f4f4f4;
}

.button-secondary:hover {
  background: #e8e8e8;
  border-color: #e8e8e8;
  color: var(--color-ink);
}

.button-invert {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.button-invert:hover {
  background: #1f1f1f;
  border-color: #1f1f1f;
  color: #ffffff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--color-ink);
  font-weight: 400;
  text-decoration: none;
  transition: color 180ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: #a4a7ae;
}

.hero-visual {
  position: relative;
  width: min(100%, 430px);
  margin-left: auto;
}

.hero-visual::before {
  position: absolute;
  content: "";
}

.hero-visual::before {
  inset: 10%;
  background: transparent;
  filter: blur(46px);
  transform: translateY(28px);
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-visual-name {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 0;
  color: #000000;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  width: 100%;
}

.hero-visual-handle {
  font-size: 46px;
  font-weight: 500;
}

.hero-visual-subname {
  color: var(--color-muted);
  font-size: 16px;
  font-weight: 400;
}

.section {
  padding: 96px 0;
}

#profile {
  padding-top: 72px;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100vw - var(--container)) / 2));
  padding-left: max(20px, calc((100vw - var(--container)) / 2));
  background: #ffffff;
}

.section-dark {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100vw - var(--container)) / 2));
  padding-left: max(20px, calc((100vw - var(--container)) / 2));
  background: #ffffff;
  color: var(--color-ink);
}

.section-dark h2 {
  color: var(--color-ink);
}

.section-dark .eyebrow {
  color: var(--color-muted);
}

.section-dark p {
  color: var(--color-body);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: none;
  gap: 24px;
}

.section-heading h2,
.page-hero h1 {
  font-size: 42px;
}

.section-heading h2 {
  font-weight: 400;
}

.page-hero h1 {
  font-weight: 400;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.profile-main,
.profile-side,
.work-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.profile-main {
  padding: 32px;
}

.profile-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-line-soft);
}

.profile-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-list dt {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.profile-list dd {
  margin: 0;
}

.profile-copy {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  min-height: 20px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line-soft);
}

.profile-copy-label {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.profile-copy p:not(.profile-copy-label) {
  margin: 0;
  color: var(--color-ink);
}

.profile-side {
  display: grid;
  gap: 8px;
  padding: 24px;
}

.side-title {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.profile-side a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-line-soft);
  font-weight: 400;
}

.sns-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: var(--radius-md);
}

.sns-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sns-icon-github {
  background: #000000;
}

.sns-icon-facebook {
  background: #1877f2;
}

.works-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.work-card-link {
  display: block;
  color: inherit;
}

.work-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.work-card .card-body {
  display: block;
  padding: 18px 0 0;
}

.meta,
.tech {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
}

.card-body h2,
.card-body h3,
.card-title,
.blog-row h2,
.blog-row h3 {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  font-weight: 400;
}

.card-body p:not(.meta):not(.tech),
.card-summary,
.blog-row p:not(.meta) {
  display: block;
  margin: 12px 0 0;
  color: var(--color-body);
}

.tech {
  display: block;
  margin-top: 18px;
  color: var(--color-ink);
}

.blog-list {
  display: grid;
  border-top: 1px solid var(--color-line);
}

.blog-row {
  border-bottom: 1px solid var(--color-line);
}

.blog-row > a {
  display: block;
  padding: 24px 0;
  color: inherit;
}

.blog-row h2,
.blog-row h3 {
  display: block;
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.45;
}

.page-hero {
  padding: 84px 0 56px;
}

.page-hero + .section {
  padding-top: 56px;
}

.page-hero h1 {
  margin-bottom: 18px;
}

.page-hero p:not(.eyebrow) {
  max-width: 660px;
  margin: 0;
  color: var(--color-body);
  font-size: 18px;
}

.article {
  max-width: 880px;
  padding: 84px 0 96px;
}

.article-header {
  margin-top: 24px;
  margin-bottom: 32px;
}

.article-header h1 {
  font-size: 48px;
  font-weight: 400;
}

.article-header p:not(.eyebrow):not(.tags) {
  margin: 20px 0 0;
  color: var(--color-body);
  font-size: 18px;
}

.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
}

.article-body {
  margin-top: 40px;
}

.article-body h2 {
  margin: 36px 0 12px;
  font-size: 26px;
  font-weight: 400;
}

.article-body p {
  margin: 0 0 18px;
  color: var(--color-body);
}

.article-body .article-link-action {
  margin-top: 32px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 56px;
  align-items: start;
}

.contact-layout h2 {
  font-size: 40px;
  font-weight: 400;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form span {
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--color-ink);
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  outline: none;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  justify-self: end;
  width: min(100%, 220px);
  min-width: 180px;
  margin-top: 8px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1);
}

.form-message {
  margin: 0;
  color: var(--color-ink);
}

.form-message.is-success {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-message.is-success::before {
  content: "✓";
  color: #15803d;
  font-weight: 700;
}

.form-message.is-error {
  color: #b42318;
}

.site-footer {
  padding: 58px 0;
  border-top: 1px solid var(--color-line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-inner nav a,
.footer-inner p {
  color: var(--color-body);
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.not-found {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px 20px;
}

.not-found-inner {
  max-width: 620px;
  text-align: center;
}

.not-found h1 {
  font-size: 48px;
}

.not-found p:not(.eyebrow) {
  margin: 18px 0 28px;
  color: var(--color-body);
}

.section-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-inner,
  .profile-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    display: contents;
  }

  .hero-title {
    order: 1;
  }

  .hero-lead {
    order: 2;
  }

  .hero-visual {
    order: 3;
    margin: 0;
    width: min(100%, 380px);
  }

  .hero-actions {
    order: 4;
  }

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

}

@media (max-width: 760px) {
  .header-inner,
  .section,
  .page-hero,
  .article,
  .footer-inner {
    width: min(100% - 32px, var(--container));
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 18px 24px 28px;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0;
    box-shadow: none;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    justify-content: flex-start;
    min-height: 48px;
    padding: 8px 0;
    text-align: left;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 44px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead,
  .page-hero p:not(.eyebrow),
  .article-header p:not(.eyebrow):not(.tags) {
    font-size: 16px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .page-hero + .section {
    padding-top: 48px;
  }

  .section-heading-row {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading h2,
  .page-hero h1,
  .contact-layout h2,
  .not-found h1 {
    font-size: 34px;
  }

  .article-header h1 {
    font-size: 36px;
  }

.contact-form button {
  justify-self: stretch;
  width: 100%;
}

  .profile-main {
    padding: 24px;
  }

  .profile-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-copy {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .works-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 460px) {
  .hero h1 {
    font-size: 42px;
  }

  .hero-visual-handle {
    font-size: 34px;
  }

  .hero-visual-subname {
    font-size: 14px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .card-body,
  .profile-main,
  .profile-side {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .section-reveal {
    opacity: 1;
    transform: none;
  }

  .hero-pattern {
    opacity: 1;
  }
}
