:root {
    --accent-1: #00f0ff;
    --accent-2: #00aaff;
    --accent-3: #7b61ff;
    --bg-1: #0d1b2a;
    --bg-2: #1b263b;
    --card-bg: rgba(13, 27, 42, 0.95);
    --header-height: 88px;
    --glass: rgba(13, 27, 42, 0.75);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ========== PRELOADER ========== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.2rem;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 240, 255, 0.15);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.preloader-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-1);
    font-size: 1rem;
    letter-spacing: 3px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ========== PARTICLE CANVAS ========== */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, rgba(13, 27, 42, 0.92), rgba(27, 38, 59, 0.92));
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: default;
    transition: transform 0.25s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    align-items: center;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.15rem 0;
    transition: color 0.25s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 0;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    transition: width 0.25s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent-1);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.25);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 6px;
    border: none;
    background: none;
    z-index: 1001;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--accent-1);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========== SECTIONS ========== */
section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: var(--header-height);
}

/* scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* stagger children */
.reveal-children>* {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-children.visible>*:nth-child(1) {
    transition-delay: 0.05s;
}

.reveal-children.visible>*:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-children.visible>*:nth-child(3) {
    transition-delay: 0.15s;
}

.reveal-children.visible>*:nth-child(4) {
    transition-delay: 0.2s;
}

.reveal-children.visible>*:nth-child(5) {
    transition-delay: 0.25s;
}

.reveal-children.visible>*:nth-child(6) {
    transition-delay: 0.3s;
}

.reveal-children.visible>*:nth-child(7) {
    transition-delay: 0.35s;
}

.reveal-children.visible>*:nth-child(8) {
    transition-delay: 0.4s;
}

.reveal-children.visible>*:nth-child(9) {
    transition-delay: 0.45s;
}

.reveal-children.visible>* {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

h1,
.sub_head_main {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1.4rem;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.sub_head_main {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.sub_head_main::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* ========== HERO ========== */
#hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    transition: transform 0.3s;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.6vw, 1.2rem);
    color: #bfcbd6;
    max-width: 780px;
    margin: 0 auto 0.6rem;
}

/* typing effect */
.typing-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.8rem;
    min-height: 2rem;
}

.typing-label {
    color: #8899a6;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}

.typing-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    background: linear-gradient(45deg, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    border-right: 2px solid var(--accent-1);
    padding-right: 4px;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-buttons {
    display: inline-flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.download-btn {
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: var(--bg-1);
    border: none;
    border-radius: 40px;
    padding: 0.85rem 1.4rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.download-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

.download-btn.outline {
    background: transparent;
    border: 2px solid var(--accent-1);
    color: var(--accent-1);
}

.download-btn.outline:hover {
    background: rgba(0, 240, 255, 0.08);
}

/* ========== ABOUT ========== */
#about {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    padding-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
    margin-top: 80px;
}

.about-content {
    display: flex;
    gap: 2.2rem;
    align-items: center;
    flex-wrap: nowrap;        /* prevent wrapping on desktop */
    justify-content: flex-start;  /* align left, not center */
}

.about-content img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.12);
    flex-shrink: 0;           /* prevent image from shrinking */
}

.about-text {
    flex: 1;                  /* text takes remaining space */
}
.about-content img:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.25);
}

.about-content p {
    color: #c7d3da;
    font-size: 1rem;
    margin: 10px;
    line-height: 1.75;
}

/* ========== SKILLS ========== */
#skills {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    margin-top: 3rem;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.2rem;
}

.skills-grid-backend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.2rem;
}

.database_skill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.2rem;
}

.skill-item {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(0, 170, 255, 0.04));
    border: 1px solid rgba(0, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.skill-image {
    border-radius: 5px;
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 10px;
}

.skill-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.2);
}

.skill-sub_head {
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #8899a6;
}

.skill-item h2 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.skill-item p {
    color: #8899a6;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* proficiency badge */
.skill-level {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.skill-level.advanced {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-1);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.skill-level.intermediate {
    background: rgba(123, 97, 255, 0.12);
    color: var(--accent-3);
    border: 1px solid rgba(123, 97, 255, 0.2);
}

.skill-level.basic {
    background: rgba(255, 180, 50, 0.12);
    color: #ffb432;
    border: 1px solid rgba(255, 180, 50, 0.2);
}

/* ========== PROJECTS ========== */
#projects {
    padding-bottom: 60px;
    margin-bottom: 30px;
    margin-top: 0;
}

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

.project-card {
    background: linear-gradient(135deg, rgba(27, 38, 59, 0.95), rgba(13, 27, 42, 0.95));
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.15);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.03);
}

.project-info {
    padding: 1.25rem;
    color: #c7d3da;
}

.project-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-info p {
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 0.8rem;
}

/* tech tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.8rem;
}

.tech-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: rgba(0, 240, 255, 0.06);
    color: var(--accent-1);
    font-family: 'Roboto Mono', monospace;
}

.tech-tag.purple {
    border-color: rgba(123, 97, 255, 0.2);
    background: rgba(123, 97, 255, 0.08);
    color: var(--accent-3);
}

.tech-tag.orange {
    border-color: rgba(255, 180, 50, 0.2);
    background: rgba(255, 180, 50, 0.08);
    color: #ffb432;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 16px;
    background: rgba(0, 240, 255, 0.08);
    color: var(--accent-1);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 240, 255, 0.12);
    font-family: 'Roboto Mono', monospace;
}

.github-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.15);
}

.view {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 16px;
    background: linear-gradient(135deg, #334e50, #364742);
    color: var(--accent-1);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Roboto Mono', monospace;
}

.view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 240, 255, 0.3);
}


/* ========== EXPERIENCE ========== */
#experience {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
}

.experience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.experience-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0, 240, 255, 0.02);
    border: 1px solid rgba(0, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.08);
}

.experience-card img {
    width: 180px;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.experience-card h2 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.experience-card p {
    color: #b0c7cf;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ========== CERTIFICATIONS ========== */
#certifications {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
    margin-top: 40px;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.certification-card {
    padding: 1.5rem;
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.06);
    background: rgba(0, 240, 255, 0.02);
}

.certification-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.15);
}

.certification-card h2 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.certification-card h3 {
    color: var(--accent-3);
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.certification-card p {
    color: #b0c7cf;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ========== AWARDS ========== */
#awards {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
    margin-top: 40px;
}

.awards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.award-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.8rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.03), rgba(123, 97, 255, 0.03));
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.award-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.18);
}

.award-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.06);
    border-radius: 14px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.award-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.award-org {
    color: var(--accent-3) !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    margin-bottom: 0.5rem !important;
}

.award-content p {
    color: #b0c7cf;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ========== CONTACT ========== */
#contact {
    background: rgba(13, 27, 42, 0.92);
    border-radius: 16px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.04);
    border: 1px solid rgba(0, 255, 255, 0.06);
    margin-top: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.contact-info {
    padding: 1rem;
    color: #c7d3da;
}

.contact-info p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.social-links {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.15);
    background: rgba(0, 240, 255, 0.12);
}

.cnct-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
}

.contact-form {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.06);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.08);
    background: rgba(13, 27, 42, 0.8);
    color: #e0e0e0;
    font-size: 0.95rem;
    font-family: 'Roboto Mono', monospace;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 16px rgba(0, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6b7f8d;
}

.btn {
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: var(--bg-1);
    padding: 0.75rem 1.6rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.25);
}

.contact-success {
    display: none;
    margin-top: 0.8rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    background: rgba(0, 200, 200, 0.07);
    color: #bfeeea;
    border: 1px solid rgba(0, 255, 255, 0.06);
    font-size: 0.85rem;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #6b7f8d;
    margin-top: 1.6rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 255, 255, 0.04);
}

footer span {
    color: #b0c7cf;
}

.footer-version {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: #4a5e6a;
    letter-spacing: 1px;
    font-family: 'Roboto Mono', monospace;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: var(--bg-1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.35);
}

/* ========== STATS ========== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.4rem;
    padding-top: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(0, 255, 255, 0.06);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8rem;
    color: #8899a6;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* glow effect for cards on hover */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 240, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    }
}

/* ========== RESPONSIVE — TABLET (≤880px) ========== */
@media (max-width: 880px) {
    .hamburger {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -280px;
        flex-direction: column;
        width: 260px;
        height: 100vh;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(12px);
        padding: 5rem 1.5rem 2rem;
        gap: 0.8rem;
        transition: right 0.35s ease;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    nav ul.show {
        right: 0;
    }

    nav ul li a {
        font-size: 1.05rem;
        padding: 0.5rem 0;
        display: block;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .experience-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .experience-card img {
        width: 160px;
    }

    .about-content {
        gap: 1.5rem;
    }

    section {
        padding: 4rem 1.2rem;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        gap: 2rem;
    }
}

/* ========== RESPONSIVE — MOBILE (≤600px) ========== */
@media (max-width: 600px) {
    :root {
        --header-height: 70px;
    }

    header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    #hero .hero-content {
        padding: 1.5rem 0.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    section {
        padding: 3rem 1rem;
    }

    #about,
    #skills,
    #experience,
    #certifications,
    #awards,
    #contact {
        padding: 2rem 1.2rem;
        border-radius: 12px;
    }

    .award-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    /* PERF: hover transitions are useless on touch — remove to free GPU */
    .skill-item,
    .certification-card,
    .award-card,
    .project-card {
        transition: none;
    }

    /* PERF: simplify reveal on mobile — opacity only, no transform */
    .reveal-children>* {
        transform: none;
        transition: opacity 0.4s ease;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-content img {
        width: 160px;
        height: 160px;
    }

    .about-content p {
        font-size: 0.92rem;
        margin: 6px 0;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 180px;
    }

    .experience-card p {
        font-size: 0.88rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .contact-form {
        padding: 1rem;
    }

    .sub_head_main {
        font-size: 1.5rem;
    }

    .stats-bar {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

/* ========== RESPONSIVE — SMALL MOBILE (≤400px) ========== */
@media (max-width: 400px) {

    .skills-grid,
    .skills-grid-backend,
    .database_skill {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }

    .skill-item {
        padding: 1rem 0.8rem;
    }

    .skill-image {
        width: 44px;
        height: 44px;
    }

    .skill-item h2 {
        font-size: 0.9rem;
    }

    .skill-item p {
        font-size: 0.78rem;
    }

    .certification-card h2 {
        font-size: 0.95rem;
    }

    .certification-card p {
        font-size: 0.82rem;
    }

    .typing-wrapper {
        flex-direction: column;
        gap: 0.2rem;
    }

    .back-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.show {
    display: block;
}