:root {
    --bg-main: #f5f5f7; /* Apple-style professional soft silver/white */
    --bg-card: #ffffff;
    
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent: #2563eb; 
    
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --shadow-card: 0 10px 20px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.08);
}

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

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

a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 2rem; }

/* ----------------------------------
   PROFESSIONAL SUBTLE GRID 
----------------------------------- */
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1; pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
}

/* ----------------------------------
   NAVIGATION
----------------------------------- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 100;
}
.nav-container {
    height: 75px; display: flex; justify-content: space-between; align-items: center; position: relative;
}
.logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem;}
.logo-img { height: 28px; width: auto; display: block; filter: contrast(1.2); }
.logo span { color: var(--text-muted); font-weight: 500;}

.nav-links { 
    display: flex; gap: 2rem; align-items: center; 
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); transition: 0.2s; position: relative;}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

/* Contact Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    visibility: hidden; opacity: 0; position: absolute;
    top: 150%; left: 50%; transform: translateX(-50%) translateY(10px);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px); min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px; border: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem; z-index: 101;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown:hover .dropdown-content {
    visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0);
}
.dropdown-content a {
    color: var(--text-main); padding: 0.8rem 1rem;
    display: block; font-size: 0.85rem; font-weight: 600;
    border-radius: 8px; text-align: left; transition: 0.2s;
}
.dropdown-content a:hover { background-color: rgba(0,0,0,0.04); }


.btn-outline {
    background: transparent; border: 1px solid rgba(0,0,0,0.15); color: var(--text-main);
    padding: 0.5rem 1.2rem; border-radius: 100px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.btn-outline:hover { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.3); }

.mobile-top-hire { display: none; }


/* ----------------------------------
   HERO SECTION
----------------------------------- */
.hero { padding: 12rem 0 6rem; position: relative;}
.hero-container { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 900px;}

.status-badge {
    background: var(--bg-card); border: 1px solid rgba(0,0,0,0.08);
    padding: 0.5rem 1.2rem; border-radius: 100px; font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.6rem; margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.dot { width: 8px; height: 8px; background: #34c759; border-radius: 50%; box-shadow: 0 0 10px rgba(52,199,89,0.5);}

.hero h1 { font-family: var(--font-display); font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em; color: var(--text-main);}
.text-gradient { 
    background: linear-gradient(135deg, #000 0%, #4338ca 100%); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin-bottom: 3rem; font-weight: 500;}

.btn-primary {
    background: var(--text-main); color: #fff; padding: 1rem 2.5rem; border-radius: 100px;
    font-weight: 600; font-size: 1rem; transition: 0.3s; display: inline-block;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(0,0,0,0.15);}


/* ----------------------------------
   EXTENDED ABOUT PAGE
----------------------------------- */
.text-center { text-align: center; }
.about-hero { padding: 4rem 0 6rem; }
.display-title { font-family: var(--font-display); font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.03em; color: var(--text-main);}
.about-subtitle { font-size: 1.3rem; color: var(--text-muted); max-width: 750px; margin: 0 auto 4rem; line-height: 1.6;}

.about-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat-box { background: var(--bg-card); padding: 2.5rem; border-radius: 20px; border: 1px solid rgba(0,0,0,0.05); text-align: center; box-shadow: var(--shadow-card);}
.stat-box h3 { font-family: var(--font-display); font-size: 3rem; color: var(--text-main); margin-bottom: 0.5rem;}
.stat-box span { font-size: 0.9rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;}

.about-story { padding: 6rem 0; background: #fff; border-top: 1px solid rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.05);}
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;}
.story-image { height: 500px; border-radius: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-card); border: 1px solid rgba(0,0,0,0.05); box-shadow: var(--shadow-card);}
.profile-photo { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease;}
.story-image:hover .profile-photo { transform: scale(1.05); }
.story-content h2 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 1.5rem;}
.story-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.8;}
.core-values { list-style: none; margin-top: 2rem;}
.core-values li { font-size: 1.1rem; font-weight: 600; color: var(--text-main); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.8rem;}

.about-skills { padding: 8rem 0; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;}
.skill-card { background: var(--bg-card); padding: 3rem; border-radius: 24px; border: 1px solid rgba(0,0,0,0.05); box-shadow: var(--shadow-card); transition: 0.3s;}
.skill-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover);}
.skill-card h4 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-main);}
.skill-card p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6;}

.about-cta { padding: 6rem 0 8rem; background: #fff;}
.about-cta h2 { font-family: var(--font-display); font-size: 3rem; margin-bottom: 1rem;}
.about-cta p { font-size: 1.2rem; color: var(--text-muted);}


/* ----------------------------------
   CARD-BY-CARD GRID SECTION
----------------------------------- */
.portfolio-section { padding: 4rem 0 10rem;}
.section-header { text-align: center; margin-bottom: 4rem;}
.section-header h2 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 0.8rem; color: var(--text-main);}
.section-header p { color: var(--text-muted); font-size: 1.1rem;}

.project-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card); border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05); overflow: hidden;
    box-shadow: var(--shadow-card); transition: 0.3s ease;
    display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: rgba(0,0,0,0.1);}

.card-cover { 
    width: 100%; height: 240px; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative; overflow: hidden;
    background-color: #f1f1f1;
}

/* 
  The trick to creating a live screenshot!
  We make the iframe 400% of the container width and scale it down to 25%.
  This ensures it always spans exactly 100% of the card width, no matter the screen size!
*/
.thumb-iframe {
    position: absolute;
    top: 0; left: 0;
    width: 400%; height: 400%; /* Dynamically 4x container size */
    border: none;
    transform: scale(0.25);
    transform-origin: 0 0;
    pointer-events: none; /* Make it act like a static image */
    transition: transform 0.5s ease;
}

.project-card:hover .thumb-iframe { transform: scale(0.26); }

.card-body { padding: 2rem; display: flex; flex-direction: column; flex: 1;}
.p-category { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); background: rgba(37, 99, 235, 0.1); padding: 0.4rem 0.8rem; border-radius: 6px; font-weight: 600; width: max-content; margin-bottom: 1rem;}
.card-body h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-main); margin-bottom: 1.5rem; line-height: 1.3;}

.btn-card {
    margin-top: auto; display: block; text-align: center;
    background: transparent; border: 1px solid rgba(0,0,0,0.15); color: var(--text-main);
    padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
    transition: 0.2s;
}
.btn-card:hover { background: var(--text-main); color: #fff; border-color: var(--text-main);}


/* Footer */
footer { border-top: 1px solid rgba(0,0,0,0.1); padding: 4rem 0; background: var(--bg-main);}
.footer-container { display: flex; justify-content: space-between; align-items: center;}
.f-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;}
.f-logo span { color: var(--text-muted); font-weight: 500;}
footer p { font-size: 0.95rem; color: var(--text-muted); font-weight: 500;}
.social-links { display: flex; gap: 2rem;}
.social-links a { font-size: 0.95rem; color: var(--text-muted); transition: 0.2s; font-weight: 600;}
.social-links a:hover { color: var(--text-main); }

/* ----------------------------------
   RESPONSIVE LAYOUT
----------------------------------- */
@media (max-width: 900px) {
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .story-grid { grid-template-columns: 1fr; }
    .story-image { height: 350px; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.2rem; }
    
    /* Navbar & Hamburger */
    .nav-container { height: 65px; position: relative;}
    .logo { font-size: 1.1rem; z-index: 200; position: relative;}
    .logo-img { height: 24px; }
    .desktop-hire { display: none; }
    
    .mobile-top-hire { 
        display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
        font-size: 0.8rem; padding: 0.4rem 1rem; z-index: 200;
        background: rgba(255,255,255,0.7); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(0,0,0,0.1); border-radius: 100px; font-weight: 600;
    }

    .hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 200; padding: 0.5rem;}
    .hamburger span { display: block; width: 24px; height: 2px; background: var(--text-main); transition: 0.3s; border-radius: 2px;}
    .hamburger.toggle span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 5px); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: rotate(45deg) translate(-5px, -5px); }

    /* Ultra Premium Mobile Menu Glassmorphism */
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        left: auto; transform: none;
        background: rgba(255, 255, 255, 0.85); 
        backdrop-filter: blur(30px) saturate(200%); -webkit-backdrop-filter: blur(30px) saturate(200%);
        display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
        transition: 0.4s cubic-bezier(0.77,0.2,0.05,1.0); z-index: 150;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.6rem; color: var(--text-main); font-weight: 700; letter-spacing: -0.02em;}
    .dropdown-content { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none !important; background: transparent !important; text-align: center; border: none !important; padding: 1rem 0 0;}
    .dropdown:hover .dropdown-content { transform: none; }
    .dropdown-content a { font-size: 1.1rem; color: var(--text-muted); text-align: center; padding: 0.5rem;}
    
    /* Hero Section */
    .hero { padding: 8rem 0 4rem 0; }
    .status-badge { margin-bottom: 1.5rem; font-size: 0.8rem; padding: 0.4rem 1rem;}
    .hero h1 { font-size: 2.8rem; margin-bottom: 1rem; line-height: 1.1; letter-spacing: -0.04em; padding: 0 0.5rem;}
    .hero p { font-size: 1.05rem; padding: 0 1rem; margin-bottom: 2.5rem; line-height: 1.6;}
    
    /* Portfolio Grid */
    .section-header h2 { font-size: 2.2rem; }
    .project-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .project-card { border-radius: 16px; }
    .card-cover { height: 220px; }
    .card-body { padding: 1.2rem; }
    .card-body h3 { font-size: 1.25rem; margin-bottom: 1rem;}
    .btn-card { padding: 0.7rem 1rem; }
    
    /* About */
    .display-title { font-size: 2.4rem; letter-spacing: -0.02em;}
    .about-subtitle { font-size: 1.1rem; margin-bottom: 3rem; }
    
    /* Compact Stats Grid (2x1) */
    .about-stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .stat-box:last-child { grid-column: 1 / -1; } /* 3rd stat spans full width */
    .stat-box { padding: 1.2rem; border-radius: 16px; }
    .stat-box h3 { font-size: 2rem; margin-bottom: 0.2rem;}
    
    .story-image { height: 280px; border-radius: 16px; }
    .skills-grid { grid-template-columns: 1fr; gap: 1rem;}
    .skill-card { padding: 1.5rem; border-radius: 16px; }
    
    .about-cta { padding: 4rem 0; }
    .about-cta h2 { font-size: 2.2rem; line-height: 1.2;}
    
    /* Footer */
    footer { padding: 3rem 0; }
    .footer-container { flex-direction: column; text-align: center; gap: 1.2rem; }
    .social-links { justify-content: center; width: 100%; flex-wrap: wrap; gap: 1.5rem;}
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero h1 { font-size: clamp(2rem, 10vw, 2.4rem); hyphens: auto; word-wrap: break-word; }
    .card-cover { height: 180px; }
    .section-header h2 { font-size: 1.8rem; }
}

/* Floating WhatsApp Button */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 999999;
    transition: transform 0.3s ease, background-color 0.3s;
    animation: pulse-wa 2.5s infinite;
}
.floating-wa:hover {
    transform: scale(1.1);
    animation: none;
    background-color: #128C7E;
}
.wa-tooltip {
    position: absolute;
    right: 75px;
    background: #fff;
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
}
.floating-wa:hover .wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 768px) {
    .floating-wa {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    .floating-wa svg {
        width: 28px !important;
        height: 28px !important;
    }
    .wa-tooltip { display: none; }
}
