@import url('https://fonts.googleapis.com/css?family=Fira+Code:400,500,600,700&display=swap');

.fira-code {
  font-family: "Fira Code", monospace;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

.Terminal {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #1a1e21;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0);
}

.Terminal:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(255, 76, 97, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 76, 97, 0.15);
}

.padding-30 {
  padding: 20px 25px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.bg-terminal {
  background: linear-gradient(135deg, #1a1e21 0%, #121416 100%);
  color: #f8f8f2;
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  line-height: 1.6;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 76, 97, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 76, 97, 0.03) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.8;
}

.Terminal__Toolbar {
  background: linear-gradient(to bottom, #3a3d41 0%, #2c2f33 100%);
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  height: 40px;
  display: flex;
  align-items: center;
  border-radius: 20px 20px 0 0;
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.Terminal__Toolbar::after {
  content: "▸ ~/portfolio";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  font-family: "Fira Code", monospace;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(255, 76, 97, 0.3);
}

/* Add a subtle animated gradient decoration */
.Terminal__Toolbar::before {
  content: "◆";
  position: absolute;
  right: 20px;
  color: #FF4C61;
  font-size: 18px;
  animation: pulse-glow 2s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    text-shadow: 0 0 8px rgba(255, 76, 97, 0.5);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 16px rgba(255, 76, 97, 0.8);
  }
}

.Terminal__tabs {
  display: none;
}

.Terminal__tab {
  display: none;
}

.Terminal__tab--active {
  display: none;
}

.Toolbar__buttons {
  display: flex;
  align-items: center;
}

.Toolbar__button {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.Toolbar__button:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

.Toolbar__button--exit {
  background-color: #ff5f56;
}

.Toolbar__button--exit:hover {
  background: #ff3333;
}

.Toolbar__button--exit:hover::before,
.Toolbar__button--exit:hover::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 2px;
  background: rgba(0, 0, 0, 0.5);
  top: 6px;
  left: 3px;
}

.Toolbar__button--exit:hover::before {
  transform: rotate(45deg);
}

.Toolbar__button--exit:hover::after {
  transform: rotate(-45deg);
}

.Toolbar__button--minimize {
  background-color: #ffbd2e;
}

.Toolbar__button--minimize:hover {
  background: #ffb000;
}

.Toolbar__button--minimize:hover::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 2px;
  background: rgba(0, 0, 0, 0.5);
  top: 6px;
  left: 3px;
}

.Toolbar__button--fullscreen {
  background-color: #27c93f;
}

.Toolbar__button--fullscreen:hover {
  background: #1aab2a;
}

.Toolbar__button--fullscreen:hover::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 2px solid rgba(0, 0, 0, 0.5);
  border-radius: 1px;
  top: 3px;
  left: 3px;
}

.Toolbar__button:focus {
  outline: none;
}

.Toolbar__user {
  color: #bac2de;
  margin-left: 4px;
  font-size: 12px;
  line-height: 14px;
  margin-bottom: 1px;
}

.Terminal__body {
  padding: 30px 0; /* More generous vertical spacing */
  position: relative;
  z-index: 2;
  min-height: 300px;
  color: #f8f8f2;
}

/* Ensure all text inside terminal is visible */
.Terminal__body * {
  color: inherit;
}

.Terminal__text {
  color: #f8f8f2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.right-border {
  color: white;
}

::highlight(rainbow-color-1) {
  color: #cba6f7;
  text-decoration: underline;
}

.Terminal__Prompt {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 500;
  padding: 20px 40px; /* Match terminal-single-line padding exactly */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border-left: 4px solid var(--color-primary, #FF4C61);
  transition: all 0.3s ease;
}

.Terminal__Prompt:hover {
  /* Hover effects disabled */
}

.command-output {
  margin-top: 5px;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #f8f8f2;
}

.Prompt__user {
  color: var(--color-primary, #FF4C61);
  text-shadow: 0 0 8px rgba(255, 76, 97, 0.3);
  font-weight: 600;
}

.Prompt__location {
  color: #FFD15C;
  text-shadow: 0 0 6px rgba(255, 209, 92, 0.3);
  font-weight: 500;
}

.Prompt__dollar {
  color: #f8f8f2;
  text-shadow: none;
  margin-right: 8px;
  font-weight: 600;
  opacity: 0.8;
}

#command {
  color: #f8f8f2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  font-weight: 500;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 20px;
  background: linear-gradient(180deg, var(--color-primary, #FF4C61) 0%, #FF6B7D 100%);
  animation: cursorBlink 1.2s ease-in-out infinite;
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 2px;
}

@keyframes cursorBlink {
  0%, 100% { 
    opacity: 1;
    transform: scaleY(1);
  }
  50% { 
    opacity: 0.3;
    transform: scaleY(0.9);
  }
}

/* Horizontal line */
.Terminal__hr {
  height: 1px;
  background: #4b5263;
  margin: 15px 0;
  border: none;
  width: 100%;
}

.Terminal__hr--red {
  background: #e06c75;
  height: 2px;
  margin: 0;
}

.Terminal__hr--yellow {
  background: #e5c07b;
  height: 2px;
  margin: 0;
}

.Terminal__hr--blue {
  background: #61afef;
  height: 2px;
  margin: 0;
}

.Terminal__statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #f8f8f2;
  border-radius: 0 0 20px 20px;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5);
}

.statusbar__left, .statusbar__right {
  display: flex;
  align-items: center;
}

.statusbar__session {
  color: var(--color-primary);
  font-weight: 600;
  margin-right: 10px;
  padding: 4px 12px;
  background: rgba(255, 76, 97, 0.1);
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statusbar__info {
  margin-right: 10px;
  color: rgba(248, 248, 242, 0.8);
  font-weight: 500;
}

.statusbar__time {
  font-family: 'Fira Code', monospace;
  font-weight: 500;
  color: #f8f8f2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.Terminal__pane {
  padding: 0; /* No padding - let child elements control their own padding */
  color: #f8f8f2;
  max-width: 100%;
  box-sizing: border-box;
}

.Terminal__pane-title {
  display: none;
}

.Terminal__pane:first-child {
  margin-top: 0;
}

.terminal-content {
  padding: 12px 0; /* Slightly more vertical padding */
  line-height: 1.9; /* More spacious line-height to match */
  color: #f8f8f2;
  font-size: 15px; /* Slightly larger for better readability */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em; /* Add subtle letter spacing */
}

/* Single line terminal output - JSON-like object display */
.terminal-single-line {
  padding: 24px 40px; /* VERY generous padding - luxury spacing */
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px; /* Softer corners */
  font-family: 'Fira Code', monospace;
  font-size: 15px; /* Larger font for better readability */
  line-height: 1.8; /* Even more spacious line-height */
  color: #f8f8f2;
  transition: all 0.3s ease;
  border-left: 4px solid #FF4C61; /* Slightly thicker accent */
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: 0.02em; /* More letter spacing for breathing room */
}

.terminal-single-line:hover {
  /* Hover effects disabled */
}

/* Inline prompt styling - combined with content in one box */
.terminal-prompt-inline {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  text-align: left;
  justify-content: flex-start;
}

/* Comfortable spacing between paragraphs */
.terminal-single-line br {
  display: block;
  margin: 8px 0; /* More breathing room between lines */
  content: "";
}

.terminal-single-line .terminal-label {
  color: #50fa7b;
  font-weight: 600;
}

.terminal-single-line .highlight-keyword {
  color: #8be9fd;
  font-weight: 600;
}

.terminal-single-line a.highlight-keyword {
  color: #8be9fd !important;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  transition: all 0.3s ease;
}

.terminal-single-line a.highlight-keyword:hover {
  color: #50fa7b !important;
  text-decoration-style: solid;
}

/* Override default link colors */
.terminal-single-line a {
  color: inherit;
}

.terminal-single-line a:visited {
  color: inherit;
}

/* Dark mode adjustments for single-line terminal */
[data-theme="dark"] .terminal-single-line {
  background: rgba(0, 0, 0, 0.4);
  border-left-color: #bd93f9;
}

[data-theme="dark"] .terminal-single-line:hover {
  /* Hover effects disabled */
}

[data-theme="dark"] .terminal-single-line .terminal-label {
  color: #50fa7b;
}

[data-theme="dark"] .terminal-single-line .highlight-keyword {
  color: #ff79c6;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  position: relative;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  transition: all 0.3s ease;
  color: #f8f8f2;
}

.terminal-line:hover {
  /* Hover effects disabled */
}

.terminal-icon {
  font-size: 20px;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(255, 76, 97, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.terminal-line:hover .terminal-icon {
  /* Hover effects disabled */
}

.highlight-keyword {
  color: var(--color-primary, #FF4C61);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.highlight-keyword::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary, #FF4C61);
  transition: width 0.3s ease;
}

.highlight-keyword:hover::after {
  width: 100%;
}

.terminal-skills {
  margin-top: 15px;
}

.skill-label {
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-primary, #FF4C61) 0%, #FFD15C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 6px;
}

.skill-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary, #FF4C61) 0%, #FFD15C 100%);
  opacity: 0.5;
}

.skill-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #FFD15C;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 209, 92, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.skill-tag:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255, 209, 92, 0.15);
  border-color: rgba(255, 209, 92, 0.4);
  color: #FFFFFF;
  box-shadow: 
    0 6px 20px rgba(255, 209, 92, 0.3),
    inset 0 1px 4px rgba(255, 255, 255, 0.1);
}

/* Removed individual skill tag light streaks to prevent overflow issues */

.terminal-content span {
  display: inline;
  vertical-align: middle;
}

.terminal-content span:has(emoji) {
  display: inline-block;
  transform-style: preserve-3d;
}

.emoji-pulse {
  animation: emoji-pulse 2s infinite;
}

@keyframes emoji-pulse {
  0%, 100% { transform: scale(1) translateZ(10px); }
  50% { transform: scale(1.2) translateZ(15px); }
}

/* Style for specific emojis */
.terminal-content:has(🌇) {
  position: relative;
}

.terminal-content:has(⚡️) {
  position: relative;
}

.terminal-content:has(👨🏻‍🏫) {
  position: relative;
}

/* Add a subtle glow effect to emojis */
.terminal-content span:has(🌇),
.terminal-content span:has(⚡️),
.terminal-content span:has(👨🏻‍🏫) {
  filter: drop-shadow(0 0 6px rgba(255, 76, 97, 0.4));
  display: inline-block;
  animation: emoji-float 3s ease-in-out infinite;
}

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

/* Glitch effect for command text */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.glitch-active {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both;
  color: #FF4C60;
  text-shadow: 0 0 8px rgba(255, 76, 96, 0.8);
}

/* Highlight important terms */
.terminal-content strong, 
.terminal-content b {
  color: #e5c07b;
  font-weight: normal;
  text-shadow: 0 0 5px rgba(229, 192, 123, 0.5);
}

/* Highlight keywords */
.highlight-keyword:hover {
  color: #FFD15C;
  box-shadow: none;
  text-shadow: none;
}

@media (max-width: 600px) {
  .Terminal {
    border-radius: 15px;
  }
  
  .padding-30 {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .Terminal__statusbar {
    padding: 6px 10px;
  }
  
  .Terminal__Toolbar::after {
    font-size: 12px;
  }
  
  .statusbar__info {
    display: none;
  }
  
  .statusbar__session {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .statusbar__time {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .terminal-content {
    font-size: 12px;
    line-height: 1.5;
  }
}

#1st_description_trans {
  line-height: 1.6;
  display: block;
  margin-top: 10px;
  color: #f8f8f2 !important;
}

/* Stats section styling */
.stats-row {
  margin: 0 auto;
  max-width: 800px;
}

.stat-box {
  text-align: center;
  padding: 15px 5px;
  margin-bottom: 20px;
}

.stat-content {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.stat-icon {
  font-size: 28px;
  color: #FF4C60;
  margin-right: 10px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #212529;
  line-height: 1;
}

.stat-text {
  font-size: 14px;
  color: #6c757d;
  margin: 0 auto;
  max-width: 90px;
}

@media (max-width: 767px) {
  .stats-row {
    max-width: 100%;
  }
  
  .stat-box {
    padding: 10px 5px;
  }
  
  .stat-icon {
    font-size: 24px;
    margin-right: 8px;
    color: #FF4C60;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .stat-text {
    font-size: 12px;
    max-width: 80px;
  }
}

/* Flag wave animation */
@keyframes wave {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(8deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Language flag styles - consistent with portfolio design */
#flag-pl, #flag-ch, #flag-de, #flag-en, #flag-cn {
  display: inline-block;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  transform-origin: center center;
  opacity: 0.7;
  filter: grayscale(30%);
  /* Override any external animations */
  animation: none !important;
  /* Isolate from parent backgrounds */
  isolation: isolate;
  z-index: 1;
}

/* Elegant hover state - lift and brighten */
#flag-pl:hover, #flag-ch:hover, #flag-de:hover, #flag-en:hover, #flag-cn:hover {
  transform: translateY(-4px) scale(1.1) !important;
  opacity: 1;
  filter: grayscale(0%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  /* Ensure no animations are applied */
  animation: none !important;
}

/* Active state for tactile feedback */
#flag-pl:active, #flag-ch:active, #flag-de:active, #flag-en:active, #flag-cn:active {
  transform: translateY(-2px) scale(1.05);
  transition-duration: 0.1s;
}

/* Add subtle underline indicator */
#flag-pl::before, #flag-ch::before, #flag-de::before, #flag-en::before, #flag-cn::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary, #FF4C61);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#flag-pl:hover::before, #flag-ch:hover::before, #flag-de:hover::before, #flag-en:hover::before, #flag-cn:hover::before {
  width: 100%;
}

/* Container subtle lift */
.list-inline-item {
  position: relative;
  transition: transform 0.3s ease;
  /* Ensure no background interferes with tooltips */
  background: transparent !important;
  z-index: auto;
}

/* Ensure footer area with flags has proper stacking */
.desktop-header-1 .footer,
.desktop-header-2 .footer {
  position: relative;
  z-index: 1001 !important;
  overflow: visible !important;
}

.desktop-header-1 .footer ul,
.desktop-header-2 .footer ul {
  position: relative;
  z-index: 1002 !important;
  overflow: visible !important;
}

/* Selected/active language indicator */
#flag-pl.active, #flag-ch.active, #flag-de.active, #flag-en.active, #flag-cn.active {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

#flag-pl.active::before, #flag-ch.active::before, #flag-de.active::before, #flag-en.active::before, #flag-cn.active::before {
  width: 100%;
  opacity: 1;
}

/* Add tooltip-like effect */
#flag-pl::after, #flag-ch::after, #flag-de::after, #flag-en::after, #flag-cn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #000000 !important;
  color: #ffffff !important;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 999999 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#flag-pl:hover::after, #flag-ch:hover::after, #flag-de:hover::after, #flag-en:hover::after, #flag-cn:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Ensure tooltip disappears on hover out */
#flag-pl:not(:hover)::after, #flag-ch:not(:hover)::after, #flag-de:not(:hover)::after, #flag-en:not(:hover)::after, #flag-cn:not(:hover)::after {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-50%) translateY(5px);
  transition-delay: 0s;
  display: none;
}

/* When hovering class is added via JS */
#flag-pl.hovering::after, #flag-ch.hovering::after, #flag-de.hovering::after, #flag-en.hovering::after, #flag-cn.hovering::after {
  display: block;
}

/* Toolbar title */
.Toolbar__title {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  flex-grow: 1;
  margin-right: 60px;
}

/* Remove conflicting animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Terminal lines - ensure text visibility */
.terminal-line * {
  color: #f8f8f2 !important;
}

.terminal-line:hover {
  /* Hover effects disabled */
}

/* Skills section */
.terminal-skills {
  margin-top: 10px;
}

.skill-label {
  font-weight: bold;
  color: var(--color-primary);
  margin-right: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 3px 8px;
  margin: 3px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, rgba(255,209,92,0.2) 0%, rgba(255,209,92,0.1) 100%);
}

/* Status indicator */
.statusbar__status {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  font-size: 12px;
  color: #8BC34A;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

.statusbar__status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #8BC34A;
  margin-right: 5px;
  animation: blink 1.5s infinite;
}

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

/* Glitch effect for command */
.glitch-active {
  position: relative;
  animation: glitch 0.3s infinite;
  text-shadow: 
    2px 0 #ff00ea, 
    -2px 0 #00ffff;
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* Add pulsing animation to skill tags on load */
.skill-tag {
  animation: skillPulse 0.6s ease-out;
  animation-fill-mode: both;
}

.skill-tag:nth-child(1) { animation-delay: 0.1s; }
.skill-tag:nth-child(2) { animation-delay: 0.2s; }
.skill-tag:nth-child(3) { animation-delay: 0.3s; }
.skill-tag:nth-child(4) { animation-delay: 0.4s; }
.skill-tag:nth-child(5) { animation-delay: 0.5s; }
.skill-tag:nth-child(6) { animation-delay: 0.6s; }

@keyframes skillPulse {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  50% {
    transform: scale(1.05) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  .skills-container {
    gap: 8px;
    padding: 15px;
    margin-left: 15px !important;
    max-width: calc(100% - 30px);
  }
  
  .skill-tag {
    font-size: 11px;
    padding: 6px 12px;
  }
}

@media (max-width: 768px) {
  .Terminal__Toolbar {
    height: 32px;
    padding: 0 10px;
  }
  
  .Toolbar__button {
    width: 10px;
    height: 10px;
    margin-right: 6px;
  }
  
  .Toolbar__title {
    font-size: 12px;
    margin-right: 40px;
  }
  
  .terminal-content {
    font-size: 13px;
  }
  
  .terminal-line {
    padding-left: 0;
  }
  
  .terminal-icon {
    font-size: 16px;
  }
  
  .skill-tag {
    font-size: 11px;
    padding: 2px 6px;
    margin-right: 4px;
    margin-bottom: 4px;
  }
}

/* Skills line specific styling */
.terminal-line.skills-line {
  flex-direction: row;
  align-items: flex-start;
  padding: 15px;
}

.skills-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Unique skills container with matrix-style animation */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.5) 0%, 
    rgba(255, 76, 97, 0.05) 50%,
    rgba(0, 0, 0, 0.3) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 76, 97, 0.3);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.3),
    0 4px 20px rgba(255, 76, 97, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.skills-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 76, 97, 0.1), 
    transparent);
  animation: skillsScan 6s linear infinite;
  pointer-events: none;
}

@keyframes skillsScan {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================= */
/* APPLE-STYLE MOBILE OPTIMIZATION */
/* Principles: Clarity, Deference, Depth */
/* ============================================= */

/* Medium screens (tablets and large phones) - iPad/large phones */
@media screen and (max-width: 991px) {
  /* Container - Apple uses generous margins on iPad */
  .Terminal {
    max-width: 100%;
    margin: 0 16px;
    border-radius: 20px; /* Apple's larger corner radius */
    /* Softer shadow - Apple style */
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.08);
  }

  /* Typography - Apple's SF Mono principles: readability first */
  .bg-terminal {
    font-size: 16px !important; /* Apple's minimum readable size */
    line-height: 1.6; /* Apple's optimal line-height for readability */
    padding: 20px 20px; /* Balanced, symmetrical padding */
    /* Use system fonts on iOS for better rendering */
    font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .Terminal__body,
  .Terminal__Prompt {
    font-size: 16px !important;
    font-weight: 400; /* Apple prefers regular weight for body text */
  }

  /* Content spacing - Apple's generous whitespace */
  .terminal-content,
  .terminal-single-line {
    font-size: 16px !important;
    line-height: 1.6; /* Tighter than before - Apple's preference */
    word-break: break-word;
    letter-spacing: -0.01em; /* Subtle tracking for digital screens */
  }

  /* Padding - Apple's symmetric approach */
  .padding-30 {
    padding: 20px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  /* Toolbar - Simplified for mobile */
  .Terminal__Toolbar {
    height: 44px; /* Apple's minimum touch target */
    padding: 0 16px;
  }

  .Terminal__Toolbar::after {
    font-size: 14px;
    font-weight: 500; /* Medium weight for prominence */
  }

  /* Code blocks - Maintain readability */
  .hljs,
  .language-python,
  .language-javascript {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  /* Tags - Apple's pill design */
  .skill-tag {
    font-size: 14px !important; /* Slightly larger for touch */
    padding: 8px 16px; /* More horizontal padding - Apple style */
    border-radius: 12px; /* Softer corners */
    font-weight: 500; /* Medium weight */
  }

  /* Stats - Clear hierarchy */
  .stat-value {
    font-size: 22px !important; /* Prominent numbers */
    font-weight: 600; /* Semibold for emphasis */
  }

  .stat-label {
    font-size: 13px !important;
    font-weight: 400; /* Regular for secondary info */
    opacity: 0.75; /* Apple's secondary text opacity */
  }

  /* Interaction - Apple's subtle feedback */
  .Terminal:hover {
    transform: none; /* No hover on touch devices */
  }

  /* Touch feedback - Apple's spring animation */
  .Terminal:active {
    transform: scale(0.99); /* Subtle scale - less dramatic */
    transition: transform 0.15s cubic-bezier(0.36, 0, 0.66, -0.56); /* Apple's spring curve */
  }
}

/* Landscape mobile adjustments */
@media screen and (max-width: 991px) and (orientation: landscape) {
  .Terminal {
    margin: 0 20px;
  }

  .bg-terminal,
  .terminal-content,
  .Terminal__body {
    font-size: 14px !important;
  }

  .padding-30 {
    padding: 15px;
  }
}

/* iPhone and smaller tablets - Apple's mobile optimization */
@media screen and (max-width: 768px) {
  /* Container - Nearly full width for maximum content area */
  .Terminal {
    margin: 0 6px; /* Minimal margins - almost full width */
    border-radius: 16px;
    width: calc(100% - 12px); /* Almost edge-to-edge */
    /* Lighter shadow on smaller screens */
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.1),
      0 1px 4px rgba(0, 0, 0, 0.06);
  }

  /* Typography - COMPACT for minimal scrolling */
  .bg-terminal {
    font-size: 14px !important; /* Smaller for compactness */
    padding: 14px 12px !important; /* Much tighter padding */
    line-height: 1.4 !important; /* Tighter for less scrolling */
    font-family: ui-monospace, 'SF Mono', monospace;
  }

  .Terminal__body {
    padding: 16px 0 !important; /* Reduce vertical spacing */
    min-height: auto !important; /* Don't force height */
  }

  .Terminal__pane {
    padding: 0 !important; /* No padding - elements control their own */
  }

  .Terminal__Prompt {
    font-size: 14px !important;
    margin-bottom: 8px !important; /* Less space after prompt */
    padding: 12px 10px !important; /* Match terminal-single-line mobile padding */
    border-radius: 8px !important;
    border-left-width: 3px !important;
  }

  .terminal-content {
    padding: 6px 0 !important; /* Very compact vertical spacing */
    font-size: 14px !important;
    line-height: 1.5 !important; /* Tighter line-height */
    letter-spacing: 0 !important; /* Remove letter spacing */
  }

  .terminal-single-line {
    padding: 12px 10px !important; /* Minimal horizontal padding for max text width */
    font-size: 14px !important;
    line-height: 1.5 !important; /* Compact for less scrolling */
    border-radius: 8px !important;
    margin: 0 !important;
    letter-spacing: 0 !important; /* No extra spacing */
    border-left-width: 3px !important; /* Thinner accent */
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* Also reduce padding-30 wrapper */
  .padding-30 {
    padding: 12px 6px !important; /* Minimal wrapper padding */
  }

  /* Reduce spacing between line breaks for compactness */
  .terminal-single-line br {
    margin: 3px 0 !important; /* Minimal paragraph spacing */
  }

  /* Make keywords less prominent */
  .highlight-keyword {
    font-weight: 500 !important; /* Less bold = less height */
  }

  /* Links - Keep touchable but compact */
  .terminal-content a,
  .terminal-single-line a {
    padding: 2px 0; /* Minimal padding */
    display: inline; /* Inline to save space */
    line-height: inherit;
  }

  /* Code blocks - Smooth horizontal scrolling */
  pre, code {
    font-size: 14px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Apple's momentum scrolling */
    scroll-padding: 16px; /* Comfortable scroll padding */
  }

  /* Scrollbar - Subtle iOS-style indicators */
  pre::-webkit-scrollbar,
  code::-webkit-scrollbar,
  .padding-30::-webkit-scrollbar {
    height: 4px; /* Thinner, more subtle */
  }

  pre::-webkit-scrollbar-thumb,
  code::-webkit-scrollbar-thumb,
  .padding-30::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 2px;
  }

  /* Toolbar - Compact but still readable */
  .Terminal__Toolbar {
    height: 44px; /* Keep Apple's touch target */
    padding: 0 12px;
  }

  .Terminal__Toolbar::after {
    font-size: 13px;
    content: "~/"; /* Shorter on mobile */
    font-weight: 500;
  }

  /* Stats - Card-based layout for mobile */
  .stats-row {
    gap: 10px; /* Slightly more generous */
  }

  .stat-box {
    padding: 14px 12px; /* Comfortable touch target */
    border-radius: 12px; /* Apple's rounded corners */
  }

  .stat-icon {
    font-size: 24px !important; /* Larger for visibility */
    margin-bottom: 6px;
  }

  .stat-value {
    font-size: 20px !important; /* Prominent but not overwhelming */
    font-weight: 600; /* Semibold */
    letter-spacing: -0.02em; /* Tight for numbers */
  }

  .stat-label {
    font-size: 12px !important;
    font-weight: 400;
    opacity: 0.7; /* Secondary text */
    letter-spacing: 0.01em; /* Slightly open for small text */
  }

  /* Full width utilization */
  .container .Terminal {
    max-width: 100%;
  }

  /* Safe area support for notched devices */
  .padding-30 {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* iPhone SE and compact phones - Maximum readability focus */
@media screen and (max-width: 576px) {
  /* Container - Maximize screen real estate - nearly edge-to-edge */
  .Terminal {
    margin: 0 4px; /* Absolute minimal margins for max width */
    border-radius: 14px;
    width: calc(100% - 8px); /* Maximum width usage */
    /* Even lighter shadow */
    box-shadow:
      0 2px 12px rgba(0, 0, 0, 0.08),
      0 1px 3px rgba(0, 0, 0, 0.05);
  }

  /* Typography - Ultra-compact for smallest screens */
  .bg-terminal {
    font-size: 13px !important; /* As small as readable */
    padding: 10px 8px !important; /* Minimal padding */
    background: #1a1e21;
    line-height: 1.4 !important; /* Very tight */
    font-family: ui-monospace, 'SF Mono', monospace;
  }

  .Terminal__body {
    padding: 12px 0 !important; /* Minimal vertical space */
  }

  .Terminal__pane {
    padding: 0 !important; /* No padding - elements control their own */
  }

  .Terminal__Prompt {
    font-size: 13px !important;
    margin-bottom: 6px !important;
    padding: 8px 8px !important; /* Match terminal-single-line iPhone SE padding */
    border-radius: 6px !important;
    border-left-width: 2px !important;
  }

  .terminal-content {
    padding: 4px 0 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    letter-spacing: -0.01em !important; /* Tighter for space */
  }

  .terminal-single-line {
    padding: 8px 8px !important; /* Absolute minimal padding for max text area */
    font-size: 13px !important;
    line-height: 1.45 !important;
    border-radius: 6px !important;
    border-left-width: 2px !important; /* Thin accent */
    letter-spacing: -0.01em !important;
  }

  /* Minimal wrapper padding */
  .padding-30 {
    padding: 10px 4px !important; /* Ultra-minimal */
  }

  .bg-terminal {
    padding: 10px 6px !important; /* Reduce bg-terminal padding too */
  }

  .terminal-single-line br {
    margin: 2px 0 !important; /* Minimal line spacing */
  }

  .Terminal__body,
  .hljs {
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-weight: 400;
  }

  /* Simplify prompt on tiny screens */
  .Terminal__Prompt::before {
    content: '$ ';
    color: rgba(255, 255, 255, 0.6);
  }

  /* Toolbar - Minimum height maintained */
  .Terminal__Toolbar {
    height: 44px; /* Never shrink below Apple's minimum */
    padding: 0 8px;
  }

  .Terminal__Toolbar::after {
    font-size: 12px;
    content: "~"; /* Ultra-compact */
    font-weight: 500;
  }

  /* Skills - Compact but touchable */
  .skills-container {
    gap: 8px; /* Maintain touch targets */
    padding: 12px;
    border-radius: 12px;
  }

  .skill-tag {
    font-size: 12px !important; /* Never below 12px for Apple */
    padding: 6px 12px; /* Horizontal padding for easy tapping */
    border-radius: 10px;
    font-weight: 500;
    min-height: 32px; /* Smaller but still tappable */
    display: inline-flex;
    align-items: center;
  }

  /* Content spacing */
  .terminal-content {
    padding-right: 12px;
  }

  .terminal-content span,
  .terminal-single-line span {
    font-weight: 450; /* Slightly heavier for better readability */
  }

  /* Safe areas for iPhone SE */
  .Terminal {
    margin-left: max(8px, env(safe-area-inset-left));
    margin-right: max(8px, env(safe-area-inset-right));
  }

  /* Links maintain 44pt minimum */
  .highlight-keyword,
  .terminal-content a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 4px 2px;
  }
}

/* ============================================= */
/* APPLE ACCESSIBILITY FEATURES */
/* ============================================= */

/* High contrast mode - WCAG AAA compliant */
@media (prefers-contrast: high) {
  .bg-terminal {
    background: #000;
    border: 2px solid #fff;
  }

  .terminal-content,
  .terminal-single-line {
    color: #fff;
    font-weight: 600;
  }

  .Terminal__Toolbar {
    background: #1a1a1a;
    border-bottom: 2px solid #fff;
  }

  .highlight-keyword {
    color: #FFD60A; /* Apple's yellow for high contrast */
    font-weight: 700;
  }
}

/* Reduced motion - Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .Terminal,
  .Terminal:active,
  .skill-tag,
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode specific adjustments */
[data-theme="dark"] .bg-terminal {
  background: #0d0d0d;
}

[data-theme="dark"] .Terminal__Toolbar {
  background: linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 100%);
}

/* Light mode optimizations for readability */
[data-theme="light"] .bg-terminal {
  background: #ffffff;
  color: #1d1d1f; /* Apple's text black */
}

[data-theme="light"] .Terminal__Toolbar {
  background: linear-gradient(to bottom, #f5f5f7 0%, #e8e8ed 100%);
}

[data-theme="light"] .Terminal__Toolbar::after {
  color: rgba(29, 29, 31, 0.8);
}

/* Dynamic Type support - Scale with user preferences */
@media screen and (max-width: 768px) {
  .bg-terminal,
  .terminal-content,
  .Terminal__body {
    font-size: clamp(14px, 4vw, 16px) !important; /* Fluid, bounded typography */
  }

  .Terminal__Toolbar::after {
    font-size: clamp(12px, 3.5vw, 14px);
  }

  .skill-tag {
    font-size: clamp(12px, 3.5vw, 14px) !important;
  }

  .stat-value {
    font-size: clamp(18px, 5vw, 24px) !important;
  }
}
