/* --- Pink Panther --- */
/* Inspiration: https://terminalcss.xyz */
@import url('https://cdn.staticdelivr.com/gfonts/css2?family=Fira+Code:wght@300..700&display=swap');

:root {
  --background: #1a170f;
  --foreground: #eceae5;
  --accent: #ee82cf;
  --muted: rgba(236, 234, 229, 0.4);
  --page-width: 900px;
  --line-height: 1.6;
}

/* ─── Reset ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Fira Code", "JetBrains Mono", monospace;
  font-size: 16px;
  line-height: var(--line-height);
  background-color: var(--background);
  color: var(--foreground);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Links ─── */
a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
a:hover {
  background-color: var(--accent);
  color: var(--background);
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}
h1 { font-size: 2rem; }
h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px dashed rgba(238, 130, 207, 0.35);
  padding-bottom: 0.4rem;
}
h3 { font-size: 1rem; margin-top: 0; }
p  { margin-bottom: 1.5rem; }

hr {
  border: 0;
  border-bottom: 1px dashed rgba(238, 130, 207, 0.35);
  margin: 2rem 0;
}

/* ─── Layout Wrapper ─── */
.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────────────────
   Two-tier TUI layout:
   Tier 1  .header-title  → site title (left) + search btn (right)
   Tier 2  .site-nav      → navigation links
─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--background);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Tier 1 */
.header-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 2rem;
  border-bottom: 1px dashed rgba(238, 130, 207, 0.2);
}

.header-title a {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--foreground);
}

/* ~/  prefix via CSS — no markup change needed */
.header-title a::before {
  content: "~/";
  color: var(--accent);
  font-weight: 400;
}

.header-title a:hover {
  background: transparent;
  color: var(--accent);
}

/* Search toggle button */
#search-toggle {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, color 0.15s;
}

#search-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#search-toggle kbd {
  font-family: inherit;
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--muted);
  padding: 0 4px;
  border-radius: 0;
}

/* Tier 2 — nav links */
.site-nav {
  display: flex;
  padding: 0.35rem 2rem;
  gap: 0;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 2px 16px 2px 0;
  position: relative;
  transition: color 0.15s;
}

.site-nav a::before {
  content: "./";
  color: var(--accent);
  opacity: 0.5;
  transition: opacity 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  background: transparent;
  color: var(--foreground);
}

.site-nav a:hover::before,
.site-nav a.active::before {
  opacity: 1;
}

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

/* Underline indicator for active page */
.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -0.35rem;
  left: 0;
  right: 16px;
  height: 2px;
  background: var(--accent);
}

/* ─── Search Dropdown ─── */
#search-wrapper {
  background: var(--background);
  overflow: hidden;
  max-height: 450px;
  /* transition: max-height 0.2s steps(5); */
  transition: all 0.5s linear;
  border-bottom: 2px solid var(--accent);
}

#search-wrapper.hidden {
  max-height: 0;
  border-bottom: none;
  opacity: 0;
}

.search-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

#search-input {
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: transparent;
  color: var(--foreground);
  border: 2px solid var(--foreground);
  border-radius: 0;
  outline: none;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
}

/* Search results */
#search-results {
  margin-top: 10px;
  border: 2px solid var(--accent);
  background: var(--background);
  max-height: 300px;
  overflow-y: auto;
}

#search-results:empty { display: none; }

.result-item { border-bottom: 1px dashed var(--muted); }
.result-item:last-child { border-bottom: none; }

.result-item a {
  display: block;
  padding: 10px;
  color: var(--foreground);
}

.result-item a:hover {
  background: var(--accent);
  color: var(--background);
}

.result-item h3 { margin: 0; font-size: 0.95rem; color: inherit; }

.result-item .badge {
  font-size: 0.72rem;
  border: 1px solid currentColor;
  padding: 1px 5px;
  margin-right: 8px;
  text-transform: uppercase;
}

/* ─── Main Content ─── */
.site-content {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* ─── Intro / Hero section (index page) ─── */
.intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px dashed rgba(236, 234, 229, 0.15);
}

/* h1 in intro — big, foreground white, tight */
.intro h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
  line-height: 1.2;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Wrap your name in <span class="hl">Name</span> in index.md */
.intro h1 .hl,
.hl {
  color: var(--accent);
}

/* Bold subtitle line (rendered as <strong> or <b> in markdown) */
.intro > p:first-of-type strong,
.intro > p:first-of-type b {
  color: var(--foreground);
  font-weight: 700;
}

/* Body paragraphs in intro slightly muted */
.intro p {
  color: rgba(236, 234, 229, 0.75);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Hero tag pills */
.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 1.25rem 0 0;
  border-top: none;
}

.hero-tags li {
  display: inline-block;
  width: auto;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  /* reset any grid/list bleed */
  grid-column: unset;
  background: transparent;
}

.hero-tags li:hover { background: transparent; }

/* ─── Project Cards (index.j2 grid) ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0 2.5rem;
}

.card {
  border: 1px solid rgba(236, 234, 229, 0.2);
  padding: 1.25rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.1s;
}

/* Animated accent bar — expands on hover */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 5px 5px 0 var(--accent);
  transform: translate(-2px, -2px);
}

.card:hover::before { width: calc(100% + 1px); }

.card h3 { margin: 0; font-size: 1rem; }

.card h3 a { color: var(--foreground); }
.card h3 a:hover { background: transparent; color: var(--accent); }

.card > p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

/* Tags inside cards */
.card .tags {
  margin: 0 !important;
  padding: 0.5rem 0 0;
  border-top: 1px dashed rgba(236, 234, 229, 0.12);
}

/* ─── Blog Post List (index.j2 & tag.j2) ─── */
/*
  Markup: <ul> → <li> → <span.date> + <a>
*/
.site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(236, 234, 229, 0.15);
}

.site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) > li {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed rgba(236, 234, 229, 0.12);
  transition: background 0.1s, padding-left 0.1s;
}

.site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) > li:hover {
  background: rgba(238, 130, 207, 0.05);
  padding-left: 6px;
}

.site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) > li a {
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.92rem;
}

.site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) > li a:hover {
  background: transparent;
  color: var(--accent);
}

/* ─── Date ─── */
.date {
  font-size: 0.8rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Tags (pill list) ─── */
.tags {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 1rem 0;
}

.tags li a {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tags li a:hover {
  background: var(--accent);
  color: var(--background);
}

/* ─── Meta Box (post.j2) ─── */
.meta-box {
  border: 1px dashed rgba(236, 234, 229, 0.25);
  padding: 10px 14px;
  margin-bottom: 2rem;
  font-size: 0.88rem;
}

.meta-box p { margin: 0 0 0.25rem; }
.meta-box p:last-child { margin: 0; }
.meta-box strong { color: var(--accent); }

.tags-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tags-container .tags { margin: 0; }

/* ─── About page ─── */
.about { max-width: 680px; }
.about h2 { margin-top: 0; }
.about h3 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--foreground);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(238, 130, 207, 0.25);
  padding-bottom: 0.35rem;
}

.subtitle {
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.75rem;
  padding: 3px 0;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

/* About page prose */
.about p {
  color: rgba(236, 234, 229, 0.8);
  font-size: 0.93rem;
  line-height: 1.8;
}

/* Experience / bullet list in about */
.about ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about ul li {
  display: block !important;
  grid-template-columns: unset !important;
  padding: 0.9rem 0 0.9rem 1rem !important;
  border-bottom: 1px dashed rgba(236, 234, 229, 0.1) !important;
  border-left: 2px solid rgba(238, 130, 207, 0.2);
  margin-bottom: 0;
  font-size: 0.9rem;
  color: rgba(236, 234, 229, 0.75);
  line-height: 1.7;
  transition: border-left-color 0.15s;
}

.about ul li:hover {
  background: rgba(238, 130, 207, 0.03) !important;
  border-left-color: var(--accent);
  padding-left: 1rem !important;
}

.about ul li strong {
  display: block;
  color: var(--foreground);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

/* ─── Project single page (project.j2) ─── */
.stack, .links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.stack li {
  border: 1px solid rgba(236, 234, 229, 0.2);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 2px 10px;
  text-transform: uppercase;
}

.links li a {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 2px 10px;
  text-transform: uppercase;
}

.links li a:hover {
  background: var(--accent);
  color: var(--background);
}

.description {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

/* ─── Code ─── */
pre {
  background: #15130b !important;
  border: 1px solid rgba(236, 234, 229, 0.15);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

:not(pre) > code {
  background: #2a251a;
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid rgba(236, 234, 229, 0.15);
  font-size: 0.88em;
}

/* ─── Images ─── */
img {
  max-width: 100%;
  border: 2px solid rgba(236, 234, 229, 0.2);
  padding: 4px;
}

/* ─── Terminal Utilities ─── */
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: bold;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Terminal prompt line — user@host:~$ */
.terminal-cmd {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.t-user  { color: var(--accent); font-weight: 600; }
.t-at    { color: var(--muted); }
.t-host  { color: var(--foreground); opacity: 0.65; }
.t-prompt { color: var(--accent); margin-left: 1px; }

/* ─── Status Bar ─── */
.status-bar {
  background: var(--accent);
  color: var(--background);
  padding: 4px 1.5rem;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* ─── Footer ─── */
.site-footer {
  text-align: center;
  padding: 0.65rem 1rem;
  border-top: none;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.site-footer p::before {
  content: "> ";
  color: var(--accent);
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  background: transparent;
  text-decoration: underline;
}

/* ─── Responsive ─── */
@media (max-width: 680px) {
  .header-title { padding: 0.55rem 1rem; }
  .site-nav      { padding: 0.35rem 1rem; flex-wrap: wrap; }
  .search-inner  { padding: 0.75rem 1rem; }
  .site-content  { padding: 2rem 1rem; }

  h1 { font-size: 1.6rem; }

  .site-content ul:not(.tags):not(.stack):not(.links):not(.hero-tags) > li {
    grid-template-columns: 90px 1fr;
  }

  .grid { grid-template-columns: 1fr; }
}

/* --- PDF Resume Viewer --- */
.resume-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.resume-actions h1 {
  margin: 0;
}

.download-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.download-btn:hover {
  opacity: 0.8;
  text-decoration: none;
}

.pdf-container {
  width: 100%;
  height: 75vh; /* Takes up most of the viewport */
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background-color: #1a1a1a;
}

.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
  color: var(--fg-muted);
}

/* ─── Contact page ─── */
.contact { max-width: 620px; }

.contact h1 {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Each section heading — e.g. ## Online, ## Email */
.contact-body h2 {
  margin-top: 2rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: none;
  padding-bottom: 0;
}

/* Contact entry list */
.contact-body ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  border-top: none;
  display: flex;
  flex-direction: column;
}

.contact-body ul li {
  display: grid !important;
  grid-template-columns: 120px 1fr !important;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0 !important;
  border-bottom: 1px dashed rgba(236, 234, 229, 0.1) !important;
  border-left: none !important;
  font-size: 0.9rem;
  transition: background 0.1s, padding-left 0.1s;
}

.contact-body ul li:hover {
  background: rgba(238, 130, 207, 0.04) !important;
  padding-left: 6px !important;
  border-left: none !important;
}

/* The label (bold part before the link/value) */
.contact-body ul li strong {
  display: inline !important;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Links inside contact entries */
.contact-body ul li a {
  color: var(--foreground);
  font-weight: 400;
}

.contact-body ul li a:hover {
  background: transparent;
  color: var(--accent);
}

/* ─── Responsive ─── */
@media (max-width: 680px) {
  .header-title {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }
  .header-title a    { grid-column: 1; }
  #search-toggle     { grid-column: 2; justify-self: end; }
  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(238, 130, 207, 0.15);
  }
  .search-inner  { padding: 0.75rem 1rem; }
  .site-content  { padding: 2rem 1rem; }

  h1 { font-size: 1.6rem; }

  .post-list > li {
    grid-template-columns: 90px 1fr;
  }

  .grid { grid-template-columns: 1fr; }
}

em {
  margin: 1px;
}