/* ============================================
   HUNTER THOMAS PORTFOLIO — DARK THEME
   Inspired by ami.ke dark portfolio design
   ============================================ */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0e0e28;
  --bg-card: #12122e;
  --bg-card-hover: #18183e;
  --accent: #e94560;
  --accent-hover: #ff6b81;
  --accent-glow: rgba(233, 69, 96, 0.15);
  --text-primary: #e0e0e0;
  --text-heading: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.25);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE ===== */
body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  overflow-x: hidden;
}

.quarto-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display) !important;
  color: var(--text-heading) !important;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-weight: 800; }

h2 {
  font-weight: 700;
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

strong {
  color: var(--text-heading);
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 0.75rem 0 !important;
  backdrop-filter: blur(20px);
}

.navbar-brand {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  color: var(--text-heading) !important;
  letter-spacing: -0.02em;
}

.navbar-nav {
  margin: 0 auto;
  justify-content: center;
  gap: 0.25rem;
}

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-heading) !important;
}

.navbar-nav .nav-link.active {
  position: relative;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem !important;
}

.dropdown-item {
  color: var(--text-secondary) !important;
  border-radius: 6px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.9rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-heading) !important;
}

/* ===== HOMEPAGE HERO ===== */
.dark-hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2rem;
}

.hero-watermark {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(8rem, 18vw, 22rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  line-height: 1;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  gap: 2rem;
}

.hero-left {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex: 1;
}

.hero-socials {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  transition: all var(--transition);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateY(-2px);
  text-decoration: none !important;
  background: rgba(233, 69, 96, 0.08);
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  margin-bottom: 1.25rem !important;
  letter-spacing: -0.03em;
}

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

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 460px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border: 2px solid var(--text-heading);
  color: var(--text-heading) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--transition);
  border-radius: 4px;
}

.btn-hero-primary:hover {
  background: var(--text-heading);
  color: var(--bg-primary) !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.btn-hero-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 1rem;
  text-decoration: none !important;
  transition: all var(--transition);
  box-shadow: 0 0 25px var(--accent-glow);
  padding-left: 3px;
}

.btn-hero-play:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(233, 69, 96, 0.35);
  text-decoration: none !important;
}

.hero-right {
  flex: 0 0 auto;
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  width: clamp(280px, 28vw, 400px);
  height: clamp(340px, 34vw, 480px);
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius) !important;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-primary) 0%, transparent 35%);
  z-index: 1;
  pointer-events: none;
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.content-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.content-section h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 0.75rem;
  border-radius: 2px;
}

main {
  padding: 2rem 0;
  line-height: 1.7;
}

/* ===== PROJECT CARDS ===== */
.g-col-12.g-col-md-6 {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.g-col-12.g-col-md-6::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.g-col-12.g-col-md-6:hover {
  border-color: var(--border-hover) !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.g-col-12.g-col-md-6:hover::before {
  opacity: 1;
}

.g-col-12.g-col-md-6 h3 {
  margin-top: 0;
}

.g-col-12.g-col-md-6 h3 a {
  color: var(--text-heading) !important;
  text-decoration: none !important;
  transition: color var(--transition);
}

.g-col-12.g-col-md-6 h3 a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}

.g-col-12.g-col-md-6 p {
  color: var(--text-secondary);
}

.grid {
  gap: 2rem;
  margin: 2rem 0;
}

/* ===== HERO BANNER (About page) ===== */
.hero-banner {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}

.hero-banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading) !important;
  margin-bottom: 0.5rem;
}

.hero-banner h2 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-secondary) !important;
  margin-bottom: 2rem;
  margin-top: 0;
}

.hero-banner img {
  border: 3px solid rgba(255, 255, 255, 0.08);
}

.hero-banner .btn {
  margin: 0.25rem;
  text-decoration: none;
}

.hero-banner .btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== PROBLEM CARDS ===== */
.problems-intro {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}

.problem-card:hover {
  border-color: var(--border-hover);
  border-left-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.problem-card h3 {
  color: var(--text-heading) !important;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.problem-card h3:first-child {
  margin-top: 0;
}

.problem-card p {
  color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: white !important;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-primary:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-outline-primary {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-outline-primary:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: white !important;
  transform: translateY(-1px);
}

.btn-outline-dark,
.btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--text-heading) !important;
  color: var(--text-heading) !important;
}

/* ===== LINKS ===== */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ===== TABLES ===== */
table {
  margin: 1.5rem 0;
  border-collapse: collapse;
  width: 100%;
}

th, td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color) !important;
  text-align: left;
}

th {
  background: var(--bg-card) !important;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-heading) !important;
  font-size: 0.9rem;
}

td {
  color: var(--text-secondary) !important;
  background: transparent !important;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

.table {
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04) !important;
  --bs-table-border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* ===== CODE BLOCKS ===== */
pre {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

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

/* ===== LISTS ===== */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

li strong {
  color: var(--text-heading);
}

.skills-list {
  list-style: none;
  padding-left: 0;
}

.skills-list li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.skills-list li::before {
  content: "▶";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  top: 3px;
}

/* ===== TITLE BLOCK (project pages) ===== */
.quarto-title-banner {
  padding: 2rem 0;
  text-align: center;
}

.quarto-title-block .quarto-title {
  margin-bottom: 1rem;
  text-align: center;
}

.quarto-title-block .quarto-title h1 {
  text-align: center;
  font-size: 2.25rem;
}

.quarto-title-block .description {
  text-align: center;
  color: var(--text-secondary);
}

.quarto-title-block .quarto-categories {
  justify-content: center;
}

.quarto-title-meta {
  color: var(--text-muted) !important;
}

.quarto-title-meta-heading {
  color: var(--text-muted) !important;
}

.quarto-title-meta-contents {
  color: var(--text-secondary) !important;
}

.quarto-category {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--accent) !important;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

/* ===== TOC SIDEBAR ===== */
#TOC {
  border-left: 1px solid var(--border-color);
  padding-left: 1rem;
}

#TOC h2 {
  font-size: 0.85rem !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted) !important;
  margin-bottom: 1rem;
  font-weight: 600;
}

#TOC .nav-link {
  color: var(--text-secondary) !important;
  padding: 0.3rem 0 !important;
  font-size: 0.85rem;
  border-left: 2px solid transparent;
  padding-left: 0.75rem !important;
  margin-left: -1rem;
  transition: all var(--transition);
}

#TOC .nav-link:hover {
  color: var(--text-primary) !important;
}

#TOC .nav-link.active {
  color: var(--accent) !important;
  border-left-color: var(--accent);
}

.sidebar.margin-sidebar {
  background: transparent !important;
}

/* ===== FOOTER ===== */
.nav-footer {
  background: var(--bg-secondary);
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.nav-footer a {
  color: var(--text-secondary) !important;
}

/* ===== IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.about-image {
  border-radius: 50%;
  max-width: 200px;
  margin: 0 auto 2rem;
  display: block;
}

/* ===== ABOUT PAGE ===== */
.about-contents {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-text {
  animation: fadeInLeft 0.8s ease-out;
}

.hero-socials {
  animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.hero-image-wrapper {
  animation: fadeInRight 0.8s ease-out 0.3s both;
}

.hero-watermark {
  animation: fadeInRight 1.2s ease-out 0.5s both;
}

.problem-card,
.g-col-12.g-col-md-6 {
  animation: fadeInUp 0.6s ease-out both;
}

.g-col-12.g-col-md-6:nth-child(2) { animation-delay: 0.15s; }

.hero-banner {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-left {
    flex-direction: column;
    align-items: center;
  }

  .hero-socials {
    flex-direction: row;
    padding-top: 0;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-right {
    order: -1;
  }

  .hero-image-wrapper {
    width: 250px !important;
    height: 300px !important;
  }

  .hero-image-wrapper::before {
    background: none;
  }

  .hero-watermark {
    display: none;
  }
}

@media (max-width: 768px) {
  .quarto-container {
    padding: 0 15px;
  }

  main {
    padding: 1rem 0;
  }

  .content-section {
    padding: 2rem 1rem;
  }

  .problem-card {
    padding: 1.5rem;
  }

  .g-col-12.g-col-md-6 {
    padding: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .dark-hero {
    min-height: auto;
    padding: 3rem 1rem;
  }

  .hero-image-wrapper {
    width: 200px !important;
    height: 240px !important;
  }

  .hero-text h1 {
    font-size: 2rem !important;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== QUARTO SEARCH ===== */
.aa-DetachedOverlay .aa-Panel,
.aa-DetachedFormContainer {
  background: var(--bg-card) !important;
}

.aa-Input {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(233, 69, 96, 0.3);
  color: var(--text-heading);
}
