:root {
  color-scheme: light;

  --font-primary: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --color-linen-white: hsl(0, 0%, 97%);
  --color-light-gray: hsl(210, 20%, 92%);
  --color-dark-slate: hsl(217, 19%, 16%);
  --color-brand-teal: hsl(168, 72%, 54%);
  --color-profile-green: hsl(84, 79%, 60%);

  --color-accent: hsl(168, 62%, 36%);

  --color-bg-main: var(--color-linen-white);
  --color-bg-surface: #FFFFFF;
  --color-bg-surface-2: var(--color-light-gray);
  --color-bg-raised: #FFFFFF;

  --color-text-main: var(--color-dark-slate);
  --color-text-muted: hsl(220, 9%, 40%);
  --color-text-faint: hsl(220, 8%, 46%);

  --color-border: hsl(217, 14%, 84%);
  --color-border-strong: hsl(217, 14%, 70%);

  --color-state-error: hsl(0, 62%, 46%);

  --shadow-card: 0 1px 2px rgba(35, 42, 54, 0.05), 0 4px 16px rgba(35, 42, 54, 0.06);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5rem;

  --section-spacing: clamp(2rem, 5vw, 3rem);
  --header-height: 3.5rem;

  --radius: 10px;
  --border: 1px solid var(--color-border-strong);

  --fs-h1: clamp(2rem, 3vw + 1rem, 3rem);
  --fs-h2: clamp(1.5rem, 2vw + 1rem, 2rem);
  --fs-h3: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --lh-body: 1.6;
  --lh-tight: 1.2;
}

.dark {
  color-scheme: dark;

  --color-accent: var(--color-brand-teal);

  --color-bg-main: hsl(217, 19%, 13%);
  --color-bg-surface: hsl(217, 19%, 17%);
  --color-bg-surface-2: hsl(217, 19%, 21%);
  --color-bg-raised: hsl(217, 19%, 21%);

  --color-text-main: var(--color-linen-white);
  --color-text-muted: hsl(220, 10%, 70%);
  --color-text-faint: hsl(220, 9%, 60%);

  --color-border: hsl(217, 15%, 24%);
  --color-border-strong: hsl(217, 15%, 33%);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
}

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

ul {
  list-style-type: none;
}

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


h1,
h2,
h3 {
  color: var(--color-text-main);
  line-height: var(--lh-tight);
  font-weight: 800;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

html {
  background-color: var(--color-bg-main);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-main);
  overflow-x: hidden;
  background-color: var(--color-bg-main);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 10000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-raised);
  color: var(--color-text-main);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-2);
}

main {
  flex: 1 0 auto;
}

input,
textarea,
button {
  padding: var(--space-2) var(--space-4);
}

.tip-anchor {
  position: relative;
}

.tip-box {
  position: fixed;
  position-area: top;
  position-try-fallbacks: flip-block;
  margin-bottom: 8px;
  border: none;
  background: var(--color-bg-surface);
  color: var(--color-text-main);
  padding: var(--space-1) var(--space-3);
  border-radius: 4px;
  font-size: var(--fs-small);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.tip-anchor:hover>.tip-box {
  opacity: 1;
}


.container {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-spacing);
}


.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cluster {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.flow>*+* {
  margin-block-start: var(--flow-space, var(--space-8));
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--color-bg-surface);
  color: var(--color-text-main);
  border: 1px solid var(--color-border-strong);
}

.btn-primary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border-strong);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg-main);
  border-bottom: 1px solid var(--color-border);
}

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

.brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

header nav a {
  color: var(--color-text-muted);
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

header nav a:hover {
  color: var(--color-text-main);
}

header nav a.active {
  color: var(--color-text-main);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-toggle-moon {
  display: none;
}

.dark .theme-toggle .theme-toggle-sun {
  display: none;
}

.dark .theme-toggle .theme-toggle-moon {
  display: block;
}

@media (max-width: 560px) {
  header nav ul {
    gap: 14px;
    font-size: 13px;
  }
}

.hero {
  padding: clamp(5rem, 8vw, 8rem) 0 clamp(3rem, 8vw, 5rem) 0;
}

.hero-inner {
  display: grid;
  gap: var(--space-1);
}

.hero-portrait img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface-2);
  box-shadow: var(--shadow-card);
}

.hero h1 {
  font-size: clamp(2rem, 4vw + 0.75rem, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .35rem;
  text-transform: none;
}

.hero-title {
  color: var(--color-text-muted);
  font-size: 16px;
  margin: 0 0 .75rem;
}

.hero-bio {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 34rem;
  margin: 0 0 1rem;
}

.hero-bio a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.hero-bio a:hover {
  text-decoration: underline;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.hero-location svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-block: var(--space-2);
}

.hero-actions .btn svg {
  width: 17px;
  height: 17px;
}

.hero-actions .btn {
  padding: 10px 14px;
}

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: auto 1fr;

    .hero-portrait{
      grid-row-start: 2;
      padding-right: var(--space-5);
    }

    h1, .hero-actions{
      grid-column-start: 2;
    }
  }

  .hero-portrait img {
    width: 180px;
    height: 180px;
  }
}


.project-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-block: var(--space-3);
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-preview {
  position: relative;
  background: var(--color-bg-surface);
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.project-card:hover .project-preview::after {
  background: rgba(0, 0, 0, 0.15);
}

.project-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  max-width: none;
  display: block;
  border-radius: 4px;
  background-color: var(--color-bg-surface);
}

.project-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.project-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  height: auto;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, color 0.2s ease;
}

.project-action:hover {
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-accent);
}

.project-action svg {
  width: 16px;
  height: 16px;
}

.project-info {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.project-year {
  font-size: 12px;
  color: var(--color-text-muted);
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.tag {
  background-color: var(--color-bg-raised, rgba(255, 255, 255, 0.04));
  color: var(--color-text-muted);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.project-card.filtered-out {
  display: none;
}

.view-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  align-self: flex-start;
  text-decoration: none;
}

.view-more svg {
  width: 14px;
  height: 14px;
}

.view-more:hover {
  text-decoration: underline;
}

@media (min-width: 601px) {
  .project-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 901px) {
  .project-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}


.project-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-height));
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
  padding: var(--space-5) 0;
  gap: var(--space-7);
}

.project-sticky {
  position: static;
  height: fit-content;
  align-self: start;
}

.project-sticky .back-link {
  display: inline-block;
  margin-bottom: var(--space-6);
}

.project-title-lg {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.project-desc-lg {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: var(--lh-body);
}

.project-sticky .project-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.project-sticky .project-year {
  font-size: inherit;
}

.project-sticky .project-tags {
  margin-bottom: var(--space-6);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.project-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
  margin-block: var(--space-7);
}

.pager-empty {
  visibility: hidden;
  pointer-events: none;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.pager-link:hover {
  border-color: var(--color-accent);
}

.pager-link.pager-next {
  align-items: flex-end;
  text-align: right;
}

.pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.pager-link:hover .pager-label {
  color: var(--color-accent);
}

.pager-label svg {
  width: 14px;
  height: 14px;
}

.pager-link.pager-prev .pager-label svg {
  transform: scaleX(-1);
}

.pager-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
}

.pager-link:hover .pager-title {
  color: var(--color-accent);
}

.project-related .project-cards {
  margin-block: 0;
}

@media (min-width: 600px) {
  .project-related .project-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}

.media-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--color-bg-surface);
  border: var(--border);
}

.media-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.project-highlights {
  background-color: var(--color-bg-surface);
  border: var(--border);
  border-radius: 12px;
  padding: var(--space-5);
}

.project-highlights h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-4);
}

.project-highlights ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-highlights li {
  display: flex;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}

.project-highlights li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 0.5em;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-surface);
}

.stat-value {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  line-height: var(--lh-tight);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.tech-stack {
  background-color: var(--color-bg-surface);
  border: var(--border);
  border-radius: 12px;
  padding: var(--space-5);
}

.tech-stack h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-2);
}

.tech-stack p {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin: 0 0 var(--space-4);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-surface-2);
  font-size: var(--fs-small);
  font-weight: 600;
}

.tech-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.media-card img[data-lightbox] {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox[hidden] {
  display: none;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  max-width: min(90vw, 1200px);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.lightbox-close {
  top: var(--space-4);
  right: var(--space-4);
}

.lightbox-nav svg {
  width: 20px;
  height: 20px;
}

.lightbox-prev {
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev svg {
  transform: scaleX(-1);
}

.lightbox-next {
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.commit-history {
  margin-top: var(--space-2);
  min-width: 0;
}

.commit-history h2 {
  margin-bottom: var(--space-3);
}

.commit-list {
  border: var(--border);
  border-radius: var(--space-2);
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.commit-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  width: 100%;
  padding-block: 2px;
  border-bottom: var(--border);
  font-size: var(--fs-small);
}

.commit-row:last-child {
  border-bottom: none;
}

.commit-graph-col {
  flex-shrink: 0;
}

.commit-message {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-sha {
  font-family: monospace;
  color: var(--color-text-muted);
  flex-shrink: 0;
  padding-right: var(--space-3);
  text-decoration: none;
}

.commit-sha:hover {
  color: var(--color-accent);
}

@media (min-width: 768px) {
  .project-layout {
    grid-template-columns: 1fr 1.5fr;
    padding: var(--space-6) 0;
  }

  .project-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
  }
}


.writing .section-header {
  margin-bottom: 0;
}

.blog-intro,
.blog-sub {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 1.25rem;
  max-width: 36rem;
}

.blog-list,
.blog-cards {
  display: flex;
  flex-direction: column;
}

.blog-row,
.blog-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}

.blog-row:last-child,
.blog-card:last-child {
  border-bottom: 1px solid var(--color-border);
}

.blog-row:hover .blog-title,
.blog-card:hover .blog-title {
  color: var(--color-accent);
}

.blog-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
  color: var(--color-text-main);
  transition: color 0.15s ease;
}

.blog-excerpt {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.blog-date {
  font-size: 12px;
  color: var(--color-text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  order: -1;
  min-width: 0;
}

.blog-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-main);
  transition: color 0.15s ease;
}

.blog-card:hover {
  h3{
    color: var(--color-accent);
  }
}

.blog-card p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.blog-all {
  display: inline-block;
  margin-top: 1rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  align-self: flex-start;
}


.back-link {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

.back-link:hover {
  color: var(--color-accent);
}

.post-date {
  display: block;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.projects.section .container.flow {
  --flow-space: var(--space-5);
}

.post-content {
  --flow-space: var(--space-6);
  max-width: 60rem;
  line-height: 1.75;
}

.post-content h2 {
  margin-block-start: var(--space-7);
}

.post-content h3 {
  margin-block-start: var(--space-6);
}

.post-content p {
  color: var(--color-text-muted);
}

.post-content a {
  color: var(--color-accent);
}

.post-content code {
  font-size: 0.875em;
  padding: 0.15em 0.3em;
  background: #1e1e1e;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.post-content pre {
  overflow-x: auto;
  padding: var(--space-4);
  background: #1e1e1e;
  border: 1px solid var(--color-border);
  border-radius: var(--space-2);
}

.post-content pre code {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.post-content ul {
  padding-left: var(--space-5);
  color: var(--color-text-muted);
  list-style-type: disc;
}

.post-content ol {
  padding-left: var(--space-5);
  color: var(--color-text-muted);
  list-style-type: decimal;
}

.post-content li {
  margin-block-start: var(--space-2);
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-4);
  color: var(--color-text-muted);
  font-style: italic;
}


.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.75rem;
}

.header-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0 1.25rem;
}

.timeline-date {
  grid-column: 1 / -1;
  order: -1;
  color: var(--color-text-faint);
  font-size: 13px;
  padding-top: 2px;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 5px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 14%, transparent);
}

.timeline-line {
  position: absolute;
  top: 16px;
  bottom: -28px;
  width: 1px;
  background: var(--color-border-strong);
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: .15rem;
}

.timeline-company {
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: .35rem;
}

.timeline-desc {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

.single-entry {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.single-entry .timeline-date {
  flex-shrink: 0;
}

.single-entry .timeline-title {
  margin-top: 0;
}

.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.cert-card:hover {
  border-color: var(--color-border-strong);
}

.cert-info {
  display: flex;
  flex-direction: column;
}

.cert-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
}

.cert-issuer {
  color: var(--color-accent);
  font-size: 12px;
  margin: 2px 0;
}

.cert-date {
  color: var(--color-text-faint);
  font-size: 12px;
}

.cert-card svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-text-muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .certificates-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-item {
    grid-template-columns: 130px 24px 1fr;
  }

  .timeline-date {
    grid-column: auto;
    order: 0;
  }

  .single-entry {
    flex-direction: row;
    gap: 1.25rem;
  }

  .single-entry .timeline-date {
    width: 130px;
  }
}


.work-filter {
  position: sticky;
  top: 0;
  z-index: 9;
  margin-inline: -1rem;
  padding: var(--space-3) 0;
  background: var(--color-bg-main);
  border-bottom: 1px solid var(--color-border);
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow-x: auto;
  padding-inline: 1rem;
  padding-block: var(--space-1);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-main);
  font-family: inherit;
  font-size: var(--fs-small);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--color-border-strong);
}

.filter-chip.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.filter-chip-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.filter-chip-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-bg-surface-2);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.filter-chip.active .filter-chip-count {
  background: color-mix(in srgb, var(--color-accent) 15%, transparent);
  color: var(--color-accent);
}

.filter-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-surface);
}

.filter-active[hidden] {
  display: none;
}

.filter-active-label {
  flex-basis: 100%;
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.filter-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.filter-active-chip:hover {
  border-color: var(--color-accent);
}

.filter-active-chip .filter-chip-icon {
  width: 14px;
  height: 14px;
}

.filter-active-chip svg {
  width: 12px;
  height: 12px;
  color: var(--color-text-muted);
}

.filter-active-chip:hover svg {
  color: var(--color-accent);
}

.filter-clear {
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}

.filter-clear:hover {
  color: var(--color-accent);
}

.filter-result-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.filter-empty {
  padding: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  text-align: center;
}

#project-grid {
  scroll-margin-top: 1.5rem;
}

@media (min-width: 600px) {
  .work-filter {
    position: static;
    margin-inline: 0;
    padding: 0;
    background: none;
    border-bottom: none;
  }

  .filter-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
    overflow: visible;
    padding-inline: 0;
  }

  .filter-chip {
    justify-content: flex-start;
    border-radius: var(--radius);
    padding: var(--space-3);
  }

  .filter-chip .filter-chip-count {
    margin-left: auto;
  }
}

@media (min-width: 900px) {
  .filter-chips {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1050px) {
  .filter-chips {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .filter-chips {
    grid-template-columns: repeat(5, 1fr);
  }
}


.github-heatmap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.heatmap-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);

  svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
  }
}

.heatmap-grid {
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--color-border-strong);
  position: relative;
}

.heatmap-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--color-accent);
}

.heatmap-cell[data-level="0"]::after {
  opacity: 0;
}

.heatmap-cell[data-level="1"]::after {
  opacity: 0.3;
}

.heatmap-cell[data-level="2"]::after {
  opacity: 0.6;
}

.heatmap-cell[data-level="3"]::after {
  opacity: 0.9;
}

.heatmap-cell[data-level="4"]::after {
  opacity: 1;
}

.heatmap-cell--empty {
  background: transparent;
}

.now-playing {
  flex: 1 1 260px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}

.now-playing__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.now-playing__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-faint);
  flex-shrink: 0;
}

.now-playing__dot.is-playing {
  background: var(--color-accent);
  animation: now-playing-pulse 2s infinite;
}

@keyframes now-playing-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(77, 240, 147, .5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(77, 240, 147, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(77, 240, 147, 0);
  }
}

.now-playing__link {
  margin-left: auto;
  color: var(--color-text-faint);
  text-decoration: none;
}

.now-playing__link:hover {
  color: var(--color-accent);
}

.now-playing__body {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.now-playing__art {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-bg-surface-2);
  flex-shrink: 0;
}

.now-playing__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.now-playing__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.now-playing__artist {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.now-playing__links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.now-playing__links a {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  transition: color .15s ease;
}

.now-playing__links a:hover {
  color: var(--color-accent);
}

.now-playing__links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}


.now-cards {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.now-updated {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--color-text-faint);
}

.now-list {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: 0;
  list-style-type: "- ";
}

.now-list li {
  color: var(--color-text-main);
  font-size: 15px;
  line-height: 1.6;
}

.now-list li + li {
  margin-top: var(--space-3);
}

.location-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 260px;
  min-width: 0;
  width: 100%;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 60%),
    var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
}

.location-card__map {
  position: absolute;
  right: -10px;
  bottom: -8px;
  width: 150px;
  height: auto;
  opacity: 0.09;
  fill: var(--color-accent);
  pointer-events: none;
}

.location-card__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.location-card__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.location-card__icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  color: var(--color-accent);
}

.location-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}

.location-card__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.location-card__clock {
  margin-left: auto;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.location-card__city {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-text-main);
}

.location-card__tz {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-bg-surface-2);
  border: 1px solid var(--color-border);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@media (min-width: 600px) {
  .now-cards {
    flex-direction: row;
  }

  .location-card {
    width: auto;
  }

  .location-card__body {
    align-items: flex-end;
  }
}


.gallery-heading {
  margin-top: var(--space-6);
}

.gallery {
  columns: 3 240px;
  column-gap: var(--space-3);
}

.gallery__item {
  position: relative;
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s ease;
}

.gallery__item:hover img {
  transform: scale(1.03);
}

.gallery__meta {
  position: absolute;
  bottom: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: flex-start;
}

.gallery__caption,
.gallery__date {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .65);
  border: 1px solid var(--color-border-strong);
  font-size: 11px;
  letter-spacing: .04em;
  color: hsl(220, 10%, 70%);
}

.gallery__caption {
  color:  hsl(0, 0%, 97%);
  font-weight: 600;
}


.contact-header p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.3fr;
  }
}

.contact-list {
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: .85rem 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.contact-item:last-child {
  border-bottom: none;
}

a.contact-item:hover .contact-label {
  color: var(--color-accent);
}

.contact-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-badge svg {
  width: 16px;
  height: 16px;
  fill: var(--color-text-muted);
}

.contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-main);
  line-height: 1.2;
  transition: color 0.15s ease;
}

.contact-detail {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
  word-break: break-word;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.contact-actions > svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-text-muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: opacity 0.2s ease, stroke 0.2s ease;
}

.contact-item:hover .contact-actions > svg {
  opacity: 1;
  stroke: var(--color-text-main);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: var(--color-text-main);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-btn.copied {
  color: var(--color-accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.contact-form > div:not(.cf-turnstile) {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-text-faint);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-form .cf-turnstile {
  align-self: flex-start;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-accent);
  color: var(--color-bg-main);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.submit-btn:hover {
  filter: brightness(1.12);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.submit-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 480px) {
  .contact-form > div:not(.cf-turnstile) {
    grid-template-columns: 1fr 1fr;
  }
}


footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: var(--space-8);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-bg-surface);
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--color-text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-socials a:hover {
  color: var(--color-accent);
  background: var(--color-bg-surface-2);
}

.footer-socials svg {
  width: 15px;
  height: 15px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .35s;
}

::view-transition-group(pt),
::view-transition-group(blog-title) {
  animation-duration: .4s;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-group(*) {
    animation-duration: .01ms;
  }
}

.hidden {
  display: none;
}

.rounded {
  border-radius: 8px;
}

.center {
  align-items: center;
}

.sticky {
  position: sticky;
  top: 0;
  height: var(--header-height);
}

.text-outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-accent);
}

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