/* AI-Era Portfolio — Dark Theme */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a82;
  --accent: #00b4d8;
  --accent-light: #90e0ef;
  --accent-glow: rgba(0, 180, 216, 0.15);
  --border: #2a2a3e;
  --success: #00c853;
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a62;
  --text-muted: #7a7a92;
  --accent: #0077b6;
  --accent-light: #00b4d8;
  --accent-glow: rgba(0, 119, 182, 0.1);
  --border: #d8d8e8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

[data-theme="light"] .top-nav {
  background: rgba(245, 245, 250, 0.9);
}

.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Callout */
.callout {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 32px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.callout strong {
  color: var(--accent);
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 20px;
  object-fit: cover;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #0a0a0f;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
}

/* Sections */
.section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  font-size: 1.2rem;
}

/* Endpoints Grid */
.endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.2s;
}

.endpoint-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.endpoint-card .ep-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.endpoint-card .ep-url {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--accent-light);
  word-break: break-all;
  margin-bottom: 10px;
}

.endpoint-card .ep-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
}

/* About */
.about-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* Experience Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timeline-item .dates {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Skills Pills */
.skills-group {
  margin-bottom: 24px;
}

.skills-group h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Publications */
.pub-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.pub-item:hover {
  border-color: var(--accent);
}

.pub-item h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pub-item .pub-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pub-item a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.pub-item a:hover {
  text-decoration: underline;
}

/* Conferences list */
.conf-list {
  list-style: none;
}

.conf-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.conf-list li:last-child {
  border-bottom: none;
}

.conf-list .conf-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.conf-list a {
  color: var(--accent-light);
  text-decoration: none;
}

.conf-list a:hover {
  text-decoration: underline;
}

/* Education */
.edu-item {
  margin-bottom: 18px;
}

.edu-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.edu-item .edu-school {
  color: var(--accent);
  font-size: 0.9rem;
}

.edu-item .edu-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.contact-card .cc-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-card .cc-value {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  transition: color 0.2s;
}

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

.footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

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

  .nav-links a.hide-mobile {
    display: none;
  }
}
