@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@500&display=swap');

/* --- Base Styles --- */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #070B0E;
  font-family: 'Fira Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* --- Main Layout --- */
.main-container {
  display: flex;
  height: calc(100vh - 60px);
  width: 100vw;
  overflow: hidden;
  margin-top: 60px;
}

/* --- Header --- */
.header-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(10, 245, 132, 0.1);
  border-bottom: 2px solid #0af58466;
  box-shadow: 0 2px 15px #0af58433;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  animation: headerGlow 1.5s infinite;
}

.header-bar h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #39ff14;
  text-shadow: 0 0 10px #1aff81b9, 0 0 20px #0af58466;
  letter-spacing: 2px;
  animation: textPulse 1.5s infinite;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

/* --- ID Card Panel (Left Side) --- */
.idcard-panel {
  width: 30vw;
  min-width: 252px;
  max-width: 500px;
  height: calc(100vh - 60px);
  background: #000;
  border-right: 2px solid #0e3d1c88;
  position: relative;
  z-index: 2;
  overflow: hidden;
  cursor: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.idcard-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(transparent 0, transparent 1.5em, rgba(20, 255, 118, 0.1) 1.5em, rgba(20, 255, 118, 0.1) 3em),
    repeating-linear-gradient(90deg, transparent 0, transparent 1px, rgba(20, 255, 118, 0.15) 1px, rgba(20, 255, 118, 0.15) 2px),
    linear-gradient(rgba(10, 245, 132, 0.1) 2px, transparent 2px),
    url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBzdHJva2U9IiMxNGZmNzYiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgNTAgSDUwIFYxMDAgSDEwMCBWMTUwIEgxNTAgVjIwMCIvPjxwYXRoIGQ9Ik01MCAwIFY1MCBIMTAwIFYxMDAgSDE1MCBWMTUwIEgyMDAiLz48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI0Ii8+PGNpcmNsZSBjeD0iMTAwIiBjeT0iMTAwIiByPSI0Ii8+PGNpcmNsZSBjeD0iMTUwIiBjeT0iMTUwIiByPSI0Ii8+PGNpcmNsZSBjeD0iNTAiIGN5PSIxNTAiIHI9IjMiLz48Y2lyY2xlIGN4PSIxNTAiIGN5PSI1MCIgcj0iMyIvPjwvZz48L3N2Zz4=');
  background-size: 100% 3em, 100% 1px, 100% 10px, 200px 200px;
  background-repeat: repeat;
  -webkit-mask-image: radial-gradient(circle 80px at var(--x, -500px) var(--y, -500px), black 10%, transparent 100%);
  mask-image: radial-gradient(circle 80px at var(--x, -500px) var(--y, -500px), black 10%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  animation: rainFall 1s linear infinite, lineGlitch 0.2s steps(4) infinite, panCircuit 20s linear infinite;
}

.idcard-panel:hover::before {
  opacity: 1;
}

/* --- ID Card --- */
.idcard {
  width: 90%;
  height: 480px;
  min-width: 220px;
  max-width: 345px;
  padding: 1.5em 1.3em;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  background: rgba(16,25,23,0.32);
  backdrop-filter: blur(8px) saturate(130%);
  border: 1.7px solid #2efda321;
  border-radius: 20px;
  box-shadow: 0 0 22px #27ffad1c, 0 5px 26px #1df59347, 0 0 0 rgba(38,255,196,0.2);
  color: #d7ffe0;
  transform: translateY(50px) scale(0.92);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 1s ease;
  animation: glassEnter 1.2s cubic-bezier(.28,1.08,.31,.96) forwards, pulseGlow 3s ease-in-out infinite;
}

.idcard:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #27ffad66, 0 8px 32px #1df59388, 0 0 10px rgba(38,255,196,0.4);
}

.idcard::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(20, 255, 118, 0.5), transparent);
  animation: scanLine 5s linear infinite;
  z-index: 4;
}

.idcard-avatar-wrap {
  margin: 0.5em 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.idcard-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2.5px solid #18ffb2b7;
  box-shadow: 0 0 16px #06ffba80, 0 2px 12px #18ffb220, 0 0 0 8px #03e69714;
  background: #fff7;
  position: relative;
  overflow: hidden;
  transition: border-color 1s ease, box-shadow 1s ease;
  animation: avatarPopIn .85s cubic-bezier(.57,1.41,.41,.94) .18s backwards;
}

.idcard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.idcard-avatar::before,
.idcard-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  opacity: 0.3;
  z-index: 1;
}

.idcard-avatar::before {
  transform: translateX(-3px);
  animation: glitchTop 2s linear infinite;
}

.idcard-avatar::after {
  transform: translateX(3px);
  animation: glitchBottom 1.5s linear infinite;
}

.idcard h2 {
  font-size: 1.30rem;
  font-weight: 700;
  color: #49fd7e;
  text-shadow: 0 0 10px #1aff81b9;
  letter-spacing: 1.2px;
  margin: 0.5em 0;
  animation: flickerText 1.5s infinite;
}

.idcard p {
  margin: 0.5em 0;
  font-size: 1.03em;
  line-height: 1.33;
  text-align: center;
  color: #a3ffda;
}

.idcard-email {
  font-size: 0.98em;
  font-weight: 500;
  color: #39ffb1;
  text-decoration: none;
  letter-spacing: 0.04em;
  margin: 0.5em 0;
  opacity: 1;
}

.idcard-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0.5em 0;
}

.idcard-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(38,255,196,0.18);
  box-shadow: 0 2px 12px #2ef5d141;
  border: 1.4px solid #23fda868;
  cursor: pointer;
  will-change: transform;
  opacity: 1;
  transition: box-shadow 0.18s, transform 0.15s;
  animation: socialCirclePulse 1.35s cubic-bezier(.48,1.47,.39,.92) backwards;
}

.idcard-social-btn svg {
  display: block;
  fill: white;
}

.idcard-social-btn:hover {
  transform: scale(1.18) translateY(-5px);
  box-shadow: 0 4px 15px #20ffc3ad, 0 0 0 1.5px #16ff8d8c;
  animation: bounceBtn 0.23s .01s forwards;
}

.idcard-social-btn.linkedin { background: rgba(37,119,238,0.16); }
.idcard-social-btn.instagram { background: rgba(225,48,108,0.14); }
.idcard-social-btn.github { background: rgba(31,32,37,0.16); }
.idcard-social-btn.medium { background: rgba(0,171,108,0.14); }

.idcard-links {
  margin: 0.5em 0;
}

.resume-btn {
  display: inline-block;
  padding: 0.38em 1.2em;
  font-family: inherit;
  font-size: .99em;
  color: #80ffb6;
  background: #161A23;
  border: 1px solid #35fd6e;
  border-radius: 6px;
  box-shadow: 0 2px 13px #06f59a2e;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transition: background 0.16s, color 0.16s, box-shadow 0.2s;
}

.resume-btn:hover {
  background: #0af584;
  color: #111;
  box-shadow: 0 4px 19px #0af584aa;
}

/* --- Terminal (Right Side) --- */
.hacker-terminal-bg {
  flex-grow: 1;
  width: 70vw;
  height: calc(100vh - 60px);
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 66% 46%, #1a3530 40%, #060b13 110%);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.hacker-terminal-bg::before {
  content: '0101 1100 0011 1010 1111 0001 1001 0110';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(20, 255, 118, 0.15);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
  white-space: pre-wrap;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
  animation: codeRain 15s linear infinite;
}

#terminal {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 34px 25px 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: rgba(7,15,13,0.98);
  border: 2px solid #0af584;
  border-radius: 0;
  box-shadow: 0 0 25px #1cfc47b4;
  color: #02fe6e;
  font-size: 1.14rem;
  white-space: pre-line;
  overflow: hidden;
  outline: none;
  animation: borderFlicker 2s infinite;
}

#terminal-content {
  flex-grow: 1;
  margin-bottom: 1.20rem;
  line-height: 1.5;
  word-wrap: break-word;
  text-shadow: 0 0 4px #28ff94d4, 0 0 10px #0fb8e512;
  overflow-y: auto;
}

#terminal-content > .terminal-block:first-child {
  margin-top: -60px;
}

.terminal-block {
  margin-bottom: 1.05em;
}

.terminal-line {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.15em;
  font-family: inherit;
}

.terminal-output {
  margin-left: 2.2em;
  line-height: 1.52;
  max-width: 95%;
  word-break: break-word;
  position: relative;
  animation: outputGlitch 3s infinite;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  font-size: 1.16rem;
  color: #14ff76;
  filter: drop-shadow(0 0 4px #41ffb1);
}

.prompt {
  font-weight: 600;
  color: #38ff80;
  text-shadow: 0 0 7px #1bff25a5;
  user-select: none;
}

#terminal-input {
  width: 89vw;
  max-width: 810px;
  margin-left: 0.5em;
  background: transparent;
  border: none;
  outline: none;
  color: #a0fe5d;
  font-family: inherit;
  font-size: inherit;
  text-shadow: 0 0 6px #3eff8e;
  caret-color: #29ff59;
  animation: cursorPulse 1s infinite;
}

#terminal-input:focus {
  outline: none;
}

#terminal-input::selection {
  background: #193a2c;
  color: #52fd39;
}

/* --- Scrollbar Hiding Utility --- */
#terminal-content, .popup-output {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

#terminal-content::-webkit-scrollbar,
.popup-output::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

/* --- Popups --- */
.hacker-popup {
  position: fixed;
  background: rgba(7, 15, 13, 0.95);
  border: 2px solid #ff3333;
  box-shadow: 0 0 15px #ff5555;
  z-index: 1001;
  font-family: 'Fira Mono', monospace;
  color: #ff9999;
  font-size: 1.1rem;
  overflow: hidden;
}

.hacker-popup-large { width: 700px; height: 300px; }
.hacker-popup-medium { width: 500px; height: 250px; }
.hacker-popup-small { width: 550px; height: 700px; }

.hacker-popup-ascii {
  width: 900px;
  height: 400px;
  border-color: #ff3333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-terminal {
  padding: 15px;
  height: 100%;
  box-sizing: border-box;
}

.popup-line {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.5em;
  color: #ff6666;
}

.popup-line::before {
  content: '$';
  margin-right: 0.5em;
  color: #ff3333;
  font-weight: 600;
}

.popup-output {
  line-height: 1.5;
  word-break: break-word;
  max-height: calc(100% - 2em);
  overflow-y: auto;
}

#lockdownPopup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background: #1a0000;
  border: 3px solid #ff3333;
  color: #ff6666;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 0 15px #ff5555;
  animation: popupGlitch 0.8s infinite;
}

#lockdownPopup::before {
  content: "💀";
  display: block;
  margin-bottom: 10px;
  font-size: 40px;
  animation: skullGlitch 0.6s infinite;
}

.access-restored-popup,
.access-granted-popup {
  position: fixed;
  background: rgba(7, 15, 13, 0.95);
  border: 2px solid #39ff14;
  box-shadow: 0 0 15px #39ff14;
  z-index: 1002;
  font-family: 'Fira Mono', monospace;
  color: #39ff14;
  font-size: 1.2rem;
  width: 400px;
  height: 100px;
  overflow: hidden;
}

.access-restored-popup .popup-terminal,
.access-granted-popup .popup-terminal {
  padding: 15px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.access-restored-popup .popup-line,
.access-granted-popup .popup-line {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.5em;
  color: #39ff14;
}

.access-restored-popup .popup-line::before,
.access-granted-popup .popup-line::before {
  content: '$';
  margin-right: 0.5em;
  color: #39ff14;
  font-weight: 600;
}

.access-granted-fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Fira Mono', monospace;
  font-size: 10vw;
  font-weight: 700;
  color: #39ff14;
  text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14, 0 0 40px #39ff14;
  z-index: 1005;
  pointer-events: none;
  white-space: nowrap;
}

.access-granted-fullscreen.flicker-after-typing {
  animation: flickerText-fullscreen 2s infinite;
}

/* --- Theming & State Changes --- */

/* Glitch Mode */
body.glitch-mode-shake {
  animation: glitch 0.5s infinite;
}

body.glitch-mode-overlays {
  background: rgba(255, 0, 0, 0.3);
  overflow: hidden;
}

body.glitch-mode-overlays::before,
body.glitch-mode-overlays::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 990;
}

body.glitch-mode-overlays::before {
  background-color: rgba(255, 0, 0, 0.2);
  animation: glitch-effect 1s steps(5, end) infinite;
  mix-blend-mode: color-dodge;
}

body.glitch-mode-overlays::after {
  background-color: rgba(0, 0, 255, 0.2);
  animation: glitch-effect 1.5s steps(3, end) infinite reverse;
  mix-blend-mode: lighten;
}

/* Lockdown Theme */
#terminal.lockdown {
  background: #1a0000 !important;
  border-color: #ff3333 !important;
  animation: lockdownFlash 1s infinite;
}

#terminal.lockdown #terminal-content {
  color: #ff6666;
  text-shadow: 0 0 10px #ff3333;
}

#terminal.lockdown .terminal-output {
  color: #ff9999;
}

#terminal.lockdown .terminal-input-line,
#terminal.lockdown #terminal-input {
  display: none;
}

/* Horror Theme */
.header-bar.header-horror {
  background: rgba(26, 0, 0, 0.8);
  border-color: #ff3333;
  animation: horrorHeaderPulse 1s infinite;
}

.header-bar.header-horror h1 {
  color: #ff6666;
  animation: headerTextGlitch 0.3s infinite;
}

.header-bar.header-horror .header-buttons {
  opacity: 0;
  pointer-events: none;
}

.idcard.idcard-horror {
  background: rgba(26, 0, 0, 0.6);
  backdrop-filter: blur(5px) saturate(50%);
  border-color: rgba(255, 51, 51, 0.5);
  animation: horrorPulse 1.5s infinite, glassEnter 1.2s cubic-bezier(.28,1.08,.31,.96) forwards;
}

.idcard.idcard-horror:hover {
  transform: scale(1.0);
}

.idcard.idcard-horror .idcard-avatar {
  border-color: #ff3333;
  box-shadow: 0 0 25px #ff3333, inset 0 0 15px #ff0000;
  animation: avatarGlitch 2s infinite, avatarPopIn .85s cubic-bezier(.57,1.41,.41,.94) .18s backwards;
}

.idcard.idcard-horror .idcard-email,
.idcard.idcard-horror .idcard-socials,
.idcard.idcard-horror .idcard-links {
  display: none;
}

.idcard.idcard-horror::after {
  background: linear-gradient(to right, transparent, rgba(255, 0, 0, 0.7), transparent);
  animation: scanLine 2s linear infinite;
}

.id-glitched-text {
  color: #ff3333 !important;
  text-shadow: 2px 2px #00f, -2px -2px #0f0;
  animation: idTextGlitch 0.25s infinite;
}

/* Restored Theme */
#terminal.restored {
  background: rgba(7, 15, 13, 0.98) !important;
  border-color: #39ff14 !important;
  box-shadow: 0 0 25px #39ff14b4 !important;
  animation: borderFlicker 2s infinite;
}

#terminal.restored #terminal-content,
#terminal.restored .terminal-output,
#terminal.restored .prompt,
#terminal.restored #terminal-input {
  color: #39ff14;
  text-shadow: 0 0 7px #39ff14a5;
}

/* Warning Text */
.warning-text {
  color: #ff9966;
}

.warning-highlight-red {
  color: #ff3333;
  font-weight: bold;
  text-shadow: 0 0 5px #ff5555;
}

/* Recovery Animation Classes */
.glitch-in {
  animation: glitch-in 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.email-recovering {
    opacity: 0;
    animation: glitch-in-email 0.7s ease-out forwards;
}

.socials-recovering .idcard-social-btn {
    opacity: 0;
    animation: social-icon-pop-in 0.5s cubic-bezier(.57,1.41,.41,.94) forwards;
}

.socials-recovering .idcard-social-btn:nth-child(1) { animation-delay: 0.1s; }
.socials-recovering .idcard-social-btn:nth-child(2) { animation-delay: 0.2s; }
.socials-recovering .idcard-social-btn:nth-child(3) { animation-delay: 0.3s; }
.socials-recovering .idcard-social-btn:nth-child(4) { animation-delay: 0.4s; }

.links-recovering .resume-btn {
    opacity: 0;
    animation: link-button-slide-in 0.6s ease-out forwards;
}

.links-recovering .resume-btn:nth-child(1) { animation-delay: 0.1s; }
.links-recovering .resume-btn:nth-child(2) { animation-delay: 0.25s; }

/* --- ASCII Animation --- */
.ascii-animation {
  font-family: 'Fira Mono', monospace;
  color: #ff6666;
  text-shadow: 0 0 5px #ff3333;
  line-height: 1.1;
  font-size: 0.9rem;
  white-space: pre;
}

/* --- Animations --- */
@keyframes headerGlow {
  50% { box-shadow: 0 2px 20px #0af58466; }
}

@keyframes textPulse {
  50% { text-shadow: 0 0 15px #1aff81cc, 0 0 25px #0af58499; }
}

@keyframes rainFall {
  to { background-position: 0 3em, 0 0, 0 0, 0 0; }
}

@keyframes lineGlitch {
  25% { background-position: 0 0, 0 2px, 0 0, 0 0; }
  50% { background-position: 0 0, 0 8px, 0 0, 0 0; }
  100% { background-position: 0 0, 0 1px, 0 0, 0 0; }
}

@keyframes panCircuit {
  to { background-position: 0 0, 0 0, 0 0, -200px -200px; }
}

@keyframes pulseGlow {
  50% { box-shadow: 0 0 30px #27ffad33, 0 8px 32px #1df59366, 0 0 10px rgba(38,255,196,0.3); }
}

@keyframes scanLine {
  to { transform: translateY(470px); }
}

@keyframes glassEnter {
  0%   { opacity: 0; transform: translateY(80px) scale(0.85); }
  80%  { opacity: 1; transform: translateY(-3px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes avatarPopIn {
  from { opacity: 0; transform: scale(0.75) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes glitchTop {
  20% { clip-path: inset(10% 0 70% 0); }
  40% { clip-path: inset(30% 0 50% 0); }
  60% { clip-path: inset(50% 0 30% 0); }
  80% { clip-path: inset(70% 0 10% 0); }
}

@keyframes glitchBottom {
  20% { clip-path: inset(70% 0 10% 0); }
  40% { clip-path: inset(50% 0 30% 0); }
  60% { clip-path: inset(30% 0 50% 0); }
  80% { clip-path: inset(10% 0 70% 0); }
}

@keyframes flickerText {
  10% { opacity: 0.6; text-shadow: 0 0 5px #1aff8166; transform: translateX(-2px); }
  15% { opacity: 0.8; text-shadow: 0 0 8px #1aff81b9; transform: translateX(2px); }
  40%, 60% { opacity: 0.7; text-shadow: 0 0 5px #1aff8166; }
}

@keyframes flickerText-fullscreen {
  50% { text-shadow: 0 0 15px #39ff14, 0 0 35px #39ff14, 0 0 60px #39ff14; }
}

@keyframes socialCirclePulse {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes bounceBtn {
  65%  { transform: scale(1.22) translateY(-7px); }
  100% { transform: scale(1.18) translateY(-5px); }
}

@keyframes codeRain {
  50% { opacity: 0.5; }
  100% { transform: translateY(100%); opacity: 0.3; }
}

@keyframes borderFlicker {
  40% { border-color: #07b365; box-shadow: 0 0 15px #1cfc47b4; }
  60% { border-color: #0af58466; box-shadow: 0 0 10px #1cfc47b4; }
}

@keyframes outputGlitch {
  10% { transform: translateX(-1px); opacity: 0.8; }
  15% { transform: translateX(1px); opacity: 0.9; }
}

@keyframes cursorPulse {
  50% { caret-color: #1cffb2; text-shadow: 0 0 8px #3eff8ecc; }
}

@keyframes glitch {
  20% { transform: translate(-5px, -5px); }
  40% { transform: translate(5px, 5px); }
  60% { transform: translate(-5px, 0); }
  80% { transform: translate(5px, 0); }
}

@keyframes glitch-effect {
  10% { clip-path: polygon(0 15%, 100% 15%, 100% 17%, 0 17%); }
  20% { transform: translate(-3px, 0); clip-path: polygon(0 40%, 100% 40%, 100% 42%, 0 42%); }
  30% { clip-path: polygon(0 62%, 100% 62%, 100% 64%, 0 64%); }
  40% { transform: translate(3px, 2px); clip-path: polygon(0 85%, 100% 85%, 100% 87%, 0 87%); }
  50% { transform: translate(-3px, -2px); clip-path: polygon(0 50%, 100% 50%, 100% 52%, 0 52%); }
  60% { transform: translate(3px, -2px); clip-path: polygon(0 22%, 100% 22%, 100% 24%, 0 24%); }
  70% { clip-path: polygon(0 75%, 100% 75%, 100% 77%, 0 77%); }
  80% { transform: translate(-3px, 1px); clip-path: polygon(0 10%, 100% 10%, 100% 12%, 0 12%); }
  90% { transform: translate(3px, 0); clip-path: polygon(0 92%, 100% 92%, 100% 94%, 0 94%); }
}

@keyframes lockdownFlash {
  50% { box-shadow: 0 0 30px #ff5555; }
}

@keyframes popupGlitch {
  20% { transform: translate(-50%, -50%) scale(1.02) rotate(1deg); }
  40% { transform: translate(-50%, -50%) scale(0.98) rotate(-1deg); }
  60% { transform: translate(-50%, -50%) scale(1.01); }
}

@keyframes skullGlitch {
  50% { color: #ff3333; text-shadow: 0 0 10px #ff5555; }
}

@keyframes horrorHeaderPulse {
  50% { box-shadow: 0 0 30px #ff5555; }
}

@keyframes headerTextGlitch {
  25% { transform: skewX(5deg); text-shadow: 2px 0 5px #00f; }
  50% { transform: skewX(-5deg); text-shadow: -2px 0 5px #0f0; }
  75% { transform: skewX(2deg); text-shadow: 0 0 5px #ff3333; }
}

@keyframes horrorPulse {
  50% { box-shadow: 0 0 30px #ff1a1a, inset 0 0 20px #b30000; transform: scale(1.01); }
}

@keyframes avatarGlitch {
  25% { transform: rotate(-3deg) scale(0.98); }
  50% { transform: rotate(3deg) scale(1.02); }
}

@keyframes idTextGlitch {
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(1px, 2px); }
}

@keyframes glitch-in {
  0% { opacity: 0; transform: translateX(-50px) skewX(20deg); }
  60% { opacity: 1; transform: translateX(10px) skewX(-10deg); }
  80% { transform: translateX(-5px) skewX(5deg); }
  100% { transform: translateX(0) skewX(0); }
}

@keyframes glitch-in-email {
  0% { opacity: 0; text-shadow: 0 0 10px #ff3333; transform: translateY(20px) scale(1.2); }
  40% { text-shadow: 2px 2px #00f, -2px -2px #0f0; transform: translateY(-5px) scale(0.9); }
  100% { opacity: 1; text-shadow: none; transform: translateY(0) scale(1); }
}

@keyframes social-icon-pop-in {
    from { opacity: 0; transform: scale(0.5) rotate(-45deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes link-button-slide-in {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Media Queries --- */
@media (max-width: 900px) {
  .header-bar {
    height: 50px;
  }
  .header-bar h1 {
    font-size: 1.4rem;
  }
  .main-container {
    flex-direction: column;
    margin-top: 50px;
  }
  .idcard-panel, .hacker-terminal-bg {
    width: 100vw !important;
    max-width: unset;
    height: 50vh;
  }
  .idcard {
    max-width: 90%;
    height: 420px;
    padding: 1em 1.2em;
  }
  .idcard h2 {
    font-size: 1.1rem;
  }
  .idcard p {
    font-size: 0.9em;
  }
  .idcard-email {
    font-size: 0.85em;
  }
  #terminal {
    height: 48vh;
    width: 98vw;
    padding: 20px 15px;
  }
  #terminal-input {
    width: 85vw;
  }
  .hacker-terminal-bg::before {
    font-size: 0.7rem;
    line-height: 1.4;
  }
  .hacker-popup-large {
    width: 90vw;
    max-width: 360px;
    height: 240px;
  }
  .hacker-popup-medium {
    width: 80vw;
    max-width: 320px;
    height: 200px;
  }
  .hacker-popup-small {
    width: 70vw;
    max-width: 280px;
    height: 160px;
  }
   .hacker-popup-ascii {
    width: 95vw;
    height: auto;
  }
  .ascii-animation {
    font-size: 0.5rem;
    line-height: 1;
  }
  .access-restored-popup,
  .access-granted-popup {
    width: 80vw;
    max-width: 320px;
    height: 80px;
    font-size: 1rem;
  }
}

/* --- New Animated Warning Icon --- */
.warning-icon {
  /* Set the color for the SVG shape */
  color: #ff4444; 
  display: inline-block;
  vertical-align: middle; /* Aligns the icon nicely with the text */
  margin-right: 2px;
  width: 30px; /* Set a specific size */
  height: 30px;
  animation: warning-glow 1.3s ease-in-out infinite;
}

/* This animation keyframe does NOT need to change */
@keyframes warning-glow {
  0%, 100% {
    text-shadow: none;
    filter: drop-shadow(0 0 0px #ff1111); /* Use filter for better SVG glow */
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 8px #ff1111, 0 0 16px #ff4444;
    filter: drop-shadow(0 0 6px #ff1111);
    transform: scale(1.1);
  }
}

.glowing-text-animation {
  animation: glowing-text-animation 1.3s ease-in-out infinite;
}

/* These are the keyframes for the new, more subtle animation */
@keyframes glowing-text-animation {
  0%, 100% {
    /* Starts and ends with no glow */
    text-shadow: none;
  }
  50% {
    /* At its peak, the glow is now smaller (5px) and simpler */
    text-shadow: 0 0 5px #ff5555;
  }
}