@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #21262d;
  --border: #30363d;
  --border-hover: #58a6ff;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --green: #3fb950;
  --blue: #58a6ff;
  --purple: #d2a8ff;
  --yellow: #e3b341;
  --orange: #ffa657;
  --red: #f85149;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}

/* Subtle grid background */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(48, 54, 61, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 54, 61, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAVIGATION ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--green);
  white-space: nowrap;
}

.nav-brand::before {
  content: '~/';
  color: var(--text-dim);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-links a::before { content: './'; color: var(--text-dim); }

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  border-color: rgba(63, 185, 80, 0.35);
  background: rgba(63, 185, 80, 0.08);
}

.nav-links a.nav-secret {
  color: var(--text-dim);
  font-size: 0.68rem;
  padding: 4px 7px;
  opacity: 0.55;
  border-color: transparent;
  background: transparent;
}

.nav-links a.nav-secret::before {
  content: '';
}

.nav-links a.nav-secret:hover,
.nav-links a.nav-secret.active {
  color: var(--purple);
  opacity: 0.85;
  border-color: rgba(210, 168, 255, 0.25);
  background: rgba(210, 168, 255, 0.06);
}

/* ── MAIN ── */
main {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* ── HERO ── */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
}

.hero-photo {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--green);
  box-shadow: 0 0 0 6px rgba(63, 185, 80, 0.1);
  flex-shrink: 0;
}

.hero-text h1 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-family: var(--font-mono);
  color: var(--blue);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.hero-institution {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.4rem; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: #0d1117;
  font-weight: 700;
  border: 1px solid var(--green);
}
.btn-primary:hover { background: #5dbd6a; border-color: #5dbd6a; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(88, 166, 255, 0.4);
}
.btn-outline:hover { background: rgba(88, 166, 255, 0.1); border-color: var(--blue); }

/* ── TERMINAL ── */
.terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.terminal-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red   { background: #f85149; }
.dot-yellow{ background: #e3b341; }
.dot-green { background: #3fb950; }

.terminal-filename { color: var(--text-muted); font-size: 0.78rem; margin-left: 4px; }

.terminal-body { padding: 1.2rem 1.5rem; line-height: 2; }

.prompt  { color: var(--green); }
.cmd     { color: var(--blue); }
.out     { display: block; color: var(--text-muted); padding-left: 2px; }
.out-arr { color: var(--purple); }
.comment { color: var(--text-dim); font-style: italic; }

.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* ── SECTION HEADERS ── */
.section-h {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
}

.section-h h2 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

.section-h h2::before { content: '## '; color: var(--text-dim); }

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--border-hover); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.card h3 { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.3rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.6rem; }

/* ── TAGS ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  border: 1px solid;
}
.tag-blue   { color: var(--blue);   background: rgba(88,166,255,0.1);  border-color: rgba(88,166,255,0.3); }
.tag-green  { color: var(--green);  background: rgba(63,185,80,0.1);   border-color: rgba(63,185,80,0.3); }
.tag-purple { color: var(--purple); background: rgba(210,168,255,0.1); border-color: rgba(210,168,255,0.3); }
.tag-yellow { color: var(--yellow); background: rgba(227,179,65,0.1);  border-color: rgba(227,179,65,0.3); }
.tag-orange { color: var(--orange); background: rgba(255,166,87,0.1);  border-color: rgba(255,166,87,0.3); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), transparent);
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 0.8rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 1.5rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(63, 185, 80, 0.3);
}

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.skill-item { margin-bottom: 0.85rem; }
.skill-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skill-name  { color: var(--text); }
.skill-level { color: var(--text-dim); }
.skill-track {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.skill-fill         { height: 100%; border-radius: 3px; background: linear-gradient(to right, var(--green), #5dbd6a); }
.skill-fill.blue    { background: linear-gradient(to right, var(--blue), #82bcff); }
.skill-fill.purple  { background: linear-gradient(to right, var(--purple), #e0c4ff); }

.tools-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── PAPER CARDS ── */
.paper-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
}
.paper-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.3); border-color: var(--purple); }
.paper-title  { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.35rem; line-height: 1.4; }
.paper-authors{ color: var(--text-muted); font-size: 0.86rem; margin-bottom: 0.5rem; }
.paper-abstract{ color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ── FEATURED PAPER CARD ── */
.paper-card-featured {
  border-left-width: 4px;
  padding: 1.5rem 1.7rem;
}

.paper-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(210, 168, 255, 0.25), transparent);
  margin: 1rem 0;
}

.paper-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.paper-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
}

.paper-findings { }

.paper-findings-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.paper-findings-label::before { content: '## '; color: var(--border); }

.paper-findings ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.paper-findings li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.paper-findings li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.paper-links {
  display: flex;
  gap: 8px;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  opacity: 0.6;
  cursor: default;
}

.btn-cv {
  background: transparent;
  color: var(--yellow);
  border: 1px solid rgba(227,179,65,0.4);
}
.btn-cv:hover { background: rgba(227,179,65,0.1); border-color: var(--yellow); }

.paper-git {
  margin-top: 1.1rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.9;
}

.paper-venue {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.paper-venue::before { content: '//'; color: var(--border); }

/* ── DISTINCTIONS ── */
.distinction-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.distinction-item:last-child { border-bottom: none; }
.distinction-year { font-family: var(--font-mono); color: var(--yellow); font-size: 0.82rem; flex-shrink: 0; }

/* ── REFERENCES ── */
.ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.ref-card h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.3rem; }
.ref-card p  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.4rem; }
.ref-card a  { color: var(--blue); font-family: var(--font-mono); font-size: 0.76rem; text-decoration: none; }
.ref-card a:hover { text-decoration: underline; }

/* ── COURSES GRID ── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

/* ── HOBBIES ── */
.hobby-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.hobby-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: all 0.15s;
}
.hobby-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.hobby-icon  { font-size: 2rem; display: block; margin-bottom: 0.6rem; }
.hobby-card h3 {
  font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem;
  font-family: var(--font-mono); color: var(--green);
}
.hobby-card p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

/* ── PHOTO BANNER ── */
.photo-section {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}
.photo-full { width: 100%; max-height: 420px; object-fit: cover; object-position: center 60%; display: block; }
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 2rem 1.5rem 1rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
}

/* ── AMELIA PAGE ── */
.amelia-hero {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(210, 168, 255, 0.3);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.amelia-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center top, rgba(210,168,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.amelia-name {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.amelia-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.5rem; }

.amelia-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.fact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  text-align: left;
}
.fact-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); display: block; margin-bottom: 4px; }
.fact-value { font-family: var(--font-mono); font-size: 0.9rem; color: var(--purple); font-weight: 600; }

.amelia-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 0.8rem;
}
.amelia-section h3 {
  font-family: var(--font-mono);
  color: var(--purple);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.amelia-section h3::before { content: '# '; color: var(--text-dim); }
.amelia-section p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* ── CONTACT ── */
.contact-item { display: flex; align-items: center; gap: 10px; }
.contact-item a { color: var(--blue); font-family: var(--font-mono); font-size: 0.87rem; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* ── HOBBY PHOTO GALLERY ── */
.hobby-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 0.7rem;
}

.hobby-photo-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hobby-photo-wrap.tall  { grid-row: span 2; }
.hobby-photo-wrap.wide  { grid-column: span 2; }

.hobby-photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.hobby-photo-wrap:hover .hobby-photo-img { transform: scale(1.04); }

.hobby-photo-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(13,17,23,0.82));
  padding: 1.8rem 0.9rem 0.7rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}
.hobby-photo-wrap:hover .hobby-photo-cap { opacity: 1; }

@media (max-width: 600px) {
  .hobby-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .hobby-photo-wrap.wide { grid-column: span 2; }
}

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.4rem 2rem;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
footer span { color: var(--green); }

/* ── UTILITIES ── */
a { color: inherit; }
em { font-style: italic; }
strong { font-weight: 600; }
.mt-half { margin-top: 0.4rem; }
.mt-1    { margin-top: 0.8rem; }
.ac-green  { color: var(--green); }
.ac-blue   { color: var(--blue); }
.ac-purple { color: var(--purple); }
.ac-yellow { color: var(--yellow); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links a { font-size: 0.68rem; padding: 5px 7px; }
  main { padding: 1.5rem 1rem 4rem; }
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; padding: 1.5rem; }
  .hero-photo { width: 130px; height: 130px; }
  .badge-row { justify-content: center; }
  .hero-actions { justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
  .hobby-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 1.5rem; }
  .paper-card-featured { padding: 1.1rem 1.2rem; }
  .paper-stats { gap: 5px; }
  .paper-stat { padding: 0.3rem 0.6rem; }
}

@media (max-width: 480px) {
  .nav-links a::before { content: ''; }
  .nav-links a { font-size: 0.65rem; padding: 4px 6px; }
  .amelia-name { font-size: 2.2rem; }
}
