:root {
  --bg: #ffffff;
  --fg: #0f0f0f;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --btn-bg: #f3f4f6;
  --btn-hover: #e5e7eb;
  --badge-blue-bg: #dbeafe;
  --badge-blue-txt: #1d4ed8;
  --badge-green-bg: #dcfce7;
  --badge-green-txt: #15803d;
  --badge-orange-bg: #ffedd5;
  --badge-orange-txt: #c2410c;
  --badge-purple-bg: #f3e8ff;
  --badge-purple-txt: #7e22ce;
  --robot-glow: rgba(96, 165, 250, 0.18);
  --notes-surface: #f4f4f8;
  --notes-surface-soft: #ececf1;
  --notes-divider: rgba(15, 23, 42, 0.08);
  --notes-text: #1c1c1e;
  --notes-muted: #6e6e73;
  --notes-accent: #f4c542;
  --work-line: #d8dbe2;
  --work-dot: #d8dbe2;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #323232;
    --fg: #e8d8c9;
    --muted: rgba(232, 216, 201, 0.72);
    --border: rgba(232, 216, 201, 0.14);
    --accent: #e8d8c9;
    --btn-bg: #3a3a3a;
    --btn-hover: #434343;
    --badge-blue-bg: #1e3a5f;
    --badge-blue-txt: #93c5fd;
    --badge-green-bg: #14532d;
    --badge-green-txt: #86efac;
    --badge-orange-bg: #431407;
    --badge-orange-txt: #fdba74;
    --badge-purple-bg: #3b0764;
    --badge-purple-txt: #d8b4fe;
    --robot-glow: rgba(96, 165, 250, 0.26);
    --notes-surface: #3a3a3a;
    --notes-surface-soft: #434343;
    --notes-divider: rgba(232, 216, 201, 0.1);
    --notes-text: #e8d8c9;
    --notes-muted: rgba(232, 216, 201, 0.68);
    --notes-accent: #ffd54a;
    --work-line: rgba(232, 216, 201, 0.18);
    --work-dot: rgba(232, 216, 201, 0.18);
  }
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

body {
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

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

.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;
}

.layout {
  min-height: 100vh;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav-inner {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  background: color-mix(in srgb, var(--btn-bg) 82%, transparent);
}

.main {
  width: 100%;
  padding: 6rem 1.25rem 5rem;
}

@media (min-width: 768px) {
  .main {
    padding: 6.25rem clamp(2rem, 5vw, 4.5rem) 5rem;
  }
}

.content {
  width: min(100%, 1100px);
  margin: 0 auto;
}

.easter-egg {
  display: flex;
  position: relative;
  justify-content: flex-start;
  width: 100%;
  margin: 0 0 1.75rem;
  user-select: none;
}

@media (min-width: 768px) {
  .easter-egg {
    align-items: flex-end;
    justify-content: flex-start;
    width: fit-content;
    margin: 0 0 2rem;
  }
}

.robot-wrap {
  display: block;
  cursor: default;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  filter: none;
}

.robot-figure {
  position: relative;
  width: clamp(170px, 46vw, 240px);
  transform-origin: center bottom;
  will-change: transform, filter;
  animation: panda-breathe 4.2s ease-in-out infinite;
}

@media (min-width: 768px) {
  .robot-figure {
    width: 240px;
  }
}

.robot-base {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.08));
}

.panda-eye-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.panda-pupil {
  will-change: transform;
}

.robot-wrap:hover {
  filter: none;
}

@keyframes panda-breathe {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.08));
  }

  25% {
    transform: translateY(-5px) scale(1.018);
    filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.1));
  }

  50% {
    transform: translateY(-10px) scale(1.03);
    filter: drop-shadow(0 22px 28px rgba(15, 23, 42, 0.12));
  }

  75% {
    transform: translateY(-4px) scale(1.014);
    filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.09));
  }

  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.08));
  }
}

@media (prefers-reduced-motion: reduce) {
  .robot-figure {
    animation: none;
  }
}

.hero {
  margin-bottom: 3.5rem;
  scroll-margin-top: 6.5rem;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-phonetic {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}

.hero-bio,
.hero-current {
  max-width: 560px;
  font-size: clamp(1.12rem, 1rem + 0.35vw, 1.32rem);
  color: var(--muted);
  line-height: 1.8;
}

.hero-current {
  margin-top: 0.9rem;
}

.hero-current a {
  color: var(--accent);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  background: var(--btn-hover);
}

.projects-section {
  width: min(100%, 1080px);
  margin: 0 0 1.15rem;
}

.projects-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.notes-app {
  width: min(100%, 720px);
  position: relative;
  z-index: 1;
  margin-top: 5rem;
}

.work-listing {
  width: min(100%, 980px);
  margin-top: 0;
}

.work-header {
  margin-bottom: 1rem;
}

.work-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.work-rows {
  display: grid;
  gap: 0.75rem;
}

.work-row {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.9rem;
  justify-content: flex-start;
}

.work-name {
  font-size: clamp(0.98rem, 1.5vw, 1.2rem);
  color: var(--muted);
  white-space: nowrap;
}

.work-name-link {
  transition: color 0.15s ease;
}

.work-name-link:hover,
.work-name-link:focus-visible {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.work-line {
  display: flex;
  align-items: center;
  width: clamp(12rem, 40vw, 34rem);
  gap: 0.8rem;
  min-width: 0;
}

.work-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--work-dot);
  flex-shrink: 0;
}

.work-dashes {
  flex: 1;
  height: 2px;
  background-image: linear-gradient(90deg, var(--work-line) 0 50%, transparent 50% 100%);
  background-size: 12px 2px;
  background-repeat: repeat-x;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.work-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.work-tag-blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-txt);
}

.work-tag-green {
  background: var(--badge-green-bg);
  color: var(--badge-green-txt);
}

.work-tag-orange {
  background: var(--badge-orange-bg);
  color: var(--badge-orange-txt);
}

.work-tag-purple {
  background: var(--badge-purple-bg);
  color: var(--badge-purple-txt);
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  width: min(100%, 760px);
  margin-top: 3.5rem;
}

.feature-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--btn-bg) 55%, transparent);
}

.feature-card-art {
  display: block;
  width: 100%;
  aspect-ratio: 0.96 / 1;
  object-fit: cover;
  background: #f0f0f0;
}

.feature-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.8rem 0.8rem;
}

.feature-card-title {
  font-size: 0.88rem;
  line-height: 1.15;
}

.feature-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.feature-card-cta:hover,
.feature-card-cta:focus-visible {
  background: var(--btn-bg);
}

.notes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.notes-kicker {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.notes-title {
  margin-top: 0;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.notes-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0 1.2rem;
  border-radius: 18px;
  background: var(--notes-surface-soft);
  color: var(--notes-muted);
}

.notes-search-icon,
.notes-search-mic {
  font-size: 1.5rem;
  line-height: 1;
}

.notes-search-text {
  font-size: 1.05rem;
}

.notes-search-mic {
  margin-left: auto;
}

.notes-group {
  margin-top: 1.5rem;
}

.notes-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.4rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.notes-list {
  overflow: hidden;
  border-radius: 22px;
  background: var(--notes-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.notes-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  color: var(--notes-text);
  transition: background 0.15s ease;
}

.notes-row + .notes-row {
  border-top: 1px solid var(--notes-divider);
}

.notes-row:hover,
.notes-row:focus-visible {
  background: color-mix(in srgb, var(--notes-surface-soft) 82%, transparent);
}

.notes-row-main {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.notes-folder-icon {
  flex-shrink: 0;
  color: var(--notes-accent);
  font-size: 1.4rem;
}

.notes-row-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notes-row-title {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.25;
}

.notes-row-meta {
  margin-top: 0.2rem;
  color: var(--notes-muted);
  font-size: 0.88rem;
}

.notes-row-side {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
  color: var(--notes-muted);
}

.notes-row-value {
  font-size: 0.95rem;
}

.notes-row-arrow {
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 767px) {
  .site-nav-inner {
    padding: 0.85rem 1rem;
    justify-content: flex-start;
  }

  .site-nav-link {
    font-size: 0.8rem;
    padding: 0.45rem 0.7rem;
  }

  .main {
    padding-top: 5.5rem;
  }

  .hero-name {
    font-size: 1.75rem;
  }

  .notes-app {
    width: 100%;
    margin-top: 4.25rem;
  }

  .projects-section {
    margin-bottom: 1rem;
  }

  .work-listing {
    width: 100%;
    margin-top: 0;
  }

  .feature-cards {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 3rem;
  }

  .feature-card-art {
    aspect-ratio: 1.15 / 1;
  }

  .feature-card-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-row {
    grid-template-columns: auto minmax(1.5rem, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
  }

  .work-line {
    width: auto;
    gap: 0.5rem;
  }

  .work-tags {
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: nowrap;
  }

  .work-tag {
    min-height: 2.45rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
  }

  .work-name {
    font-size: 0.96rem;
    white-space: nowrap;
  }

  .work-dot {
    width: 0.72rem;
    height: 0.72rem;
  }

  .work-dashes {
    background-size: 11px 2px;
  }

  .notes-title {
    font-size: 2.5rem;
  }

  .notes-search {
    min-height: 3.5rem;
    padding: 0 1rem;
  }

  .notes-row {
    padding: 1rem;
  }

  .notes-row-main {
    gap: 0.8rem;
  }

  .notes-row-title {
    font-size: 0.98rem;
  }

  .notes-row-value {
    display: none;
  }
}
