/* =========================================
   1. VARIABLES & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #f16160;
    --primary-hover: #d14d4c;
    --secondary: #2d3748;
    --accent: #ff9a9e;
    
    /* Backgrounds */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    /* Glassmorphism */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    
    /* Shadows & Radius */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    
    /* Font */
    --font-main: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-light);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle Global Gradient */
    background-image: radial-gradient(at 0% 0%, rgba(241, 97, 96, 0.05) 0px, transparent 50%), 
                      radial-gradient(at 100% 100%, rgba(66, 153, 225, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* =========================================
   2. UTILITIES & LAYOUT
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Glass Panel (Used in Dashboard/Editor) */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: #1a202c; }
h1 { font-size: 3.5rem; letter-spacing: -1px; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; letter-spacing: -0.5px; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { color: #64748b; font-size: 1rem; margin-bottom: 1rem; }

/* =========================================
   4. BUTTONS
   ========================================= */
/* Primary Action */
.btn-main {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(241, 97, 96, 0.3);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
}
.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(241, 97, 96, 0.4);
    background: var(--primary-hover);
}

/* Outline Button (Secondary) */
.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--secondary);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    cursor: pointer;
}
.btn-outline:hover { border-color: var(--secondary); background: white; }

/* Ghost Button (Links/Nav) */
.btn-ghost {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--secondary);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); color: var(--primary); }

/* Next Step Button (Editor) */
.btn-next {
    display: block; width: 100%; text-align: center;
    background: #2d3748; color: white; padding: 15px;
    border-radius: 12px; margin-top: 20px; text-decoration: none;
    font-weight: bold; transition: 0.3s; cursor: pointer; border: none;
}
.btn-next:hover { background: #1a202c; transform: translateY(-2px); }

/* =========================================
   5. FORMS & INPUTS
   ========================================= */
.input-group { margin-bottom: 20px; position: relative; }
.input-group label, label {
    display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; color: #4a5568;
}

/* Modern Inputs */
input[type="text"], input[type="email"], input[type="password"], 
input[type="number"], input[type="url"], input[type="date"], 
input[type="month"], textarea, select, .modern-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: #f8fafc; /* Slightly grey background */
    transition: all 0.3s ease;
    outline: none;
    color: #2d3748;
    margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus, .modern-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(241, 97, 96, 0.1);
}

/* Checkbox Wrapper */
.checkbox-wrapper {
    display: flex; align-items: center; gap: 10px; 
    margin-top: 5px; background: rgba(255,255,255,0.5); 
    padding: 10px; border-radius: 8px; border: 1px solid #e2e8f0;
}
.checkbox-wrapper input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.checkbox-wrapper label { margin: 0; cursor: pointer; }

/* =========================================
   6. ALERTS & NOTIFICATIONS
   ========================================= */
.alert {
    padding: 15px; border-radius: 12px; margin-bottom: 25px;
    font-size: 0.95rem; display: flex; align-items: center; border-left: 5px solid transparent;
}
.alert.error { background: #fff5f5; color: #c53030; border-color: #fc8181; }
.alert.success { background: #f0fff4; color: #276749; border-color: #68d391; }

/* =========================================
   7. NAVIGATION (SaaS Style)
   ========================================= */
nav {
    padding: 20px 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid #eee;
}

/* =========================================
   8. HERO SECTION & HOMEPAGE
   ========================================= */
.hero-section {
    padding: 100px 0;
    background: radial-gradient(circle at 80% 20%, rgba(241, 97, 96, 0.08) 0%, transparent 40%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-badge {
    background: #fff0f0; color: var(--primary); padding: 5px 15px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; display: inline-block;
}

/* BENTO GRID (Homepage Features) */
.bento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 300px); gap: 20px;
}
.bento-card {
    background: white; border-radius: 24px; padding: 30px; border: 1px solid #f1f5f9;
    transition: 0.3s; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
}
.bento-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #e2e8f0; }
.bento-card.wide { grid-column: span 2; background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%); color: white; }
.bento-card.wide p { color: #cbd5e0; }
.bento-card.tall { grid-row: span 2; background: #fff0f0; }
.bento-icon { font-size: 2rem; margin-bottom: 20px; color: var(--primary); }

/* =========================================
   9. AUTH PAGES (Login/Register)
   ========================================= */
.auth-container {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 50%, #fff0f0 0%, #fff 100%); padding: 20px;
}
.auth-card {
    background: white; width: 100%; max-width: 450px; padding: 40px;
    border-radius: 24px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid #f1f5f9; text-align: center;
}
.auth-title { font-size: 2rem; margin-bottom: 10px; color: #1a202c; }
.auth-subtitle { color: #718096; margin-bottom: 30px; }

/* =========================================
   10. DASHBOARD & EDITOR
   ========================================= */
.dashboard-container { display: grid; grid-template-columns: 280px 1fr; gap: 30px; max-width: 1400px; margin: 30px auto; padding: 0 20px; }

/* Sidebar */
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 10px; color: #64748b; font-weight: 500; transition: 0.2s; margin-bottom: 5px;}
.sidebar-link:hover, .sidebar-link.active { background: #fff0f0; color: var(--primary); }

/* Stats */
.stat-card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 25px; border-radius: 16px; border: 1px solid #f1f5f9; text-align: center; }

/* Editor Tabs */
.tab-nav { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.tab-btn {
    background: rgba(255,255,255,0.5); border: none; padding: 12px 15px; flex: 1;
    border-radius: 10px; cursor: pointer; font-weight: 600; color: #555; white-space: nowrap;
    transition: all 0.3s ease; min-width: 110px;
}
.tab-btn:hover { background: rgba(255,255,255,0.9); }
.tab-btn.active { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(241, 97, 96, 0.3); }

/* Item Rows (Experience/Edu lists) */
.item-row {
    background: rgba(255,255,255,0.8); padding: 15px; margin-bottom: 10px;
    border-radius: 12px; display: flex; justify-content: space-between; align-items: center;
    border-left: 4px solid var(--primary); border: 1px solid #e2e8f0;
}

/* Form Helper Grid */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Portfolio Card in Editor */
.portfolio-card { background: white; border-radius: 12px; overflow: hidden; border: 1px solid #eee; display: flex; flex-direction: column; }
.portfolio-img-wrap { position: relative; height: 150px; overflow: hidden; }
.portfolio-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); color: white;
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 10px; opacity: 0; transition: opacity 0.3s ease;
}
.portfolio-img-wrap:hover .portfolio-overlay { opacity: 1; }
.portfolio-actions { padding: 10px; border-top: 1px solid #eee; background: #fff; z-index: 10; position: relative; }

/* =========================================
   11. PUBLIC PROFILE (Resume View)
   ========================================= */
.resume-container {
    max-width: 1000px; margin: 40px auto; display: grid; grid-template-columns: 300px 1fr;
    gap: 20px; box-shadow: var(--shadow-lg); border-radius: 20px; overflow: hidden;
}
.sidebar-profile { background: #2d3748; color: white; padding: 40px 20px; text-align: center; }
.profile-pic { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary); margin-bottom: 20px; }
.contact-item { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: #cbd5e0; }
.skill-tag { background: rgba(255,255,255,0.1); padding: 5px 10px; border-radius: 4px; display: inline-block; margin: 3px; font-size: 0.85rem; }

/* Timeline */
.timeline-item { padding-left: 20px; border-left: 2px solid #e2e8f0; margin-bottom: 25px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; background: var(--primary); border-radius: 50%; }

/* =========================================
   12. RESPONSIVENESS (Mobile)
   ========================================= */
@media (max-width: 900px) {
    /* Hero */
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    h1 { font-size: 2.5rem; }
    
    /* Bento */
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .bento-card.wide, .bento-card.tall { grid-column: span 1; grid-row: span 1; height: auto; min-height: 250px; }
    
    /* Dashboard */
    .dashboard-container { grid-template-columns: 1fr; }
    
    /* Editor */
    .form-grid-2 { grid-template-columns: 1fr; }
    .item-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .delete-btn { align-self: flex-end; }
    
    /* Public Profile */
    .resume-container { grid-template-columns: 1fr; margin: 20px; width: auto; }
    .sidebar-profile { text-align: center; }
    .contact-info { display: flex; flex-direction: column; align-items: center; }
}

@media print {
    body { background: white; }
    .btn-print, .btn-main, nav, aside { display: none !important; }
    .resume-container { box-shadow: none; margin: 0; width: 100%; grid-template-columns: 1fr; }
    .sidebar-profile { background: white; color: black; border-bottom: 2px solid #333; }
    .contact-item { color: black; }
}