:root {
  --bg: #eef3fb;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #1f2937;
  --heading: #0f172a;
  --muted: #5f6b7b;
  --border: rgba(123, 149, 184, 0.22);
  --border-strong: rgba(78, 114, 162, 0.3);
  --link: #2563eb;
  --link-strong: #1d4ed8;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --orange: #f97316;
  --shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 28px 60px rgba(15, 23, 42, 0.12);
  --glow: rgba(37, 99, 235, 0.18);
  --wrapper-width: 1020px;
  --sidebar-width: 320px;
  --content-width: 620px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 48px 32px;
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 235, 0.18), transparent 20%),
    radial-gradient(circle at 88% 10%, rgba(15, 118, 110, 0.16), transparent 22%),
    radial-gradient(circle at 65% 80%, rgba(249, 115, 22, 0.12), transparent 18%),
    linear-gradient(180deg, #f8fbff 0%, #edf3fb 52%, #edf2f7 100%);
  color: var(--text);
  font: 14px/1.6 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 78%);
  opacity: 0.45;
}

a {
  color: var(--link);
  text-decoration: none;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.link-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.link-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.link-label {
  display: inline-flex;
  align-items: center;
}

.link-detail {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

a:hover,
a:focus {
  color: var(--link-strong);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  margin: 0 0 18px;
  line-height: 1.15;
}

h1 {
  font-size: 2.15rem;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.045em;
}

h3 {
  font-size: 1.38rem;
  letter-spacing: -0.03em;
}

p,
ul,
ol,
dl {
  margin: 0 0 18px;
}

.wrapper {
  width: min(var(--wrapper-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  gap: 60px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 32px;
}

.sidebar-inner,
.intro-section,
.work-section,
.repo-section,
.page-footer,
.case-study {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.sidebar-inner {
  padding: 28px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.sidebar-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #f97316);
}

.sidebar-inner::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -24px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, transparent 72%);
  pointer-events: none;
}

.section-label {
  margin-bottom: 12px;
  color: #5b6f8d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-block {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.profile-role {
  color: #305e95;
  font-size: 1rem;
  margin-top: -6px;
  margin-bottom: 8px;
  font-weight: 700;
}

.profile-positioning {
  max-width: 26ch;
  margin: 0;
  color: #3a5876;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
}

.profile-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  margin-bottom: 22px;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.14);
  position: relative;
  z-index: 1;
}

.contact-block {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.contact-line {
  margin-bottom: 10px;
  color: var(--heading);
  font-weight: 700;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(78, 114, 162, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--heading);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.contact-link:hover,
.contact-link:focus {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.contact-link .link-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.88));
  color: #ffffff;
  box-shadow: 0 14px 22px rgba(37, 99, 235, 0.18);
}

.contact-link[data-icon-type="image"] .link-icon {
  width: 58px;
  height: 44px;
  padding: 6px 8px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
  border: 1px solid rgba(78, 114, 162, 0.12);
  color: inherit;
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.08);
}

.contact-link[data-icon="linkedin"] .link-icon {
  background: linear-gradient(135deg, #0a66c2 0%, #2563eb 100%);
}

.contact-link[data-icon="mail"] .link-icon {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.contact-link .link-label {
  color: var(--heading);
}

.sidebar-copy {
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.affiliations-block {
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.affiliations-list {
  display: grid;
  gap: 10px;
}

.affiliation-item,
.affiliation-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(78, 114, 162, 0.16);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.affiliation-item::before,
.affiliation-link::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb 0%, #14b8a6 100%);
}

.affiliation-link {
  color: var(--heading);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.affiliation-link:hover,
.affiliation-link:focus {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.affiliation-link .link-copy {
  gap: 3px;
}

.affiliation-link .link-label {
  color: var(--heading);
  font-size: 0.96rem;
  font-weight: 700;
}

.affiliation-link .link-detail {
  margin-top: 0;
  font-size: 0.84rem;
  font-weight: 600;
}

.affiliation-link .link-icon {
  width: 58px;
  height: 44px;
  padding: 6px 8px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
  border: 1px solid rgba(78, 114, 162, 0.12);
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.08);
}

.affiliation-name {
  display: block;
  color: var(--heading);
  font-size: 0.96rem;
}

.affiliation-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-bio {
  color: var(--heading);
}

.profile-intro {
  color: var(--muted);
}

.sidebar-meta {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.sidebar-meta div + div {
  margin-top: 14px;
}

.sidebar-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-meta dd {
  margin: 0;
  color: var(--heading);
}

.sidebar-github {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(78, 114, 162, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-weight: 700;
  color: var(--heading);
  position: relative;
  z-index: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.content {
  min-width: 0;
  display: grid;
  gap: 28px;
}

.intro-section,
.work-section,
.repo-section,
.page-footer {
  border-radius: 22px;
  padding: 30px 32px;
}

.intro-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 248, 255, 0.9) 100%);
}

.intro-section h2 {
  max-width: 12ch;
  text-wrap: balance;
}

.intro-section::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -54px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.16) 0%, transparent 70%);
}

.work-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 251, 255, 0.94) 100%);
}

.work-section::after {
  content: "";
  position: absolute;
  inset: auto -48px -48px auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.14) 0%, transparent 70%);
}

.work-section h2 {
  max-width: 15ch;
  text-wrap: balance;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(78, 114, 162, 0.16);
  color: #28486a;
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.quick-nav a:hover,
.quick-nav a:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(37, 99, 235, 0.2);
}

.lead {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.8;
  max-width: 60ch;
  position: relative;
  z-index: 1;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.intro-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.intro-action:hover,
.intro-action:focus {
  transform: translateY(-1px);
}

.intro-action-primary {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
}

.intro-action-primary:hover,
.intro-action-primary:focus {
  color: #ffffff;
}

.intro-action-secondary {
  background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
}

.intro-action-secondary:hover,
.intro-action-secondary:focus {
  color: #ffffff;
}

.intro-action-ghost {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(78, 114, 162, 0.16);
  color: #28486a;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.fact-card {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(78, 114, 162, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fact-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.fact-value {
  color: var(--heading);
  font-size: 1rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.work-card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(78, 114, 162, 0.15);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0f766e 0%, #14b8a6 100%);
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.work-card h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.work-card p {
  margin: 0;
  color: var(--muted);
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.featured-list {
  display: grid;
  gap: 20px;
}

.case-study {
  padding: 30px 32px;
  border-radius: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.case-study:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--border-strong);
}

.case-study-spotlight {
  position: relative;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.26);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.14), transparent 22%),
    linear-gradient(135deg, rgba(247, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 50%, rgba(245, 252, 251, 0.96) 100%);
}

.case-study-spotlight::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2563eb 0%, #14b8a6 55%, #f97316 100%);
}

.case-study-spotlight::after {
  content: "Featured Build";
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-study-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.case-study-body {
  min-width: 0;
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(78, 114, 162, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #345272;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.meta-chip-status {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.26);
  color: #915700;
}

.case-study-summary {
  color: var(--heading);
  font-size: 1.04rem;
  line-height: 1.82;
  max-width: 58ch;
}

.case-study-detail {
  color: var(--muted);
  max-width: 60ch;
}

.case-study-callout {
  margin-top: -4px;
  padding: 16px 16px 14px;
  border-left: 3px solid #2563eb;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(15, 118, 110, 0.07));
  color: #274560;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.case-study-callout::before,
.repo-impact::before {
  content: "Why it matters";
  display: block;
  margin-bottom: 8px;
  color: #5b6f8d;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-study-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.case-study-metric {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(78, 114, 162, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.case-study-metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-study-metric-value {
  color: var(--heading);
  font-size: 1.08rem;
}

.case-study-visual {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(98, 141, 197, 0.24);
  box-shadow: 0 24px 42px rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, #f8fbfe 0%, #eef6ff 100%);
  position: relative;
}

.case-study-visual img {
  width: 100%;
  height: auto;
  display: block;
}

.case-study-visual-inline {
  margin: 0 0 22px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.case-study-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.1));
  pointer-events: none;
}

.case-study-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.case-link-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #14b8a6 100%);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
}

.case-link-primary:hover,
.case-link-primary:focus {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
  transform: translateY(-1px);
}

.repo-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 255, 0.92) 100%);
}

.repo-lead {
  margin-bottom: 10px;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.repo-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(78, 114, 162, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.94) 100%);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.repo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.1);
  border-color: rgba(37, 99, 235, 0.18);
}

.repo-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--repo-accent, linear-gradient(180deg, #2563eb 0%, #14b8a6 100%));
}

.repo-item-featured {
  grid-column: span 2;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 52%, rgba(243, 249, 255, 0.94) 100%);
}

.repo-item-blue {
  --repo-accent: linear-gradient(180deg, #2563eb 0%, #14b8a6 100%);
}

.repo-item-teal {
  --repo-accent: linear-gradient(180deg, #0f766e 0%, #14b8a6 100%);
}

.repo-item-orange {
  --repo-accent: linear-gradient(180deg, #f97316 0%, #fb923c 100%);
}

.repo-item-ink {
  --repo-accent: linear-gradient(180deg, #0f172a 0%, #334155 100%);
}

.repo-item-loading,
.repo-item-empty {
  min-height: 0;
}

.repo-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.repo-topline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.repo-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #31465f;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.repo-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #915700;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.repo-language {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(78, 114, 162, 0.14);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.repo-item-head {
  display: block;
  margin-bottom: 8px;
}

.repo-item-head h3 {
  margin: 0;
  font-size: 1.14rem;
}

.repo-text {
  margin-bottom: 12px;
  color: var(--muted);
}

.repo-impact {
  margin-bottom: 14px;
  padding: 16px 14px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(78, 114, 162, 0.14);
  color: #29425e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.repo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.repo-tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5f9ff 0%, #edf5ff 100%);
  color: #4d6580;
  font-size: 0.8rem;
  font-weight: 700;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.repo-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.repo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: auto;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.repo-link-primary {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 14px 22px rgba(37, 99, 235, 0.16);
}

.repo-link-primary:hover,
.repo-link-primary:focus {
  color: #ffffff;
}

.intro-action .link-copy,
.case-link .link-copy,
.repo-link .link-copy,
.sidebar-github .link-copy {
  flex-direction: row;
  align-items: center;
}

.intro-action .link-detail,
.case-link .link-detail,
.repo-link .link-detail,
.sidebar-github .link-detail {
  display: none;
}

.intro-action .link-icon,
.case-link .link-icon,
.repo-link .link-icon,
.sidebar-github .link-icon {
  width: 18px;
  height: 18px;
  background: none;
  color: currentColor;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.page-footer {
}

.page-footer p {
  margin: 0;
  color: var(--muted);
}

.repo-link:hover,
.repo-link:focus,
.sidebar-github:hover,
.sidebar-github:focus,
.contact-link:hover,
.contact-link:focus {
  text-shadow: 0 0 18px var(--glow);
}

.sidebar-github:hover,
.sidebar-github:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.reveal-target {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 560ms ease,
    transform 560ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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

@media print, screen and (max-width: 960px) {
  body {
    padding: 28px 18px;
  }

  .wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    position: static;
  }

  .case-study-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .case-study-spotlight::after {
    top: auto;
    right: 18px;
    bottom: 18px;
  }

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

  .fact-strip {
    grid-template-columns: 1fr;
  }

  .case-study-metrics {
    grid-template-columns: 1fr;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .repo-item-featured {
    grid-column: span 1;
  }
}

@media print, screen and (max-width: 560px) {
  .sidebar-inner,
  .intro-section,
  .work-section,
  .repo-section,
  .page-footer,
  .case-study {
    padding: 22px 20px;
  }

  .intro-section h2,
  .work-section h2,
  .repo-section h2 {
    font-size: 1.75rem;
  }

  .profile-positioning {
    max-width: none;
    font-size: 0.9rem;
  }

  .contact-link,
  .affiliation-link,
  .affiliation-item {
    padding: 11px 12px;
    gap: 10px;
  }

  .contact-link .link-icon {
    width: 36px;
    height: 36px;
  }

  .contact-link[data-icon-type="image"] .link-icon,
  .affiliation-link .link-icon {
    width: 50px;
    height: 38px;
  }

  .repo-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .quick-nav,
  .intro-actions,
  .work-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-nav a,
  .intro-action {
    justify-content: center;
  }
}

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

  .reveal-target {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
