/* Profile Image Float (Bulletproof Markdown approach) */
.profile-image-float {
    float: right;
    width: 240px;
    border-radius: 20px;
    border: 5px solid var(--md-default-bg-color);
    box-shadow: var(--md-shadow-z3);
    margin-left: 40px;
    margin-bottom: 20px;
}

.title-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.45rem;
}

/* Mobile Responsiveness for Profile Image */
@media screen and (max-width: 768px) {
    .profile-image-float {
        float: none;
        display: block;
        margin: 0 auto 30px auto;
    }
    h1 {
        text-align: center;
    }
}

/* Custom Tech Tags (Matches your resume aesthetic) */
.tech-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px 4px 4px 0;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--md-primary-fg-color--transparent);
    color: var(--md-primary-fg-color);
    border: 1px solid var(--md-primary-fg-color);
    font-family: 'Fira Code', monospace;
}

/* Terminal Box Formatting */
.terminal-box {
    background-color: #1e1e1e;
    color: #00ff00;
    font-family: 'Fira Code', monospace;
    padding: 20px;
    border-radius: 8px;
    border-top: 30px solid #333;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.terminal-box::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10px;
    width: 12px;
    height: 12px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #00ff00;
    animation: typing 3s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: #00ff00; } }

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .profile-wrapper {
        flex-direction: column-reverse;
        text-align: center;
    }
    .profile-text .social-links {
        justify-content: center;
    }
}

/* Modern Stack Badges to replace img.shields */
.stack-badge {
    display: inline-block;
    padding: 8px 18px;
    margin: 5px 8px 10px 0;
    border-radius: 8px;
    background-color: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lighter);
    color: var(--md-default-fg-color) !important;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
    box-shadow: var(--md-shadow-z1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.stack-badge:hover {
    box-shadow: var(--md-shadow-z2);
    border-color: var(--md-primary-fg-color);
    color: var(--md-primary-fg-color) !important;
    transform: translateY(-2px);
}

.stack-badge .twemoji {
    vertical-align: middle;
    margin-right: 6px;
    height: 1.2em;
    width: 1.2em;
}

/* Modern Tech Chips for Grid Cards */
.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin: 4px 4px 4px 0;
    border-radius: 6px;
    background-color: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lighter);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--md-default-fg-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.tech-chip:hover {
    background-color: var(--md-primary-fg-color--transparent);
    border-color: var(--md-primary-fg-color);
    transform: translateY(-1px);
}

.tech-chip .twemoji {
    height: 1.2em;
    width: 1.2em;
}

.tech-tags img {
  height: 28px;
}

/* Portfolio refinements */
.md-grid {
    max-width: 1220px;
}

.md-typeset .grid.cards > ul > li {
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover {
    transform: translateY(-3px);
    box-shadow: var(--md-shadow-z2);
    border-color: var(--md-accent-fg-color);
}

.md-typeset .md-button {
    border-radius: 8px;
}

.md-typeset h1 {
    font-weight: 750;
    letter-spacing: -0.03em;
}

.md-typeset h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-wrapper .profile-text {
    flex: 1;
}

.profile-wrapper .profile-image img {
    width: 240px;
    border-radius: 20px;
    box-shadow: var(--md-shadow-z3);
}

@media screen and (max-width: 768px) {
    .typing-effect {
        white-space: normal;
        border-right: 0;
        animation: none;
    }

    .terminal-box {
        overflow-x: auto;
    }

    .profile-wrapper {
        gap: 1.5rem;
    }

    .profile-wrapper .profile-image img {
        width: 190px;
    }
}

img[src*="img.shields.io"] {
  border-radius: 6px;
  overflow: hidden;
  margin: 2px;
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
  margin-top: 12px;
}

.lang-row {
  display: grid;
  grid-template-columns: 150px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.lang-name {
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-flag {
  width: 22px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}

.lang-track {
  background: #2b2f36;
  border-radius: 999px;
  height: 12px;
  width: 100%;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4EAA25, #017CEE);
}

.lang-pct {
  font-size: 0.85em;
  opacity: 0.8;
  text-align: right;
}