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

:root {
    --primary-color: #0ea5e9;
    --secondary-color: #06b6d4;
    --accent-color: #8b5cf6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #020617;
    --border-color: #334155;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-heavy: 0 20px 25px rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ================================
   HEADER & NAVIGATION - Match Home Page
   ================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 9%;
    background: transparent;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: .5s;
}

.header.sticky {
    background: var(--bg-primary);
    box-shadow: 0 .1rem 1rem rgba(0, 0, 0, 0.1);
    padding: 1rem 9%;
}

body.dark-mode .header.sticky {
    background: var(--bg-primary);
}

.logo {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-right: auto;
    text-decoration: none;
}

body.dark-mode .logo {
    color: #00ff9d;
}

.navbar {
    display: flex;
    gap: 2rem;
    margin-right: 2rem;
}

.navbar a {
    position: relative;
    font-size: 1.2rem;
    color: var(--white-color);
    font-weight: 500;
    text-decoration: none;
    transition: .3s;
}

.header.sticky .navbar a {
    color: var(--text-primary);
}

.header.sticky .navbar a.active {
    color: var(--primary-color);
}

.navbar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: .2rem;
    background: var(--white-color);
}

.header.sticky .navbar a::before {
    background: var(--primary-color);
    opacity: .7;
}

.navbar a:hover {
    color: var(--primary-color);
}

body.dark-mode .navbar a {
    color: var(--white-color);
}

body.dark-mode .header.sticky .navbar a {
    color: var(--text-primary);
}

body.dark-mode .navbar a:hover,
body.dark-mode .header.sticky .navbar a.active {
    color: #00ff9d;
}

body.dark-mode .navbar a.active::before,
body.dark-mode .header.sticky .navbar a::before {
    background: #00ff9d;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white-color);
    transition: var(--transition);
}

.header.sticky .menu-toggle span {
    background: var(--text-primary);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ================================
   FLOATING SOCIAL BUTTONS
   ================================ */
.floating-social {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    opacity: 0.8;
}

.social-btn:hover {
    opacity: 1;
    transform: translateX(-5px) scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.social-btn.linkedin {
    background: #0077b5;
}

.social-btn.github {
    background: #333;
}

.social-btn.twitter {
    background: #1da1f2;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
    margin-top: 80px;
    min-height: 100vh;
}

/* ================================
   INTRO SECTION
   ================================ */
.intro-section {
    padding: 10rem 0 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

body.dark-mode .intro-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    animation: fadeInUp 0.8s ease-out;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ================================
   SECTION STYLES
   ================================ */
section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.section-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   SKILLS SECTION
   ================================ */
.skills-section {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    border: 1px solid var(--border-color);
}

.skill-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.8rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: rotate(360deg) scale(1.1);
}

.skill-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Category-based hover effects */
.skill-card[data-category="frontend"]:hover .skill-icon {
    background: linear-gradient(135deg, #61dafb, #21d4fd);
}

.skill-card[data-category="backend"]:hover .skill-icon {
    background: linear-gradient(135deg, #68d391, #38b2ac);
}

.skill-card[data-category="database"]:hover .skill-icon {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
}

.skill-card[data-category="ai"]:hover .skill-icon {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.skill-card[data-category="systems"]:hover .skill-icon {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

/* ================================
   TOOLS SECTION
   ================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-30px);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    transition: var(--transition);
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card.animate {
    opacity: 1;
    transform: translateX(0);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.tool-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: white;
    font-size: 1.6rem;
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
    background: var(--gradient-primary);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ================================
   EXPERTISE SECTION
   ================================ */
.expertise-section {
    background: var(--bg-secondary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.expertise-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    opacity: 0;
    transform: scale(0.9);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.expertise-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.expertise-card:hover::after {
    transform: scaleX(1);
}

.expertise-card.animate {
    opacity: 1;
    transform: scale(1);
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.expertise-icon {
    width: 65px;
    height: 65px;
    margin-bottom: 1.2rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.8rem;
    transition: var(--transition);
}

.expertise-card:hover .expertise-icon {
    transform: rotate(5deg) scale(1.1);
    background: var(--gradient-accent);
}

.expertise-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.expertise-card p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.expertise-card ul {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.expertise-card ul li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-tags span {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.expertise-card:hover .expertise-tags span {
    background: var(--gradient-accent);
    transform: translateY(-2px);
}

/* ================================
   SKILLS PROGRESS BARS
   ================================ */
.skills-progress {
    margin-top: 4rem;
}

.progress-item {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: var(--transition);
}

.progress-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-label h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
    animation: shimmer 2s infinite;
}

/* ================================
   DARK MODE TOGGLE
   ================================ */
.dark-mode-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

body.dark-mode .dark-mode-toggle {
    background: #ffd93d;
    color: #333;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--secondary-color);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-20px);
    }
    100% {
        transform: translateX(100px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ================================
   SCROLL ANIMATIONS
   ================================ */
.scroll-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.scroll-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   LOADING STATES
   ================================ */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .header {
        padding: 1.2rem 3%;
    }

    .logo {
        font-size: 2rem;
    }
    
    .navbar {
        gap: 1rem;
    }

    .navbar a {
        font-size: 1.4rem;
    }

    #darkMode-icon {
        font-size: 2.2rem;
    }

    #menu-icon {
        font-size: 2.8rem;
    }

    .menu-toggle {
        display: none;
    }

    .floating-social {
        right: 1.5rem;
        gap: 0.8rem;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }

    .intro-section {
        padding: 10rem 3% 4rem;
    }

    .intro-title {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    .intro-text {
        font-size: 1.5rem;
        padding: 0 2rem;
        line-height: 1.7;
    }

    .section-title {
        font-size: 2.8rem;
        margin-bottom: 3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
        padding: 0 2rem;
    }

    .skill-card {
        padding: 2.5rem 2rem;
    }

    .skill-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .skill-card h3 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .skill-card p {
        font-size: 1.4rem;
    }

    .progress-bar {
        height: 10px;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.8rem;
        padding: 0 2rem;
    }

    .tool-card {
        padding: 2rem 1.5rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .tool-card h3 {
        font-size: 1.6rem;
    }

    .tool-card p {
        font-size: 1.3rem;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 2rem;
    }

    .expertise-card {
        padding: 2.5rem 2rem;
    }

    .expertise-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .expertise-card h3 {
        font-size: 2rem;
    }

    .expertise-card ul li {
        font-size: 1.4rem;
    }

    section {
        padding: 5rem 0 4rem;
    }

    .container {
        padding: 0 3%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 52%;
    }

    .header {
        padding: 1rem 3%;
    }

    .logo {
        font-size: 1.8rem;
    }

    .navbar {
        gap: 0;
    }

    .navbar a {
        font-size: 1.6rem;
        padding: 1rem 0.8rem;
        margin: 1.5rem 0;
    }

    #darkMode-icon {
        font-size: 2rem;
        right: 6rem;
    }

    #menu-icon {
        font-size: 2.6rem;
    }

    .intro-section {
        padding: 8rem 3% 3rem;
    }

    .intro-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .intro-text {
        font-size: 1.4rem;
        padding: 0 1rem;
        line-height: 1.6;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        padding: 0 1rem;
    }

    .skill-card {
        padding: 2rem 1.5rem;
    }

    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
    }

    .skill-card h3 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .skill-card p {
        font-size: 1.3rem;
        line-height: 1.6;
    }

    .progress-bar {
        height: 8px;
        margin-top: 1rem;
    }

    .progress-fill {
        border-radius: 10px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .tool-card {
        padding: 1.8rem 1.2rem;
    }

    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .tool-card h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .tool-card p {
        font-size: 1.2rem;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        padding: 0 1rem;
    }

    .expertise-card {
        padding: 2rem 1.5rem;
    }

    .expertise-icon {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
        margin-bottom: 1.2rem;
    }

    .expertise-card h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .expertise-card ul {
        padding-left: 2rem;
    }

    .expertise-card ul li {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
        line-height: 1.6;
    }

    .expertise-card ul li::marker {
        font-size: 1.2rem;
    }

    section {
        padding: 4rem 0 3rem;
    }

    .container {
        padding: 0 3%;
        max-width: 100%;
    }

    .floating-social {
        display: none;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    html {
        font-size: 50%;
    }

    .intro-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .skill-card,
    .tool-card,
    .expertise-card {
        padding: 1.5rem 1.2rem;
    }
}

@media (max-width: 320px) {
    .navbar {
        gap: 0.5rem;
    }

    .navbar a {
        font-size: 0.8rem;
    }

    .intro-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .skills-grid,
    .tools-grid,
    .expertise-grid {
        gap: 1rem;
    }
}