/* Devil Terminal Theme - Dark Red/Black Color Scheme */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap");

/* CSS Custom Properties - Devil Theme */
:root {
  --terminal-bg: #0a0a0a;
  --terminal-bg-secondary: #1a0f0f;
  --terminal-text: #ff6b6b;
  --terminal-text-secondary: #cc5555;
  --terminal-accent: #ff3333;
  --terminal-border: #330000;
  --terminal-card-bg: #1a0808;
  --terminal-hover: #2a1010;
  --terminal-green: #ff4444;
  --terminal-yellow: #ff8800;
  --terminal-red: #ff0000;
  --terminal-blue: #ff6666;
  --terminal-purple: #ff99cc;
  --terminal-cursor: #ff0000;
  --terminal-shadow: rgba(255, 0, 0, 0.3);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "JetBrains Mono", "Consolas", "Monaco", monospace;
  background: var(--terminal-bg);
  color: var(--terminal-text);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Skip link - hidden by default, only visible when focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--terminal-accent);
  color: var(--terminal-bg);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-size: 12px;
}

.skip-link:focus {
  top: 6px;
}

/* Terminal Container */
.terminal-container {
  max-width: 1200px;
  margin: 20px auto;
  background: var(--terminal-bg);
  border: 2px solid var(--terminal-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px var(--terminal-shadow);
  min-height: calc(100vh - 40px);
}

/* Terminal Header */
.terminal-header {
  background: var(--terminal-bg-secondary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--terminal-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.btn-close {
  background: var(--terminal-red);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.btn-minimize {
  background: var(--terminal-yellow);
  box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

.btn-maximize {
  background: var(--terminal-green);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.terminal-title {
  color: var(--terminal-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* Terminal Body */
.terminal-body {
  padding: 20px;
  min-height: 600px;
}

/* Command Line */
.command-line {
  margin: 24px 0 16px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.prompt {
  color: var(--terminal-accent);
  text-shadow: 0 0 5px var(--terminal-accent);
}

.path {
  color: var(--terminal-purple);
  text-shadow: 0 0 5px var(--terminal-purple);
}

.dollar {
  color: var(--terminal-green);
  margin-right: 8px;
  text-shadow: 0 0 5px var(--terminal-green);
}

.command-text {
  color: var(--terminal-text);
}

.cursor {
  color: var(--terminal-cursor);
  animation: blink 1s infinite;
  font-weight: bold;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Section Headers */
.section-header {
  color: var(--terminal-text-secondary);
  font-size: 12px;
  margin: 8px 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.section-content {
  margin-bottom: 32px;
}

/* Profile Section */
.profile-section {
  margin: 16px 0 32px 0;
}

.profile-card {
  background: var(--terminal-card-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 20px var(--terminal-shadow);
  transition: all 0.3s ease;
}

.profile-card:hover {
  border-color: var(--terminal-accent);
  box-shadow: 0 8px 30px var(--terminal-shadow);
}

.profile-image img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--terminal-accent);
  box-shadow: 0 0 20px var(--terminal-shadow);
}

.profile-info .name {
  color: var(--terminal-accent);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 0 10px var(--terminal-accent);
}

.profile-info .role {
  color: var(--terminal-green);
  font-weight: 500;
  margin-bottom: 4px;
  text-shadow: 0 0 5px var(--terminal-green);
}

.profile-info .location {
  color: var(--terminal-text-secondary);
  font-size: 13px;
}

/* About Section */
.about-section {
  margin: 16px 0 32px 0;
}

.about-section p {
  color: var(--terminal-text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

/* Skills Section */
.skills-header h2 {
  background: var(--terminal-green);
  color: var(--terminal-bg);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin: 16px 0;
  box-shadow: 0 0 15px var(--terminal-shadow);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.skill-card {
  background: var(--terminal-card-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.skill-card:hover {
  border-color: var(--terminal-accent);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--terminal-shadow);
}

.skill-title {
  background: var(--terminal-yellow);
  color: var(--terminal-bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
  box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

.skill-list {
  list-style: none;
}

.skill-list li {
  color: var(--terminal-text-secondary);
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
  transition: color 0.3s ease;
}

.skill-list li:before {
  content: "▸";
  color: var(--terminal-green);
  position: absolute;
  left: 0;
  text-shadow: 0 0 5px var(--terminal-green);
}

.skill-card:hover .skill-list li {
  color: var(--terminal-text);
}

/* Projects Section */
.projects-header h2 {
  background: var(--terminal-green);
  color: var(--terminal-bg);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin: 16px 0;
  box-shadow: 0 0 15px var(--terminal-shadow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.project-card {
  background: var(--terminal-card-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  border-color: var(--terminal-accent);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--terminal-shadow);
}

.project-image {
  margin-bottom: 16px;
}

.project-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--terminal-border);
  transition: all 0.3s ease;
}

.project-card:hover .project-image img {
  border-color: var(--terminal-accent);
  box-shadow: 0 0 15px var(--terminal-shadow);
}

.project-title {
  background: var(--terminal-red);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 12px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.project-desc {
  color: var(--terminal-text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.project-links a {
  padding: 6px 12px;
  border: 1px solid var(--terminal-accent);
  border-radius: 4px;
  color: var(--terminal-accent);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px var(--terminal-accent);
}

.project-links a:hover {
  background: var(--terminal-accent);
  color: var(--terminal-bg);
  box-shadow: 0 0 15px var(--terminal-shadow);
}

/* Social Section */
.social-header h2 {
  background: var(--terminal-green);
  color: var(--terminal-bg);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin: 16px 0;
  box-shadow: 0 0 15px var(--terminal-shadow);
}

.social-section {
  background: var(--terminal-card-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.social-list {
  list-style: none;
}

.social-list li {
  padding: 8px 0;
  position: relative;
  padding-left: 16px;
  transition: all 0.3s ease;
}

.social-list li:before {
  content: "→";
  color: var(--terminal-green);
  position: absolute;
  left: 0;
  text-shadow: 0 0 5px var(--terminal-green);
}

.social-list li:hover {
  padding-left: 24px;
  background: var(--terminal-hover);
  margin: 0 -8px;
  padding-right: 8px;
  border-radius: 4px;
}

.social-list a {
  color: var(--terminal-accent);
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px var(--terminal-accent);
}

.social-list a:hover {
  color: var(--terminal-text);
  text-decoration: underline;
}

/* Thanks Section */
.thanks-section {
  margin: 24px 0;
  padding: 16px;
  background: var(--terminal-card-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.thanks-section p {
  color: var(--terminal-text-secondary);
}

/* Terminal Footer */
.terminal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--terminal-border);
  text-align: center;
}

.terminal-footer p {
  color: var(--terminal-text-secondary);
  font-size: 12px;
}

.terminal-footer a {
  color: var(--terminal-accent);
  text-decoration: none;
  text-shadow: 0 0 5px var(--terminal-accent);
}

.terminal-footer a:hover {
  text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--terminal-accent);
  border: 2px solid var(--terminal-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--terminal-shadow);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--terminal-red);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--terminal-shadow);
}

.scroll-to-top::before {
  content: "↑";
  color: var(--terminal-bg);
  font-size: 20px;
  font-weight: bold;
  text-shadow: none;
}

/* Pulse animation for scroll button */
.scroll-to-top.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px var(--terminal-shadow);
  }
  50% {
    box-shadow: 0 4px 20px var(--terminal-shadow), 0 0 0 10px rgba(255, 51, 51, 0.3);
  }
  100% {
    box-shadow: 0 4px 20px var(--terminal-shadow);
  }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .terminal-container {
    margin: 10px;
    border-radius: 4px;
  }

  .terminal-body {
    padding: 16px;
  }

  body {
    font-size: 13px;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .profile-info .name {
    font-size: 20px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-links {
    flex-direction: column;
  }

  .command-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .command-line .dollar {
    margin-right: 4px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
  }

  .terminal-header {
    padding: 10px 12px;
  }

  .terminal-body {
    padding: 12px;
  }

  .profile-card,
  .skill-card,
  .project-card,
  .social-section,
  .thanks-section {
    padding: 16px;
  }

  .profile-image img {
    width: 60px;
    height: 60px;
  }

  .profile-info .name {
    font-size: 18px;
  }

  .terminal-buttons span {
    width: 10px;
    height: 10px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top::before {
    font-size: 18px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --terminal-bg: #000000;
    --terminal-text: #ffffff;
    --terminal-accent: #ff0000;
    --terminal-border: #ff0000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .cursor {
    animation: none;
  }
}

/* Print styles */
@media print {
  .terminal-container {
    border: 1px solid #000;
    box-shadow: none;
  }

  .terminal-header {
    background: #f5f5f5;
    color: #000;
  }

  .terminal-body {
    background: #fff;
    color: #000;
  }
}

/* Large screens optimization */
@media (min-width: 1200px) {
  body {
    font-size: 15px;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
