:root {
    --primary: #1c6b7a;
    --bg: #ffffff;
    --text: #222;
    --light: #f5f7fa;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
}

.dark {
    --bg: #121212;
    --text: #f4f4f4;
    --light: #1e1e1e;
}

/* Container */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Navbar */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 700;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero */
.hero {
    padding-top: 150px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text span {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.hero-text h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
}

.hero-text h3 {
    margin: 10px 0;
}

.hero-text p {
    font-size: 18px;
    margin: 20px 0;
}

.hero-social a .material-symbols-outlined {
    font-size: 32px; 
    color: var(--primary); 
    transition: 0.3s; 
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}


.hero-social a:hover .material-symbols-outlined {
    transform: scale(1.2);
    color: #000; 
}

.dark .hero-social a:hover .material-symbols-outlined {
    color: #ffffff; 
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
}
/* Social Icons Dark Mode */
.dark .hero-social a {
    color: var(--primary);
    transition: transform 0.3s, color 0.3s;
}

.dark .hero-social a:hover {
    color: #ffffff;
    transform: scale(1.2);
}

/* About Me Button Hover Effect */
a.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, opacity 0.3s, box-shadow 0.3s;
}

a.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    opacity: 0.95;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-img {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
}

.hero-img img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-social {
    margin: 15px 0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-social a {
    font-size: 24px;
    color: var(--primary);
    transition: 0.3s;
}

.hero-social a:hover {
    transform: scale(1.2);
    color: #000;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 80px;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary);
}

.bg-light {
    background: var(--light);
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    background: var(--bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

/* 1. Global Hover Transitions */
.card, .project-card {
    transition: all 0.3s ease-in-out;
}

/* 2. Light Mode Hover Effect */
.card:hover, .project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border: 1px solid #269499;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 
                0 0 15px rgba(38, 148, 153, 0.2);
    cursor: pointer;
}

/* 3. Dark Mode Hover Effect */
.dark .card:hover, .dark .project-card:hover {
    background: #1e1e1e;
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(28, 107, 122, 0.5); 
    transform: translateY(-8px) scale(1.02);
}

#skills .card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* LinkedIn Icon inside project card */
.project-links a:not(.btn-primary):not(.btn-secondary) {
    font-size: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.project-links a:not(.btn-primary):not(.btn-secondary):hover {
    transform: scale(1.2);
    color: #000;
}

/* Dark mode */
.dark .project-links a:not(.btn-primary):not(.btn-secondary) {
    color: var(--primary);
}

.dark .project-links a:not(.btn-primary):not(.btn-secondary):hover {
    color: #ffffff;
}


.project-links a {
    text-decoration: none;
}

/* Project Cards */
.project-card {
    position: relative;
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Dark Mode Project Card Active Effect */
.dark .project-card:active {
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(0, 212, 211, 0.4);
    transform: translateY(-3px) scale(1.02);
    transition: all 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: #269499;
    box-shadow: 0 0 10px rgba(38, 148, 153, 0.3);
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 10px;
}

.project-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.project-tooltip {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 107, 122, 0.9);
    color: #fff;
    padding: 10px;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
    border-radius: 8px;
    pointer-events: none;
    width: 90%;
    text-align: center;
    z-index: 2;
    line-height: 1.5;
    font-weight: 400;
}

.project-card:hover .project-tooltip {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

#portfolio .grid {
    margin-top: 50px;
}

.more-projects {
    text-align: center;
    margin-top: 50px;
}

.more-projects p {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 500;
}

.more-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.more-links a {
    transition: all 0.3s ease;
}

.more-links a:hover {
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: auto;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.contact-form button {
    padding: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
}

body.dark .contact-form input,
body.dark .contact-form textarea {
    background: #1e1e1e;
    color: #f4f4f4;
    border: 1px solid #333;
}

body.dark .contact-form button {
    background: var(--primary);
    color: #fff;
}

/* Dark Mode Tooltip Enhancement */
.dark .project-tooltip {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dark .project-card {
    border: 1px solid #222;
}

/* WhatsApp Button Style */
.whatsapp-button {
    text-align: center;
    margin: 50px 0;
}

.whatsapp-button a {
    font-size: 18px;
    padding: 12px 25px;
    border-radius: 8px;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-button a:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    background: var(--bg);
    color: var(--text);
}

/* Loader */
#loader {
    position: fixed;
    width: 100%;
    height: 100vh;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media(max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}
