:root {
  --bg: #fafafa;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border-color: #e8e8e8;
  --accent: #000;
  --pulse-color: #22c55e;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --nav-bg: rgba(255, 255, 255, 0.85);
  
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --font-devanagari: 'Noto Sans Devanagari', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --text-primary: #e8e8e8;
  --text-secondary: #999;
  --text-muted: #666;
  --border-color: #1a1a1a;
  --accent: #fff;
  --card-bg: #111;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(10, 10, 10, 0.85);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  padding: 3rem 1.5rem;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.wrapper {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1000;
  width: 0;
  transition: width 0.1s ease;
}

/* Floating Navigation */
.floating-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.floating-nav.visible {
  opacity: 1;
  pointer-events: all;
}

.nav-dots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  display: block;
}

.nav-dot:hover {
  transform: scale(1.3);
  background: var(--text-secondary);
}

.nav-dot.active {
  background: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 0 3px var(--border-color);
}

.nav-dot::after {
  content: attr(title);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--nav-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.nav-dot:hover::after {
  opacity: 1;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-2px) scale(1.05);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.back-to-top-icon {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.back-to-top:hover .back-to-top-icon {
  transform: translateY(-2px);
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.theme-btn:hover {
  color: var(--text-primary);
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
  transition: border-color 0.3s ease;
}

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

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-name {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 0.1rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pulse-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  padding-left: 0.25rem;
}

.social-icon {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.25rem 0;
}

.social-icon:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Quote */
.quote-card {
  font-family: var(--font-devanagari);
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
  line-height: 1.8;
}

.quote-card:hover {
  color: var(--text-primary);
}

.quote-toast {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.quote-toast.show {
  opacity: 1;
}

/* Bio */
.bio-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reading-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.bio-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.meta-row {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Section Label */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Now Section */
.now-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.now-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.now-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.now-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.now-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.now-item:last-child {
  border-bottom: none;
}

.now-item-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.now-item-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Work Section - Card Slider */
.work-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.work-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.work-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-family: var(--font-mono);
  box-shadow: var(--shadow);
  padding: 0;
  line-height: 1;
}

.work-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
  transform: scale(1.05);
}

.work-btn:active {
  transform: scale(0.95);
}

.work-counter {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.work-slider-container {
  overflow: hidden;
  position: relative;
  border-radius: 12px;
}

.work-slider {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0;
}

.work-card {
  flex: 0 0 100%;
  padding: 1.5rem 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pulse-color), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card:hover::before {
  opacity: 1;
}

.work-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.work-card-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.work-card-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.work-card-period {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.work-card-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.work-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0.85;
}

.work-card-number {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border-color);
  opacity: 0.3;
  line-height: 1;
  pointer-events: none;
}

/* Work Dots */
.work-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.work-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 0;
}

.work-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.work-dot:hover {
  transform: scale(1.2);
}

/* Writing Section */
.writing-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.writing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.writing-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.writing-link:hover {
  color: var(--text-primary);
}

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.writing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: color 0.2s ease;
  gap: 1rem;
}

.writing-item:hover {
  color: var(--text-primary);
}

.writing-item-title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.writing-item-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Writing Empty State */
.writing-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-family: var(--font-mono);
}

.writing-empty a {
  color: var(--text-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.writing-empty a:hover {
  color: var(--accent);
}

/* Footer */
.footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  .floating-nav {
    right: 0.75rem;
  }
  
  .nav-dots {
    padding: 0.5rem 0.35rem;
    gap: 0.5rem;
  }
  
  .nav-dot {
    width: 6px;
    height: 6px;
  }
  
  .nav-dot::after {
    display: none;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
  }
  
  .back-to-top-icon {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }
  
  .wrapper {
    gap: 2.5rem;
  }

  .hero-row {
    gap: 1rem;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .hero-name {
    font-size: 1.4rem;
  }

  .social-icons {
    gap: 0.75rem;
  }

  .social-icon {
    font-size: 0.75rem;
  }

  .work-card {
    padding: 1.25rem 1.25rem;
  }
  
  .work-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .work-card-period {
    align-self: flex-start;
  }
  
  .work-card-number {
    font-size: 2.5rem;
    bottom: 0.75rem;
    right: 1rem;
  }
  
  .work-controls {
    gap: 0.5rem;
  }
  
  .work-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .work-counter {
    font-size: 0.6rem;
    min-width: 35px;
  }
}