/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES (HSL PALETTE)
   ========================================================================== */
:root {
    --bg-dark: hsl(222, 47%, 7%);
    --bg-card: hsla(222, 40%, 12%, 0.4);
    --bg-card-hover: hsla(222, 40%, 15%, 0.65);
    --border-color: hsla(222, 30%, 25%, 0.3);
    --border-hover: hsla(222, 30%, 40%, 0.5);
    
    --text-primary: hsl(0, 0%, 95%);
    --text-secondary: hsl(215, 20%, 75%);
    --text-muted: hsl(215, 16%, 55%);
    
    --purple: hsl(262, 83%, 65%);
    --blue: hsl(217, 91%, 60%);
    --pink: hsl(330, 85%, 60%);
    
    --gradient-primary: linear-gradient(135deg, var(--purple), var(--blue));
    --gradient-hover: linear-gradient(135deg, hsl(262, 83%, 70%), hsl(217, 91%, 65()));
    
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-glow: 0 8px 32px 0 rgba(139, 92, 246, 0.15);
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

input, textarea, select {
    font-family: var(--font-sans);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-success { color: #10b981; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: hsla(0, 0%, 100%, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background-color: hsla(0, 0%, 100%, 0.15);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* Background Glow Effects */
.glow-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.glow-purple {
    top: 15%;
    left: 10%;
    background-color: var(--purple);
}

.glow-blue {
    top: 25%;
    right: 15%;
    background-color: var(--blue);
}

.glow-pink {
    bottom: 30%;
    left: 15%;
    background-color: var(--pink);
}

.glow-blue-right {
    bottom: 10%;
    right: 5%;
    background-color: var(--blue);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
}

.logo-icon {
    font-size: 1.2rem;
    color: var(--purple);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 10rem 0 7rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--purple);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-role {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 580px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-socials {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.5rem;
    font-size: 1.4rem;
}

.hero-socials a {
    color: var(--text-secondary);
}

.hero-socials a:hover {
    color: var(--purple);
    transform: scale(1.15);
}

/* Hero Image & Custom Avatar */
.hero-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 24px;
    z-index: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    border: 2px solid var(--border-color);
}

.default-avatar {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.avatar-svg {
    width: 85%;
    height: 85%;
}

.avatar-icon {
    position: absolute;
    font-size: 2.2rem;
    color: #fff;
    background: var(--gradient-primary);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    bottom: 25px;
    right: 25px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 22px rgba(139, 92, 246, 0.7); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }
}

.image-accent {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.2;
    transition: var(--transition-smooth);
}

.image-wrapper:hover .image-accent {
    transform: translate(8px, 8px);
    opacity: 0.35;
}

/* ==========================================================================
   SECTION STRUCTURE & HEADER
   ========================================================================== */
section {
    padding: 7rem 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
}

.title-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0.8rem auto 0 auto;
    border-radius: 2px;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 5rem;
    align-items: center;
}

.about-info h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1.2rem;
}

.about-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.personal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.detail-value a:hover {
    color: var(--purple);
}

.about-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skills-category {
    padding: 2.5rem 2rem;
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.text-purple { color: var(--purple); }

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.skill-name {
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--text-secondary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.1, 1);
}

/* ==========================================================================
   PROJECTS SECTION (PORTFOLIO GALLERY)
   ========================================================================== */
.filter-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, hsla(262, 83%, 65%, 0.1), hsla(217, 91%, 60%, 0.1));
    color: var(--purple);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.project-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--purple);
    letter-spacing: 1px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag-pill {
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Project Modals */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.85);
    z-index: 2000;
    padding: 2rem 1.5rem;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.project-modal.modal-active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: hsl(222, 47%, 9%);
    border-color: var(--border-hover);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.1, 0.8, 0.1, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: #fff;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.modal-img {
    height: 100%;
    max-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-details h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
}

.modal-details p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.tech-stack-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.modal-actions {
    margin-top: 1rem;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3.5rem;
}

.contact-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--purple);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.contact-info-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-info-card a:hover {
    color: var(--purple);
}

.contact-form-wrapper {
    padding: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row .form-group {
    flex: 1;
}

.contact-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--purple);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.error-msg {
    font-size: 0.8rem;
    color: #ef4444;
}

.success-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    margin-bottom: 3rem;
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.success-banner i {
    font-size: 1.5rem;
    color: #10b981;
}

.success-banner p {
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: hsl(222, 47%, 5%);
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.heart {
    color: #ef4444;
    display: inline-block;
    animation: beat 1.2s infinite alternate;
}

@keyframes beat {
    to { transform: scale(1.15); }
}

/* ==========================================================================
   ADMIN LOGIN CARD STYLING
   ========================================================================== */
.login-body {
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-card {
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.login-icon {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-errors {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-error-item {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #f87171;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    top: 50%;
    left: 1.2rem;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    padding-left: 3rem !important;
}

.remember-me-group {
    margin-top: -0.25rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-footer a:hover {
    color: #fff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 992px) {
    html { font-size: 15px; }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu, .nav-actions {
        display: none; /* simple stack representation, normally needs mobile menu drawer */
    }
    
    .personal-details {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}
