/* ================================================================
   fleshman.dev — Terminal Dark
   ================================================================ */

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

:root {
  --bg:           #0d0f14;
  --surface:      #131720;
  --surface2:     #1a2030;
  --border:       #1e2535;
  --border-light: #263045;
  --text:         #b0bec8;
  --text-dim:     #556070;
  --text-bright:  #e8edf2;
  --accent:       #4fc3f7;
  --accent-green: #80cfa9;
  --accent-dim:   rgba(79, 195, 247, 0.08);

  --font-mono: "SFMono-Regular", "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 860px;
  --radius: 4px;
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ================================================================
   Navigation
   ================================================================ */
nav {
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(13, 15, 20, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-bright);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .prompt { color: var(--accent-green); }
.nav-brand .cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 0.35rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-color: var(--border-light);
  background: var(--surface);
  text-decoration: none;
}
.nav-links a.active { color: var(--accent-green); }

/* ================================================================
   Layout
   ================================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ================================================================
   Section dividers
   ================================================================ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-divider .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ================================================================
   Hero (index page)
   ================================================================ */
.hero {
  padding: 5rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 148px;
  gap: 3.5rem;
  align-items: start;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}
.terminal-bar .dots {
  display: flex;
  gap: 5px;
}
.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red   { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-bar .filename { margin-left: 0.25rem; }

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.hero h1 .rank { color: var(--text-dim); }
.hero h1 .hl { color: var(--accent); }

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.9;
}
.hero-meta .kw { color: var(--accent-green); }
.hero-meta .val { color: var(--text); }

.hero-bio p {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 0.9rem;
  max-width: 520px;
}
.hero-bio p:last-child { margin-bottom: 0; }

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo-placeholder {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-dim);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.link-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}

/* ================================================================
   Publication list
   ================================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 1.5rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }

.pub-meta { padding-top: 0.1rem; }
.pub-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  display: block;
  margin-bottom: 0.3rem;
}
.pub-venue {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  white-space: nowrap;
}

.pub-title {
  font-size: 0.95rem;
  color: var(--text-bright);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}
.pub-title a {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.pub-title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.pub-authors {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.pub-authors strong {
  color: var(--text);
  font-weight: 500;
}

/* ================================================================
   Award list
   ================================================================ */
.award-list { display: flex; flex-direction: column; }

.award-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 1.5rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border);
}
.award-item:last-child { border-bottom: none; }

.award-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  padding-top: 0.15rem;
}
.award-title {
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.award-org {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  margin-bottom: 0.4rem;
}
.award-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ================================================================
   Page header (used on publications / awards pages)
   ================================================================ */
.page-header {
  padding: 4rem 0 3rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.page-header .subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.page-header .subtitle .hl { color: var(--accent-green); }

/* ================================================================
   "View all" link
   ================================================================ */
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1.25rem;
  transition: color 0.15s;
}
.view-all:hover {
  color: var(--accent);
  text-decoration: none;
}
.view-all::after { content: ' →'; }

/* ================================================================
   Education list
   ================================================================ */
.edu-list { display: flex; flex-direction: column; }

.edu-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  padding-top: 0.15rem;
}

.edu-degree {
  font-size: 0.95rem;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}
.edu-institution {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.edu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.1rem;
}
.edu-detail {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-dim);
}
.edu-detail .kw {
  color: var(--accent-green);
  margin-right: 0.5rem;
}
.edu-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-top: 0.3rem;
  width: fit-content;
}
.edu-tag--active {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(79, 195, 247, 0.2);
}

/* ================================================================
   Footer
   ================================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-cmd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-cmd .prompt { color: var(--accent-green); }
.footer-cmd .val { color: var(--text); }
.footer-right {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 640px) {
  /* Nav wraps to two rows so links don't overflow on small phones */
  nav {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.4rem 0;
  }
  .nav-links {
    width: 100%;
    gap: 0.15rem;
    flex-wrap: wrap;
  }
  .nav-links a {
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem;
  }

  .container { padding: 0 1.25rem; }

  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-grid .hero-photo {
    order: -1;
    width: 100px;
    height: 100px;
    justify-self: center;
  }
  .hero h1 { font-size: 2rem; }

  /* Larger touch targets */
  .link-chip { padding: 0.5rem 0.875rem; }
  .view-all { padding: 0.5rem 0; margin-top: 0.75rem; }

  .pub-item,
  .award-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .pub-meta,
  .award-year { display: flex; gap: 0.5rem; align-items: center; }

  .edu-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .edu-year { display: inline-block; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}
