:root {
  color-scheme: light;
  --theme-bg: #fbfbfa;
  --theme-surface: #ffffff;
  --theme-text: #141414;
  --theme-muted: #626a66;
  --theme-border: #e6e4de;
  --theme-accent: #0891b2;
  --theme-accent-strong: #047c99;
  --theme-accent-soft: rgba(8, 145, 178, 0.16);
  --theme-accent-mark: rgba(8, 145, 178, 0.26);
  --theme-shadow: 0 24px 90px rgba(35, 40, 34, 0.12);
  --bg: var(--theme-bg);
  --surface: var(--theme-surface);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --border: var(--theme-border);
  --accent: var(--theme-accent);
  --accent-soft: var(--theme-accent-soft);
  --accent-strong: var(--theme-accent-strong);
  --shadow: var(--theme-shadow);
  --content: min(100% - 40px, 760px);
  --index: min(100% - 40px, 980px);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --text-sm: 0.92rem;
  --text-base: 1rem;
  --text-md: 1.12rem;
  --text-lg: 1.35rem;
  --text-xl: clamp(1.55rem, 3vw, 2rem);
  --text-hero: clamp(2.1rem, 7vw, 4.5rem);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: background 180ms ease, color 180ms ease;
}

a {
  color: inherit;
}

.site-header {
  width: var(--index);
  margin: 0 auto;
  padding: 26px 0 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 32px);
  flex: 1;
  min-width: 0;
}

.top-nav__link {
  position: relative;
  padding: 10px 0 18px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav__link:hover,
.top-nav__link.is-active {
  color: var(--text);
}

.top-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.article-index {
  width: var(--index);
  margin: 0 auto 96px;
}

.category-nav {
  display: flex;
  gap: clamp(22px, 4vw, 40px);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav__link {
  position: relative;
  flex: 0 0 auto;
  padding: 22px 0 20px;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 650;
  text-decoration: none;
}

.category-nav__link:hover,
.category-nav__link.is-active {
  color: var(--text);
}

.category-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.article-list {
  border-top: 0;
}

.article-row {
  border-bottom: 1px solid var(--border);
}

.article-row:last-child {
  border-bottom: 0;
}

.article-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(170px, 24vw, 230px);
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  padding: 44px 0;
  text-decoration: none;
}

.article-link h2,
.article-link h3 {
  margin: 0 0 12px;
  max-width: 700px;
  font-size: var(--text-xl);
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

.article-link:hover h2,
.article-link:hover h3 {
  color: var(--accent-strong);
}

.article-summary {
  min-width: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
}

.article-excerpt {
  max-width: 660px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.28;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.article-page {
  width: var(--content);
  margin: 76px auto 110px;
}

.article-hero {
  margin-bottom: 52px;
}

.article-hero h1 {
  margin: 0 0 28px;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1.06;
  font-weight: 550;
  letter-spacing: 0;
}

.article-cover {
  display: block;
  width: 100%;
  max-height: 420px;
  margin-top: 34px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.draft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.title-mark {
  display: inline;
  padding: 0 0.05em;
  color: var(--text);
  background-image: linear-gradient(90deg, var(--theme-accent-soft), var(--theme-accent-mark));
  background-repeat: no-repeat;
  background-position: 0 78%;
  background-size: 100% 0.78em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  white-space: normal;
}

.title-mark.is-animating {
  animation: mark-title 820ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(180ms + var(--mark-index, 1) * 130ms);
}

.title-mark span {
  position: static;
}

.article-content {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.75;
}

.article-content > * {
  margin-top: 0;
  margin-bottom: 1.25em;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-family: var(--font-sans);
  line-height: 1.16;
  letter-spacing: 0;
}

.article-content a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.article-content blockquote {
  margin-left: 0;
  padding-left: 22px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.article-content code {
  padding: 0.14em 0.32em;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92em;
}

.article-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.article-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

.article-content th,
.article-content td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--surface);
  font-weight: 750;
}

.article-author {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 84px;
  padding-top: 44px;
  text-align: center;
}

.article-author::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.article-author img {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-author h2 {
  margin: 14px 0 8px;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.article-author p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.empty-state {
  margin-top: 64px;
}

.empty-state h1 {
  margin: 0;
  max-width: 680px;
  font-family: var(--font-sans);
  font-size: var(--text-hero);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: 0;
}

.empty-state p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.portfolio-page {
  width: var(--index);
  margin: 86px auto 120px;
}

.portfolio-eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-weight: 750;
}

.portfolio-page h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: 0;
}

.portfolio-page p:not(.portfolio-eyebrow) {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.45;
}

.portfolio-hero,
.portfolio-section,
.contact-section {
  width: var(--index);
  margin-inline: auto;
}

.portfolio-hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(36px, 9vw, 120px);
  align-content: center;
  padding: 84px 0 76px;
  text-align: left;
}

.hero-copy {
  min-width: 0;
}

.hero-avatar {
  position: relative;
  margin: 0;
  justify-self: end;
}

.hero-avatar img {
  width: clamp(150px, 18vw, 220px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 999px;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 8px rgba(8, 145, 178, 0.12), var(--shadow);
}

.portfolio-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: var(--text-hero);
  line-height: 1;
  letter-spacing: 0;
}

.hero-kicker {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-weight: 760;
}

.hero-summary {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(8, 145, 178, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.social-link:hover {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
  transform: translateY(-1px);
}

.social-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.hero-button,
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 760;
}

.hero-button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--text);
  color: #ffffff;
  font-size: var(--text-sm);
}

.hero-link {
  min-height: 38px;
  color: var(--accent-strong);
  font-size: var(--text-sm);
}

.portfolio-section {
  padding: 15px 0;
}

.portfolio-section h2,
.contact-section h2 {
  display: flex;
  align-items: center;
  margin: 0 0 28px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  letter-spacing: 0;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading-row h2 {
  margin-bottom: 0;
}

.section-heading-row a {
  color: var(--accent-strong);
  font-weight: 760;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  white-space: nowrap;
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(35, 40, 34, 0.05);
  font-size: 0.94rem;
  font-weight: 650;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.focus-grid article {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(35, 40, 34, 0.05);
}

.focus-grid h3 {
  margin: 0 0 10px;
  font-size: var(--text-md);
}

.focus-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.latest-articles .article-list {
  border-top: 1px solid var(--border);
}

.timeline {
  display: grid;
  gap: 46px;
  border-left: 2px solid rgba(20, 20, 20, 0.14);
  margin-left: 12px;
  padding-left: 44px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -53px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.12);
}

.timeline-company {
  margin: 0 0 8px;
  color: #15803d;
  font-weight: 760;
}

.timeline-item h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.1rem;
}

.timeline-item time,
.timeline-item p {
  color: var(--muted);
}

.timeline-item p:last-child {
  margin: 0;
  line-height: 1.55;
}

.contact-section {
  padding: 70px 0 120px;
  text-align: center;
}

.contact-section h2 {
  justify-content: center;
  margin-bottom: 18px;
}

.contact-panel__header h2 {
  justify-content: center;
  margin-bottom: 14px;
}

.contact-panel__header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 780px;
  margin: 38px auto 0;
}

.contact-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 22px 16px;
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 50px rgba(35, 40, 34, 0.07);
  text-decoration: none;
}

.contact-card:hover {
  border-color: rgba(8, 145, 178, 0.38);
  transform: translateY(-1px);
}

.contact-card span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(8, 145, 178, 0.28);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.contact-card span svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.contact-card strong {
  color: var(--text);
}

.contact-card small {
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.site-footer {
  width: var(--index);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 34px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.site-footer strong,
.site-footer a {
  color: var(--accent-strong);
}

.site-footer a {
  flex: 0 0 auto;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

@keyframes mark-title {
  to {
    background-size: 100% 0.78em;
  }
}

@media (max-width: 700px) {
  :root {
    --content: min(100% - 28px, 760px);
    --index: min(100% - 28px, 900px);
  }

  .site-header {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
    align-items: center;
    gap: 18px;
  }

  .top-nav {
    justify-content: flex-end;
    overflow-x: auto;
    gap: 24px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .article-page {
    margin-top: 54px;
  }

  .category-nav__link {
    padding-top: 18px;
  }

  .article-hero {
    margin-bottom: 38px;
  }

  .article-link {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 30px 0;
  }

  .article-link:has(.article-thumb) {
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: start;
  }

  .article-excerpt {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .article-thumb {
    aspect-ratio: 1;
  }

  .site-logo {
    font-size: 1.2rem;
  }

  .portfolio-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 54px 0 56px;
    gap: 28px;
    text-align: left;
  }

  .hero-avatar {
    justify-self: start;
    order: -1;
  }

  .hero-avatar img {
    width: 132px;
  }

  .focus-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .portfolio-section {
    padding: 42px 0 30px;
  }

  .timeline {
    gap: 34px;
    padding-left: 30px;
  }

  .timeline-item::before {
    left: -39px;
  }

  .contact-section {
    padding-bottom: 84px;
  }

  .contact-panel {
    padding: 42px 16px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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