:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --surface: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.1);
  --radius: 10px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 45%);
  color: var(--text);
  line-height: 1.6;
}

/* Layout */

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.95), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.brand-mark {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.brand-name {
  letter-spacing: 0.03em;
}

.nav a {
  margin-left: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.nav a.is-active {
  color: var(--accent);
}

/* Hero */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.hero-tagline {
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */

.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.btn {
  background: var(--accent);
  color: #020617;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn:hover,
.btn-outline:hover {
  transform: translateY(-1px);
}

/* Sections */

.section {
  padding: 3rem 0;
}

.section-alt {
  background: radial-gradient(circle at top right, #111827 0, #020617 65%);
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.section-intro {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 32rem;
}

/* Grid */

.grid {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Cards */

.card {
  background: linear-gradient(135deg, #020617, #020617 50%, #020617 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem 1.1rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.card-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.card p {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
}

.details {
  position: relative;
  z-index: 1;
  margin: 0.6rem 0 0.9rem;
  padding-left: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.details li + li {
  margin-top: 0.25rem;
}

.card-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.card-links a {
  color: var(--accent);
  text-decoration: none;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.55);
  backdrop-filter: blur(10px);
}

.card-links a:hover {
  border-color: var(--accent);
}

/* Skills */

.skills-grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.skills-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.skills-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.skills-grid li + li {
  margin-top: 0.15rem;
}

/* Contact */

.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.contact-list li + li {
  margin-top: 0.25rem;
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* PDF Thumbnail Preview */

.pdf-thumbnail {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.pdf-thumbnail canvas {
  display: none;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pdf-thumbnail-loading {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Image Thumbnail Preview */

.img-thumbnail {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Coming Soon Badge */

.card-coming-soon {
  opacity: 0.7;
}

.coming-soon-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(148, 163, 184, 0.2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  z-index: 2;
}

.hero-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap; /* so it doesn't break on small screens */
}

.hero-headshot {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-text h1 {
  margin-bottom: 0.35rem;
}

/* Optional: stack nicely on very small screens */
@media (max-width: 600px) {
  .hero-profile {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Gallery Page */

.gallery-page .hero {
  padding: 3.5rem 0 2rem;
}

.gallery-controls {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.control-input,
.control-select {
  appearance: none;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  min-width: 180px;
}

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

.filter-group button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.filter-group button.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

.gallery-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.gallery-grid {
  margin-top: 1.5rem;
  column-gap: 1.25rem;
  columns: 1;
}

@media (min-width: 720px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (min-width: 1100px) {
  .gallery-grid {
    columns: 3;
  }
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.5);
}

.gallery-preview {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.gallery-preview img,
.gallery-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.gallery-caption {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.gallery-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.gallery-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.gallery-actions {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.gallery-actions a {
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.gallery-empty {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  width: min(1100px, 95vw);
  max-height: 90vh;
  background: #0b1020;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  padding: 1rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lightbox-title {
  margin: 0;
  font-size: 1rem;
}

.lightbox-close {
  border: none;
  background: rgba(148, 163, 184, 0.2);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.lightbox-body img,
.lightbox-body iframe {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #020617;
}
