/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Hardcoded Colors - Dark Theme */
:root {
  /* Dark Theme Colors */
  --bg-primary: #202023;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --accent-primary: #27ca3f;
  --border-primary: #333333;
  --shadow-primary: rgba(0, 0, 0, 0.3);

  /* Theme transition */
  --transition-theme: all 0.3s ease;
}

/* Light Theme Colors */
[data-theme="light"] {
  --bg-primary: rgb(240, 231, 219);
  --bg-secondary: rgb(235, 225, 210);
  --bg-tertiary: rgb(230, 220, 205);
  --text-primary: #1a1a1a;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --accent-primary: #198754;
  --border-primary: rgba(26, 26, 26, 0.1);
  --shadow-primary: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "JetBrains Mono", monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
  min-height: 100vh;
  transition: var(--transition-theme);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
}

/* Animations and Keyframes */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px var(--accent-primary); }
  50% { box-shadow: 0 0 20px var(--accent-primary); }
}

@keyframes glowDark {
  0%, 100% { box-shadow: 0 0 10px #27ca3f; }
  50% { box-shadow: 0 0 20px #27ca3f; }
}

@keyframes glowLight {
  0%, 100% { box-shadow: 0 0 10px #198754; }
  50% { box-shadow: 0 0 20px #198754; }
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

.stagger-animation {
  animation-delay: 0s;
}

.typing-animation {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-primary);
  animation: typewriter 2s steps(40) 1s forwards, blink 1s infinite;
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.glow-animation {
  animation: glow 2s ease-in-out infinite;
}

/* Cursor Animation */
.cursor-blink {
  animation: blink 1s infinite;
  font-weight: bold;
  color: var(--accent-primary);
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-primary);
  z-index: 1000;
  padding: 0 20px;
  transform: translateY(-100%);
  animation: slideInDown 0.8s ease-out 0.2s forwards;
  transition: var(--transition-theme);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.nav-brand {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

.nav-brand a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: var(--transition-theme);
}

.nav-brand a:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(39, 202, 63, 0.5);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  justify-content: center;
  flex: 1;
  margin: 0;
  padding: 0;
}

.nav-links li {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-theme);
  font-size: 14px;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-links a.active::after {
  width: 100%;
}

.nav-theme {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-theme);
  color: var(--text-primary);
  font-size: 18px;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* Icon Hero Section */
.icon-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 0 40px 0;
  text-align: center;
}

.icon-hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-icon {
  margin-bottom: 30px;
}

.terminal-symbol {
  font-size: 80px;
  color: var(--accent-primary);
  display: block;
  line-height: 1;
  text-shadow: 0 0 20px rgba(39, 202, 63, 0.5);
  animation: glow 3s ease-in-out infinite;
}

.rotating-symbol {
  display: inline-block;
  animation: rotate360 3s linear infinite;
}

.hero-greeting {
  font-size: 48px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-family: 'JetBrains Mono', monospace;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0 60px 0; /* Added top padding for fixed header */
}

.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0 60px 0;
}

.terminal-window {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 10px 30px var(--shadow-primary);
  animation: scaleIn 0.8s ease-out 0.5s both;
  transition: var(--transition-theme);
}

.terminal-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow-primary);
}

.terminal-header {
  background-color: var(--bg-tertiary);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  border-radius: 8px 8px 0 0;
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: scaleIn 0.4s ease-out both;
  animation-delay: 1s;
}

.btn:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px currentColor;
}

.btn.red {
  background-color: #ff5f56;
}
.btn.yellow {
  background-color: #ffbd2e;
}
.btn.green {
  background-color: #27ca3f;
}

.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: bold;
  animation: fadeInUp 0.6s ease-out 1.2s both;
}

.terminal-body {
  padding: 30px;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-line {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInLeft 0.6s ease-out both;
  animation-delay: 1.5s;
}

.prompt {
  color: var(--accent-primary);
  font-weight: bold;
  animation: glow 2s ease-in-out infinite;
  animation-delay: 2s;
}

.command {
  color: var(--text-primary);
  position: relative;
}

.command-input {
  color: var(--text-primary);
  position: relative;
}

#typewriter {
  color: var(--text-primary);
  font-size: 14px;
}

.cursor {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-output {
  margin: 15px 0 30px 20px;
  color: var(--text-secondary);
  animation: fadeInUp 0.6s ease-out both;
  animation-delay: 1.8s;
}

.name {
  color: var(--text-primary);
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.title {
  color: var(--accent-primary);
  font-size: 18px;
  margin-bottom: 10px;
}

.description {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 20px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.skill-item {
  background-color: var(--bg-tertiary);
  padding: 8px 12px;
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  text-align: center;
  font-size: 12px;
  transition: all 0.3s ease;
  animation: scaleIn 0.5s ease-out both;
  animation-delay: 2.5s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(39, 202, 63, 0.1), transparent);
  transition: left 0.5s ease;
}

.skill-item:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(39, 202, 63, 0.3);
}

.skill-item:hover::before {
  left: 100%;
}

.skill-item:active {
  transform: translateY(-1px) scale(1.02);
}

/* Section Styles */
section {
  padding: 80px 0;
  margin: 0 auto;
  max-width: 1200px;
}

.section {
  padding: 80px 0;
  margin: 0 auto;
  max-width: 1200px;
}

.section-title {
  color: var(--text-primary);
  font-size: 36px;
  margin-bottom: 40px;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-prefix {
  color: var(--accent-primary);
  font-weight: bold;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-primary);
  margin-left: 20px;
}

/* Content Grid for About Section */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.about-text {
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 18px;
}

.ascii-art {
  margin-top: 30px;
  padding: 20px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  font-size: 12px;
}

.ascii-art pre {
  color: var(--accent-primary);
  text-align: center;
}

/* Contact Content Layout */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 16px;
}

.contact-terminal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

/* Contact Form */
.contact-form {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 30px;
}

.contact-form h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 18px;
}

.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  color: var(--accent-primary);
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(39, 202, 63, 0.1);
}

.submit-btn {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-theme);
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #2dd146;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 202, 63, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

.section-grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.writing-grid {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Project Cards */
.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(39, 202, 63, 0.05), transparent);
  transition: left 0.6s ease;
}

.project-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(39, 202, 63, 0.15);
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover .project-header h3 {
  color: var(--accent-primary);
  transform: translateX(5px);
}

.project-card:hover .project-links {
  transform: translateX(-5px);
}

.project-card:hover .tech-tag {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(39, 202, 63, 0.2);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.project-header h3 {
  color: var(--text-primary);
  font-size: 18px;
  transition: all 0.3s ease;
}

.project-links {
  display: flex;
  gap: 15px;
  transition: all 0.3s ease;
}

.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--accent-primary);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--accent-primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.project-link:hover {
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 202, 63, 0.3);
}

.project-link:hover::before {
  left: 0;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

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

.tech-tag {
  background-color: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  border: 1px solid var(--border-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Blog Posts */
.blog-post {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 25px;
  transition: all 0.3s ease;
}

.blog-post:hover {
  border-color: var(--accent-primary);
  transform: translateX(10px);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 12px;
}

.post-meta time {
  color: var(--text-muted);
}

.post-category {
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-post h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 15px;
  text-decoration: none;
}

.blog-post p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.read-more {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: var(--text-primary);
}

/* Contact Links */
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  padding: 15px 20px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background-color: var(--bg-secondary);
  font-size: 14px;
}

.contact-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(39, 202, 63, 0.2);
}

.contact-icon {
  font-size: 18px;
  min-width: 20px;
}

/* Terminal Command Links */
.terminal-command {
  margin-top: 30px;
  padding: 15px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
}

.terminal-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-link:hover .command {
  color: var(--accent-primary);
}

/* Stats Panel */
.stats-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  position: sticky;
  top: 100px;
  box-shadow: 0 10px 30px var(--shadow-primary);
  transition: var(--transition-theme);
}

.stats-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px var(--shadow-primary);
}

.stats-panel .terminal-header {
  background-color: var(--bg-tertiary);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.stats-panel .terminal-buttons {
  display: flex;
  gap: 8px;
}

.stats-panel .btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stats-panel .btn:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px currentColor;
}

.stats-panel .btn.red {
  background-color: #ff5f56;
}
.stats-panel .btn.yellow {
  background-color: #ffbd2e;
}
.stats-panel .btn.green {
  background-color: #27ca3f;
}

.stats-panel .terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: bold;
}

.stats-panel .json-content {
  padding: 20px;
}

.stats-panel h3 {
  color: var(--accent-primary);
  margin-bottom: 15px;
  font-size: 16px;
}

.json-content {
  font-size: 12px;
  line-height: 1.6;
}

.json-content pre {
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* JSON Syntax Highlighting */
.json-key {
  color: #ff79c6;
  font-weight: 500;
}

.json-string {
  color: var(--accent-primary);
}

.json-brace,
.json-bracket {
  color: var(--text-secondary);
  font-weight: bold;
}

.json-colon,
.json-comma {
  color: var(--text-primary);
}

/* Flash Messages */
.flash-notice,
.flash-alert {
  margin: 20px 0;
  padding: 15px;
  border-radius: 4px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
}

.flash-notice .terminal-output.success {
  color: var(--accent-primary);
}

.flash-alert .terminal-output.error {
  color: #ff5f56;
}

/* Footer */
.footer {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-primary);
  background-color: var(--bg-secondary);
}

/* Git Graph Section */
.gitgraph-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.git-graph {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 20px;
}

.git-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0;
  animation: fadeInLeft 0.6s ease-out both;
  animation-delay: calc(var(--line-index, 0) * 0.1s + 1s);
}

.git-line:nth-child(1) { --line-index: 0; }
.git-line:nth-child(2) { --line-index: 1; }
.git-line:nth-child(3) { --line-index: 2; }
.git-line:nth-child(4) { --line-index: 3; }
.git-line:nth-child(5) { --line-index: 4; }
.git-line:nth-child(6) { --line-index: 5; }
.git-line:nth-child(7) { --line-index: 6; }
.git-line:nth-child(8) { --line-index: 7; }
.git-line:nth-child(9) { --line-index: 8; }
.git-line:nth-child(10) { --line-index: 9; }
.git-line:nth-child(11) { --line-index: 10; }
.git-line:nth-child(12) { --line-index: 11; }

.git-graph-char {
  color: var(--accent-primary);
  font-weight: bold;
  min-width: 20px;
  font-family: monospace;
}

.git-hash {
  color: #ffa500;
  font-weight: bold;
  min-width: 80px;
}

.git-message {
  color: var(--text-primary);
  flex: 1;
}

.git-time {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 120px;
  text-align: right;
}

.git-stats {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 25px;
  position: sticky;
  top: 100px;
  height: fit-content;
  animation: fadeInRight 0.8s ease-out 0.5s both;
}

.git-stats h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 18px;
}

.git-stats h4 {
  color: var(--accent-primary);
  margin: 25px 0 15px 0;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 202, 63, 0.2);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  color: var(--accent-primary);
  font-size: 18px;
  font-weight: bold;
}

.contribution-graph {
  margin-top: 20px;
}

.graph-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 15px 0;
}

.graph-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.day-label {
  color: var(--text-muted);
  font-size: 10px;
  min-width: 25px;
  text-align: right;
  margin-right: 8px;
}

.contribution-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid var(--border-primary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.contribution-day:hover {
  transform: scale(1.2);
  border-color: var(--accent-primary);
}

.contribution-day.level-0 {
  background-color: var(--bg-tertiary);
}

.contribution-day.level-1 {
  background-color: rgba(39, 202, 63, 0.3);
}

.contribution-day.level-2 {
  background-color: rgba(39, 202, 63, 0.5);
}

.contribution-day.level-3 {
  background-color: rgba(39, 202, 63, 0.7);
}

.contribution-day.level-4 {
  background-color: var(--accent-primary);
}

/* Light theme adjustments for contribution graph */
[data-theme="light"] .contribution-day.level-1 {
  background-color: rgba(25, 135, 84, 0.3);
}

[data-theme="light"] .contribution-day.level-2 {
  background-color: rgba(25, 135, 84, 0.5);
}

[data-theme="light"] .contribution-day.level-3 {
  background-color: rgba(25, 135, 84, 0.7);
}

[data-theme="light"] .contribution-day.level-4 {
  background-color: var(--accent-primary);
}

.graph-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 10px;
  color: var(--text-muted);
}

.legend-squares {
  display: flex;
  gap: 2px;
}

.legend-squares .contribution-day {
  width: 10px;
  height: 10px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-quote {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  margin-top: 10px;
}

.footer-quote .terminal-output {
  text-align: center;
}

.footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition-theme);
}

.footer a:hover {
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .nav {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
  }

  .nav-brand {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  .nav-links {
    gap: 20px;
    margin: 10px 0;
    flex: none;
  }

  .nav-theme {
    position: absolute;
    top: 15px;
    right: 20px;
    flex: none;
  }

  .hero {
    padding: 100px 0 40px 0;
  }

  .terminal-window {
    margin: 0 10px;
  }

  .terminal-body {
    padding: 20px;
  }

  .name {
    font-size: 24px;
  }

  .title {
    font-size: 16px;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

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

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

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

  .content-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gitgraph-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .git-stats {
    position: static;
  }

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

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 28px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .section-title::after {
    margin-left: 0;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .terminal-body {
    padding: 15px;
  }

  .terminal-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .terminal-output {
    margin-left: 0;
  }

  .name {
    font-size: 20px;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .project-links {
    align-self: flex-start;
  }

  .git-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .git-hash,
  .git-time {
    min-width: auto;
  }

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

  .graph-row {
    justify-content: center;
  }

  .day-label {
    min-width: 20px;
  }
}
