@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css");
:root {
  color-scheme: light dark;
  --font-body: Inter, Segoe UI, sans-serif;
  --font-display: Playfair Display, Georgia, serif;
  --color-bg: #f6f7fb;
  --color-surface: rgba(255, 255, 255, 0.75);
  --color-surface-strong: #ffffff;
  --color-text: #17212c;
  --color-muted: #5c6c7f;
  --color-accent: #274690;
  --color-accent-soft: rgba(39, 70, 144, 0.08);
  --color-border: rgba(23, 33, 44, 0.1);
  --shadow-lg: 0 24px 40px -32px rgba(23, 33, 44, 0.45);
  --shadow-sm: 0 12px 24px -20px rgba(23, 33, 44, 0.45);
  --max-width: 1200px;
}

body.theme--dark {
  --color-bg: #0d141c;
  --color-surface: rgba(18, 25, 36, 0.85);
  --color-surface-strong: #151c2a;
  --color-text: #f2f4f8;
  --color-muted: #97a4b7;
  --color-accent: #5c8bff;
  --color-accent-soft: rgba(92, 139, 255, 0.08);
  --color-border: rgba(151, 164, 183, 0.16);
  --shadow-lg: 0 24px 40px -32px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 12px 24px -20px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--color-text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5vw;
  backdrop-filter: blur(16px);
  background: linear-gradient(120deg, rgba(246, 247, 251, 0.92), rgba(246, 247, 251, 0.75));
  border-bottom: 1px solid var(--color-border);
}

body.theme--dark .site-header {
  background: linear-gradient(120deg, rgba(13, 20, 28, 0.92), rgba(13, 20, 28, 0.7));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand__initials {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.brand__logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
}
.brand__name {
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-list a:hover::after, .nav-list a[aria-current=true]::after {
  transform: scaleX(1);
}

.theme-toggle {
  background: var(--color-accent);
  border: none;
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.theme-toggle:hover {
  transform: translateY(-2px);
}

@media (max-width: 960px) {
  .site-header {
    position: sticky;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    position: relative;
  }
  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--color-surface-strong);
    padding: 1.5rem;
    border-radius: 0.5rem;
    min-width: 220px;
    max-width: min(320px, 85vw);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.75rem);
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    z-index: 20;
  }
  .nav-list[data-open=true] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0.5rem);
    pointer-events: auto;
  }
}
/* Anchor targets: offset scrolling under sticky header */
#home,
#github,
#web-projects,
#contact,
#blog {
  scroll-margin-top: 6rem;
}

.hero {
  display: grid;
  gap: 2rem;
  padding: 8rem 5vw 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  grid-template-columns: repeat(12, 1fr);
}
.hero__content {
  grid-column: span 7;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}
.hero__headline {
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.hero__lede {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 42ch;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}
.hero__meta {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero__portrait {
  margin: 0 0 2rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: 240px;
  align-self: flex-start;
}
.hero__portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.hero__meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.stack-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.stack-list i {
  margin-right: 0.5rem;
}

.hero__meta-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 6.5rem;
  }
  .hero__content,
  .hero__meta {
    grid-column: span 12;
  }
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero__portrait {
    margin: 0 auto 1.75rem;
    max-width: 200px;
  }
}
@media (max-width: 600px) {
  .section {
    padding: 2rem 1.5rem;
  }
}
.section {
  padding: 2rem 5vw;
  max-width: var(--max-width);
  margin: 0 auto;
  scroll-margin-top: 6rem;
}

.section--accent {
  background: var(--color-accent-soft);
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.section--accent .section__header {
  padding-top: 2rem;
}

.section__header {
  max-width: 70ch;
  margin-bottom: 3rem;
}

.section__header p {
  color: var(--color-muted);
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.85rem 1.5rem;
  }
  .brand__initials {
    width: 2.5rem;
    height: 2.5rem;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--ghost {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  box-shadow: none;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 2rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.project-card__meta {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.project-card__links {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
}

.project-card__links a {
  flex: 1 1 0;
  text-align: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  font-weight: 600;
  font-size: 0.9rem;
}

.project-card__links a:first-child {
  background: var(--color-accent);
  color: #fff;
  border: none;
}

.project-card__stats {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.project-card__stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.principles {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.principle {
  padding: 1.75rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.principle h3 i {
  margin-right: 0.6rem;
  color: var(--color-accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(39, 70, 144, 0.12);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

body.theme--dark .tag {
  background: rgba(92, 139, 255, 0.16);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--color-muted);
}

.blog-meta__note {
  font-size: 0.85rem;
}

.section--stacked {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.articles {
  display: grid;
  gap: 4rem;
}

.article--hidden {
  display: none !important;
}

.articles__empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.articles__empty[hidden] {
  display: none !important;
}

.blog-meta__filter {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-meta__filter strong {
  color: var(--color-text);
}

.filter-clear {
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-clear:hover,
.filter-clear:focus-visible {
  background-color: var(--color-accent-soft);
  border-color: var(--color-accent);
  outline: none;
}

.filter-hint {
  color: var(--color-muted);
  font-size: 0.75rem;
}

body.theme--dark .filter-clear {
  border-color: rgba(151, 164, 183, 0.4);
  background: var(--color-surface);
}

body.theme--dark .filter-clear:hover,
body.theme--dark .filter-clear:focus-visible {
  background-color: rgba(92, 139, 255, 0.16);
  border-color: var(--color-accent);
}

.article {
  padding: 2.5rem;
  border-radius: 0.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.article__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.article__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article__summary {
  color: var(--color-text);
  font-size: 1.05rem;
}

.article__body {
  display: grid;
  gap: 1.5rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.article__body pre {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

.article__body pre code {
  display: block;
  padding: 0.35rem 0.45rem;
  background: transparent;
  border: 0;
  color: inherit;
  white-space: pre;
}

.article__body code {
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 0.88rem;
  background: rgba(39, 70, 144, 0.08);
  color: var(--color-text);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(39, 70, 144, 0.12);
}

body.theme--dark .article__body code {
  background: rgba(92, 139, 255, 0.12);
  border-color: rgba(92, 139, 255, 0.26);
}

body.theme--dark .article__body pre {
  background: rgba(21, 28, 42, 0.9);
  border-color: rgba(151, 164, 183, 0.2);
}

.article__body code.hljs {
  background: transparent;
  border: 0;
  display: block;
}

.article__body ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.75;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--color-accent);
  background-color: var(--color-accent-soft);
  outline: none;
}

.chip[data-active=true] {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

body.theme--dark .chip {
  border-color: rgba(151, 164, 183, 0.4);
  background: var(--color-surface);
}

body.theme--dark .chip[data-active=true] {
  background-color: var(--color-accent);
  color: #0d141c;
}

.embed {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.embed iframe {
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
}

.embed figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.article-image {
  margin: 0 0 1.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.article-image img {
  display: block;
  width: 100%;
  height: min(40vh, 28rem);
  object-fit: cover;
}

.article-image figcaption {
  margin: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.article-image figcaption a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .article {
    padding: 2rem;
  }
}
.share-button {
  position: relative;
  align-self: flex-start;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.share-button i {
  pointer-events: none;
  font-size: 1.05rem;
}

.share-button:hover,
.share-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  outline: none;
}

.share-button--copied::after {
  content: "Link copied";
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

body.theme--dark .share-button {
  background: var(--color-surface);
}

body.theme--dark .share-button--copied::after {
  background: var(--color-surface-strong);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.site-footer {
  padding: 1rem 5vw;
  text-align: center;
  color: var(--color-muted);
}

.back-to-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--color-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
}
.back-to-top[data-visible=true] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover, .back-to-top:focus-visible {
  transform: translateY(-0.25rem);
  outline: none;
}

body.theme--dark .back-to-top {
  background: var(--color-accent);
  color: #0d141c;
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 2.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.05rem;
  }
}
.section--contact {
  background: linear-gradient(135deg, rgba(39, 70, 144, 0.1), rgba(39, 70, 144, 0));
  border-radius: 0.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  padding: 1.75rem;
  border-radius: 0.5rem;
  background: var(--color-surface-strong);
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.contact-card a {
  color: var(--color-accent);
  font-weight: 600;
}

/* Social icon row */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  color: var(--color-text);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.social-link i {
  font-size: 1.1rem;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  background-color: var(--color-accent-soft);
  outline: none;
}

.projects__skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skeleton-card {
  height: 220px;
  border-radius: 0.5rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
  position: relative;
  overflow: hidden;
}

.skeleton-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 0.5rem;
}

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

body:not(.theme--dark) .hljs {
  background: var(--color-surface-strong);
  color: var(--color-text);
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
}

body:not(.theme--dark) pre code.hljs,
body:not(.theme--dark) code.hljs {
  background: transparent;
  color: inherit;
}

body:not(.theme--dark) .hljs-comment,
body:not(.theme--dark) .hljs-quote {
  color: var(--color-muted);
}

body:not(.theme--dark) .hljs-keyword,
body:not(.theme--dark) .hljs-title,
body:not(.theme--dark) .hljs-built_in,
body:not(.theme--dark) .hljs-selector-tag {
  color: var(--color-accent);
  font-weight: 600;
}

body:not(.theme--dark) .hljs-attr,
body:not(.theme--dark) .hljs-literal,
body:not(.theme--dark) .hljs-number,
body:not(.theme--dark) .hljs-operator,
body:not(.theme--dark) .hljs-string,
body:not(.theme--dark) .hljs-variable,
body:not(.theme--dark) .hljs-title.function_ {
  color: #356859;
}

body:not(.theme--dark) .hljs-built_in,
body:not(.theme--dark) .hljs-symbol,
body:not(.theme--dark) .hljs-meta {
  color: #9c2a63;
}

body:not(.theme--dark) .hljs-section,
body:not(.theme--dark) .hljs-name {
  color: #b22d30;
}

body.theme--dark .hljs {
  border-radius: 0.5rem;
  border: 1px solid rgba(151, 164, 183, 0.2);
}

/*# sourceMappingURL=styles.css.map */
