:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --bg-elevated: #ffffff;
  --ink: #151512;
  --muted: #62635d;
  --line: #d9ded1;
  --line-strong: #aeb7a4;
  --teal: #0d9488;
  --teal-dark: #0f6f67;
  --coral: #db5a42;
  --violet: #5247d7;
  --amber: #b77912;
  --green: #238553;
  --shadow: 0 18px 55px rgba(21, 21, 18, 0.12);
  --header-height: 74px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161712;
  --bg-elevated: #202119;
  --ink: #f2f4ea;
  --muted: #b8bcae;
  --line: #383c31;
  --line-strong: #555c4b;
  --teal: #28c7b7;
  --teal-dark: #71ddd3;
  --coral: #ff8066;
  --violet: #9189ff;
  --amber: #ebb84d;
  --green: #65c88e;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.skip-link,
.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:focus {
  z-index: 100;
  width: auto;
  height: auto;
  margin: 1rem;
  clip: auto;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-nav {
  width: min(1180px, calc(100% - 28px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-weight: 800;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand span {
  overflow-wrap: anywhere;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-panel a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 0.2rem;
}

.nav-panel a:hover {
  color: var(--ink);
}

.nav-resume {
  color: var(--ink) !important;
  border-bottom: 2px solid var(--teal);
}

.nav-theme {
  width: 2.35rem;
  height: 2.35rem;
  box-shadow: none;
}

.icon-button {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(21, 21, 18, 0.06);
}

.icon-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.icon-button ion-icon {
  font-size: 1.25rem;
}

.menu-toggle {
  display: none;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.button ion-icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.button-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.section-heading h1,
.section-heading h2 {
  max-width: 48rem;
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p:not(.section-kicker) {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.section {
  padding: 6rem 0;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 0.55fr);
  gap: 2rem;
  align-items: end;
}

.work-section {
  background: var(--bg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
  align-items: stretch;
}

.project-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(21, 21, 18, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.project-media {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  background: var(--line);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 22rem;
  overflow: hidden;
  padding: 1.15rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-content: flex-start;
  min-height: 3.9rem;
  margin-bottom: 1rem;
}

.tag-row span {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--teal) 12%, var(--bg-elevated));
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.project-body h3 {
  min-height: 4.78rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.project-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--teal-dark);
  font-weight: 900;
}

.text-link:hover {
  color: var(--coral);
}

.project-body .text-link + .text-link {
  margin-top: 0.35rem;
  padding-top: 0;
}

.project-note {
  margin-top: auto !important;
  color: var(--amber) !important;
  font-weight: 850;
}

.experience-section {
  background: var(--bg);
}

.experience-timeline {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  gap: 1.5rem;
  margin-top: 2.25rem;
  align-items: stretch;
}

.timeline-track {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 1.4rem;
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  bottom: 1.1rem;
  left: 0.48rem;
  width: 2px;
  background: linear-gradient(var(--teal), var(--violet), var(--coral));
}

.timeline-node {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 30px rgba(21, 21, 18, 0.05);
}

.timeline-node:hover,
.timeline-node.active {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.timeline-dot {
  position: absolute;
  top: 1.15rem;
  left: -1.34rem;
  width: 0.82rem;
  height: 0.82rem;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 18%, transparent);
}

.timeline-node:nth-child(2) .timeline-dot {
  background: var(--violet);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent);
}

.timeline-node:nth-child(3) .timeline-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 18%, transparent);
}

.timeline-date {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 1.55rem;
  padding: 0.16rem 0.45rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--teal) 10%, var(--bg-elevated));
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.timeline-node strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.timeline-node span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.timeline-detail {
  min-width: 0;
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 8%, transparent), transparent 42%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.timeline-detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.timeline-detail-title > div {
  min-width: 0;
}

.timeline-detail h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.12;
}

.timeline-meta,
.timeline-summary {
  color: var(--muted);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline-meta span {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 4%, var(--bg-elevated));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-theme {
  flex: 0 0 auto;
  max-width: 11rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--teal) 12%, var(--bg-elevated));
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.timeline-summary {
  margin: 1rem 0 0;
}

.timeline-detail ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.timeline-detail li::marker {
  color: var(--teal);
}

.timeline-tags {
  margin-top: 1rem;
}

.atlas-section {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--teal) 8%, var(--bg)), var(--bg) 26%),
    var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.atlas-section .shell {
  position: relative;
  z-index: 1;
}

.atlas-network-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.95;
}

[data-theme="dark"] .atlas-network-bg {
  opacity: 0.78;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
  gap: 2rem;
  align-items: start;
}

.atlas-side {
  display: grid;
  gap: 0.85rem;
  align-self: stretch;
}

.identity-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--teal) 10%, transparent), transparent 56%),
    color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(21, 21, 18, 0.08);
  overflow: hidden;
}

.identity-main {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.identity-photo-shell {
  position: relative;
  width: 8.25rem;
  height: 8.25rem;
  flex: 0 0 auto;
  margin-inline: auto;
  padding: 0.35rem;
  isolation: isolate;
}

.identity-photo-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--teal), var(--violet) 58%, var(--coral)),
    var(--bg-elevated);
}

.identity-photo-shell img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  border: 2px solid color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(21, 21, 18, 0.16);
}

.identity-copy {
  position: relative;
  min-width: 0;
  padding-inline: 0.1rem;
  z-index: 1;
}

.identity-label,
.identity-role {
  margin: 0;
}

.identity-label {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1.15;
}

.identity-role {
  margin-top: 0.28rem;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.identity-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.identity-links .icon-button {
  width: 100%;
  height: 2.35rem;
  border-radius: 8px;
  box-shadow: none;
}

.atlas-controls {
  display: grid;
  gap: 0.85rem;
  max-width: 42rem;
  margin-top: 1.35rem;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(12px);
  border-radius: 8px;
}

.filter-button {
  min-height: 2.2rem;
  padding: 0.48rem 0.7rem;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.filter-button:hover,
.filter-button.active {
  background: var(--ink);
  color: var(--bg);
}

.search-shell {
  min-height: 2.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(12px);
}

.search-shell ion-icon {
  color: var(--muted);
  flex: 0 0 auto;
}

.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-shell input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.knowledge-graph {
  margin: 2.2rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg-elevated) 92%, transparent), transparent),
    var(--bg-elevated);
  box-shadow: 0 14px 40px rgba(21, 21, 18, 0.08);
  overflow: hidden;
}

.graph-toolbar {
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.legend-item::before {
  content: "";
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--teal);
}

.legend-nlp::before {
  background: var(--violet);
}

.legend-ml::before {
  background: var(--coral);
}

.legend-essentials::before {
  background: var(--amber);
}

.graph-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.4rem;
}

.graph-control {
  width: 2.25rem;
  height: 2.25rem;
  box-shadow: none;
}

.graph-frame {
  position: relative;
  min-height: 34rem;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 28%),
    radial-gradient(circle at 77% 26%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 26%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
}

.knowledge-graph-svg {
  width: 100%;
  height: min(66vh, 42rem);
  min-height: 34rem;
  display: block;
  cursor: grab;
  touch-action: none;
}

.knowledge-graph-svg.is-panning,
.knowledge-graph-svg.is-dragging {
  cursor: grabbing;
}

.graph-edge {
  stroke: color-mix(in srgb, var(--muted) 38%, transparent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transition: opacity 160ms ease, stroke 160ms ease, stroke-width 160ms ease;
}

.graph-edge.is-muted {
  opacity: 0.14;
}

.graph-edge.is-active {
  opacity: 1;
  stroke: var(--teal);
  stroke-width: 2.8;
}

.graph-node {
  cursor: pointer;
  outline: none;
}

.graph-node.is-hidden,
.graph-edge.is-hidden {
  display: none;
}

.graph-node circle {
  fill: var(--bg-elevated);
  stroke: var(--teal);
  stroke-width: 3;
  filter: drop-shadow(0 10px 18px rgba(21, 21, 18, 0.13));
  transition: opacity 160ms ease, r 160ms ease, stroke-width 160ms ease;
}

.graph-node text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.graph-node[data-category="nlp"] circle {
  stroke: var(--violet);
}

.graph-node[data-category="ml"] circle {
  stroke: var(--coral);
}

.graph-node[data-category="essentials"] circle {
  stroke: var(--amber);
}

.graph-node.is-muted {
  opacity: 0.28;
}

.graph-node.is-active circle,
.graph-node:focus-visible circle {
  stroke-width: 5;
}

.graph-node.is-selected circle {
  r: 22;
}

.graph-detail {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.graph-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.graph-detail h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.graph-detail p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.graph-detail-close {
  width: 2rem;
  height: 2rem;
  box-shadow: none;
}

.graph-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.graph-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-weight: 850;
}

.notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
}

.notes-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.notes-toggle {
  min-height: 2.35rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.notes-grid[hidden] {
  display: none;
}

.note-card {
  min-width: 0;
  min-height: 8.4rem;
  display: flex;
  flex-direction: column;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.note-card[data-category="nlp"] {
  border-top-color: var(--violet);
}

.note-card[data-category="ml"] {
  border-top-color: var(--coral);
}

.note-card[data-category="essentials"] {
  border-top-color: var(--amber);
}

.note-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}

.note-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.note-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.note-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.9rem;
}

.note-actions a {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
}

.note-actions a:hover {
  color: var(--teal-dark);
  border-color: var(--teal);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.contact-section {
  padding: 5rem 0;
  background: var(--ink);
  color: var(--bg);
}

.contact-section .section-kicker {
  color: var(--amber);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.contact-layout h2 {
  max-width: 48rem;
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.contact-section .button-secondary {
  background: transparent;
  color: var(--bg);
  border-color: color-mix(in srgb, var(--bg) 30%, transparent);
}

.contact-section .button-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
}

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

@media (max-width: 980px) {
  .split-heading,
  .atlas-layout,
  .contact-layout,
  .experience-timeline {
    grid-template-columns: 1fr;
  }

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

  .contact-actions {
    justify-content: flex-start;
  }

  .atlas-side {
    align-self: start;
  }

  .identity-card {
    height: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    height: var(--header-height);
  }

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

  .nav-panel {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: grid;
    align-content: start;
    gap: 0;
    min-height: calc(100svh - var(--header-height));
    padding: 1rem;
    background: var(--bg);
    border-top: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms ease;
  }

  .nav-panel.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-panel a {
    padding: 1rem 0.4rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
  }

  .nav-theme {
    margin-top: 1rem;
  }

  .section,
  .contact-section {
    padding: 4rem 0;
  }

  .section-heading h1,
  .section-heading h2,
  .contact-layout h2 {
    font-size: 1.85rem;
  }

  .timeline-detail-title {
    flex-direction: column;
  }

  .timeline-theme {
    max-width: 100%;
  }

  .identity-main {
    display: grid;
    grid-template-columns: 5.75rem minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
  }

  .identity-photo-shell {
    width: 5.75rem;
    height: 5.75rem;
    flex: 0 0 auto;
    margin-inline: 0;
  }

  .identity-copy {
    padding-inline: 0;
  }

  .project-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .graph-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .graph-actions {
    justify-content: flex-end;
  }

  .graph-frame {
    min-height: 28rem;
  }

  .knowledge-graph-svg {
    height: 28rem;
    min-height: 28rem;
  }

  .graph-node text {
    font-size: 11px;
  }

}

@media (max-width: 460px) {
  .shell,
  .site-nav {
    width: min(100% - 24px, 1120px);
  }

  .brand span {
    max-width: 9rem;
  }

  .contact-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

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

  .identity-card {
    padding: 0.8rem;
  }

  .identity-photo-shell {
    width: 5rem;
    height: 5rem;
  }

  .graph-frame {
    min-height: 24rem;
  }

  .knowledge-graph-svg {
    height: 24rem;
    min-height: 24rem;
  }

  .graph-detail {
    position: static;
    width: auto;
    margin: 0.75rem;
  }
}
