:root {
    /* Premium SaaS Palette - Vibrant & Deep */
    --bg-deep: #020617;
    --bg-surface: #0a0f1e;

    --accent-emerald: #10b981;
    --accent-teal: #14b8a6;
    --accent-violet: #8b5cf6;
    --accent-blue: #3b82f6;

    --gradient-primary: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --gradient-vibrant: linear-gradient(135deg, #10b981 0%, #3b82f6 50%, #8b5cf6 100%);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Caveat', cursive;
    --font-mono: 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Radial Glows - Dynamic & Colorful */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background:
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
    display: block;
}

.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s;
    opacity: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Minimalist Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* Responsive Typography & Utilities */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        letter-spacing: -2px;
    }

    .section {
        padding: 6rem 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
        overflow-x: auto;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }

    .hero-description {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

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

    .bento-item,
    .bento-item.wide,
    .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
        width: 100%;
        height: auto;
        min-height: min-content;
    }

    .section-title {
        margin-bottom: 3rem;
    }

    .footer-cta h2 {
        font-size: clamp(2rem, 8vw, 3.5rem);
        letter-spacing: -1px;
    }

    .footer-cta {
        padding: 6rem 0;
    }

    .social-links {
        gap: 2rem;
    }

    .social-links a {
        font-size: 1.5rem;
    }

    .terminal-wrapper {
        padding: 1rem;
    }

    .uptime-badge,
    .security-badge {
        position: static;
        transform: none;
        margin-bottom: 1rem;
        width: max-content;
    }
}

/* About Grid Responsive Logic */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-grid .profile-img-container img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 3px solid var(--accent-emerald);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
    margin: 0 auto;
    display: block;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .about-grid .profile-img-container img {
        width: 180px;
        height: 180px;
    }

    .about-grid h2 {
        font-size: 2.25rem !important;
    }

    .about-grid .section-label {
        text-align: center !important;
    }

    .about-grid .details-list {
        text-align: left;
        display: inline-block;
        margin-top: 2rem;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

nav {
    height: 4.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    text-decoration: none;
}

.logo span {
    color: var(--accent-emerald);
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 2vw, 2.5rem);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--accent-emerald);
}

/* Hero Section - SaaS Style */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
}

.hero-profile-wrap {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.hero-profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 3px solid var(--accent-emerald);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    animation: profileFloat 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.hero-profile-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
    z-index: 1;
    animation: profileGlow 3s ease-in-out infinite alternate;
}

@keyframes profileFloat {
    0% {
        transform: translateY(0px);
    }

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

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

@keyframes profileGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

.hero-badge {
    padding: 0.5rem 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 999px;
    color: var(--accent-emerald);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badge i {
    font-size: 0.75rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 10vw, 6rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -3px;
    margin-bottom: 2rem;
    max-width: 1100px;
}

.hero-title span.accent-font {
    font-family: var(--font-accent);
    font-weight: 400;
    color: var(--accent-emerald);
    letter-spacing: 0;
    display: block;
    font-size: 1.25em;
    margin-top: -10px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3.5rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-vibrant);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

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

/* Sections Global */
.section {
    padding: 10rem 0;
}

.section-label {
    color: var(--accent-emerald);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: clamp(3rem, 8vw, 5rem);
    text-align: center;
}

/* Glass Card - SaaS Style */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.card:hover {
    transform: translateY(-12px);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(16, 185, 129, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.8s;
    pointer-events: none;
}

.card:hover::after {
    left: 150%;
}

/* Experience Layout */
.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.exp-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.exp-meta {
    position: sticky;
    top: 8rem;
}

.exp-year {
    font-weight: 800;
    color: var(--accent-emerald);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
}

.exp-org {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.exp-role {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.exp-details ul {
    list-style: none;
}

.exp-details li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.25rem;
    color: #cbd5e1;
    font-size: 1.05rem;
}

.exp-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-emerald);
    font-weight: 800;
}

/* Bento Skills Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(min-content, auto);
    gap: 1.5rem;
}

.bento-item {
    grid-column: span 1;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-emerald);
    margin-bottom: 1.5rem;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    /* Push tags to bottom if card is tall */
}

.bento-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.bento-tag:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Footer CTAs */
.footer-cta {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
    padding: 10rem 0;
    text-align: center;
}

.footer-cta h2 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 3rem;
    line-height: 1.1;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-emerald);
}

/* Responsive */
@media (max-width: 1024px) {
    .exp-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .exp-meta {
        position: static;
    }

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

/* =========================================
   SaaS Terminal Showcase
   ========================================= */
.terminal-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    perspective: 1000px;
}

.terminal-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transition: transform 0.3s;
}

.terminal-badge:hover {
    transform: translateY(-5px) !important;
}

.uptime-badge {
    top: 0;
    left: -2rem;
    transform: translateY(-50%);
}

.security-badge {
    bottom: 0;
    right: -2rem;
    transform: translateY(50%);
}

.badge-icon-wrap {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.uptime-badge .badge-icon-wrap {
    background: rgba(59, 130, 246, 0.1);
}

.uptime-badge i {
    color: #3b82f6;
    font-size: 1.25rem;
}

.security-badge .badge-icon-wrap {
    background: rgba(16, 185, 129, 0.1);
}

.security-badge i {
    color: var(--accent-emerald);
    font-size: 1.25rem;
}

.badge-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.badge-value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.terminal-window {
    background: rgba(5, 13, 33, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    min-height: 400px;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.close {
    background: #ff5f56;
}

.dot.minimize {
    background: #ffbd2e;
}

.dot.maximize {
    background: #27c93f;
}

.terminal-trash {
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.terminal-trash:hover {
    color: #fff;
}

.terminal-body {
    padding: 2.5rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    max-height: 380px;
    overflow-y: auto;
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.term-text {
    margin-bottom: 0.5rem;
}

.term-prompt-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.term-prompt {
    color: var(--accent-teal);
    font-weight: bold;
}

.term-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    flex-grow: 1;
}

.term-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.term-output {
    color: #cbd5e1;
}

.term-error {
    color: #ef4444;
}