:root {
  --bg: #070707;
  --bg-2: #0d0d0d;
  --card: #121212;
  --card-2: #161616;
  --stroke: rgba(255,255,255,.07);
  --stroke-2: rgba(255,255,255,.12);
  --text: #f3f3f3;
  --muted: #9a9a9a;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 0 0 1px rgba(255,255,255,.04), 0 16px 40px rgba(0,0,0,.45);
  --max: 1120px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Instrument Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(7,7,7,.97), rgba(7,7,7,.78) 75%, transparent);
  backdrop-filter: blur(12px);
  padding: 16px 0 12px;
}
.topbar-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: .2px;
  white-space: nowrap;
}
.nav-pill {
  margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  gap: 2px;
  background: #141414;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  padding: 5px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  flex-wrap: wrap;
}
.nav-pill a {
  color: #eee; font-size: 14.5px; padding: 6px 11px; border-radius: 999px;
  transition: .2s background;
  white-space: nowrap;
}
.nav-pill a:hover, .nav-pill a.active { background: rgba(255,255,255,.06); }

.hero { text-align: center; padding: 42px 0 8px; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 400;
  letter-spacing: -1px;
}
.hero-line {
  width: min(560px, 72%);
  height: 1px;
  background: linear-gradient(90deg, transparent, #3a3a3a, transparent);
  margin: 20px auto 24px;
}
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; border: 1px solid var(--stroke-2);
  background: #161616; color: #fff;
  padding: 9px 18px; min-height: 42px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: .18s transform, .18s background, .18s border-color;
}
.btn:hover { background: #1e1e1e; transform: translateY(-1px); }
.btn-blue { background: var(--blue); border-color: transparent; box-shadow: none; min-width: 88px; }
.btn-blue:hover { background: var(--blue-2); }
.btn-sm { padding: 6px 12px; min-height: 32px; font-size: 13px; border-radius: 10px; }

.glass {
  background: linear-gradient(180deg, #171717, #101010);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: stretch;
  margin: 28px auto 8px;
}
.about-text {
  padding: 26px 28px;
  color: #d4d4d4;
  font-size: 16px;
  white-space: pre-line;
}
.about-photo-col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.about-photo {
  width: 100%;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: #000;
}
.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}
.edit-chip { align-self: flex-end; }

.skills-bar {
  margin: 18px auto;
  display: flex; justify-content: space-around; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  color: #ddd; font-size: 15px;
}
.skills-bar span { max-width: 220px; text-align: center; line-height: 1.35; }
.skills-bar small { display: block; color: #8f8f8f; font-size: 12px; margin-top: 4px; }
.ach-caption { color: #9a9a9a !important; font-size: 13px !important; margin-top: 4px; }
.brand-icon { width: 40px; height: 40px; display: block; object-fit: contain; }
.skill-icons {
  display: flex; justify-content: center; align-items: center;
  gap: 30px; flex-wrap: wrap;
  padding: 20px 0 6px;
}
.skill-icons .si { width: 56px; height: 56px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }

.section { padding: 30px 0 6px; }
.section h2, .page-top h1 {
  font-family: var(--display);
  text-align: center;
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 400;
  letter-spacing: -.4px;
  margin-bottom: 18px;
}
.section-head {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap; margin-bottom: 16px;
}
.section-head h2 { margin: 0; }
.blog-head { justify-content: center; position: relative; }
.blog-head .link-blue { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.link-blue { color: #3b82f6; font-size: 14px; }
.link-blue:hover { text-decoration: underline; }

.filters {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  background: #151515; border: 1px solid var(--stroke);
  padding: 5px; border-radius: 14px;
}
.filters button, .filters a {
  background: transparent; border: 0; color: #ddd;
  padding: 7px 12px; border-radius: 10px; font-size: 14px;
}
.filters button.active, .filters button:hover,
.filters a.active, .filters a:hover { background: rgba(255,255,255,.06); }

.admin-chips {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tile {
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tile-media, .slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,.05);
}
.tile-media img, .slider img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.tile-body { padding: 12px 6px 4px; }
.tile-body h3 { font-size: 16px; font-weight: 600; }
.tile-body p { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.45; }

.ach-grid .ach-tile { padding: 12px; }
.ach-grid .cert-frame,
.ach-grid .tile-media {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  background: #f6f6f6;
  display: block;
  padding: 8px;
}
.ach-grid .cert-frame img,
.ach-grid .tile-media img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #f6f6f6;
}

.slider { display: block; }
.slider-link { display: block; height: 100%; }
.slider-track { width: 100%; height: 100%; position: relative; }
.slider-slide {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.slider-slide.is-active { opacity: 1; pointer-events: auto; position: relative; }
.slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 999px;
  border: 0; background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; z-index: 2;
}
.slider-nav.prev { left: 8px; }
.slider-nav.next { right: 8px; }
.slider-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.slider-dot {
  width: 7px; height: 7px; border-radius: 99px;
  border: 0; background: rgba(255,255,255,.35);
}
.slider-dot.is-active { background: #fff; }

.card-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }

.blog-card {
  min-height: 0;
  display: flex; flex-direction: column;
}
.blog-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,.05);
  overflow: hidden;
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.blog-copy { padding: 12px 8px 0; }
.blog-copy h3 { font-size: 17px; margin-bottom: 8px; }
.blog-preview { color: #b7b7b7; font-size: 14px; line-height: 1.55; }
.blog-full { display: none; color: #d5d5d5; font-size: 14.5px; line-height: 1.6; }
.blog-full p { margin: 0 0 10px; }
.blog-card.is-open .blog-preview { display: none; }
.blog-card.is-open .blog-full { display: block; }
.more-btn {
  margin-top: 8px; background: transparent; border: 0;
  color: #60a5fa; padding: 0; font-size: 13.5px;
}
.blog-meta { padding: 12px 8px 6px; display: flex; gap: 10px; align-items: center; min-height: 44px; }
.icon-btn {
  min-width: 34px; height: 34px; border-radius: 10px;
  padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 0; color: #ececec;
}
.like-count { font-size: 12px; color: #cfcfcf; }
.icon-btn:hover { background: rgba(255,255,255,.06); }
.icon-btn.liked,
.like-btn.liked { color: #fff; }
.icon-btn.liked svg,
.like-btn.liked svg { fill: #fff; stroke: #fff; }

.contact-box { padding: 16px 16px 12px; }
.contact-box textarea, .contact-box input {
  width: 100%; background: transparent; border: 0; outline: 0;
  color: #eee; resize: vertical;
}
.contact-box textarea { min-height: 150px; }
.contact-box input {
  min-height: 40px;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 8px;
}
.contact-box textarea::placeholder, .contact-box input::placeholder { color: #6f6f6f; }
.contact-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.socials {
  display: flex; justify-content: center; gap: 18px;
  padding: 22px 0 48px; align-items: center;
}
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center;
  opacity: 1; transition: .15s transform;
  border-radius: 10px;
}
.socials a:hover { transform: translateY(-2px); }
.socials svg, .socials img.brand-icon { width: 40px; height: 40px; display: block; border-radius: 10px; object-fit: contain; }
.brand-icon { width: 40px; height: 40px; display: block; object-fit: contain; border-radius: 10px; background: transparent; }

.preview-block { margin-top: 28px; }
.preview-block h2 { font-family: var(--font); font-size: 22px; text-align: left; margin-bottom: 12px; }
.preview-creds { padding: 14px 16px; margin-bottom: 12px; }
.preview-creds p { margin-top: 8px; }
.preview-frame-wrap {
  overflow: hidden;
  padding: 0;
  width: 100%;
  height: min(1400px, 94vh);
  min-height: 920px;
  display: flex;
  flex-direction: column;
}
.preview-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: #171717;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #9a9a9a; font-size: 12px;
}
.preview-chrome span { width: 8px; height: 8px; border-radius: 99px; background: #3a3a3a; }
.preview-chrome span:first-child { background: #ff5f57; }
.preview-chrome span:nth-child(2) { background: #febc2e; }
.preview-chrome span:nth-child(3) { background: #28c840; }
.preview-chrome em { font-style: normal; margin-left: 8px; }
.preview-frame {
  width: 100%; flex: 1; min-height: 860px;
  border: 0; background: #fff; display: block;
}

.page-top {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 0 14px;
}
.page-top h1 { flex: 1; text-align: center; margin: 0; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: #161616; border: 1px solid var(--stroke-2);
  border-radius: 999px; padding: 8px 14px; min-width: 170px;
}
.search input { background: transparent; border: 0; outline: 0; width: 130px; color: #fff; }
.search input::placeholder { color: #8a8a8a; }

.blog-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: 50px; }
.blog-row {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 16px; padding: 12px; min-height: 150px; align-items: stretch;
}
.blog-row .thumb {
  border-radius: 14px; background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.05); overflow: hidden; min-height: 126px;
}
.blog-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-row .info { padding: 8px 8px 4px; display: flex; flex-direction: column; }
.blog-row .info h3 { font-size: 18px; margin-bottom: 6px; }
.blog-row .info p { color: #9b9b9b; flex: 1; }
.blog-row .actions { display: flex; gap: 6px; margin-top: 8px; }

.blog-stack { display: flex; flex-direction: column; gap: 16px; }
.project-wide { display: block; padding: 12px; }
.project-wide .tile-media, .project-wide .slider { aspect-ratio: 16 / 9; height: auto; }

.article { max-width: 780px; margin: 0 auto; padding: 10px 0 50px; }
.article h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 44px); font-weight: 400; margin: 10px 0 12px; }
.article .meta { color: #8d8d8d; margin-bottom: 18px; }
.article-cover { border-radius: 18px; overflow: hidden; margin-bottom: 18px; }
.article-cover img { width: 100%; height: auto; max-height: 520px; object-fit: contain; background: #0b0b0b; }
.article-cover.slider { aspect-ratio: 16 / 9; max-height: none; }
.article-cover.slider img { height: 100%; object-fit: cover; }

.comments { margin-top: 28px; }
.comments h2 { font-family: var(--font); font-size: 22px; text-align: left; margin-bottom: 12px; }
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.comment-item { padding: 12px 14px; }
.comment-item .who { font-size: 13px; color: #9a9a9a; margin-bottom: 6px; }
.comment-form textarea { width: 100%; min-height: 90px; background: #101010; border: 1px solid var(--stroke-2); border-radius: 12px; padding: 10px 12px; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.comment-form input { width: 100%; background: #101010; border: 1px solid var(--stroke-2); border-radius: 12px; padding: 10px 12px; }

.project-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.article-body { color: #d5d5d5; font-size: 17px; }
.article-body p { margin: 0 0 14px; }
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1f1f1f; border: 1px solid var(--stroke-2);
  padding: 10px 16px; border-radius: 12px; display: none; z-index: 80;
}

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.86);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.lightbox-close {
  position: absolute; top: 16px; right: 18px;
  background: #1a1a1a; color: #fff; border: 0;
  width: 36px; height: 36px; border-radius: 999px;
}

@media (max-width: 860px) {
  .wrap { width: calc(100% - 28px); }
  .about { grid-template-columns: 1fr 168px; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .blog-head .link-blue { position: static; transform: none; }
  .nav-pill { gap: 0; padding: 4px 6px; }
  .nav-pill a { font-size: 12.5px; padding: 5px 8px; }
  .brand { font-size: 20px; }
}

@media (max-width: 640px) {
  .page-top { flex-wrap: wrap; }
  .page-top h1 { order: 0; flex: 1 1 auto; }
  .page-top .search { margin-left: auto; }
  .blog-row { grid-template-columns: 1fr; }
  .blog-row .thumb { min-height: 160px; }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: 42px; }
}

@media (max-width: 520px) {
  .about { grid-template-columns: 1fr 118px; }
  .about-text { padding: 16px; font-size: 13.5px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .comment-form .row { grid-template-columns: 1fr; }
  .skills-bar { font-size: 12.5px; padding: 10px 12px; }
  .skill-icons { gap: 16px; }
  .skill-icons .si { width: 42px; height: 42px; }
  .nav-pill a { font-size: 11.5px; padding: 5px 6px; }
}
