/* ===================================
   CSS Variables & Theme
   =================================== */
:root {
  --bg-color: #050505;
  --surface-color: #0a0a0a;
  --text-primary: #e6e6e6;
  --text-secondary: #888888;
  --text-dim: #444444;
  
  --accent-color: #ff3333; /* Tech Red */
  --accent-hover: #ff0000;
  
  --border-color: #222222;
  --border-active: #444444;
  
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  --container-width: 900px;
  
  --transition-fast: 0.1s ease;
  --transition-smooth: 0.3s ease;
}

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

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
}

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

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ===================================
   Utility Classes
   =================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent { color: var(--accent-color); }
.text-dim { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }

.hidden { display: none !important; }

.mono { font-family: var(--font-mono); }
.sans { font-family: var(--font-sans); }

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

/* ===================================
   Navbar
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::before {
  content: '// ';
  color: var(--text-dim);
  opacity: 0;
  transition: var(--transition-fast);
}

.nav-link:hover::before, .nav-link.active::before {
  opacity: 1;
  color: var(--accent-color);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
}

.mobile-nav {
  display: none;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.hero-meta #user-ip {
  color: #ff6b35;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background-color: var(--accent-color);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 0.2rem;
}

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

.hero-subtitle {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.status-line {
  margin-top: 3rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline-block;
}

.status-item {
  margin-right: 1.5rem;
}

.status-label {
  color: var(--text-dim);
  margin-right: 0.5rem;
}

/* ===================================
   Section Styles
   =================================== */
section {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: baseline;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 1rem;
}

.section-path {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===================================
   About
   =================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.about-content {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-size: 1rem;
}

.about-content p {
  margin-bottom: 1.5rem;
}

.profile-img-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.profile-img {
  width: 100%;
  max-width: 250px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.profile-img:hover {
  filter: grayscale(0%);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* ===================================
   Projects
   =================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  padding: 1.5rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

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

.folder-icon {
  color: var(--accent-color);
  width: 24px;
  height: 24px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link-icon {
  color: var(--text-secondary);
}

.project-link-icon:hover {
  color: var(--accent-color);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-desc {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===================================
   Community / Stats
   =================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition-fast);
}

.stat-box:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.stat-box:hover .stat-label {
  color: var(--accent-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.community-list {
  border-left: 1px solid var(--border-color);
  padding-left: 1.5rem;
}

.community-item {
  margin-bottom: 1rem;
  position: relative;
}

.community-item::before {
  content: '>';
  position: absolute;
  left: -2rem;
  color: var(--accent-color);
}

/* ===================================
   Blog List
   =================================== */
.blog-list {
  display: flex;
  flex-direction: column;
}

.blog-row {
  display: flex;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.blog-row:hover {
  background-color: var(--surface-color);
  padding-left: 1rem;
}

.blog-date {
  width: 120px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.blog-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.blog-row:hover .blog-title {
  color: var(--accent-color);
}

/* ===================================
   Contact
   =================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-method {
  margin-bottom: 1.5rem;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  display: block;
}

.contact-value {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.contact-value:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ===================================
   Footer
   =================================== */
footer {
  padding: 3rem 0 2rem 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem; /* Space above footer */
}

/* Blog page footer - more space from share section */
.blog-post-wrapper + footer,
article + footer {
  margin-top: 0; /* Share section handles spacing */
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .blog-date {
    width: auto;
  }

  /* Mobile Nav Overlay */
  .mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: none;
  }
  
  .mobile-nav.open {
    display: block;
  }
  
  .mobile-nav-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
  }
  
  /* Blog Post Mobile Fixes */
  .blog-post-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
    padding-top: 80px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .post-content {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
  }

  .post-content h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    word-wrap: break-word;
  }

  .post-content h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
  }

  .post-content p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .post-content pre {
    padding: 0.75rem;
    font-size: 0.75rem;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    margin-left: 0;
    margin-right: 0;
  }
  
  .post-content code {
    font-size: 0.75rem;
    word-break: break-word;
  }

  /* Share section mobile fix */
  .share-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .share-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* Footer spacing on mobile */
  footer {
    margin-top: 2rem;
    padding: 2rem 1rem;
  }

  /* Better code block handling on mobile */
  .post-content pre,
  .post-content code {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
  }

  /* Mentorship page mobile fix */
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
  .share-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .blog-post-wrapper {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .post-content pre {
    font-size: 0.85rem;
  }

  footer {
    margin-top: 3rem;
  }
}

/* ===================================
   Blog Post Page
   =================================== */
.blog-post-wrapper {
  padding-top: 100px;
  max-width: 700px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  overflow-x: hidden;
}

.post-content {
  overflow-x: hidden;
  word-wrap: break-word;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.back-link:hover {
  color: var(--accent-color);
}

.post-meta {
  margin-bottom: 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.post-content h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content code {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
  color: var(--accent-color);
}

.post-content pre {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  max-width: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

/* Share Section */
.share-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border-color);
}

.share-label {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Share Links */
.share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}


