/* ========================================
   AWOO SHARK -- TERMINAL THEME
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

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

:root {
  --bg-deep:    #0a0e17;
  --bg-panel:   #0d1220;
  --bg-card:    #111827;
  --bg-hover:   #1a2332;
  --border:     #1e3a5f;
  --border-dim: #152238;
  --cyan:       #00d4ff;
  --blue:       #2563eb;
  --blue-dim:   #1d4ed8;
  --text:       #c9d1d9;
  --text-dim:   #5c6a7a;
  --text-bright:#e6edf3;
  --accent:     #00d4ff;
  --green:      #00ff9d;
  --red:        #ff3e3e;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Noto Sans SC', monospace;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--cyan);
  color: var(--bg-deep);
}

/* ---- SCANLINE OVERLAY ---- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ---- TOP BAR ---- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  font-size: 13px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  color: var(--cyan);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.topbar-separator {
  color: var(--border);
}

.topbar-status {
  color: var(--green);
  font-size: 11px;
  letter-spacing: 1px;
}

.topbar-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle;
}

.topbar-right {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 1px;
}

/* ---- NAV TABS ---- */
.nav {
  position: fixed;
  top: 48px; left: 0; right: 0;
  height: 42px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: stretch;
  padding: 0 24px;
  z-index: 999;
  gap: 0;
}

.nav-tab {
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  text-transform: uppercase;
  user-select: none;
  font-family: 'JetBrains Mono', monospace;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.nav-tab .tab-index {
  color: var(--text-dim);
  margin-right: 6px;
  font-size: 10px;
}

/* ---- MAIN CONTENT ---- */
.main {
  margin-top: 90px;
  padding: 40px 24px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- HOME PAGE ---- */
.hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.hero-avatar-wrap {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 3px;
  position: relative;
}

.hero-avatar-wrap::before {
  content: 'PROFILE.IMG';
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.hero-avatar {
  width: 100%;
  display: block;
}

.hero-info {
  padding-top: 8px;
}

.hero-name {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 3px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.hero-name-cn {
  font-size: 18px;
  color: var(--cyan);
  letter-spacing: 4px;
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
  letter-spacing: 1px;
}

.hero-tagline::before {
  content: '> ';
  color: var(--cyan);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-box {
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  padding: 16px;
}

.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
}

.stat-value.text-val {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 400;
}

/* ---- BIO SECTION ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  margin-top: 48px;
}

.page > .section-header:first-child {
  margin-top: 0;
}

.section-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

.bio-block {
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  padding: 32px;
  font-size: 14px;
  line-height: 2;
  color: var(--text);
}

.bio-block p {
  margin-bottom: 16px;
}

.bio-block p:last-child {
  margin-bottom: 0;
}

.bio-block .highlight {
  color: var(--cyan);
  font-weight: 500;
}

.bio-block .cmd {
  color: var(--green);
}

.bio-block .comment {
  color: var(--text-dim);
}

.bio-block .mem-frag {
  color: #161f2e;
  font-size: 11px;
  margin-bottom: 0;
  transition: color 0.8s;
  cursor: default;
  user-select: none;
}

.bio-block .mem-frag:hover {
  color: #2a3548;
  user-select: text;
}

/* ---- SKILLS ---- */
.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.skill-item {
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.skill-icon {
  color: var(--cyan);
  font-size: 11px;
  padding-top: 2px;
  white-space: nowrap;
}

.skill-name {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 500;
  margin-bottom: 4px;
}

.skill-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---- HACKATHON PAGE ---- */
.hack-hero {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hack-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--cyan);
}

.hack-badge {
  display: inline-block;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 10px;
  padding: 4px 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hack-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.hack-subtitle {
  font-size: 16px;
  color: var(--cyan);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hack-desc {
  font-size: 13px;
  line-height: 2;
  color: var(--text);
  max-width: 720px;
}

.hack-desc p {
  margin-bottom: 12px;
}

.hack-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.hack-meta-item {
  border: 1px solid var(--border-dim);
  background: var(--bg-panel);
  padding: 20px;
}

.hack-meta-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hack-meta-value {
  font-size: 14px;
  color: var(--text-bright);
  font-weight: 500;
}

/* hack photos */
.hack-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.hack-photo-card {
  border: 1px solid var(--border-dim);
  background: var(--bg-panel);
  padding: 3px;
  position: relative;
  overflow: hidden;
}

.hack-photo-card img {
  width: 100%;
  display: block;
}

.hack-photo-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 14, 23, 0.85);
  padding: 10px 14px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  border-top: 1px solid var(--border-dim);
}

/* ---- TIMELINE ---- */
.timeline {
  border-left: 2px solid var(--border-dim);
  margin-left: 20px;
  padding-left: 32px;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--cyan);
  background: var(--bg-deep);
}

.timeline-time {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.timeline-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
}

/* ---- GALLERY PAGE ---- */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border: 1px solid var(--border-dim);
  background: var(--bg-panel);
  padding: 3px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.gallery-item:hover {
  border-color: var(--cyan);
}

.gallery-item img {
  width: 100%;
  display: block;
}

.gallery-item-label {
  padding: 10px 14px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-dim);
}

.gallery-item-label span {
  color: var(--cyan);
  margin-right: 8px;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 14, 23, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border: 1px solid var(--border);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 2px;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.15s;
  background: none;
  border: none;
}

.lightbox-close:hover {
  color: var(--cyan);
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border-dim);
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 40px;
}

.footer a,
.footer a:visited,
.footer a:active,
.footer a:hover {
  text-decoration: none;
}

.footer a {
  color: var(--cyan);
  transition: color 0.15s;
}

.footer a:hover {
  color: var(--text-bright);
}

.footer .blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---- CURSOR BLINK ---- */
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--cyan);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 4px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-avatar-wrap {
    max-width: 280px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hack-photos {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    columns: 2;
  }
  .hack-hero {
    padding: 28px;
  }
  .nav-tab {
    padding: 0 12px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 1;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
