/* ==========================================================================
   Derek Heidorn — site styles
   Built on Bootstrap 5.3 + Bootswatch "Darkly". Only additions live here.
   ========================================================================== */

:root {
  --dh-accent: #00bc8c;
  --dh-accent-2: #3498db;
  --dh-surface: #2b2f33;
  --dh-surface-2: #303439;
  --dh-border: rgba(255,255,255,.08);
  --dh-muted: #9aa5b1;
  --dh-grad: linear-gradient(135deg, var(--dh-accent), var(--dh-accent-2));
}

html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
::selection { background: rgba(0,188,140,.35); }
a { text-underline-offset: .18em; }
.text-accent { color: var(--dh-accent) !important; }
.text-muted-2 { color: var(--dh-muted) !important; }

/* ---------- Navbar ---------- */
.site-navbar {
  background: rgba(24,27,31,.88) !important;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--dh-border);
}
.site-navbar .navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .01em; }
.site-navbar .navbar-brand img { width: 36px; height: 36px; }
.site-navbar .nav-link { font-weight: 600; color: rgba(255,255,255,.72); position: relative; }
.site-navbar .nav-link:hover, .site-navbar .nav-link:focus { color: #fff; }
.site-navbar .nav-link.active { color: #fff; }
@media (min-width: 992px) {
  .site-navbar .nav-link.active::after {
    content: ""; position: absolute; left: .5rem; right: .5rem; bottom: -.15rem; height: 2px;
    border-radius: 2px; background: var(--dh-grad);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 4rem 0 7rem;
  background:
    url("../img/hero-topo.svg") center / cover no-repeat,
    radial-gradient(ellipse at 85% 10%, rgba(52,152,219,.18), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(0,188,140,.14), transparent 55%),
    #1a1d21;
  border-bottom: 0;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px;
  background: url("../img/hero-profile.svg") bottom center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.hero .lead { color: #c9d1d9; max-width: 44rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dh-accent);
}
.hero .breadcrumb { --bs-breadcrumb-bg: transparent; --bs-breadcrumb-padding-x: 0; --bs-breadcrumb-padding-y: 0; --bs-breadcrumb-divider-color: rgba(255,255,255,.4); margin-bottom: .75rem; font-size: .85rem; }
.hero .breadcrumb a { color: var(--dh-muted); text-decoration: none; }
.hero .breadcrumb a:hover { color: #fff; }
.hero-sm { padding: 3rem 0 6rem; }

.portrait-ring {
  width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; padding: 5px;
  background: var(--dh-grad); box-shadow: 0 20px 50px rgba(0,0,0,.45);
  margin-inline: auto;
}
.portrait-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid #1a1d21; }

.btn-accent {
  --bs-btn-color: #fff; --bs-btn-bg: var(--dh-accent); --bs-btn-border-color: var(--dh-accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #00a57b; --bs-btn-hover-border-color: #00a57b;
  --bs-btn-active-bg: #009470; --bs-btn-active-border-color: #009470;
  font-weight: 700;
}
.btn-ghost {
  --bs-btn-color: #e9ecef; --bs-btn-border-color: rgba(255,255,255,.25);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255,255,255,.08); --bs-btn-hover-border-color: rgba(255,255,255,.45);
  font-weight: 600;
}

.stat { border-left: 2px solid var(--dh-accent); padding-left: .9rem; }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 900; color: #fff; }
.stat span { font-size: .85rem; color: var(--dh-muted); }

/* ---------- Sections & cards ---------- */
.section { padding: 4rem 0; }
.section + .section { padding-top: 1rem; }
.section-title { font-weight: 900; letter-spacing: -.01em; margin-bottom: .35rem; }
.section-intro { color: var(--dh-muted); max-width: 46rem; margin-bottom: 2rem; }

.panel {
  background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}
.tile {
  background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 1rem;
  padding: 1.5rem; height: 100%; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.tile, .tile-link { color: inherit; text-decoration: none; display: block; }
a.tile:hover, a.tile:focus-visible { transform: translateY(-4px); border-color: rgba(0,188,140,.45); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.tile-icon {
  width: 3rem; height: 3rem; border-radius: .8rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff; background: var(--dh-grad); margin-bottom: 1rem;
}
.tile h3 { font-size: 1.15rem; font-weight: 700; }
.tile p { color: var(--dh-muted); margin-bottom: 0; }

.photo-card {
  position: relative; display: block; border-radius: 1rem; overflow: hidden; border: 1px solid var(--dh-border);
  background: #111; color: #fff; text-decoration: none; aspect-ratio: 16 / 10;
}
.photo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.photo-card:hover img { transform: scale(1.04); }
.photo-card .photo-caption {
  position: absolute; inset: auto 0 0 0; padding: 1.25rem; background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.photo-card .photo-caption h3 { margin: 0; font-weight: 900; font-size: 1.4rem; }
.photo-card .photo-caption p { margin: .25rem 0 0; color: #d0d7de; font-size: .92rem; }

.badge-skill {
  display: inline-block; padding: .4rem .75rem; margin: 0 .35rem .5rem 0; border-radius: 2rem;
  background: rgba(0,188,140,.1); border: 1px solid rgba(0,188,140,.3); color: #c8f2e6; font-size: .85rem; font-weight: 600;
}

/* Featured project */
.feature-project { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 992px) { .feature-project { grid-template-columns: 4fr 8fr; } }
.feature-project img { width: 100%; max-width: 300px; border-radius: 1rem; box-shadow: 0 20px 50px rgba(0,0,0,.5); display: block; margin-inline: auto; transform: rotate(-2deg); }
.platforms { display: flex; flex-wrap: wrap; gap: .5rem; }
.platforms span { background: var(--dh-surface-2); border: 1px solid var(--dh-border); border-radius: .5rem; padding: .35rem .7rem; font-size: .85rem; }
.platforms i { color: var(--dh-accent); margin-right: .35rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; margin: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(var(--dh-accent), var(--dh-accent-2), transparent); }
.timeline > li { position: relative; padding-bottom: 2rem; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -2rem; top: .35rem; width: 1rem; height: 1rem; border-radius: 50%;
  background: #222; border: 3px solid var(--dh-accent); box-shadow: 0 0 0 4px rgba(0,188,140,.12);
}
.timeline .when { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dh-accent); }
.timeline h3 { font-size: 1.2rem; font-weight: 700; margin: .2rem 0 .1rem; }
.timeline .where { color: var(--dh-muted); margin-bottom: .6rem; }
.timeline ul { color: #ced4da; padding-left: 1.1rem; }
.timeline ul li { margin-bottom: .3rem; }
.role { border-left: 1px dashed rgba(255,255,255,.15); padding-left: 1rem; margin-top: 1rem; }
.role h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: .1rem; }
.role .when { font-size: .75rem; }

/* ---------- Discipline blocks (cycling) ---------- */
.discipline { padding: 3rem 0; border-top: 1px solid var(--dh-border); }
.discipline:first-of-type { border-top: 0; }
.discipline h2 { font-weight: 900; }
.org-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery a { display: block; border-radius: .75rem; overflow: hidden; border: 1px solid var(--dh-border); aspect-ratio: 4 / 3; background: #111; }
.gallery a.tall { aspect-ratio: 3 / 4; }
.gallery a:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 992px) { .gallery a:only-child { max-width: 560px; } }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.gallery a:hover img { transform: scale(1.05); }
.gallery a:focus-visible { outline: 2px solid var(--dh-accent); outline-offset: 2px; }
.lightbox .modal-content { background: transparent; border: 0; }
.lightbox img { max-height: 85vh; width: auto; max-width: 100%; margin-inline: auto; display: block; border-radius: .5rem; }
.lightbox .btn-close { position: absolute; top: -2.5rem; right: 0; }
.lightbox figcaption { text-align: center; color: #ced4da; margin-top: .75rem; }

/* ---------- Encoder tool ---------- */
.tool-card { background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 1rem; }
.tool-card .card-header { background: transparent; border-bottom: 1px solid var(--dh-border); font-weight: 700; }
.hash-output { font-family: SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.selftest .badge { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #181b1f; border-top: 1px solid var(--dh-border); padding: 2.5rem 0 1.5rem; color: var(--dh-muted); font-size: .92rem; flex-shrink: 0; }
.site-footer a { color: #ced4da; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.05rem; }
.site-footer .footer-brand img { width: 32px; height: 32px; }
.site-footer .social a { font-size: 1.25rem; margin-left: .9rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-navbar, .site-footer, .hero::after { display: none !important; }
  .hero { background: none !important; padding: 0 0 1rem; }
  body { background: #fff; color: #000; }
  .panel, .tile { border-color: #ccc; background: #fff; }
}
