/* --- 1. Variables & Reset (Apple Aesthetic) --- */
:root {
    --primary: #007AFF; /* Apple Blue for Tech feel, or stick to #FFA500 if preferred */
    --accent: #FFA500;
    --black: #000000;
    --white: #ffffff;
    --bg-gray: #F5F5F7;
    --text-main: #1D1D1F;
    --text-light: #86868B;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; /* Custom cursor */ }

body {
    background-color: var(--bg-gray);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.5;
    overflow-x: hidden; /* Hide scrollbars from 3D tilt */
}

/* --- 2. Custom Cursor --- */
.cursor {
    width: 8px; height: 8px; background: var(--black); border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 10001; transform: translate(-50%, -50%);
}
.cursor2 {
    width: 40px; height: 40px; border: 1px solid rgba(0,0,0,0.3); border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 10000; transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
}
.cursor2.hovered {
    width: 60px; height: 60px; background: rgba(0, 122, 255, 0.1); border: none; backdrop-filter: blur(2px);
}

/* --- 3. Navigation --- */
#main-nav {
    position: fixed; top: 0; width: 100%; z-index: 9999;
    background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 15px 20px;
}
.logo { font-size: 1.4rem; font-weight: 700; color: var(--black); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.menu { display: flex; gap: 30px; list-style: none; }
.menu a { text-decoration: none; color: var(--text-light); font-size: 0.9rem; font-weight: 500; transition: 0.3s; }
.menu a:hover { color: var(--black); }
.btn-nav { color: var(--primary) !important; font-weight: 600; }
.hamburger { display: none; border: none; background: none; font-size: 1.5rem; cursor: pointer; }

/* --- 4. Hero Section (3D Interaction) --- */
#hero {
    min-height: 100vh; display: flex; align-items: center;
    background: radial-gradient(circle at 50% 50%, #fff 0%, var(--bg-gray) 100%);
    overflow: hidden; padding-top: 80px;
}
.hero-container {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.hero-text { flex: 1; max-width: 600px; z-index: 2; }
.badge { 
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; 
    color: var(--accent); margin-bottom: 15px; display: inline-block; letter-spacing: 1px;
}
.hero-title-3d {
    font-size: 5rem; font-weight: 800; line-height: 1; letter-spacing: -2px;
    background: linear-gradient(to bottom, #000, #444); -webkit-background-clip: text; color: transparent;
    margin-bottom: 20px;
}
.bio { font-size: 1.2rem; color: var(--text-light); margin-bottom: 30px; max-width: 450px; }

.hero-btns { display: flex; gap: 15px; }
.btn-primary { background: var(--black); color: white; padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn-secondary { border: 1px solid #ddd; color: var(--black); padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.btn-secondary:hover { border-color: var(--black); }

/* 3D Visuals */
.hero-visual { flex: 1; display: flex; justify-content: flex-end; perspective: 1000px; }
.tilt-card {
    width: 350px; height: 450px; position: relative;
    transform-style: preserve-3d; transition: transform 0.1s;
}
.profile-photo {
    width: 100%; height: 100%; object-fit: cover; border-radius: 24px;
    box-shadow: var(--shadow-lg);
}
.float-card {
    position: absolute; background: white; padding: 12px 20px; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 10px;
    transform: translateZ(50px); /* Pushes element toward user */
}
.f-1 { top: 40px; left: -50px; }
.f-2 { bottom: 60px; right: -30px; }
.icon-box { width: 35px; height: 35px; background: var(--bg-gray); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.float-card span { font-weight: 700; font-size: 0.9rem; color: var(--text-main); }

/* --- 5. Bento Grid (Projects) --- */
section { padding: 100px 20px; }
.center-text { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 3rem; letter-spacing: -1px; margin-bottom: 10px; }
.sub-head { color: var(--text-light); font-size: 1.1rem; }

.bento-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 350px);
    gap: 20px; max-width: 1200px; margin: 0 auto;
}
.project-card {
    position: relative; border-radius: 24px; overflow: hidden; cursor: pointer;
    background: #e0e0e0; box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.project-card:hover { transform: scale(0.98); }

/* Spans */
.span-2 { grid-column: span 2; }
.span-1 { grid-column: span 1; }

/* Images */
.p-bg {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s;
}
.project-card:hover .p-bg { transform: scale(1.1); }

/* Content Overlay */
.p-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white; z-index: 2;
}
.p-tag { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; opacity: 0.8; display: block; margin-bottom: 5px; }
.p-content h3 { font-size: 1.5rem; margin-bottom: 5px; }

/* Github Card */
.dark-card { background: #111; color: white; display: flex; align-items: center; justify-content: center; }
.full-link { text-decoration: none; color: white; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.center-content { text-align: center; z-index: 5; }
.center-content h3 { margin-top: 15px; }

/* --- 6. General Card (Experience & About) --- */
.clean-card {
    background: white; border-radius: 24px; padding: 50px;
    box-shadow: var(--shadow-lg); max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; gap: 60px;
}
.cc-text { flex: 1; }
.cc-visual { flex: 1; height: 350px; position: relative; }
.erp-mockup {
    width: 100%; height: 100%; background: #2c3e50; border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; color: white;
}
.erp-mockup i { font-size: 4rem; margin-bottom: 15px; }

.skills-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.skill-pill {
    padding: 10px 20px; border-radius: 20px; background: var(--bg-gray);
    font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
}
.skill-pill:hover { background: var(--black); color: white; }
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; color: var(--text-light); }
.feature-list i { color: var(--accent); }

/* --- 7. Footer --- */
footer { background: white; text-align: center; padding: 80px 20px; border-top: 1px solid #eee; }
.footer-content h2 { font-size: 2.5rem; margin-bottom: 10px; }
.footer-content p { margin-bottom: 30px; color: var(--text-light); }
.social-links { margin: 40px 0; }
.social-links a { font-size: 1.5rem; color: var(--text-main); margin: 0 15px; transition: 0.3s; }
.social-links a:hover { color: var(--accent); }
.copyright { font-size: 0.9rem; color: #aaa; }

/* --- 8. Chatbot UI --- */
.chatbot-toggler { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; background: var(--black); color: white; border-radius: 50%; border: none; cursor: pointer; font-size: 1.5rem; box-shadow: var(--shadow-lg); z-index: 10000; transition: 0.3s; }
.chatbot-toggler:hover { transform: scale(1.1); }
.chatbot-window { position: fixed; bottom: 90px; right: 25px; width: 320px; height: 400px; background: white; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; z-index: 10000; opacity: 0; pointer-events: none; transform: translateY(20px); transition: 0.3s; }
.chatbot-window.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.chat-header { background: var(--bg-gray); padding: 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.bot-id { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.bot-dot { width: 10px; height: 10px; background: #34C759; border-radius: 50%; }
#close-bot { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; background: white; }
.msg { padding: 10px 15px; border-radius: 15px; font-size: 0.9rem; margin-bottom: 10px; max-width: 80%; }
.bot-msg { background: var(--bg-gray); color: var(--text-main); border-bottom-left-radius: 0; }
.user-msg { background: var(--black); color: white; margin-left: auto; border-bottom-right-radius: 0; }
.chat-input { border-top: 1px solid #eee; padding: 10px; display: flex; }
.chat-input input { flex: 1; border: none; outline: none; padding: 10px; }
.chat-input button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 1.2rem; padding: 0 10px; }

/* --- 9. Mobile Optimization --- */
@media (max-width: 768px) {
    /* Hide Desktop features */
    .cursor, .cursor2, .float-card { display: none; }
    * { cursor: auto; /* Restore default cursor */ }

    /* Typography & Hero */
    .hero-title-3d { font-size: 3rem; }
    .hero-container { flex-direction: column-reverse; text-align: center; padding-top: 100px; }
    .hero-visual { margin-bottom: 40px; perspective: none; justify-content: center; }
    .tilt-card { transform: none !important; width: 280px; height: 350px; }
    .hero-btns { justify-content: center; }

    /* Bento Grid Stacking */
    .bento-grid { display: flex; flex-direction: column; gap: 20px; grid-template-rows: auto; }
    .project-card { height: 300px; width: 100%; }
    
    /* General Cards */
    .clean-card { flex-direction: column; padding: 30px; text-align: center; }
    .feature-list li { justify-content: center; }
    .reverse-mobile { flex-direction: column-reverse; }

    /* Navigation */
    .hamburger { display: block; position: relative; z-index: 10001; }
    .menu { 
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
        background: white; flex-direction: column; justify-content: center; 
        align-items: center; transform: translateX(100%); transition: 0.3s; z-index: 10000;
    }
    .menu.active { transform: translateX(0); }
    .menu a { font-size: 1.5rem; color: var(--text-main); }
}
