@property --tborder { syntax: '<color>'; inherits: true; initial-value: rgba(204,85,0,0.35); }
@property --tshadow { syntax: '<color>'; inherits: true; initial-value: rgba(204,85,0,0.15); }
@property --thighlight { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.15); }
@property --tg1 { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.3); }
@property --tg2 { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.15); }
@property --tg3 { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.5); }
@property --tg4 { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.22); }
@property --tg5 { syntax: '<color>'; inherits: true; initial-value: rgba(255,119,0,0.1); }

.terminal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  width: min(85vw, 640px);
  margin: 0;
  max-height: min(80vh, 600px);
  background: rgba(190, 205, 220, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--tborder);
  border-radius: 20px;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: clamp(13px, 1.4vw + 2px, 18px);
  color: #111;
  overflow: hidden;
  box-shadow: 0 0 30px var(--tshadow), inset 0 0 30px rgba(255,255,255,0.05);
  animation: termColors 18s ease-in-out infinite, borderGlow 5s ease-in-out infinite;
  filter: url(#jello);
}

.terminal.overlay {
  display: block;
}

.terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.015) 30%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.015) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
@keyframes termColors {
  0%, 100% {
    --tborder: rgba(204,85,0,0.35);
    --tshadow: rgba(204,85,0,0.15);
    --thighlight: rgba(255,119,0,0.15);
    --tg1: rgba(255,119,0,0.3);
    --tg2: rgba(255,119,0,0.15);
    --tg3: rgba(255,119,0,0.5);
    --tg4: rgba(255,119,0,0.22);
    --tg5: rgba(255,119,0,0.1);
  }
  33% {
    --tborder: rgba(0,102,170,0.35);
    --tshadow: rgba(0,102,170,0.15);
    --thighlight: rgba(0,153,238,0.15);
    --tg1: rgba(0,153,238,0.3);
    --tg2: rgba(0,153,238,0.15);
    --tg3: rgba(0,153,238,0.5);
    --tg4: rgba(0,153,238,0.22);
    --tg5: rgba(0,153,238,0.1);
  }
  66% {
    --tborder: rgba(0,119,68,0.35);
    --tshadow: rgba(0,119,68,0.15);
    --thighlight: rgba(0,187,102,0.15);
    --tg1: rgba(0,187,102,0.3);
    --tg2: rgba(0,187,102,0.15);
    --tg3: rgba(0,187,102,0.5);
    --tg4: rgba(0,187,102,0.22);
    --tg5: rgba(0,187,102,0.1);
  }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--tborder); box-shadow: 0 0 20px var(--tshadow), inset 0 0 20px rgba(255,255,255,0.05); }
  50% { border-color: var(--tborder); box-shadow: 0 0 40px var(--tshadow), inset 0 0 40px rgba(255,255,255,0.08); }
}

.term-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: clamp(6px, 1vw + 4px, 12px) clamp(10px, 2vw, 20px);
  background: rgba(170, 185, 200, 0.75);
  border-bottom: 1px solid var(--tborder);
  font-size: clamp(11px, 1.2vw + 1px, 15px);
  color: #111;
  user-select: none;
  letter-spacing: 0.03em;
}

.term-close {
  display: none;
  cursor: pointer;
  color: #111;
  font-size: 14px;
  line-height: 1;
  margin-right: 10px;
  transition: color 0.2s;
}
.term-close:hover {
  color: #000;
}
.terminal.overlay .term-close {
  display: inline;
}

.term-title {
  flex: 1;
}

.term-screen {
  position: relative;
  z-index: 1;
  padding: clamp(8px, 1.5vw, 16px) clamp(12px, 2.5vw, 24px) 4px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  scrollbar-width: none;
}
.term-screen::-webkit-scrollbar {
  display: none;
}

.term-input-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: clamp(2px, 0.5vw + 1px, 6px) clamp(12px, 2.5vw, 24px) clamp(8px, 1.5vw, 14px);
  gap: 0;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #111;
  font: inherit;
  font-size: 14px;
  caret-color: #111;
  padding: 0;
  margin: 0;
}

.l {
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.indent {
  padding-left: 22px;
}

.p {
  color: #111;
  margin-right: 10px;
  text-shadow: 0 0 5px var(--tg1), 0 0 12px var(--tg2);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 5px var(--tg1), 0 0 12px var(--tg2); }
  50% { text-shadow: 0 0 10px var(--tg3), 0 0 25px var(--tg4), 0 0 45px var(--tg5); }
}

.file-link {
  display: inline-block;
  color: #111;
  text-decoration: none;
  padding: 0 4px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.file-link:hover {
  background: var(--thighlight);
  color: #000;
}

.terminal ::selection {
  background: var(--thighlight);
  color: #000;
}

.terminal.page {
  display: block;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(98vw, 1400px);
  margin: 40px auto;
  max-height: none;
  animation: termColors 18s ease-in-out infinite, borderGlow 5s ease-in-out infinite;
}
.terminal.page .term-screen {
  max-height: 70vh;
}

.profile-img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 16px auto;
}

blockquote {
  border-left: 3px solid var(--tborder);
  margin: 16px 0;
  padding: 8px 16px;
  font-style: italic;
  color: #111;
}

.tech-tags {
  margin-top: 2px;
  margin-bottom: 6px;
  color: #111;
  font-size: 0.9em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 20px;
}

.term-btn {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--tborder);
  border-radius: 3px;
  color: #111;
  text-decoration: none;
  font-size: 0.85em;
  font-family: inherit;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}
.term-btn:hover {
  background: var(--thighlight);
}

.social-row {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  align-items: center;
}
.social-row a {
  display: inline-block;
  line-height: 0;
}
.social-row img {
  width: 28px;
  height: 28px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.social-row img:hover {
  opacity: 1;
}

.project-card {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tborder);
}
.project-card:last-child {
  border-bottom: none;
}
.project-card h4 {
  font-size: 1.1em;
  margin: 0 0 8px;
  font-weight: 600;
  color: #111;
}
.project-card img {
  float: left;
  max-width: 35%;
  height: auto;
  margin: 0 14px 8px 0;
}
.project-card p {
  margin: 0 0 6px;
  line-height: 1.6;
}
