/* CSS Custom Properties - Dark Color Palette */
:root {
    --color-background-dark: #07111D;
    /* Very dark blue/black, main background */
    --color-text-light: #D1DDED;
    /* Light blue/grey, main text color */
    --color-card-background: #2C394C;
    /* Dark blue/grey, for cards/sections */
    --color-border-subtle: #39444D;
    /* Slightly lighter dark blue/grey, for borders/dividers */
    --color-accent-primary: #1D719D;
    /* Medium blue, for links/buttons */
    --color-accent-highlight: #63DAFC;
    /* Light blue, for highlights/hover states */
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text-light);
    background-color: var(--color-background-dark);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    color: var(--color-accent-highlight);
    text-align: center;
    /* Ensure consistent centering for H2 */
    margin-bottom: 2rem;
    /* Add more space below H2 */
    position: relative;
}

/* Underline effect for H2 */
h2::after {
    content: '';
    display: block;
    width: 80px;
    /* Slightly wider underline */
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-highlight));
    margin: 0.5rem auto 0;
    /* Center and position below H2 */
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-text-light);
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Links */
a {
    color: var(--color-accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-highlight);
}

/* Horizontal Rules */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-highlight));
    margin: 1.5rem 0;
    border-radius: 1px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(7, 17, 29, 0.8), rgba(44, 57, 76, 0.6)),
        url('blogging-business-coding-34140.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    /* Space for fixed nav-bar */
}

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(7, 17, 29, 0.1);
    /* Slightly transparent background */
    backdrop-filter: blur(10px);
    /* Frosted glass effect */
    border-bottom: 1px solid rgba(57, 68, 77, 0.3);
    /* Subtle bottom border */
    transition: all 0.3s ease;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    margin: 0;
}

.navbar li {
    margin: 0 2rem;
}

.navbar a {
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar a:hover {
    color: var(--color-accent-highlight);
    background: rgba(99, 218, 252, 0.1);
    /* Subtle background on hover */
    transform: translateY(-2px);
    /* Slight lift effect */
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent-highlight);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar a:hover::after {
    width: 100%;
    /* Expand underline on hover */
}

/* Hero Text */
.hero-text {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin-top: 80px;
    /* Offset for fixed nav-bar */
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text-light), var(--color-accent-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
    /* Animation for heading */
}

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
    /* Animation for paragraph with delay */
}

.hero-text hr {
    max-width: 200px;
    margin: 2rem auto;
    animation: fadeInUp 1s ease-out 0.6s both;
    /* Animation for hr with delay */
}

/* Section Styling */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section:not(.hero) {
    background: var(--color-card-background);
    margin: 2rem auto;
    border-radius: 15px;
    border: 1px solid var(--color-border-subtle);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about-content {
    padding: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-content {
    padding: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skills-category {
    background: var(--color-background-dark);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--color-border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.skills-category h3 {
    color: var(--color-accent-highlight);
    /* Changed to highlight for consistency with other headings */
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skills-category ul {
    list-style: none;
}

.skills-category li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
}

.skills-category li::before {
    content: '▶';
    /* Play icon for list items */
    position: absolute;
    left: 0;
    color: var(--color-accent-primary);
    font-size: 0.8rem;
}

/* Education Section */
.education-content {
    padding: 2rem;
}

.education-item {
    background: var(--color-background-dark);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 10px;
    border-left: 4px solid var(--color-accent-primary);
    /* Accent border */
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateX(10px);
    /* Slide effect on hover */
}

.cv-download {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-background-dark);
    border-radius: 10px;
}

.download-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--color-accent-primary);
    color: var(--color-text-light);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    background: var(--color-accent-highlight);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 218, 252, 0.3);
    /* Shadow with highlight color */
}

/* Interests Section */
.interests-content {
    padding: 2rem;
}

.interests-content ul {
    list-style: none;
    /* Remove default list style */
    margin: 2rem 0;
}

.interests-content li {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-background-dark);
    border-radius: 8px;
    border-left: 3px solid var(--color-accent-primary);
    position: relative;
    /* For potential future icons */
}

/* Projects Section */
.projects-content {
    padding: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.project-item {
    background: var(--color-background-dark);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--color-border-subtle);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-highlight));
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-item h3 {
    color: var(--color-accent-highlight);
    margin-bottom: 1rem;
}

.project-tech {
    color: var(--color-accent-primary);
    font-style: italic;
    margin: 1rem 0;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.more-projects {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.2rem;
}

/* Contact Section */
.contact-content {
    padding: 2rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    background: var(--color-background-dark);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--color-border-subtle);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item h3 {
    color: var(--color-accent-highlight);
    margin-bottom: 1rem;
}

.contact-item i {
    margin-right: 0.5rem;
    color: var(--color-accent-primary);
}

.small-text {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 2rem;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--color-accent-primary);
    color: var(--color-text-light);
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0.25rem;
    border: 2px solid var(--color-accent-primary);
}

.button:hover {
    background: transparent;
    color: var(--color-accent-highlight);
    border-color: var(--color-accent-highlight);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 113, 157, 0.3);
}

/* Footer */
.footer {
    background: var(--color-background-dark);
    border-top: 1px solid var(--color-border-subtle);
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    .navbar ul {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .navbar li {
        margin: 0.5rem 0;
    }

    section {
        padding: 3rem 1rem;
        margin: 1rem;
    }

    .skills-grid,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project-links {
        flex-direction: column;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    section {
        padding: 2rem 0.5rem;
    }

    .nav-bar {
        background: rgba(7, 17, 29, 0.95);
        /* Less transparent on very small screens */
    }
}

/* Smooth scrolling enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-text-light: #FFFFFF;
        --color-accent-primary: #00BFFF;
        --color-accent-highlight: #FFFF00;
    }
}

/* Accessibility improvements */
.navbar a:focus,
.button:focus,
a:focus {
    outline: 2px solid var(--color-accent-highlight);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav-bar {
        display: none;
    }

    .hero {
        background: none;
        color: black;
    }

    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}