.sketch {
  border: 1px solid var(--manga-gray);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.manga-border {
  border: 2px solid var(--manga-black);
  border-radius: 4px;
}

/* Manga-style effects */
.speech-bubble {
  background: var(--bg-main);
  border: 3px solid var(--manga-black);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  margin: 20px 0;
  box-shadow: 5px 5px 0 var(--manga-gray);
  font-family: var(--font-manga);
  line-height: 1.6;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid var(--manga-black);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid var(--bg-main);
}

.comic-panel {
  background: var(--bg-panel);
  border: 4px solid var(--manga-black);
  border-radius: 0;
  padding: 15px;
  margin: 15px 0;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.comic-panel::before {
  content: 'PANEL';
  position: absolute;
  top: -12px;
  left: 10px;
  background: var(--manga-red);
  color: var(--bg-main);
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: bold;
  font-family: var(--font-manga);
  border-radius: 0;
}

/* Hide PANEL text for education cards */
.education-panel::before {
  content: '' !important;
  display: none !important;
}

.speed-lines {
  position: relative;
}

.speed-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(0,0,0,0.1) 5px,
    rgba(0,0,0,0.1) 10px
  );
  pointer-events: none;
  opacity: 0.3;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.skill-panel {
  text-align: center;
  padding: 10px;
}

.skill-panel h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
}

.skill-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   MANGA JAPANESE STYLE SPEECH BUBBLES
   Authentic manga balloon styles
   ============================================ */

/* Base bubble - Classic manga style with irregular organic shape */
.skill-speech-bubble {
  background: var(--bg-main);
  border: 3px solid var(--manga-black);
  border-radius: 45% 55% 52% 48% / 48% 62% 38% 52%;
  padding: 18px 20px;
  position: relative;
  margin: 15px;
  box-shadow: 4px 4px 0 var(--manga-black);
  font-family: var(--font-manga);
  text-align: center;
  min-height: 85px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: visible;
}

.skill-speech-bubble:hover {
  transform: rotate(-2deg) scale(1.05);
  box-shadow: 6px 6px 0 var(--manga-black);
}

.skill-speech-bubble h4 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-speech-bubble p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== VARIATION 1: Classic Speech Bubble (with tail) ===== */
.skill-speech-bubble.top::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 30%;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 20px solid var(--manga-black);
  transform: rotate(15deg);
}

.skill-speech-bubble.top::after {
  content: '';
  position: absolute;
  top: -16px;
  left: calc(30% + 2px);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 17px solid var(--bg-main);
  transform: rotate(15deg);
}

/* ===== VARIATION 2: Thought Bubble (with small circles) ===== */
.skill-speech-bubble.bottom {
  border-radius: 50%;
}

.skill-speech-bubble.bottom::before {
  content: '';
  position: absolute;
  bottom: -25px;
  left: 25%;
  width: 18px;
  height: 18px;
  background: var(--bg-main);
  border: 3px solid var(--manga-black);
  border-radius: 50%;
}

.skill-speech-bubble.bottom::after {
  content: '';
  position: absolute;
  bottom: -38px;
  left: 15%;
  width: 12px;
  height: 12px;
  background: var(--bg-main);
  border: 3px solid var(--manga-black);
  border-radius: 50%;
}

/* ===== VARIATION 3: Shout/Action Bubble (spiky edges) ===== */
.skill-speech-bubble.shout {
  background: var(--bg-main);
  border: none;
  border-radius: 0;
  clip-path: polygon(
    10% 0%, 20% 2%, 30% 0%, 40% 2%, 50% 0%, 60% 2%, 70% 0%, 80% 2%, 90% 0%, 100% 5%,
    98% 15%, 100% 25%, 98% 35%, 100% 45%, 98% 55%, 100% 65%, 98% 75%, 100% 85%, 95% 100%,
    85% 98%, 75% 100%, 65% 98%, 55% 100%, 45% 98%, 35% 100%, 25% 98%, 15% 100%, 5% 95%,
    0% 85%, 2% 75%, 0% 65%, 2% 55%, 0% 45%, 2% 35%, 0% 25%, 2% 15%, 0% 5%
  );
  box-shadow: 0 0 0 3px var(--manga-black);
}

.skill-speech-bubble.shout:hover {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* ===== VARIATION 4: Whisper Bubble (dashed border) ===== */
.skill-speech-bubble.whisper {
  border: 3px dashed var(--manga-black);
  border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  opacity: 0.9;
}

.skill-speech-bubble.whisper h4 {
  font-size: 0.95rem;
  font-style: italic;
}

/* ===== VARIATION 5: Explosion Bubble (action effect) ===== */
.skill-speech-bubble.explosion {
  background: var(--bg-main);
  border: 4px solid var(--manga-black);
  border-radius: 0;
  clip-path: polygon(
    50% 0%, 61% 5%, 70% 0%, 79% 5%, 85% 0%, 95% 10%, 100% 15%, 95% 25%, 100% 35%,
    95% 45%, 100% 55%, 95% 65%, 100% 75%, 90% 85%, 85% 90%, 75% 85%, 70% 95%,
    60% 90%, 50% 100%, 40% 90%, 30% 95%, 25% 85%, 15% 90%, 10% 85%, 0% 75%,
    5% 65%, 0% 55%, 5% 45%, 0% 35%, 5% 25%, 0% 15%, 10% 5%, 15% 0%, 25% 5%, 39% 0%
  );
  position: relative;
}

/* Speed lines effect for explosion bubbles */
.skill-speech-bubble.explosion::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 5px,
      rgba(0,0,0,0.05) 5px,
      rgba(0,0,0,0.05) 7px
    );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

/* ===== VARIATION 6: Rectangular Manga Panel Style ===== */
.skill-speech-bubble.panel {
  border-radius: 5px;
  border: 4px solid var(--manga-black);
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(255,255,255,0.95) 100%);
  box-shadow: 5px 5px 0 var(--manga-black), 
              inset 0 0 20px rgba(0,0,0,0.05);
}

/* ===== VARIATION 7: Cloud-like Bubble ===== */
.skill-speech-bubble.cloud {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: radial-gradient(circle at 30% 30%, var(--bg-main), rgba(255,255,255,0.9));
}

/* ===== Random rotation variations for natural look ===== */
.skill-speech-bubble:nth-child(2n) {
  transform: rotate(1deg);
}

.skill-speech-bubble:nth-child(3n) {
  transform: rotate(-1deg);
}

.skill-speech-bubble:nth-child(5n) {
  transform: rotate(2deg);
}

.skill-speech-bubble.left::before,
.skill-speech-bubble.left::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
}

.skill-speech-bubble.left::before {
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--manga-black);
}

.skill-speech-bubble.left::after {
  left: -7px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--bg-main);
}

.skill-speech-bubble.right::before,
.skill-speech-bubble.right::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
}

.skill-speech-bubble.right::before {
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid var(--manga-black);
}

.skill-speech-bubble.right::after {
  right: -7px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid var(--bg-main);
}

/* Contact speech bubbles */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.contact-speech-bubble {
  background: var(--bg-main);
  border: 3px solid var(--manga-black);
  border-radius: 25px;
  padding: 20px;
  position: relative;
  box-shadow: 5px 5px 0 var(--manga-gray);
  font-family: var(--font-manga);
  text-align: center;
  transition: transform 0.2s;
}

.contact-speech-bubble:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--manga-gray);
}

.contact-speech-bubble h4 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.contact-speech-bubble p {
  margin: 0;
  font-size: 1rem;
}

.contact-speech-bubble a {
  color: var(--manga-black);
  text-decoration: none;
}

.contact-speech-bubble a:hover {
  text-decoration: underline;
}

/* Different styles for each contact type */
.contact-speech-bubble.email {
  background: linear-gradient(135deg, var(--bg-main) 0%, #f0f8ff 100%);
}

.contact-speech-bubble.phone {
  background: linear-gradient(135deg, var(--bg-main) 0%, #fffacd 100%);
}

.contact-speech-bubble.website {
  background: linear-gradient(135deg, var(--bg-main) 0%, #f5f5f5 100%);
}

/* ============================================
   MANGA GLITCH TEXT EFFECT - Profile Section
   ============================================ */

.manga-glitch-container {
  margin: 20px 0;
  padding: 20px 15px;
  background: #fff;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
  position: relative;
  overflow: hidden;
}

.manga-glitch-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
}

.glitch-wrapper {
  position: relative;
  text-align: center;
  padding: 10px;
}

.glitch {
  font-family: var(--font-manga);
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  color: #000;
  letter-spacing: 0.1em;
  text-shadow: 
    2px 2px 0 #000,
    -1px -1px 0 #000;
  overflow: hidden;
  border-right: 3px solid #000;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #000 }
}

/* Removed glitch animations - no more flickering */
.glitch::before,
.glitch::after {
  display: none;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #fff;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #000, 2px 2px #fff;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(92px, 9999px, 107px, 0);
  }
  10% {
    clip: rect(69px, 9999px, 50px, 0);
  }
  20% {
    clip: rect(21px, 9999px, 85px, 0);
  }
  30% {
    clip: rect(104px, 9999px, 23px, 0);
  }
  40% {
    clip: rect(45px, 9999px, 110px, 0);
  }
  50% {
    clip: rect(72px, 9999px, 8px, 0);
  }
  60% {
    clip: rect(3px, 9999px, 94px, 0);
  }
  70% {
    clip: rect(118px, 9999px, 31px, 0);
  }
  80% {
    clip: rect(56px, 9999px, 73px, 0);
  }
  90% {
    clip: rect(11px, 9999px, 62px, 0);
  }
  100% {
    clip: rect(88px, 9999px, 19px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(65px, 9999px, 119px, 0);
  }
  10% {
    clip: rect(29px, 9999px, 94px, 0);
  }
  20% {
    clip: rect(103px, 9999px, 41px, 0);
  }
  30% {
    clip: rect(14px, 9999px, 76px, 0);
  }
  40% {
    clip: rect(87px, 9999px, 7px, 0);
  }
  50% {
    clip: rect(52px, 9999px, 112px, 0);
  }
  60% {
    clip: rect(98px, 9999px, 33px, 0);
  }
  70% {
    clip: rect(20px, 9999px, 68px, 0);
  }
  80% {
    clip: rect(77px, 9999px, 15px, 0);
  }
  90% {
    clip: rect(42px, 9999px, 91px, 0);
  }
  100% {
    clip: rect(6px, 9999px, 55px, 0);
  }
}

@keyframes glitch-skew {
  0% {
    transform: skew(0deg);
  }
  10% {
    transform: skew(-2deg);
  }
  20% {
    transform: skew(2deg);
  }
  30% {
    transform: skew(-1deg);
  }
  40% {
    transform: skew(1deg);
  }
  50% {
    transform: skew(0deg);
  }
  60% {
    transform: skew(-1deg);
  }
  70% {
    transform: skew(2deg);
  }
  80% {
    transform: skew(-2deg);
  }
  90% {
    transform: skew(1deg);
  }
  100% {
    transform: skew(0deg);
  }
}

.sub-glitch {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: #000;
  margin-top: 20px;
  letter-spacing: 0.2em;
  position: relative;
}

.sub-glitch::before {
  content: '>';
  margin-right: 8px;
}

@keyframes flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .glitch {
    font-size: 2rem;
  }
  
  .sub-glitch {
    font-size: 0.9rem;
  }
  
  .manga-glitch-container {
    padding: 20px 10px;
  }
  
  .speech-bubble {
    padding: 18px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--manga-gray);
  }
}

@media (max-width: 540px) {
  .skill-speech-bubble {
    padding: 14px 16px;
    margin: 12px;
    min-height: 80px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--manga-black);
  }
  
  .skill-speech-bubble h4 {
    font-size: 1rem;
  }
  
  .skill-speech-bubble p {
    font-size: 0.85rem;
  }
  
  .speech-bubble {
    padding: 16px;
    border-width: 2px;
  }
}

@media (max-width: 430px) {
  .skill-speech-bubble {
    padding: 12px 14px;
    margin: 10px;
    min-height: 75px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--manga-black);
  }
  
  .skill-speech-bubble h4 {
    font-size: 0.95rem;
  }
  
  .skill-speech-bubble p {
    font-size: 0.8rem;
  }
  
  .speech-bubble {
    padding: 15px;
  }
}

@media (max-width: 360px) {
  .skill-speech-bubble {
    padding: 12px 14px;
    margin: 8px;
    min-height: 70px;
    border-width: 2px;
  }
  
  .skill-speech-bubble h4 {
    font-size: 0.9rem;
  }
  
  .skill-speech-bubble p {
    font-size: 0.75rem;
  }
}

/* Galaxy Z Fold 6 Cover Display */
@media (max-width: 280px) {
  /* Speech bubbles */
  .skill-speech-bubble {
    padding: 12px 15px;
    margin: 10px;
    min-height: 70px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--manga-black);
  }
  
  .skill-speech-bubble:hover {
    box-shadow: 4px 4px 0 var(--manga-black);
  }
  
  .skill-speech-bubble h4 {
    font-size: 0.9rem;
  }
  
  .skill-speech-bubble p {
    font-size: 0.75rem;
  }
  
  /* Glitch effect */
  .glitch {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
  }
  
  .sub-glitch {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
  
  .manga-glitch-container {
    padding: 15px 8px;
    border-width: 3px;
    box-shadow: 6px 6px 0 #000;
  }
  
  /* Contact bubbles */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .contact-speech-bubble {
    padding: 15px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--manga-gray);
  }
  
  .contact-speech-bubble:hover {
    box-shadow: 5px 5px 0 var(--manga-gray);
  }
  
  .contact-speech-bubble h4 {
    font-size: 1rem;
  }
  
  .contact-speech-bubble p {
    font-size: 0.85rem;
  }
  
  /* Skills grid */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .speech-bubble {
    padding: 15px;
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--manga-gray);
  }
}