/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables (Theming) --- */
:root {
    /* Light Mode (Base) */
    --bg-main: #f8fafc;
    --bg-alt: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;       /* Java Blue */
    --primary-glow: rgba(37, 99, 235, 0.3);
    --secondary: #ea580c;     /* Java Orange */
    --border: #e2e8f0;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --bg-main: #0b1120;
    --bg-alt: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --nav-bg: rgba(11, 17, 32, 0.85);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
}

/* --- Resets & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* --- Typography Utilities --- */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background-color: var(--secondary);
    border-radius: 2px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background-color 0.4s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 0.5rem;
}

.theme-btn:hover {
    color: var(--secondary);
    transform: rotate(15deg) scale(1.1);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for nav */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 1.2;
}

.greeting {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.bio-short {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.cta-buttons {
    display: flex;
    gap: 1.2rem;
}

.hero-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
}

.profile-pic {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 4px solid var(--bg-card);
    position: relative;
    z-index: 2;
    animation: morph 8s ease-in-out infinite;
    box-shadow: var(--shadow-md);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.glow-effect {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    z-index: 1;
    filter: blur(25px);
    opacity: 0.4;
}

/* --- About Section --- */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    padding: 1.8rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.skill-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags li {
    background-color: var(--bg-main);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    font-weight: 500;
}

/* --- Projects Section --- */
.projects-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.project-header h3 {
    font-size: 1.8rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--text-main);
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--primary);
}

.disabled-link {
    color: var(--text-muted) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.project-description em {
    font-size: 0.9rem;
    color: var(--secondary);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-tech span {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dashed-card {
    border: 2px dashed var(--border);
    background-color: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashed-card:hover {
    border-color: var(--primary);
    transform: none;
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* --- Contact Section --- */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.email-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-bottom: 3.5rem;
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-item i {
    font-size: 1.8rem;
    background-color: var(--bg-card);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.social-item:hover i {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-5px);
}

.social-item:hover span {
    color: var(--primary);
}

.social-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem 0;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

footer i {
    color: var(--secondary);
}

/* --- Animations (Scroll Reveal) --- */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

    .bio-short {
        margin: 0 auto 2rem auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none; /* Add a hamburger menu later if needed */
    }
}