/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

.root-fix {}
:root {
  --bg: #0f1115;
  --panel: #151923;
  --text: #e6e6e6;
  --muted: #a6abb5;
  --primary: #5dd6a4;
  --primary-600: #3ebf8c;
  --border: #242a36;
  --chip: #222936;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: var(--panel); border-radius: .5rem; border:1px solid var(--border); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(10px); background: rgba(15,17,21,.75); border-bottom: 1px solid var(--border); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 360px) 1fr;
  align-items: center;
  padding: .9rem 0;
  gap: 0.75rem;
}
.brand { font-weight: 700; letter-spacing: .2px; color: var(--text); }
.site-header nav { justify-self: end; }
.nav { display:flex; gap: .5rem; list-style:none; margin:0; padding:0; }
.nav a { display:block; padding:.4rem .6rem; border-radius:.5rem; color: var(--text); font-size: 0.95rem; }
.nav a.active, .nav a[aria-current="page"], .nav a:hover { background: var(--chip); text-decoration:none; }

/* Blog header search */
.search { display:flex; align-items:center; justify-self: center; width: 100%; max-width: 360px; }
.search input[type="search"] {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: .5rem;
  padding: .4rem .6rem;
  width: 100%;
  min-width: 0;
}

@media (max-width: 768px) {
  .header-inner { display: flex; flex-wrap: wrap; justify-content: center; padding: 0.75rem 0; }
  .brand { order: 1; width: 100%; text-align: center; }
  .site-header nav { order: 2; width: 100%; justify-self: center; }
  .nav { width: 100%; justify-content: center; }
  .search { order: 3; width: 100%; max-width: 100%; }
}

@media (max-width: 480px) {
  .header-inner { gap: 0.5rem; }
  .brand { width: 100%; text-align: center; }
  .search { width: 100%; }
  .nav { gap: 0.25rem; }
  .nav a { padding: 0.35rem 0.5rem; font-size: 0.9rem; }
}

.section { margin: 2rem 0 3rem; }
.section-head { display:flex; align-items: baseline; justify-content: space-between; gap:1rem; margin: 1.25rem 0 1rem; flex-wrap: wrap; }
@media (max-width: 480px) { .section-head { justify-content: center; text-align: center; } .section-head h1, .section-head h2 { width: 100%; } }
.see-all { font-size: .95rem; }
.lead { color: var(--muted); max-width: 70ch; }

.card-grid { display:grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; display:flex; flex-direction:column; gap:.5rem; }
.card-title { margin: 0; font-size: 1.05rem; }
.card-meta { color: var(--muted); font-size: .9rem; display:flex; flex-wrap:wrap; gap:.4rem .6rem; align-items:center; }

.post-card {
  position: relative;
  min-height: 280px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #2a2f3a;
  background: #0e1015;
  background-image:
    radial-gradient(120% 120% at 20% 10%, rgba(93,214,164,.2), transparent 55%),
    linear-gradient(135deg, rgba(34,41,54,.9), rgba(15,17,21,.98));
  display: flex;
  align-items: flex-end;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,12,18,.2), rgba(10,12,18,.55));
  z-index: 1;
}
.post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9,11,16,.9), rgba(9,11,16,.55) 45%, rgba(9,11,16,0) 70%);
  z-index: 2;
}
.post-card-content {
  position: relative;
  padding: 1.25rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 3;
}
.post-card-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: .2px;
}
.post-card-title a {
  color: #f4f7fb;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.post-card-title a:hover { text-decoration: underline; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.post-card .chip { font-size: .72rem; padding: .1rem .45rem; box-shadow: 0 1px 0 rgba(0,0,0,.25) inset; }
.post-card-excerpt {
  margin: 0;
  color: #e0e6f0;
  font-size: .92rem;
  line-height: 1.35;
  max-width: 36ch;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem;
  color: #d5dbe5;
  font-size: .85rem;
}
.post-card-meta-item { display: inline-flex; align-items: center; gap: .35rem; }
.post-card-icon { width: .95rem; height: .95rem; fill: currentColor; opacity: .9; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,.3); }
@media (max-width: 600px) {
  .post-card { min-height: 240px; }
  .post-card-title { font-size: 1.35rem; }
}

.chip { display:inline-block; background: linear-gradient(90deg, var(--chip-a, var(--chip)), var(--chip-b, var(--chip))); color: var(--chip-text, var(--muted)); border: 1px solid var(--chip-border, var(--border)); padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; transition: filter .15s ease, box-shadow .15s ease, transform .15s ease; cursor: pointer; }
.chip:hover { filter: brightness(1.05); text-decoration: none; }
.chip:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(93,214,164,.45); transform: translateY(-1px); }
.chips { list-style:none; padding:0; margin:.25rem 0 0; display:flex; flex-wrap:wrap; gap:.5rem; }
.chips li { background: var(--chip); border:1px solid var(--border); color: var(--muted); padding:.25rem .6rem; border-radius:999px; }

/* Resume page: make skill chips more colorful while keeping good contrast */
.resume .chips li {
  border-color: transparent;
  color: #e9eef7;
  background: linear-gradient(90deg, #3ebf8c, #5dd6a4);
}
.resume .chips li:nth-child(6n+1) { background: linear-gradient(90deg, #3ebf8c, #5dd6a4); }
.resume .chips li:nth-child(6n+2) { background: linear-gradient(90deg, #7db3ff, #9bc1ff); }
.resume .chips li:nth-child(6n+3) { background: linear-gradient(90deg, #dda8ff, #f0b3ff); }
/* Warm palette needs darker text for readability */
.resume .chips li:nth-child(6n+4) {
  background: linear-gradient(90deg, #ffb86b, #ffd580);
  color: #1a1f27;
}
.resume .chips li:nth-child(6n+5) { background: linear-gradient(90deg, #7de3ff, #9ad0ff); }
.resume .chips li:nth-child(6n)   { background: linear-gradient(90deg, #9ad0ff, #dda8ff); }

/* Slight interaction polish */
.resume .chips li:hover { filter: brightness(1.04); }
.resume .chips li:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(93,214,164,.45); }

.button { display:inline-block; background: var(--primary); color:#0a0d12; padding:.45rem .8rem; border-radius:.5rem; font-weight:600; border:1px solid var(--primary-600); box-shadow: 0 1px 0 rgba(0,0,0,.3) inset; }
.button:hover { filter: brightness(1.03); text-decoration:none; }
.button.outline { background: transparent; color: var(--primary); border-color: var(--border); box-shadow:none; }

.projects-page .section-head h1,
.projects-page .section-head h2 {
  color: var(--text);
}

/* Projects page polish: subtle interactive and brand-consistent accents */
.projects-page .card-grid { gap: 1.25rem; }
.projects-page .card {
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.projects-page .card:hover {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 1px var(--primary-600) inset, 0 6px 20px rgba(0,0,0,.35);
  transform: translateY(-1px);
}
.projects-page .card-title { color: var(--text); }
.projects-page .card-meta { color: var(--muted); }
.projects-page .chip:not([data-tag]) { background: var(--chip); border-color: var(--border); color: var(--muted); }

.resume { display:grid; gap:2rem; }
.resume-section h3 { margin-bottom:.5rem; }
.timeline { list-style:none; padding:0; margin:0; position:relative; }
.timeline li { position: relative; padding-left: 1.75rem; margin: 1rem 0 1.25rem; }
@media (max-width: 600px) {
  .timeline li { padding-left: 1.5rem; }
  .timeline::before { left: .45rem; }
  .timeline-point { width: 0.9rem; height: 0.9rem; top: 0.45rem; }
}
.timeline::before { content:""; position:absolute; left:.55rem; top:.35rem; bottom:.35rem; width:2px; background: var(--border); }
.timeline-point { position:absolute; left:0; top:.35rem; width:1.1rem; height:1.1rem; background: var(--bg); border:2px solid var(--primary); border-radius:999px; }
.timeline-content h4 { margin:.1rem 0; }
.meta { color: var(--muted); font-size:.9rem; margin-bottom:.35rem; }
.excerpt { font-style: italic; color: var(--text); margin: 0.5rem 0; font-size: 0.95rem; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.chip.tiny { font-size: 0.7rem; padding: 0.05rem 0.4rem; opacity: 0.85; cursor: default; }

.post { background: var(--panel); border:1px solid var(--border); border-radius:.8rem; padding:1.25rem; max-width: 900px; margin: 0 auto; }
@media (max-width: 600px) { .post { padding: 1rem; border-radius: 0.5rem; } }
.post-header h1 { margin-top:0; }
.post-content p { line-height: 1.7; }
/* Blog polish: a touch more color without layout changes */
.post-header h1 {
  background: linear-gradient(90deg, var(--primary), #7db3ff 50%, #dda8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
  color: #dfe7ff;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.post-content a { color: #7db3ff; }
.post-content a:hover { color: #9fc5ff; }
.post-content blockquote {
  margin: 1rem 0;
  padding: .5rem .9rem;
  border-left: 3px solid transparent;
  background: linear-gradient(90deg, rgba(125,179,255,.18), rgba(221,168,255,.14));
  border-image: linear-gradient(180deg, #7db3ff, #dda8ff) 1;
  color: #cfe1ff;
}
.post-content pre, .post-content code { background: #0c0f14; border: 1px solid var(--border); border-radius: .35rem; padding: .15rem .35rem; }
.post-content pre { padding:.8rem 1rem; overflow:auto; line-height:1.55; }
.post-content pre code { display:block; white-space: pre; overflow: visible; tab-size: 2; }
.post-content code { color: #ffd580; }
.post-content pre.code-block { position: relative; }
.post-content pre.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: .35rem; right: .5rem;
  font-size: .7rem;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: .1rem .4rem;
  border-radius: .25rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.post-content .mermaid {
  padding: 0;
  margin: 1rem 0;
  overflow-x: auto;
}
.post-content .math-block {
  margin: 1rem 0;
}
.post-content .math-block.equation {
  position: relative;
  padding-right: 2.5rem;
}
.post-content .math-block.equation .equation-number {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .9rem;
}
.post-content .callout {
  border-left: 3px solid var(--border);
  padding: .6rem .9rem;
  margin: 1rem 0;
}
.post-content .callout-title { font-weight: 700; margin-bottom: .25rem; }
.post-content .callout-note { border-left-color: #7db3ff; }
.post-content .callout-tip { border-left-color: #5dd6a4; }
.post-content .callout-warning { border-left-color: #ffb86b; }
.post-content .callout-quote { border-left-color: #dda8ff; font-style: italic; }
.post-content .gallery {
  columns: 3 240px;
  column-gap: 1rem;
  margin: 1rem 0;
}
.post-content .gallery-item {
  break-inside: avoid;
  margin: 0 0 1rem;
  cursor: zoom-in;
}
.post-content .gallery-item img {
  width: 100%;
  height: auto;
  border-radius: .6rem;
  display: block;
  transition: transform .3s ease;
}
.post-content .gallery-item:hover img,
.post-content .gallery-item:focus-within img {
  transform: scale(1.02);
}
.post-content .gallery-item figcaption {
  margin-top: .35rem;
  font-size: .9rem;
  color: var(--muted);
}
.post-content .gallery-caption { font-weight: 700; }
.post-content .gallery-meta { font-size: .85rem; color: var(--muted); }
.post-content .map-block {
  margin: 1rem 0;
}
.post-content .map-block img {
  width: 100%;
  height: auto;
  border-radius: .6rem;
  display: block;
}
.post-content .map-block figcaption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .95rem;
}
.post-content .post-timeline {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}
.post-content .timeline-item {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: .75rem;
}
.post-content .timeline-date {
  color: var(--muted);
  font-size: .9rem;
}
.post-content .timeline-title { font-weight: 700; }
.post-content .timeline-desc { color: var(--muted); }
.post-content .itinerary {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  border-left: 2px dashed var(--border);
  padding-left: 1rem;
}
.post-content .itinerary-item {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: .75rem;
}
.post-content .itinerary-day { color: var(--muted); font-size: .9rem; }
.post-content .itinerary-place { font-weight: 700; }
.post-content .itinerary-desc { color: var(--muted); }
.post-content .route {
  display: grid;
  gap: .9rem;
  margin: 1rem 0;
}
.post-content .route-stage {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: .75rem;
  align-items: start;
}
.post-content .route-index {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .85rem;
}
.post-content .route-line { font-weight: 700; }
.post-content .route-arrow { margin: 0 .4rem; color: var(--muted); }
.post-content .route-detail { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.post-content .gear-block {
  margin: 1rem 0;
  padding: .75rem .9rem;
  border-left: 3px solid #7db3ff;
}
.post-content .gear-title { font-weight: 700; margin-bottom: .25rem; }
.post-content .gear-list { margin: 0; padding-left: 1.1rem; }
.post-content .stats-block { margin: 1rem 0; }
.post-content .stats-title { font-weight: 700; margin-bottom: .5rem; }
.post-content .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
}
.post-content .stat-card {
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
}
.post-content .stat-value { font-size: 1.2rem; font-weight: 700; }
.post-content .stat-label { color: var(--muted); font-size: .9rem; }
.post-content .stat-note { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.post-content .terminal-block {
  border: 1px solid var(--border);
  background: transparent;
}
.post-content .diff-block code { display: block; }
.post-content .diff-line { display: block; }
.post-content .diff-add { color: #8fdac0; }
.post-content .diff-del { color: #ff9cc0; }
.post-content .diff-hunk { color: #9ad0ff; }
.post-content .diff-file { color: #ffd580; }
@media (max-width: 700px) {
  .post-content .gallery { columns: 2 200px; }
  .post-content .timeline-item { grid-template-columns: 1fr; }
  .post-content .itinerary-item { grid-template-columns: 1fr; }
  .post-content .route-stage { grid-template-columns: 1fr; }
}
.post-content .math-block {
  margin: 1rem 0;
}
/* Better horizontal scrolling UX on small screens */
.post-content pre { scrollbar-color: #394256 transparent; }
.post-content pre::-webkit-scrollbar { height: 10px; }
.post-content pre::-webkit-scrollbar-thumb { background: #394256; border-radius: 6px; }
.post-content hr { border-color: #2a3140; }
.post-content ul li::marker { color: #8fdac0; }
.post-content ol li::marker { color: #7db3ff; }

/* --- Media Carousel (rendered from ```carousel fences) --- */
.post-content .carousel {
  position: relative;
  overflow: hidden;
  border-radius: .6rem;
  margin: 1rem 0;
}
.post-content .carousel-track {
  display: flex;
  width: 100%;
  transition: transform .35s ease;
  will-change: transform;
}
.post-content .carousel-slide {
  min-width: 100%;
  margin: 0;
}
.post-content .carousel-slide .carousel-media {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}
@media (max-width: 600px) {
  .post-content .carousel-slide .carousel-media { aspect-ratio: 4 / 3; }
}
.post-content .carousel-slide figcaption {
  font-size: .9rem;
  color: var(--muted);
  background: rgba(15,17,21,0.6);
  padding: .5rem .75rem;
  text-align: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.post-content .carousel:hover .carousel-slide.active figcaption,
.post-content .carousel:focus-within .carousel-slide.active figcaption { opacity: 1; }
.post-content .carousel-prev,
.post-content .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.post-content .carousel-prev { left: .5rem; }
.post-content .carousel-next { right: .5rem; }
.post-content .carousel-prev:hover,
.post-content .carousel-next:hover { background: rgba(0,0,0,.5); transform: translateY(-50%) scale(1.05); }
.post-content .carousel-prev:focus-visible,
.post-content .carousel-next:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(93,214,164,.45); }

.post-content .carousel-dots {
  position: absolute;
  left: 0; right: 0; bottom: .4rem;
  display: flex; justify-content: center; gap: .35rem;
}
.post-content .carousel-dot {
  width: .55rem; height: .55rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.post-content .carousel-dot.active { background: var(--primary); border-color: var(--primary-600); }

/* --- Album strip (rendered from ```album fences) --- */
.post-content .album {
  position: relative;
  margin: 1.5rem 0;
  border-radius: .9rem;
}
.post-content .album-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.post-content .album-item {
  position: relative;
  margin: 0;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  cursor: zoom-in;
}
.post-content .album-media {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform .35s ease;
}
.post-content .album-item:hover .album-media,
.post-content .album-item:focus-within .album-media {
  transform: scale(1.05);
}
.post-content .album-caption { font-weight: 700; }
.post-content .album-meta { font-size: .85rem; color: var(--muted); }
.post-content .album-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: .8rem 1rem;
  font-size: .95rem;
  color: #f3f6fb;
  background: linear-gradient(180deg, rgba(9,11,16,0), rgba(9,11,16,.75) 60%);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.post-content .album-item:hover figcaption,
.post-content .album-item:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 700px) {
  .post-content .album-track { padding: .75rem; }
  .post-content .album-media { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-content .carousel-track { transition: none; }
  .post-content .carousel-prev,
  .post-content .carousel-next { transition: none; }
}

/* Lightbox for full media view */
#lightbox { position: fixed; inset: 0; z-index: 1000; display: none; }
#lightbox.open { display: block; }
#lightbox .lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; }
#lightbox .lightbox-content { max-width: 90vw; max-height: 90vh; }
#lightbox .lightbox-content img,
#lightbox .lightbox-content video { max-width: 100%; max-height: 90vh; display: block; border-radius: .4rem; }
#lightbox .lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.15);
  color: #fff; border: 1px solid rgba(255,255,255,.35);
  width: 2.2rem; height: 2.2rem; border-radius: 999px; cursor: pointer;
}

/* Print-friendly adjustments */
@media print {
  @page { margin: 0.6in; }
  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #000000;
    --muted: #333333;
    --border: #cccccc;
    --chip: #f0f0f0;
  }
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, nav, .button, .card-meta .chip { color-adjust: exact; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .post { background: #fff !important; border-color: #bbb !important; }
  .post-header h1 { color: #000 !important; background: none !important; text-shadow: none !important; }
  .post-content a { color: #000 !important; text-decoration: underline; }
  .post-content blockquote { background: #fff !important; color: #000 !important; border-left: 3px solid #999 !important; border-image: none !important; }
  .post-content pre, .post-content code { background: #fff !important; color: #000 !important; border: 1px solid #999 !important; }
  .post-content pre { white-space: pre-wrap; word-break: break-word; page-break-inside: avoid; break-inside: avoid; }
  .post-content pre.code-block::before { color: #444 !important; background: #f2f2f2 !important; border-color: #ccc !important; }
  body.resume-page .site-header,
  body.resume-page .site-footer,
  body.resume-page .button {
    display: none !important;
  }
  body.resume-page .skip-link {
    display: none !important;
  }
  body.resume-page .container {
    max-width: none;
    padding: 0;
  }
  body.resume-page .section {
    margin: 0 0 .5rem;
  }
  body.resume-page main {
    margin: 0;
  }
  body.resume-page .resume {
    display: block;
    gap: 0;
  }
  body.resume-page .resume-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 1rem;
  }
  body.resume-page .section-head {
    margin: 0 0 1rem;
  }
  body.resume-page .timeline::before,
  body.resume-page .timeline-point {
    display: none;
  }
  body.resume-page .timeline li {
    padding-left: 0;
    margin: .6rem 0 .8rem;
  }
  body.resume-page .chips li,
  body.resume-page .chip,
  body.resume-page .chip.tiny {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
  body.resume-page a[href]::after {
    content: "";
  }
}

.site-footer {
  position: relative;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(93,214,164,.08), transparent 55%),
    linear-gradient(180deg, rgba(21,25,35,.95), rgba(15,17,21,.98));
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(560px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(93,214,164,.5), transparent);
}
.footer-inner {
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:1.25rem;
  padding: 1.4rem 0 2.2rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.site-footer nav a {
  color: var(--text);
  opacity: .8;
  text-decoration: none;
}
.site-footer nav a:hover { opacity: 1; text-decoration: underline; }
.site-footer nav a[aria-current="page"] { color: var(--primary); opacity: 1; }
@media (max-width: 600px) {
  .footer-inner { justify-content: center; text-align: center; }
  .footer-inner nav { width: 100%; display: flex; justify-content: center; gap: 1rem; }
}

/* Card hover: subtle border glow only, no layout change */
.card {
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 1px var(--primary-600) inset, 0 4px 14px rgba(0,0,0,.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

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

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
