@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    /* Colors */
    --jet: hsl(0, 0%, 22%);
    --onyx: hsl(240, 1%, 17%);
    --eerie-black1: hsl(240, 2%, 13%);
    --eerie-black2: hsl(240, 2%, 12%);
    --smoky-black: hsl(0, 0%, 7%);
    --white1: hsl(0, 0%, 100%);
    --white2: hsl(0, 0%, 98%);
    --orange-yellow-crayola: hsl(45, 100%, 72%);
    --vegas-gold: hsl(45, 54%, 58%);
    --light-gray: hsl(0, 0%, 84%);
    --light-gray70: hsla(0, 0%, 84%, .7);

    /* Typography */
    --ff-poppins: 'Poppins', sans-serif;
    --fs1: 24px;
    --fs2: 18px;
    --fw500: 500;
    --fw600: 600;

    /* Shadows */
    --shadow1: -4px 8px 24px hsla(0, 0%, 0%, .25);
    --shadow2: 0px 16px 30px hsla(0, 0%, 0%, .25);
    --shadow3: 0px 16px 40px hsla(0, 0%, 0%, .25);

    /* Transitions */
    --transition1: .25s ease;
    --transition2: .5s ease-in-out;

    /* Layout */
    --content-max-width: 1200px;
    --border-radius: 20px;
    --section-padding: 25px;

    /* Component Sizes */
    --header-img-size: 180px;
    --back-to-top-size: 50px;
    --progress-bar-height: 3px;
    --ripple-size: 20px;

    /* Light Mode Default Variables */
    --body-bg-color: #f8f9fa;
    --text-color-primary: var(--smoky-black);
    --text-color-secondary: var(--jet);
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --border-color: #dee2e6;
    --section-bg-color: var(--white1);
    --section-border-color: #dee2e6;
    --header-bg-color: var(--white1);
    --header-text-color-h1: var(--smoky-black);
    --header-text-color-h2: var(--jet);
    --header-text-color-p: var(--onyx);
    --profile-img-border-color: var(--orange-yellow-crayola);
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --body-bg-color: var(--smoky-black);
        --text-color-primary: var(--white2);
        --text-color-secondary: var(--light-gray);
        --link-color: var(--orange-yellow-crayola);
        --link-hover-color: var(--vegas-gold);
        --border-color: var(--jet);
        --section-bg-color: var(--eerie-black2);
        --section-border-color: var(--jet);
        --header-bg-color: var(--eerie-black1);
        --header-text-color-h1: var(--white1);
        --header-text-color-h2: var(--light-gray);
        --header-text-color-p: var(--light-gray70);
        --profile-img-border-color: var(--orange-yellow-crayola);
    }
}

/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: var(--orange-yellow-crayola);
    color: var(--smoky-black);
}

:focus { 
    outline-color: var(--orange-yellow-crayola); 
}

html { 
    font-family: var(--ff-poppins); 
    scroll-behavior: smooth;
}

body {
    background: var(--body-bg-color);
    color: var(--text-color-primary);
    line-height: 1.6;
    transition: background-color var(--transition2), color var(--transition2);
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    position: relative;
    background: var(--header-bg-color);
    padding: 60px 30px;
    text-align: center;
    margin: 20px 0 40px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow2);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right, hsl(240, 1%, 25%) 3%, hsl(0, 0%, 19%) 97%);
    opacity: 0.1;
    z-index: -1;
}

header img {
    width: var(--header-img-size);
    height: var(--header-img-size);
    display: block;
    margin: 0 auto 25px;
    border-radius: 50%;
    border: 4px solid var(--profile-img-border-color);
    box-shadow: var(--shadow3);
    transition: transform var(--transition1);
}

header img:hover {
    transform: scale(1.05);
}

header h1 {
    margin-bottom: 15px;
    font-size: 42px;
    font-weight: var(--fw600);
    color: var(--header-text-color-h1);
    background: linear-gradient(to right, hsl(45, 100%, 72%), hsl(35, 100%, 68%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header h2 {
    font-size: 28px;
    font-weight: var(--fw500);
    color: var(--header-text-color-h2);
    margin-bottom: 20px;
}

header p {
    font-size: 18px;
    color: var(--header-text-color-p);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

header h2::after {
    display: none;
    content: none;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Section Styles */
section {
    background: var(--section-bg-color);
    border: 1px solid var(--section-border-color);
    border-radius: var(--border-radius);
    padding: var(--section-padding);
    box-shadow: var(--shadow1);
    transition: transform var(--transition1), box-shadow var(--transition1);
    margin-bottom: 25px;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow2);
}

h2 {
    color: var(--text-color-primary);
    font-size: var(--fs1);
    font-weight: var(--fw600);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, hsl(45, 100%, 72%), hsl(35, 100%, 68%));
    border-radius: 3px;
}

h3 {
    color: var(--text-color-secondary);
    font-size: var(--fs2);
    font-weight: var(--fw500);
    margin-bottom: 8px;
}

/* Article Styles */
article {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--section-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: all var(--transition1);
}

article:hover {
    border-color: var(--orange-yellow-crayola);
    box-shadow: var(--shadow1);
}

article:last-child {
    margin-bottom: 0;
}

/* Typography */
p {
    color: var(--text-color-primary);
    margin-bottom: 12px;
    line-height: 1.7;
}

ul {
    list-style: none;
    padding-left: 0;
}

li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--orange-yellow-crayola);
    font-weight: bold;
}

/* Link Styles */
a {
    color: var(--link-color);
    text-decoration: none;
    position: relative;
    transition: color var(--transition1);
}

a:hover {
    color: var(--link-hover-color);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(to right, hsl(45, 100%, 72%), hsl(35, 100%, 68%));
    transition: width var(--transition1);
}

a:hover::after {
    width: 100%;
}

/* Skills Section Enhancement */
#skills ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding-left: 0;
}

#skills li {
    background: var(--section-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    text-align: center;
    font-weight: var(--fw500);
    transition: all var(--transition1);
    position: relative;
    overflow: hidden;
}

#skills li::before {
    display: none;
}

#skills li:hover {
    border-color: var(--orange-yellow-crayola);
    transform: translateY(-2px);
    box-shadow: var(--shadow1);
}

/* Personal Projects Enhancement */
#personal-projects article {
    position: relative;
    overflow: hidden;
}

/* Project Icons Styling */
#personal-projects .fab {
    color: var(--orange-yellow-crayola);
    margin-right: 8px;
    font-size: 16px;
}

/* Project Link Styles - Consolidated */
.project-link {
    padding-left: 0 !important;
    text-align: start;
}

.project-link::before {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    header {
        padding: 40px 20px;
    }
    
    header h1 {
        font-size: 36px;
    }
    
    header h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 15px;
    }
    
    header {
        margin: 15px 0 30px 0;
        padding: 30px 15px;
    }
    
    header img {
        width: 140px;
        height: 140px;
    }
    
    header h1 {
        font-size: 32px;
    }
    
    header h2 {
        font-size: 20px;
    }
    
    header p {
        font-size: 16px;
    }
    
    section {
        padding: 20px;
    }
    
    #skills ul {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 28px;
    }
    
    header h2 {
        font-size: 18px;
    }
    
    #skills ul {
        grid-template-columns: 1fr;
    }
    
    article {
        padding: 15px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--section-bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--orange-yellow-crayola);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vegas-gold);
}

/* JavaScript-generated styles moved to CSS */
.typing-cursor {
    display: inline-block;
    color: var(--orange-yellow-crayola);
    font-weight: 600;
    font-size: inherit;
    margin-left: 2px;
    animation: blink-cursor 0.7s steps(1) infinite;
    vertical-align: baseline;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Utility classes for JavaScript components */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: var(--progress-bar-height);
    background: linear-gradient(to right, hsl(45, 100%, 72%), hsl(35, 100%, 68%));
    z-index: 9999;
    transition: width 0.1s ease;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: var(--back-to-top-size);
    height: var(--back-to-top-size);
    border-radius: 50%;
    background: var(--orange-yellow-crayola);
    color: var(--smoky-black);
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow2);
    transition: all var(--transition1);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top:hover {
    transform: scale(1.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
