/* =====================================================
   Vishnu Gonela Portfolio
   components.css — premium UI components
===================================================== */

/* =========================================
   CIRCULAR SKILL PROGRESS
========================================= */
.skill-rings {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 70px;
}

.skill-ring {
    text-align: center;
    width: 150px;
}

.skill-ring svg {
    overflow: visible;
}

.skill-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, .08);
    stroke-width: 10;
}

.skill-ring .ring-fill {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 339.292;      /* 2 * PI * r (r=54) */
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1);
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, .6));
}

.skill-ring .ring-percent {
    font-size: 26px;
    font-weight: 700;
    fill: #e2e8f0;
}

body.light-theme .skill-ring .ring-percent {
    fill: #0f172a;
}

body.light-theme .skill-ring .ring-bg {
    stroke: rgba(15, 23, 42, .1);
}

.skill-ring h5 {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e1;
}

body.light-theme .skill-ring h5 {
    color: #334155;
}

/* =========================================
   TECH STACK ICONS
========================================= */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
}

.tech-item {
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 20px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(12px);
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
    cursor: default;
}

.tech-item i {
    font-size: 44px;
    transition: transform .5s ease, color .4s ease, filter .4s ease;
}

.tech-item span {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(6, 182, 212, .25);
}

.tech-item:hover i {
    transform: rotate(360deg) scale(1.15);
    filter: drop-shadow(0 0 14px currentColor);
}

body.light-theme .tech-item {
    background: #fff;
    border-color: #e2e8f0;
}

body.light-theme .tech-item span {
    color: #334155;
}

/* Brand colors */
.tech-item .fa-aws       { color: #ff9900; }
.tech-item .fa-docker    { color: #2496ed; }
.tech-item .fa-python    { color: #ffd43b; }
.tech-item .fa-linux     { color: #f6f6f6; }
.tech-item .fa-github    { color: #e2e8f0; }
.tech-item .fa-jenkins   { color: #d33833; }
.tech-item .fa-git-alt   { color: #f05032; }
.tech-item .icon-k8s     { color: #326ce5; }
.tech-item .icon-tf      { color: #7b42bc; }
.tech-item .icon-graf    { color: #f46800; }
.tech-item .icon-prom    { color: #e6522c; }

body.light-theme .tech-item .fa-linux,
body.light-theme .tech-item .fa-github { color: #0f172a; }

/* =========================================
   PROJECT CARDS (tilt + glow + tags)
========================================= */
.project-card {
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .3s ease, box-shadow .3s ease;
    will-change: transform;
}

.project-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 6px;
}

.project-tags span {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(37, 99, 235, .15);
    color: #93c5fd;
    border: 1px solid rgba(37, 99, 235, .3);
}

body.light-theme .project-tags span {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: gap .3s ease, color .3s ease;
}

.project-link:hover {
    gap: 12px;
    color: #7dd3fc;
}

/* =========================================
   CERTIFICATES
========================================= */
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}

.cert-badge {
    width: 260px;
    padding: 30px 24px;
    text-align: center;
    border-radius: 20px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(14px);
    transition: transform .4s ease, box-shadow .4s ease;
    position: relative;
    overflow: hidden;
}

.cert-badge::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(6, 182, 212, .5),
        transparent 30%
    );
    animation: certSpin 6s linear infinite;
    opacity: 0;
    transition: opacity .4s;
}

.cert-badge:hover::before { opacity: 1; }

.cert-badge > * { position: relative; z-index: 1; }

@keyframes certSpin { to { transform: rotate(360deg); } }

.cert-badge:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .3);
}

.cert-icon {
    font-size: 46px;
    color: #fbbf24;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, .5));
}

.cert-badge h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

.cert-badge p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

body.light-theme .cert-badge {
    background: #fff;
    border-color: #e2e8f0;
}

/* =========================================
   DEVOPS TERMINAL
========================================= */
.terminal-window {
    max-width: 820px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
    font-family: "SFMono-Regular", "Fira Code", Consolas, monospace;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.terminal-bar .dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.terminal-bar .red    { background: #ff5f56; }
.terminal-bar .yellow { background: #ffbd2e; }
.terminal-bar .green  { background: #27c93f; }

.terminal-bar .title {
    margin-left: 10px;
    font-size: 13px;
    color: #94a3b8;
}

.terminal-body {
    padding: 22px;
    min-height: 320px;
    font-size: 14.5px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
}

.terminal-body .prompt { color: #22c55e; }
.terminal-body .cmd    { color: #7dd3fc; }
.terminal-body .muted  { color: #64748b; }
.terminal-body .ok     { color: #22c55e; }
.terminal-body .cursor {
    display: inline-block;
    width: 9px;
    height: 17px;
    background: #22c55e;
    vertical-align: middle;
    animation: blink .9s steps(2) infinite;
}

/* keep terminal dark even in light theme (authentic look) */
body.light-theme .terminal-window { box-shadow: 0 30px 60px rgba(0, 0, 0, .2); }

/* =========================================
   RESUME PREVIEW MODAL (PDF.js)
========================================= */
.resume-modal .modal-content {
    background: var(--dark2);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
}

body.light-theme .resume-modal .modal-content {
    background: #fff;
    color: #111827;
}

.resume-modal .btn-close {
    filter: invert(1) grayscale(1) brightness(1.5);
}

body.light-theme .resume-modal .btn-close {
    filter: none;
}

.resume-viewer {
    display: flex;
    justify-content: center;
    background: #0b1120;
    border-radius: 10px;
    padding: 14px;
    max-height: 70vh;
    overflow: auto;
}

.resume-viewer canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.resume-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.resume-controls .page-info { font-size: 14px; color: #94a3b8; }

@media (max-width: 576px) {
    .skill-ring { width: 130px; }
    .tech-item { width: 100px; height: 100px; }
    .tech-item i { font-size: 36px; }
    .cert-badge { width: 100%; }
}
