:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --accent-primary: #a371f7;
    /* Purple */
    --accent-secondary: #d549a8;
    /* Pink */
    --border-color: #30363d;
    --gradient-main: linear-gradient(90deg, #a371f7 0%, #d549a8 100%);
    --font-main: 'Outfit', sans-serif;
}

.light-mode {
    --bg-color: #ffffff;
    --card-bg: #f6f8fa;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --border-color: #d0d7de;
    --accent-primary: #8a3ffc;
    /* Darker purple for better contrast in light mode */
    --accent-secondary: #ff007b;
    /* Vivid pink */
}

/* Ensure navbar background is adjusted in light mode */
.light-mode .navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.light-mode .service-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.light-mode .portfolio-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.light-mode .portfolio-overlay h3,
.light-mode .portfolio-overlay a {
    color: #24292f;
}

.light-mode .btn-sm {
    border-color: #24292f;
    color: #24292f;
}

.light-mode .skill-item {
    filter: none;
    opacity: 1;
}

/* Fix icon visibility in light mode if needed */
.light-mode .service-card .icon {
    background: rgba(163, 113, 247, 0.1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
}

section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 50px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

.section-title-left {
    font-size: 2rem;
    color: #58a6ff;
    /* Blueish accent for contact header */
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Navbar */
.navbar {
    padding: 20px 0;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--accent-primary);
    /* Gold/Yellow */
    cursor: pointer;
    font-size: 1rem;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: left;
    display: flex;
    align-items: center;
    min-height: 80vh;
    /* Ensure it takes up good screen space */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 50%;
    /* Circle shape or adjust as needed */
    box-shadow: 0 0 30px rgba(163, 113, 247, 0.3);
    border: 2px solid var(--accent-primary);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 600px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.highlight {
    color: #58a6ff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--accent-primary);
    color: var(--text-primary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-main);
    z-index: -1;
    transition: 0.3s;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    border-color: transparent;
}

/* Services */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: 0.4s ease;
    width: 60%;
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Zig-Zag Layout */
.service-card:nth-child(odd) {
    align-self: flex-end;
    border-right: 3px solid var(--accent-primary);
}

.service-card:nth-child(even) {
    align-self: flex-start;
    border-left: 3px solid var(--accent-secondary);
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(163, 113, 247, 0.2);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.service-card:nth-child(1) .icon {
    color: #58a6ff;
}

.service-card:nth-child(2) .icon {
    color: #a371f7;
}

.service-card:nth-child(3) .icon {
    color: #d549a8;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Skills */
.skills {
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(163, 113, 247, 0.05), transparent);
}

.skills-subtitle {
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-size: 1.2rem;
}

.skills-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-item {
    font-size: 3.5rem;
    transition: 0.3s;
    filter: grayscale(100%);
    opacity: 0.7;
    cursor: default;
}

.skill-item:hover {
    transform: scale(1.2) rotate(5deg);
    filter: grayscale(0%);
    opacity: 1;
}

/* GitHub Icon Specifics */
.fa-github {
    color: #ffffff;
}

.light-mode .fa-github {
    color: #333333;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 1px solid var(--border-color);
}

.portfolio-image-placeholder {
    width: 100%;
    height: 100%;
    background: #1f2428;
    background-image: linear-gradient(45deg, #1f2428 25%, #24292e 25%, #24292e 50%, #1f2428 50%, #1f2428 75%, #24292e 75%, #24292e 100%);
    background-size: 20px 20px;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: rgba(13, 17, 23, 0.9);
    transform: translateY(100%);
    transition: 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.7rem;
    border: 1px solid var(--text-primary);
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
}

.get-in-touch h3 {
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-details h3,
.social-media h3 {
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.contact-details p a {
    color: #58a6ff;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.social-icons a:hover {
    transform: translateY(-3px);
}

.social-icons a:hover .fa-linkedin-in {
    color: #0077b5;
    filter: drop-shadow(0 0 8px rgba(0, 119, 181, 0.6));
}

.social-icons a:hover .fa-facebook-f {
    color: #1877f2;
    filter: drop-shadow(0 0 8px rgba(24, 119, 242, 0.6));
}

.social-icons a:hover .fa-whatsapp {
    color: #25d366;
    filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.6));
}

.social-icons a:hover .fa-telegram {
    color: #24A1DE;
    filter: drop-shadow(0 0 8px rgba(36, 161, 222, 0.6));
}

.social-icons a:hover .fa-github {
    color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.light-mode .social-icons a:hover .fa-github {
    color: #333;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #58a6ff;
    color: #58a6ff;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #58a6ff;
    color: var(--text-primary);
}

/* Footer */
.footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: #090c10;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-color);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transition: 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        left: 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        /* Put image on top or text on top? usually image on top or keep text on top. Let's try text top for now, or column-reverse for image top? Standard is usually text top on mobile if it's the main H1. */
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-image img {
        max-width: 300px;
    }

    .service-card {
        width: 100%;
        align-self: center !important;
        /* Override zig-zag alignment on mobile */
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}