/* Base Variables & Theme */
:root {
    --bg-color: #0a192f;
    --bg-light: #112240;
    --bg-lighter: #233554;
    --text-color: #ccd6f6;
    --text-dim: #8892b0;
    --accent-color: #64ffda;
    /* Teal accent */
    --accent-hover: rgba(100, 255, 218, 0.1);
    --font-main: 'Inter', sans-serif;
    --container-width: 1000px;
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    color: #e6f1ff;
    line-height: 1.1;
}

.section-title {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0 40px;
    width: 100%;
    font-size: clamp(26px, 5vw, 32px);
    white-space: nowrap;
}

.section-title::after {
    content: "";
    display: block;
    position: relative;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--bg-lighter);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10a, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.5rem;
    border: 2px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 18px 28px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-dim);
    margin-left: 15px;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.hero-image-container {
    display: flex;
    justify-content: center;
}

.hero-profile-img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 10px 30px -15px rgba(100, 255, 218, 0.3);
    transition: var(--transition);
}

.hero-profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px -15px rgba(100, 255, 218, 0.4);
}

.intro-text {
    color: var(--accent-color);
    font-family: 'Space Mono', monospace;
    /* Fallback to monospace if Inter not enough */
    font-size: 1rem;
    margin-bottom: 20px;
}

.big-heading {
    font-size: clamp(40px, 8vw, 80px);
    margin: 0;
}

.sub-heading {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-dim);
    margin-bottom: 20px;
}

.value-prop {
    max-width: 540px;
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.education-list {
    list-style: none;
    margin-top: 30px;
}

.education-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 20px;
}

.education-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.education-list strong {
    display: block;
    color: #e6f1ff;
}

.education-list span {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skills-category {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 4px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skills-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skills-category h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.project-icon {
    color: var(--accent-color);
    font-size: 2rem;
}

.project-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-left: 15px;
}

.project-links a:hover {
    color: var(--accent-color);
}

.project-title {
    margin-bottom: 15px;
}

.project-title a {
    text-decoration: none;
    color: inherit;
}

.project-title a:hover {
    color: var(--accent-color);
}

.project-description {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
}

.streamlit-badge {
    background: var(--accent-hover);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* Contact Section */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 15px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--accent-hover);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Utilities */
.loading-container,
.error-container {
    padding: 50px;
    text-align: center;
    background: var(--bg-light);
    border-radius: 8px;
}

.loader {
    border: 3px solid var(--bg-lighter);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu can be added if needed, keeping it simple for now */
    }

    section {
        padding: 80px 0;
    }

    .hero-grid-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-image-container {
        order: -1;
        /* Image on top */
    }

    .hero-profile-img {
        width: 180px;
        height: 180px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
    }

    .section-title::after {
        width: 100px;
    }
}