:root {
    --bg: #120a24;
    --bg-soft: #1a1033;
    --panel: #160d2a;
    --panel-2: #0e071a;
    --fg: #f6f0ff;
    --muted: #b7a7d9;
    --accent: #b24bff;
    --accent-2: #6a7bff;
    --accent-3: #ff4fd8;
    --border: rgba(178, 75, 255, 0.45);
    --shadow: rgba(178, 75, 255, 0.4);
    --font-display: 'Press Start 2P', monospace;
    --font-body: 'IBM Plex Mono', monospace;
    --radius: 16px;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--fg);
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 16% 20%, rgba(178, 75, 255, 0.32), transparent 48%),
        radial-gradient(circle at 85% 12%, rgba(106, 123, 255, 0.3), transparent 44%),
        radial-gradient(circle at 50% 85%, rgba(255, 79, 216, 0.28), transparent 52%),
        linear-gradient(180deg, rgba(18, 12, 34, 0.94), rgba(10, 8, 22, 0.96));
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0px,
        rgba(255, 255, 255, 0.02) 1px,
        rgba(0, 0, 0, 0) 3px,
        rgba(0, 0, 0, 0) 6px
    );
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
    animation: scanlines 10s linear infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
    z-index: 1;
}

.page {
    position: relative;
    z-index: 2;
}

.grid-overlay {
    position: fixed;
    inset: -35% -10% 0 -10%;
    background-image:
        linear-gradient(rgba(106, 123, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(178, 75, 255, 0.16) 1px, transparent 1px);
    background-size: 130px 130px;
    transform: perspective(900px) rotateX(55deg) translateY(40px);
    opacity: 0.55;
    z-index: 0;
    animation: gridMove 22s linear infinite;
    pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
.navbar-brand,
.section-title {
    font-family: var(--font-display);
    letter-spacing: 1px;
}

h1,
.display-4 {
    line-height: 1.2;
}

.display-4 {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
}

.lead {
    font-size: clamp(1rem, 2.1vw, 1.2rem);
}

a {
    color: var(--accent-2);
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

.navbar {
    background: rgba(9, 10, 16, 0.75);
    border-bottom: 1px solid rgba(178, 75, 255, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.nav-link {
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.2rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent);
}

.hero {
    padding-bottom: 2rem;
}

.hero-panel {
    animation: glowPulse 6s ease-in-out infinite;
}

.terminal-window {
    background: linear-gradient(180deg, rgba(22, 14, 44, 0.96), rgba(12, 8, 24, 0.96));
    border: 1px solid var(--border);
    box-shadow: 0 0 0 1px rgba(106, 123, 255, 0.18), 0 28px 60px rgba(0, 0, 0, 0.55), inset 0 0 20px rgba(178, 75, 255, 0.16);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.terminal-window::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(106, 123, 255, 0.25);
    border-radius: calc(var(--radius) - 6px);
    pointer-events: none;
    opacity: 0.35;
}

.terminal-window::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(178, 75, 255, 0.18), transparent 40%, rgba(106, 123, 255, 0.16));
    opacity: 0.5;
    pointer-events: none;
}

.terminal-window > * {
    position: relative;
    z-index: 1;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(106, 123, 255, 0.25);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.terminal-title {
    color: var(--accent-2);
    animation: terminalFlicker 4.5s infinite;
}

.terminal-title-sm {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--accent-2);
    letter-spacing: 2px;
    animation: terminalFlicker 5.2s infinite;
}

.terminal-controls span {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(178, 75, 255, 0.7);
}

.terminal-controls span:nth-child(2) {
    background: var(--accent-2);
    box-shadow: 0 0 10px rgba(106, 123, 255, 0.7);
}

.terminal-controls span:nth-child(3) {
    background: var(--accent-3);
    box-shadow: 0 0 10px rgba(255, 79, 216, 0.7);
}

.terminal-log p {
    margin-bottom: 0.25rem;
    color: var(--muted);
}

.terminal-lead {
    color: var(--fg);
}

.text-glow {
    color: var(--accent);
    text-shadow: 0 0 12px var(--shadow), 0 0 30px rgba(178, 75, 255, 0.25);
}

.flicker {
    animation: glowPulse 6s ease-in-out infinite, terminalFlicker 3.8s infinite;
}

.blink-soft {
    animation: softBlink 2.2s infinite;
}

.text-accent {
    color: var(--accent-2);
}

.text-muted {
    color: var(--muted) !important;
}

.btn-neo {
    background: linear-gradient(180deg, var(--accent), var(--accent-3));
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #12071c;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 0 0 1px rgba(178, 75, 255, 0.35), 0 12px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-neo:hover,
.btn-neo:focus {
    background: linear-gradient(180deg, #c96bff, #ff6ee0);
    color: #12071c;
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(106, 123, 255, 0.45), 0 16px 30px rgba(0, 0, 0, 0.4);
}

.btn-neo-outline {
    background: rgba(106, 123, 255, 0.12);
    border: 1px solid rgba(106, 123, 255, 0.65);
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    padding: 0.55rem 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-neo-outline:hover,
.btn-neo-outline:focus {
    background: rgba(106, 123, 255, 0.28);
    color: var(--fg);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.section {
    padding: 4.5rem 0;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.65rem;
    color: var(--accent-2);
}

.section-title {
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
}

.section-header,
.section-heading {
    margin-bottom: 1.5rem;
}

.stats-list li {
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(106, 123, 255, 0.25);
}

.stats-list li:last-child {
    border-bottom: none;
}

.status-block {
    font-size: 0.95rem;
}

.portrait-frame {
    margin-bottom: 0.5rem;
    padding: 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(106, 123, 255, 0.35);
    background: rgba(8, 6, 18, 0.92);
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 18px rgba(106, 123, 255, 0.12);
}

.ascii-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.95;
    mix-blend-mode: screen;
    z-index: 0;
    pointer-events: none;
}

.portrait-frame::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(178, 75, 255, 0.35);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0.5;
}

.portrait-frame img {
    width: 80%;
    max-height: 100%;
    height: auto;
    border-radius: 8px;
    filter: contrast(1.05) saturate(1.1);
    position: relative;
    z-index: 1;
    display: block;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.portrait-placeholder {
    font-family: var(--font-display);
    letter-spacing: 2px;
    color: var(--accent-2);
    text-transform: uppercase;
    background-image: linear-gradient(135deg, rgba(106, 123, 255, 0.22), rgba(178, 75, 255, 0.24));
}

.portrait-placeholder span {
    position: relative;
    z-index: 1;
}

.info-panel {
    padding: 1.25rem;
    border: 1px solid rgba(178, 75, 255, 0.25);
    background: rgba(10, 7, 20, 0.85);
    border-radius: 12px;
}

.badge-skill {
    background: rgba(178, 75, 255, 0.18);
    color: var(--fg);
    border: 1px solid rgba(178, 75, 255, 0.4);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.6rem;
}

.skill-group {
    position: relative;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 1.6rem 1.4rem;
    min-height: 240px;
    border-radius: 18px;
    border: 1px solid rgba(106, 123, 255, 0.32);
    background: linear-gradient(180deg, rgba(22, 12, 44, 0.96), rgba(10, 8, 20, 0.86));
    box-shadow: 0 0 0 1px rgba(178, 75, 255, 0.22), 0 20px 40px rgba(0, 0, 0, 0.38);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(178, 75, 255, 0.18);
    border-radius: 14px;
    pointer-events: none;
    opacity: 0.45;
}

.skill-icon {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, rgba(178, 75, 255, 0.28), rgba(10, 8, 20, 0.8));
    border: 1px solid rgba(106, 123, 255, 0.55);
    box-shadow: inset 0 0 24px rgba(178, 75, 255, 0.25), 0 16px 30px rgba(0, 0, 0, 0.38);
}

.skill-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(178, 75, 255, 0.45));
}

.skill-label {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--fg);
}

.skill-meter {
    display: grid;
    grid-template-columns: repeat(6, 20px);
    gap: 8px;
    justify-content: center;
}

.skill-seg {
    width: 20px;
    height: 13px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
    image-rendering: pixelated;
}

.project-progress {
    margin-top: 1rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(106, 123, 255, 0.3);
    background: rgba(8, 6, 18, 0.75);
}

.project-progress__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-2);
}

.project-progress__value {
    color: var(--fg);
}

.project-progress__bar {
    margin-top: 0.45rem;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid rgba(120, 130, 150, 0.7);
    background: linear-gradient(180deg, rgba(210, 212, 220, 0.9), rgba(165, 170, 185, 0.85));
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 3px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.35);
}

.project-progress__seg {
    height: 12px;
    background: rgba(30, 42, 80, 0.25);
    border: 1px solid rgba(30, 42, 80, 0.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.project-progress__seg.is-on {
    background: linear-gradient(180deg, #5c79ff, #2a3fb8);
    border-color: rgba(22, 34, 110, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 8px rgba(92, 121, 255, 0.45);
}

.project-progress--done .project-progress__seg.is-on {
    background: linear-gradient(180deg, #4fffb5, #1a8f61);
    border-color: rgba(14, 80, 50, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 10px rgba(79, 255, 181, 0.45);
}

.skill-meter--low .skill-seg.is-on {
    background: #ff8a3c;
    border-color: rgba(255, 138, 60, 0.8);
    box-shadow: 0 0 10px rgba(255, 138, 60, 0.45);
}

.skill-meter--mid .skill-seg.is-on {
    background: #6a7bff;
    border-color: rgba(106, 123, 255, 0.8);
    box-shadow: 0 0 10px rgba(106, 123, 255, 0.45);
}

.skill-meter--high .skill-seg.is-on {
    background: #48f7a8;
    border-color: rgba(72, 247, 168, 0.85);
    box-shadow: 0 0 12px rgba(72, 247, 168, 0.5);
}

.cert-card {
    min-height: 240px;
}

.cert-logo {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    border: 1px solid rgba(178, 75, 255, 0.35);
    background: rgba(178, 75, 255, 0.18);
    display: grid;
    place-items: center;
}

.cert-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.project-card .badge-skill {
    font-size: 0.55rem;
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.45);
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(106, 123, 255, 0.25);
    border-radius: 10px;
    background: rgba(8, 6, 18, 0.75);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.65rem;
}

.terminal-line::before {
    content: '>';
    color: var(--accent-2);
}

.terminal-prompt {
    color: var(--accent);
    font-weight: 600;
}

.terminal-command {
    color: var(--fg);
    opacity: 0.85;
}


.project-wrap {
    position: relative;
}

.project-card.in_progress {
    border: 1px solid rgba(255, 165, 0, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 165, 0, 0.3), 0 0 16px rgba(255, 165, 0, 0.45), 0 0 36px rgba(255, 120, 0, 0.35), 0 20px 40px rgba(0, 0, 0, 0.45);
}

.project-card.done {
    border: 1px solid rgba(0, 200, 120, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 200, 120, 0.3), 0 0 16px rgba(0, 200, 120, 0.45), 0 0 36px rgba(0, 255, 170, 0.3), 0 20px 40px rgba(0, 0, 0, 0.45);
}

.status-pill {
    font-size: 0.48rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    font-family: var(--font-display);
}

.status-pill--bottom-right {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.status-pill--small {
    font-size: 0.32rem;
    padding: 0.13rem 0.36rem;
}

.project-card.in_progress .status-pill {
    color: #ffb454;
    border-color: rgba(255, 180, 84, 0.6);
    background: rgba(255, 180, 84, 0.15);
}

.project-card.done .status-pill {
    color: #7dffb0;
    border-color: rgba(0, 200, 120, 0.6);
    background: rgba(0, 200, 120, 0.15);
}

.project-star {
    position: absolute;
    top: -34px;
    right: -18px;
    width: 102px;
    height: 102px;
    background: #ffd84a;
    color: #ffffff;
    font-size: 0.4rem;
    font-weight: 700;
    font-family: var(--font-display);
    display: grid;
    place-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000000;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0b0714, 0 12px 24px rgba(0, 0, 0, 0.35);
    image-rendering: pixelated;
    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
    );
    animation: starPulse 3.6s ease-in-out infinite;
    z-index: 3;
}

.project-star__label {
    transform: translate(0px, -5px);
    display: block;
    line-height: 1.1;
    text-align: center;
}

@keyframes starPulse {
    0%,
    100% {
        transform: rotate(-2deg) scale(1);
    }
    50% {
        transform: rotate(3deg) scale(1.04);
    }
}

.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(178, 75, 255, 0.35);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.05rem;
    top: 1.2rem;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(178, 75, 255, 0.85);
}

.experience-media {
    margin-bottom: 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(106, 123, 255, 0.25);
    box-shadow: inset 0 0 18px rgba(106, 123, 255, 0.12);
}

.experience-media img {
    display: block;
    width: 100%;
    height: auto;
}

.footer {
    border-top: 1px solid rgba(178, 75, 255, 0.25);
    background: rgba(9, 10, 16, 0.75);
}

.socials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(106, 123, 255, 0.35);
    background: rgba(10, 8, 20, 0.9);
    display: grid;
    place-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-link:hover,
.social-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 4, 14, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1.5rem;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-dialog {
    width: min(820px, 95vw);
}

.modal-close {
    background: transparent;
    border: 1px solid rgba(106, 123, 255, 0.35);
    color: var(--accent-2);
    font-family: var(--font-display);
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.modal-body {
    margin-top: 1rem;
}

.modal-list {
    margin: 0 0 1.2rem;
    padding-left: 1.1rem;
    color: var(--muted);
}

.modal-list li {
    margin-bottom: 0.35rem;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(106, 123, 255, 0.25);
    background: rgba(8, 6, 18, 0.8);
}

.terminal-preview {
    position: relative;
    overflow: hidden;
}

.terminal-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 35%, rgba(106, 123, 255, 0.08));
    animation: screenSweep 6s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

.terminal-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.04) 0px,
        rgba(255, 255, 255, 0.02) 1px,
        rgba(0, 0, 0, 0) 3px,
        rgba(0, 0, 0, 0) 6px
    );
    opacity: 0.2;
    pointer-events: none;
}

.terminal-preview .modal-body {
    position: relative;
    z-index: 1;
}

.terminal-blink {
    animation: softBlink 2.4s infinite;
}

.terminal-list li {
    position: relative;
    padding-left: 0.6rem;
}

.terminal-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-2);
}

@keyframes screenSweep {
    0% {
        transform: translateX(-100%);
        opacity: 0.1;
    }
    50% {
        opacity: 0.35;
    }
    100% {
        transform: translateX(100%);
        opacity: 0.1;
    }
}

.is-hidden {
    display: none !important;
}

.typewriter {
    display: inline-block;
    min-height: 1.2em;
    position: relative;
}

.typewriter::after {
    content: '_';
    margin-left: 6px;
    color: var(--accent);
    animation: caret 0.8s steps(2) infinite;
}

.typewriter.is-done::after {
    opacity: 0.4;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes gridMove {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 0 240px, 240px 0;
    }
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

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

@keyframes terminalFlicker {
    0%,
    100% {
        opacity: 1;
    }
    6% {
        opacity: 0.85;
    }
    8% {
        opacity: 1;
    }
    10% {
        opacity: 0.75;
    }
    12% {
        opacity: 1;
    }
    55% {
        opacity: 0.9;
    }
    57% {
        opacity: 1;
    }
}

@keyframes softBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
        opacity: 0.25;
    }
    50% {
        background-position: 0 120px;
        opacity: 0.35;
    }
    100% {
        background-position: 0 240px;
        opacity: 0.25;
    }
}

@media (max-width: 991px) {
    .section {
        padding: 3.5rem 0;
    }

    .navbar-brand {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }

    .skill-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 575px) {
    .nav-link {
        font-size: 0.65rem;
    }

    .terminal-header {
        font-size: 0.65rem;
    }

    .skill-card {
        min-height: 210px;
        padding: 1.2rem 1rem;
    }

    .skill-icon {
        width: 120px;
        height: 120px;
    }

    .skill-icon img {
        width: 96px;
        height: 96px;
    }

    .skill-label {
        font-size: 0.95rem;
    }

    .skill-meter {
        grid-template-columns: repeat(6, 16px);
        gap: 6px;
    }

    .skill-seg {
        width: 16px;
        height: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
