/* SeaShells theme — Guojun Chen homepage
   Inspired by jonn.me: monospace, dark teal, warm sand text. */
:root {
  --bg:        #081414;
  --fg:        #DEB88D;
  --heading:   #FFE4CE;
  --accent:    #FCA02F;
  --hover:     #68D4F1;
  --muted:     #50A3B5;
  --card-bg:   #17384D;
  --border:    rgba(80, 163, 181, 0.35);
  --selection: #1E4862;
}

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

::selection { background: var(--selection); color: var(--heading); }

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--hover); }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 32px 96px;
}

/* Top nav */
.topnav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 12px 0 8px;
}
.topnav a { color: var(--muted); font-size: 0.85rem; }
.topnav a:hover { color: var(--hover); }
.topnav a::before { content: "#"; color: var(--card-bg); margin-right: 2px; }

/* Neofetch-style header */
.nf {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  padding: 48px 0 16px;
}
.nf-info { min-width: 0; }
.nf-title {
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nf-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.nf-sep { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.nf-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  margin-bottom: 3px;
  font-size: 0.9rem;
}
.nf-key { color: var(--accent); }
.nf-val { color: var(--fg); }

/* Sections */
section { padding: 44px 0 4px; }
.section-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}
.section-title::before { content: "~/"; color: var(--muted); }
.section-rule { border: none; border-top: 1px solid var(--border); margin: 10px 0 22px; }
.section-intro { font-size: 0.9rem; margin-bottom: 20px; color: var(--fg); }

/* Publications */
#publication { list-style: none; }
#publication li {
  padding: 14px 0;
  border-bottom: 1px solid var(--card-bg);
  font-size: 0.9rem;
}
#publication li:last-child { border-bottom: none; }
.pub-title {
  color: var(--heading);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}
a.pub-title:hover { color: var(--hover); }
.pub-meta { color: var(--muted); }
.pub-authors { color: var(--fg); }
.pub-award { color: var(--accent); font-weight: 700; }
#publication u {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

/* Projects */
#project { list-style: none; }
.project {
  padding: 22px 0;
  border-bottom: 1px solid var(--card-bg);
}
.project:last-child { border-bottom: none; }
.project img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--muted);
  border-radius: 8px;
  padding: 5px;
  margin-bottom: 14px;
  display: block;
}
.project h3 {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.project p { font-size: 0.9rem; margin-bottom: 10px; }
.project .link { color: var(--accent); font-size: 0.85rem; }
.project .link:hover { color: var(--hover); }

/* Educations */
#education { list-style: none; font-size: 0.9rem; }
#education li {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 18px;
  padding: 7px 0;
}
#education .yr { color: var(--muted); white-space: nowrap; }

/* Others */
.others-grid { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.others-grid figure { width: 160px; font-size: 0.8rem; }
.others-grid img {
  width: 100%;
  height: auto;
  border: 1px solid var(--muted);
  border-radius: 6px;
  padding: 4px;
  display: block;
  margin-bottom: 8px;
}
.others-grid figcaption { color: var(--fg); }
.others-grid a:hover figcaption { color: var(--hover); }
.others-more { margin-top: 22px; font-size: 0.9rem; }
.others-more a { color: var(--accent); }
.others-more a:hover { color: var(--hover); }

/* Footer */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 48px 0 0;
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  .wrap { padding: 20px 20px 72px; }
  #education li { grid-template-columns: 1fr; gap: 2px; }
}
