/* =========================================
   RESPONSIVE DEVOPS / CLOUD / AI PORTFOLIO
========================================= */

:root {
    --bg-primary: #07111f;
    --bg-secondary: #101c2f;
    --bg-card: rgba(16, 28, 47, 0.92);
    --text-primary: #ffffff;
    --text-secondary: #b9c3d3;
    --accent-primary: #3b82f6;
    --accent-secondary: #00d4ff;
    --border: rgba(255,255,255,0.08);
    --radius: 22px;
    --gradient: linear-gradient(135deg, #3b82f6, #00d4ff);
    --container: min(1120px, calc(100% - 40px));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* slightly smaller scroll offset to match reduced header height */
    scroll-padding-top: 80px;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-width: 320px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

img, iframe, video {
    max-width: 100%;
}

img {
    height: auto;
    display: block;
}

/* =========================================
   NAVIGATION
========================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(7,17,31,0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: var(--container);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    font-weight: 800;
    white-space: nowrap;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: 0.25s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent-secondary);
    transition: 0.25s ease;
}

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

#menu-btn {
    display: none;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* =========================================
   HERO / HEADERS
========================================= */

header {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* reduced top and bottom padding to tighten vertical spacing */
    padding: 110px 20px 60px;
    overflow: hidden;
}

header::before,
.demo-header::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    background: rgba(0,212,255,0.12);
    filter: blur(130px);
    top: -160px;
    right: -160px;
    pointer-events: none;
}

.hero-container {
    width: var(--container);
    display: grid;
    grid-template-columns: minmax(160px, 240px) minmax(0, 680px);
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 6vw, 80px);
    position: relative;
    z-index: 2;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    display: block;

    width: clamp(150px, 22vw, 220px);
    aspect-ratio: 1 / 1;

    object-fit: cover;
    object-position: center 5%;

    border-radius: 50%;

    border: 4px solid rgba(0,212,255,0.35);

    box-shadow:
        0 0 45px rgba(0,212,255,0.16),
        0 0 120px rgba(59,130,246,0.18);
}

.hero-text h1,
.demo-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.hero-text h3 {
    color: var(--accent-secondary);
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    margin-top: 14px;
}

.role {
    color: var(--accent-primary);
    font-weight: 600;
    margin-top: 8px;
}

.hero-sub,
.demo-subtitle {
    color: var(--text-secondary);
    margin-top: 18px;
    font-size: clamp(0.98rem, 2vw, 1.07rem);
}

.demo-header {
    min-height: auto;
    text-align: center;
    padding: 145px 20px 80px;
}

.demo-header > * {
    position: relative;
    z-index: 2;
}

.demo-subtitle {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   BUTTONS
========================================= */

.cta, .button-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.btn,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s ease;
    position: relative;
    z-index: 3;
    text-align: center;
}

.btn {
    background: var(--gradient);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 10px 30px rgba(0,212,255,0.18);
}

.btn:hover,
.btn-outline:hover {
    transform: translateY(-4px);
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    background: rgba(255,255,255,0.04);
}

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

/* =========================================
   SECTIONS
========================================= */

.section {
    width: var(--container);
    margin: 0 auto;
    padding: clamp(70px, 10vw, 110px) 0;
}

.section h2 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.section ul {
    color: var(--text-secondary);
    margin: 16px 0 0 1.2rem;
}

/* Reduce the vertical gap between the header and the About section specifically */
#about {
    /* responsive smaller top padding to tighten the header->about gap */
    padding-top: clamp(32px, 6vw, 60px);
}

/* =========================================
   CARDS / GRIDS
========================================= */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-top: 38px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 32px);
    position: relative;
    overflow: hidden;
    transition: 0.35s ease;
    min-width: 0;
}

.card::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(59,130,246,0.08);
    top: -100px;
    right: -100px;
    transition: 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,212,255,0.3);
    box-shadow: 0 18px 45px rgba(0,0,0,0.45);
}

.card:hover::before {
    transform: scale(1.2);
}

.card h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.3;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
    overflow-wrap: anywhere;
}

.card p,
.card li,
.card a {
    position: relative;
    z-index: 2;
}

.card ul {
    padding-left: 18px;
    margin: 14px 0 20px;
}

.featured {
    border-color: rgba(0,212,255,0.28);
    box-shadow: 0 0 30px rgba(0,212,255,0.12);
}

/* =========================================
   TECH STACK / IMAGES / VIDEOS
========================================= */

.tech-stack {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-stack span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

.architecture-card {
    text-align: center;
}

.architecture-img {
    width: min(100%, 900px);
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    margin-top: 38px;
}

.video-frame,
.video-wrapper.single {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: 0.3s ease;
    min-width: 0;
}

.video-wrapper.single {
    max-width: 900px;
    margin: 0 auto;
}

.video-frame:hover,
.video-wrapper.single:hover {
    transform: translateY(-6px);
    border-color: rgba(0,212,255,0.25);
}

.video-frame iframe,
.video-wrapper.single iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 14px;
    display: block;
}

.video-caption {
    text-align: center;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   CTA / CONTACT / FOOTER
========================================= */

.cta-section {
    padding: clamp(42px, 8vw, 76px) clamp(20px, 5vw, 36px);
    text-align: center;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(0,212,255,0.08));
    border: 1px solid rgba(0,212,255,0.12);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(0,212,255,0.18), transparent 42%);
    pointer-events: none;
}

.cta-section > * {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
}

/* =========================================
   ANIMATION
========================================= */

.hidden {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */

@media (max-width: 1024px) {
    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    :root {
        --container: min(100% - 32px, 760px);
    }

    #menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        top: 82px;
        right: 16px;
        width: min(280px, calc(100vw - 32px));
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: rgba(7,17,31,0.98);
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 12px;
        box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li,
    .nav-links a {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 11px 12px;
        font-size: 0.95rem;
    }

    .nav-links a::after {
        display: none;
    }

    header {
        min-height: auto;
        padding-top: 120px;
        text-align: center;
    }

    .hero-container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 32px;
    }

    .hero-text {
        max-width: 680px;
    }

    .cta,
    .button-row,
    .contact-actions {
        justify-content: center;
    }

    .demo-header {
        padding-top: 120px;
    }
}

@media (max-width: 560px) {
    :root {
        --container: min(100% - 24px, 520px);
    }

    .nav-container {
        min-height: 66px;
    }

    .logo {
        max-width: 230px;
        white-space: normal;
        line-height: 1.2;
    }

    header {
        padding: 110px 12px 64px;
    }

    .demo-header {
        padding: 105px 12px 58px;
    }

    .hero-image img {
        width: 145px;
    }

    .cta,
    .button-row,
    .contact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .btn-outline {
        width: 100%;
    }

    .cards,
    .video-grid {
        gap: 18px;
        margin-top: 28px;
    }

    .card,
    .video-frame,
    .video-wrapper.single {
        border-radius: 18px;
    }
}
