/* CSS Variables - DARK THEME WITH ORANGE & PREMIUM GLASS */
:root {
    --primary: #FF6B35;
    --secondary: #FF8C42;
    --accent: #FFA047;
    --dark: #030303; 
    --light: #1a1a1a;
    --success: #38b000;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Advanced Glassmorphism Variables */
    --glass-bg: rgba(20, 20, 20, 0.35);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--dark);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* 3D Blurred Background Colors */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    animation: floatBg 20s infinite ease-in-out alternate;
    opacity: 0.6;
}
.glow-1 { width: 600px; height: 600px; background: rgba(255, 107, 53, 0.15); top: -10%; left: -10%; }
.glow-2 { width: 500px; height: 500px; background: rgba(255, 160, 71, 0.12); bottom: -10%; right: -10%; animation-delay: -5s; }
.glow-3 { width: 450px; height: 450px; background: rgba(255, 140, 66, 0.10); top: 40%; left: 50%; animation-delay: -10s; }
.glow-4 { width: 400px; height: 400px; background: rgba(255, 107, 53, 0.10); bottom: 20%; left: -5%; animation-delay: -7s; }

@keyframes floatBg {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(3%, 3%) scale(1.1); }
    100% { transform: translate(-3%, -3%) scale(0.9); }
}

/* Global Floating Graphic Design Tools */
.floating-tools {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.tool-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.05);
    font-size: 3rem;
    animation: floatTool 25s infinite linear;
}

.tool-icon:nth-child(1) { top: 15%; left: 10%; font-size: 4rem; animation-duration: 20s; color: rgba(255, 107, 53, 0.08); } 
.tool-icon:nth-child(2) { top: 25%; right: 15%; font-size: 3.5rem; animation-duration: 22s; animation-delay: -5s; } 
.tool-icon:nth-child(3) { top: 60%; left: 5%; font-size: 5rem; animation-duration: 28s; color: rgba(255, 107, 53, 0.06); } 
.tool-icon:nth-child(4) { top: 75%; right: 8%; font-size: 3rem; animation-duration: 18s; animation-delay: -10s; } 
.tool-icon:nth-child(5) { top: 40%; left: 45%; font-size: 6rem; animation-duration: 35s; color: rgba(255, 255, 255, 0.03); filter: blur(2px); } 
.tool-icon:nth-child(6) { bottom: 10%; left: 20%; font-size: 4rem; animation-duration: 24s; } 
.tool-icon:nth-child(7) { top: 10%; left: 60%; font-size: 3rem; animation-duration: 19s; animation-delay: -7s; color: rgba(255, 107, 53, 0.07); } 
.tool-icon:nth-child(8) { bottom: 30%; right: 25%; font-size: 4.5rem; animation-duration: 30s; animation-delay: -15s; } 
.tool-icon:nth-child(9) { top: 50%; right: 5%; font-size: 3.5rem; animation-duration: 25s; } 
.tool-icon:nth-child(10) { bottom: 5%; right: 50%; font-size: 5rem; animation-duration: 27s; filter: blur(1px); color: rgba(255, 107, 53, 0.05); } 

@keyframes floatTool {
    0% { transform: translateY(100px) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* Glassmorphism Class */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.container { width: 100%; max-width: 1200px; padding: 0 20px; margin: 0 auto; position: relative; z-index: 2; }

/* Fixed Top Padding/Space Issue */
section { padding: 70px 0 40px; position: relative; z-index: 2; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 20px; color: #ffffff; }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 50px; position: relative; }
h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 4px; background: linear-gradient(to right, var(--primary), var(--secondary)); border-radius: 2px;
}
p { margin-bottom: 25px; font-size: 1.1rem; color: #cccccc; }

.btn {
    display: inline-block; padding: 15px 30px; background: var(--primary); color: black;
    border: none; border-radius: 50px; font-size: 1.1rem; min-width: 180px; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3); text-align: center;
}
.btn:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(255, 107, 53, 0.5); }

/* Fixed Button Secondary Hover Effect */
.btn-secondary { 
    background: rgba(255, 255, 255, 0.1); color: white; 
    border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(10px); box-shadow: none; 
}
.btn-secondary:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.5); 
    background: var(--primary); 
    color: black; 
    border-color: var(--primary); 
}

/* Header & Nav */
header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 30px 0; transition: transform 0.3s ease; }
header.hidden { transform: translateY(-100%); }
.navbar {
    display: flex; justify-content: center; align-items: center; max-width: 720px; margin: 0 auto;
    border-radius: 50px; transition: all 0.4s ease;
}
.nav-links {
    display: flex; list-style: none; align-items: center; background: rgba(10, 10, 10, 0.5);
    border-radius: 50px; padding: 8px; backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.nav-links li:not(:last-child) { border-right: 1px solid rgba(255, 255, 255, 0.05); }
.nav-links a { text-decoration: none; color: white; font-weight: 600; transition: var(--transition); padding: 10px 20px; display: block; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); transform: translateY(-2px); }
.hire-btn-container { background: var(--primary); border-radius: 50px; margin: 0 5px !important; }
.hire-btn { background: transparent !important; color: black !important; padding: 8px 20px !important; font-weight: 700; }
.hire-btn:hover { color: white !important; }
.hamburger { display: none; }

/* Hero */
.hero { height: 100vh; display: flex; align-items: center; }
.hero-split { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 80px; }
.hero-content { flex: 0 0 60%; max-width: 700px; }
.hero h1 { margin-top: 0; font-size: 2rem; }
.typing-container { height: 60px; margin-bottom: 20px; display: flex; align-items: center; }
.typing-container h1, .typed-text { font-size: 3.5rem; font-weight: 900; white-space: nowrap; color: var(--primary); }
.cursor { display: inline-block; background-color: var(--primary); margin-left: 0.1rem; width: 4px; height: 3.5rem; animation: blink 1s infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 99% { opacity: 0; } }
.hero-btns { display: flex; gap: 20px; margin-top: 40px; }
.hero-image-container { flex: 0 0 40%; display: flex; justify-content: center; }
.hero-image-wrapper {
    width: 380px; height: 380px; border-radius: 50%; overflow: hidden;
    box-shadow: 0 20px 50px rgba(255, 107, 53, 0.4); border: 4px solid var(--primary);
    transform: perspective(1000px) rotateY(-10deg); transition: var(--transition);
}
.hero-image-wrapper:hover { transform: perspective(1000px) rotateY(0deg) translateY(-10px); box-shadow: 0 30px 60px rgba(255, 107, 53, 0.6); }
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }

/* Skills (Core Competencies) */
.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.skill-category { padding: 35px; }
.skill-category:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.7); }
.skill-category h3 { color: var(--primary); margin-bottom: 25px; }
.skill-list li { margin-bottom: 15px; display: flex; align-items: center; color: #ddd; }
.skill-list i { color: var(--success); margin-right: 12px; }

/* Timeline / Experience */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after {
    content: ''; position: absolute; width: 4px;
    background: linear-gradient(to bottom, var(--primary), rgba(255,107,53,0.1));
    top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 10px; z-index: 1;
}
.timeline-item { padding: 20px 40px; position: relative; width: 50%; z-index: 2; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-content { padding: 30px; }
.timeline-content:hover { transform: translateY(-10px) scale(1.02); }
.timeline-item::after {
    content: ''; position: absolute; width: 20px; height: 20px; right: -10px;
    background: var(--primary); top: 50px; border-radius: 50%; z-index: 3;
    box-shadow: 0 0 15px var(--primary);
}
.timeline-item:nth-child(even)::after { left: -10px; }
.timeline-date { color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.timeline-title { font-size: 1.3rem; margin-bottom: 15px; }

/* =========================================
   Portfolio Filter & Category System 
   ========================================= */
.portfolio-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 8px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}
/* Portfolio Item Show/Hide Animation */
.portfolio-item.hide {
    display: none;
}
.portfolio-item.show {
    animation: fadeInItem 0.5s ease forwards;
}
@keyframes fadeInItem {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* FIXED: Changed auto-fit to auto-fill to prevent items from stretching when filtered */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.portfolio-item {
    position: relative; overflow: hidden; padding-bottom: 75%; 
    border-radius: 15px; cursor: pointer;
}
.portfolio-item img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.6s ease; border-radius: 15px;
}
.portfolio-item:hover img { transform: scale(1.1); filter: brightness(0.7); }

.video-play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px; background: rgba(255, 107, 53, 0.9); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: white; font-size: 24px; z-index: 3; transition: var(--transition);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6); pointer-events: none;
}
.portfolio-item:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.2); }
.video-play-btn i { margin-left: 5px; }

.portfolio-overlay {
    position: absolute; bottom: -50px; left: 0; width: 100%; height: 50px;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    transition: var(--transition); z-index: 4;
}
.portfolio-item:hover .portfolio-overlay { bottom: 0; }
.portfolio-overlay span { color: white; font-weight: 600; font-size: 1.1rem; }

/* Contact */
.contact-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.contact-info { padding: 40px; }
.contact-info h3 { font-size: 1.8rem; color: var(--primary); }
.contact-item { display: flex; align-items: center; margin-bottom: 25px; }
.contact-item i { font-size: 1.5rem; color: var(--primary); width: 40px; }
.contact-item a { color: #cccccc; text-decoration: none; transition: var(--transition); }
.contact-item a:hover { color: var(--primary); }
.iframe-container { height: 500px; padding: 0; overflow: hidden; }
.iframe-container iframe { width: 100%; height: 110%; border: none; }

/* Footer */
footer { padding: 60px 0 20px; text-align: center; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { font-size: 2.2rem; font-weight: 700; margin-bottom: 15px; }
.footer-logo span { color: var(--primary); }
.footer-links h4, .footer-services h4 { color: white; margin-bottom: 25px; position: relative; display: inline-block; }
.footer-links h4::after, .footer-services h4::after {
    content: ''; position: absolute; bottom: -8px; left: 0; width: 50%; height: 2px; background: var(--primary);
}
.footer-links li, .footer-services li { margin-bottom: 12px; list-style: none; }
.footer-links a, .footer-services a { color: #bbb; text-decoration: none; transition: var(--transition); }
.footer-links a:hover, .footer-services a:hover { color: var(--primary); padding-left: 8px; }
.copyright { padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); color: #777; }

/* Universal Lightbox */
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9); z-index: 99999; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease; border-radius: 0; border: none;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-content {
    position: relative; width: 90%; max-width: 1000px; max-height: 85vh;
    display: flex; justify-content: center; align-items: center;
}
.lightbox-content img {
    width: 100%; max-height: 85vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.1); object-fit: contain;
}
.lightbox-content video {
    width: 100%; max-height: 85vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    border: 1px solid var(--primary); outline: none; background: black;
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute; 
    top: 20px; 
    right: 40px; 
    font-size: 45px; 
    color: white; 
    cursor: pointer; 
    z-index: 100000; 
    transition: transform 0.5s ease, color 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transform-origin: center center;
}
.lightbox-close:hover { 
    color: var(--primary); 
    transform: rotate(360deg);
}

/* Fade-in Animation */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }

/* Responsive */
@media (max-width: 1200px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 80px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after, .timeline-item:nth-child(even):after { left: 22px; }
}
@media (max-width: 992px) {
    .hero-split { flex-direction: column-reverse; text-align: center; padding-top: 120px; }
    .typing-container, .hero-btns { justify-content: center; }
    .hero-image-wrapper { width: 300px; height: 300px; margin: 0 auto; }
}
@media (max-width: 768px) {
    header { padding: 15px 0; }
    .nav-links {
        flex-direction: column; width: 250px; position: fixed; left: -280px; top: 80px;
        transition: left 0.4s ease; align-items: center; padding: 20px 0;
        border-radius: 15px;
    }
    .nav-links.active { left: 20px; }
    .nav-links li { width: 100%; border: none !important; margin-bottom: 10px; }
    .nav-links a { font-size: 1.1rem; }
    .hire-btn { width: 80%; }
    .hamburger {
        display: flex; position: fixed; left: 25px; top: 25px; background: var(--primary);
        width: 45px; height: 45px; border-radius: 8px; border: none; flex-direction: column;
        justify-content: center; align-items: center; gap: 5px; cursor: pointer; z-index: 1001;
    }
    .hamburger span { width: 22px; height: 2px; background: black; transition: 0.3s; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    
    .hero { height: auto; padding-bottom: 60px; }
    .hero-split { padding-top: 50px; }
    .typing-container h1, .typed-text { font-size: 2.2rem; }
    .hero-image-wrapper { width: 250px; height: 250px; }
    h2 { font-size: 2rem; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .tool-icon { font-size: 2rem !important; }
    .copyright p { font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .typing-container h1, .typed-text { font-size: 1.7rem; }
    .hero-image-wrapper { width: 200px; height: 200px; }
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; }
    .timeline-item { padding-left: 60px; padding-right: 15px; }
    .timeline::after { left: 20px; }
    .timeline-item::after, .timeline-item:nth-child(even):after { left: 11px; }
}