/* CSS Variables for Light/Dark Theme */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-card: #ffffff;
  --bg-code: #f6f8fa;
  --bg-sidebar: #f0f2f5;
  --bg-chat: #ffffff;
  --bg-chat-user: #e3f2fd;
  --bg-chat-bot: #f5f5f5;
  --text-primary: #1a1a2e;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;
  --text-inverse: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --border: #dee2e6;
  --border-light: #e9ecef;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --timeline-line: #dee2e6;
  --tag-bg: #e8f0fe;
  --tag-text: #1a73e8;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #212121;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #333333;
  --bg-card: #2a2a2a;
  --bg-code: #1a1a1a;
  --bg-sidebar: #181818;
  --bg-chat: #2a2a2a;
  --bg-chat-user: #1c3a5e;
  --bg-chat-bot: #333333;
  --text-primary: #e6edf3;
  --text-secondary: #9e9e9e;
  --text-tertiary: #757575;
  --text-inverse: #ffffff;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-light: #1c3a5e;
  --border: #3a3a3a;
  --border-light: #333333;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #2d1b69 100%);
  --timeline-line: #3a3a3a;
  --tag-bg: #1c3a5e;
  --tag-text: #58a6ff;
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ==================== */
/* LAYOUT - Doc Style   */
/* ==================== */
.doc-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition), background-color var(--transition);
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.sidebar-logo span {
  color: var(--accent);
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.sidebar-nav {
  list-style: none;
  padding: 0 8px;
}

.sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 16px 8px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.85);
  transition: background-color var(--transition);
}

[data-theme="dark"] .topbar {
  background: rgba(33, 33, 33, 0.85);
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-primary);
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.breadcrumb span {
  color: var(--text-primary);
  font-weight: 600;
}

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

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all var(--transition);
  color: var(--text-primary);
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Content Area */
.content-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* ==================== */
/* HERO SECTION         */
/* ==================== */
.hero {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero h2 {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 24px;
}

.hero-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 600px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* Code Card in Hero */
.code-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red {
  background: #ff5f57;
}

.code-dot.yellow {
  background: #ffbd2e;
}

.code-dot.green {
  background: #28c840;
}

.code-filename {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 8px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
}

.code-block {
  padding: 16px;
  margin: 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  color: #e6edf3;
}

.code-block code {
  font-family: inherit;
}

.code-keyword {
  color: #ff79c6;
}

.code-variable {
  color: #8be9fd;
}

.code-property {
  color: #D4D4D4;
}

.code-string {
  color: #CE9178;
}

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

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

.btn-primary {
  background: #fff;
  color: #1a1a2e;
}

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  color: #1a1a2e;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Contact Bar */
.contact-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  opacity: 0.85;
  color: #fff;
}

.contact-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* ==================== */
/* SECTION STYLES       */
/* ==================== */
.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.section-icon svg {
  width: 18px;
  height: 18px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ==================== */
/* EXPERIENCE TIMELINE  */
/* ==================== */
.timeline {
  position: relative;
  padding-left: 28px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item:first-child .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--success); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2); }
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-company {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-period {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 500;
}

.timeline-role {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.timeline-project {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.timeline-project-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

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

.tech-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 50px;
  font-weight: 600;
}

/* ==================== */
/* SKILLS SECTION       */
/* ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.skill-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.skill-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 50px;
  transition: width 1s ease;
}

.skill-category {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* ==================== */
/* PROJECTS SECTION     */
/* ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.project-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.project-link:hover {
  text-decoration: underline;
}

/* ==================== */
/* EDUCATION SECTION    */
/* ==================== */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.education-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.education-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.education-school {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.education-year {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 500;
  white-space: nowrap;
}

/* ==================== */
/* KEY SKILLS & HOBBIES */
/* ==================== */
.tags-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ==================== */
/* FIXED CHAT BAR (GPT) */
/* ==================== */
.chat-fixed-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 16px 32px 12px;
  z-index: 40;
}

.chat-fixed-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .chat-input:focus {
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.chat-input::placeholder {
  color: var(--text-tertiary);
}

.chat-send {
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.chat-send:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.chat-send svg {
  width: 18px;
  height: 18px;
}

.chat-fixed-hint {
  max-width: 900px;
  margin: 8px auto 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.chat-bottom-spacer {
  height: 24px;
}

/* Chat messages inline in page */
.chat-messages-inline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 0 16px;
  transition: min-height 0.3s ease;
}

.chat-messages-inline:empty {
  display: none;
}

.chat-messages-inline.active {
  min-height: calc(100vh - 200px);
  padding-top: 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.chat-messages-inline.active::before {
  content: 'Chat with Satyam';
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.chat-msg {
  display: flex;
  gap: 12px;
  animation: msgIn 0.35s ease;
}

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

.chat-msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.chat-msg-avatar.bot {
  background: var(--accent-light);
  color: var(--accent);
}

.chat-msg-avatar.user {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.chat-msg-body {
  flex: 1;
  min-width: 0;
}

.chat-msg-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.chat-msg-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.chat-msg-typing {
  display: flex;
  gap: 5px;
  padding: 8px 0;
  align-items: center;
}

.chat-msg-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: typeDot 1.4s infinite;
}

.chat-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typeDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ==================== */
/* FOOTER               */
/* ==================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

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

/* ==================== */
/* MOBILE OVERLAY       */
/* ==================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .content-area {
    padding: 24px 16px;
  }

  .hero {
    padding: 40px 24px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1rem;
  }

  .code-block {
    font-size: 0.75rem;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
  }

  .contact-bar {
    flex-direction: column;
    gap: 8px;
  }

  .education-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .timeline-header {
    flex-direction: column;
  }

  .chat-fixed-bar {
    padding: 12px 16px 8px;
  }

  .chat-fixed-hint {
    font-size: 0.6rem;
  }
}

/* ==================== */
/* AUTH PAGES            */
/* ==================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.auth-logo-text span {
  color: var(--accent);
}

.auth-logo-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .form-input:focus {
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
}

.auth-submit {
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
  font-family: inherit;
}

.auth-submit:hover {
  background: var(--accent-hover);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.auth-theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ==================== */
/* DASHBOARD             */
/* ==================== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 12px;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

/* ==================== */
/* ARTICLES              */
/* ==================== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: inherit;
}

.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.article-meta-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.btn-small.danger:hover {
  border-color: var(--error);
  color: var(--error);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-secondary);
}

/* Article Content */
.article-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.article-content h1 { font-size: 1.75rem; }
.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.15rem; }

.article-content p {
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 4px;
}

.article-content img {
  border-radius: var(--radius);
  margin: 16px 0;
}

/* Code Blocks */
.code-block-wrapper {
  position: relative;
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.code-block-lang {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

.code-block-wrapper pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  background: var(--bg-code);
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.code-block-wrapper code {
  font-family: inherit;
  font-size: inherit;
}

.article-content code:not(pre code) {
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  border: 1px solid var(--border);
}

/* ==================== */
/* JS COMPILER           */
/* ==================== */
.compiler-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-height: 500px;
}

.compiler-editor,
.compiler-output {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compiler-panel-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compiler-textarea {
  flex: 1;
  width: 100%;
  padding: 16px;
  background: var(--bg-code);
  color: var(--text-primary);
  border: none;
  outline: none;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: none;
  min-height: 400px;
}

.compiler-output-content {
  flex: 1;
  padding: 16px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-y: auto;
  white-space: pre-wrap;
  min-height: 400px;
}

.compiler-output-content .error {
  color: var(--error);
}

.compiler-output-content .log {
  color: var(--text-primary);
}

.compiler-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.run-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.run-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.clear-btn {
  padding: 10px 24px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.clear-btn:hover {
  border-color: var(--error);
  color: var(--error);
}

@media (max-width: 768px) {
  .compiler-container {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    padding: 32px 16px;
  }

  .hero-greeting {
    font-size: 0.85rem;
  }

  .hero h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .hero h2 {
    font-size: 0.85rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .code-card {
    margin-bottom: 24px;
  }

  .code-block {
    font-size: 0.7rem;
    padding: 12px;
    overflow-x: auto;
  }

  .code-card-header {
    padding: 8px 12px;
  }

  .code-filename {
    font-size: 0.65rem;
  }

  .code-dot {
    width: 8px;
    height: 8px;
  }

  .contact-bar {
    gap: 6px;
  }

  .contact-item {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .contact-item svg {
    width: 12px;
    height: 12px;
  }
}
