:root {
    --bg-dark: #050505;
    --surface: #0f0f13;
    --surface-hover: #15151a;
    --primary: #FF4D00; /* Vibrant Orange */
    --secondary: #9D00FF; /* Vibrant Purple */
    --text-main: #ffffff;
    --text-muted: #888890;
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.1);
    
    --radius-lg: 32px;
    --radius-md: 20px;
    
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background ambient glow */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.glow-orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite alternate;
}

.glow-orb-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.7);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF0055);
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 77, 0, 0.3);
}

/* Main Layout */
main {
    padding: 120px 48px 48px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Hero */
.hero {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.hero h1 {
    font-size: 84px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -3px;
    max-width: 900px;
}

.hero h1 .gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.5;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 320px;
    gap: 24px;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bento-card:hover::before {
    opacity: 1;
}

/* Card Sizes */
.card-large { grid-column: span 2; grid-row: span 2; }
.card-tall { grid-column: span 1; grid-row: span 2; }
.card-wide { grid-column: span 2; grid-row: span 1; }
.card-small { grid-column: span 1; grid-row: span 1; }
.card-full { grid-column: span 4; grid-row: span 1; }

/* Specific Cards */
.card-image-bg {
    padding: 0;
}

.card-image-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.bento-card:hover .card-image-bg img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
}

.card-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: auto;
    align-self: flex-start;
}

/* Social & Contact info inside cards */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: auto;
}

.social-links a {
    color: white;
    font-size: 28px;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.contact-info {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    color: var(--text-main);
}

.contact-item i {
    color: var(--primary);
    font-size: 24px;
}

/* Page Headers (for subpages) */
.page-header {
    text-align: center;
    margin-bottom: 64px;
    padding-top: 40px;
}

.page-header h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
    animation: none;
    color: white;
}

@keyframes pulse-whatsapp {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .card-full { grid-column: span 3; }
    .hero h1 { font-size: 64px; }
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-large, .card-wide, .card-full { grid-column: span 2; }
    nav { padding: 20px; }
    main { padding: 100px 20px 20px; }
    .whatsapp-float { bottom: 20px; right: 20px; }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .card-large, .card-tall, .card-wide, .card-small, .card-full { 
        grid-column: span 1; 
        grid-row: span 1;
    }
    .card-large { grid-row: span 2; }
    .hero h1 { font-size: 48px; }
    .nav-links { display: none; }
    .contact-info { font-size: 14px; }
}

/* Portfolio & Work Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.product-grid.compact {
    grid-template-rows: 320px 240px;
    gap: 12px;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.shorts-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.short-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; /* 16:9 Aspect Ratio (Vertical 9:16) */
    transition: transform 0.3s, border-color 0.3s;
}

.short-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.short-card iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.portfolio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s, border-color 0.3s;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

.portfolio-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: none;
}

.portfolio-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portfolio-title {
    font-size: 20px;
    font-weight: 700;
}

.portfolio-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.portfolio-socials {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.portfolio-socials a {
    color: var(--text-muted);
    font-size: 20px;
    transition: color 0.3s;
}

.portfolio-socials a:hover {
    color: var(--text-main);
}

/* Software Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 64px;
    margin-bottom: 64px;
    white-space: nowrap;
    position: relative;
    display: flex;
}

.marquee-container::before, .marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.marquee-content {
    display: flex;
    gap: 24px;
    animation: scroll 30s linear infinite;
    padding-left: 24px;
    min-width: 200%;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.marquee-item i {
    font-size: 24px;
    color: var(--primary);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Media Gallery Styles */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.media-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
}

.media-item:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.media-item img, .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    opacity: 0.8;
    pointer-events: none;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ===================================
   3D PRODUCT STUDIO
   =================================== */

.product-studio-section {
    margin-top: 96px;
    position: relative;
}

.product-studio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
}

.product-studio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255,77,0,0.15), rgba(157,0,255,0.15));
    border: 1px solid rgba(255,77,0,0.3);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #FF4D00;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: 480px 360px;
    gap: 16px;
}

.product-item-hero { grid-column: 1; grid-row: 1 / 3; }
.product-item-tr   { grid-column: 2; grid-row: 1; }
.product-item-tfr  { grid-column: 3; grid-row: 1; }
.product-item-bm   { grid-column: 2; grid-row: 2; }
.product-item-bfr  { grid-column: 3; grid-row: 2; }

.product-item {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: #0f0f13;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: box-shadow 0.5s ease, border-color 0.4s;
}

.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-item:hover img { transform: scale(1.06); }

.product-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, #FF4D00, #9D00FF, #FF4D00);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    animation: borderFlow 3s linear infinite paused;
    z-index: 3;
}

.product-item:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@keyframes borderFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.product-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
}

.product-item:hover .product-info-overlay,
.product-item-hero .product-info-overlay {
    transform: translateY(0);
}

.product-item-hero .product-info-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.product-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: #ffffff;
}

.product-item-hero .product-name { font-size: 30px; }

.product-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #FF4D00;
    background: rgba(255, 77, 0, 0.15);
    border: 1px solid rgba(255, 77, 0, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
    display: inline-block;
}

.product-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.07) 0%, transparent 65%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-item:hover::after { opacity: 1; }

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .product-item-hero { grid-column: 1 / 3; grid-row: 1; height: 400px; }
    .product-item-tr, .product-item-tfr, .product-item-bm, .product-item-bfr { grid-column: auto; grid-row: auto; height: 280px; }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-item-hero { grid-column: 1; height: 340px; }
    .product-studio-header { flex-direction: column; align-items: flex-start; gap: 16px; }
}
