/* ==========================================================================
   1. FONTS & RESET
   ========================================================================== */
*,
:after,
:before {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-main: #1b1b1b;
    --bg-alt: #212121;
    --text-main: #f2f2f2;
    --text-muted: #888;
    --text-dim: #aaa;
    --accent: #00b7c7;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(27, 27, 27, 0.95);
}

body.light-theme {
    --bg-main: #ffffff;
    --bg-alt: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #4a4a4a;
    --text-dim: #6c757d;
    --card-bg: #ffffff;
    --border: #dee2e6;
    --nav-bg: rgba(255, 255, 255, 0.98);
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: "Inter", Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    transition:
        background-color 0.3s,
        color 0.3s;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3 {
    margin: 10px 0;
    font-weight: 500;
}

h1 {
    font-family: "Playfair Display", Georgia, serif;
}

p {
    margin: 0 0 10px 0;
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

/* ==========================================================================
   3. SECTION LAYOUTS
   ========================================================================== */
.section {
    width: 100%;
    min-height: 700px;
    position: relative;
    overflow: hidden;
    padding: 100px 15%;
}

.section:first-of-type {
    background-color: transparent;
}

.section:nth-of-type(odd) {
    background-color: var(--bg-main);
}

.section:nth-of-type(even) {
    background-color: var(--bg-alt);
}

@media only screen and (max-width: 900px) {
    .section {
        padding: 80px 10%;
    }
}

.section-heading {
    font-size: 3em;
}

.section-heading.center {
    text-align: center;
    margin: 0 auto 30px auto;
}

.divider {
    display: block;
    margin: 30px 0;
    width: 300px;
    height: 2px;
    background-color: var(--accent);
}

.divider.center {
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   4. TOP NAVIGATION
   ========================================================================== */
#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-toggle-btn {
    background: var(--border);
    border: none;
    color: var(--text-main);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--accent);
    color: #fff;
}

body.light-theme .logo img {
    filter: invert(1);
}

body.light-theme .nav-links li a {
    color: var(--text-muted);
}

body.light-theme .nav-links li a:hover,
body.light-theme .nav-links li a.is-selected {
    color: var(--accent);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    transition: filter 0.3s ease;
}

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

.nav-links li a {
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links li a:hover,
.nav-links li a.is-selected {
    color: var(--accent);
}

.nav-links li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links li a:hover::after,
.nav-links li a.is-selected::after {
    width: 100%;
}

@media (max-width: 768px) {
    #top-nav {
        display: none;
    }
    #toggle {
        display: block !important;
    }
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image-placeholder {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.card-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--bg-alt) 0%, transparent 100%);
}

.card-content {
    padding: 30px;
}

.service-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.service-subtitle {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

.sub-title {
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.center {
    text-align: center;
}

.service-card.highlight {
    border-color: var(--border);
}

.service-card.highlight:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0, 183, 199, 0.4);
}

body.light-theme .service-card.highlight {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 183, 199, 0.1);
}

body.light-theme .service-card.highlight:hover {
    box-shadow: 0 20px 40px rgba(0, 183, 199, 0.2);
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   5. WORK SHOWCASE
   ========================================================================== */
#portfolio-section {
    background: transparent !important;
}

#portfolio-section .section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(27, 27, 27, 0.9), rgba(27, 27, 27, 0.9)),
        url("../assets/img/developer.avif");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background 0.3s ease;
}

body.light-theme #portfolio-section .section-bg {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
        url("../assets/img/developer.avif");
}

.portfolio-item-wrapper {
    margin-top: 80px;
}

.showcase-item {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 120px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.showcase-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.showcase-item:nth-child(even) {
    flex-direction: row-reverse;
}

.showcase-content {
    flex: 1;
}

.showcase-visual {
    flex: 2;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    height: 450px;
}

.showcase-img {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.img-1 {
    grid-row: span 2;
}

.showcase-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.5s ease;
}

.showcase-img:hover {
    transform: scale(1.08) !important;
    z-index: 10;
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 183, 199, 0.3);
}

.showcase-img:hover img {
    filter: grayscale(0%);
}

.description-title {
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.description-title a:hover {
    color: var(--text-main);
}

.portfolio-description {
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin: 20px 0;
}

.used-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin-top: 25px;
}

.used-item {
    font-size: 0.85rem;
    background: rgba(0, 183, 199, 0.1);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 183, 199, 0.2);
    font-weight: 500;
}

.live-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    color: var(--accent);
    font-family: "Gotham", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.live-link-btn:hover {
    gap: 15px;
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .showcase-item,
    .showcase-item:nth-child(even) {
        flex-direction: column;
        gap: 40px;
    }

    .showcase-visual {
        width: 100%;
        height: 350px;
    }
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 2px solid var(--accent);
    font-family: Gotham, sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 20px;
    background: transparent;
    color: var(--text-main);
}

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

/* ==========================================================================
   7. HERO (INTRO SECTION)
   ========================================================================== */
#intro-section .bg {
    background-color: #0e1c26;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("../assets/img/laptop-background-2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background 0.3s ease;
}

body.light-theme #intro-section .bg {
    background-color: #f0f4f8;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        url("../assets/img/laptop-background-2.jpg");
}

#intro-section .intro-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-glass-card {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 60px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

body.light-theme .hero-glass-card {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 183, 199, 0.2);
    box-shadow: 0 20px 50px rgba(0, 183, 199, 0.1);
}

.heading {
    font-size: 6rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.subtext {
    font-size: 1.2rem;
    line-height: 1.6;
}

.animated-divider {
    display: block;
    width: 0;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 30px auto;
    animation: stretchLine 1.5s ease-out forwards;
    border-radius: 2px;
}

@keyframes stretchLine {
    to {
        width: 100%;
        max-width: 600px;
        opacity: 1;
    }
}

/* ==========================================================================
   8. MOBILE MENU & TOGGLE
   ========================================================================== */
#toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 200;
    cursor: pointer;
    width: 40px;
    height: 30px;
    display: none;
}

#toggle .hamburger span {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin: 6px auto;
    transition: 0.3s;
}

#toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

#toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--nav-bg);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

#overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.overlay-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.overlay-menu li {
    margin: 25px 0;
}

.overlay-menu a {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
}

.overlay-menu a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    text-align: left;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 183, 199, 0.1);
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dim);
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.author-info p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-main {
    display: flex;
    gap: 60px;
    margin-top: 50px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.info-title {
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.info-text {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.contact-features li i {
    color: var(--accent);
    font-size: 1.2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--accent);
    width: 50px;
    height: 50px;
    background: rgba(0, 183, 199, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.form-container {
    flex: 1.2;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.contact-input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    padding: 15px 20px;
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-label {
    position: absolute;
    left: 20px;
    top: 15px;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-input:focus,
.contact-input:not(:placeholder-shown) {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 183, 199, 0.05);
}

.contact-input:focus ~ .input-label,
.contact-input:not(:placeholder-shown) ~ .input-label {
    top: -10px;
    left: 15px;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--bg-main);
    padding: 0 8px;
    border-radius: 4px;
}

.submit-btn {
    width: 100%;
    border: none;
    background: var(--accent);
    color: #1b1b1b;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #00d4e6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 183, 199, 0.2);
}

.form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    display: none;
    animation: formFadeIn 0.4s ease;
}

.form-status.success {
    display: block;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .contact-main {
        flex-direction: column;
        gap: 40px;
    }
    .input-row {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 30px;
    }
}

/* ==========================================================================
   9. FOOTER & SOCIALS
   ========================================================================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--bg-alt);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    font-size: 24px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* ==========================================================================
   10. RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 1200px) {
    .section {
        padding: 100px 10%;
    }
}

@media (max-width: 992px) {
    .section {
        padding: 80px 8%;
    }
    .heading {
        font-size: 4.5rem;
    }
    .hero-glass-card {
        padding: 50px;
    }
    @keyframes stretchLine {
        100% {
            width: 80%;
        }
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 5%;
    }
    .heading {
        font-size: 3.5rem;
    }
    .hero-glass-card {
        padding: 40px;
        border-radius: 20px;
    }
    .subtext {
        font-size: 1.1rem;
    }
    .services-grid,
    .showcase-item,
    .showcase-item:nth-child(even),
    .contact-main,
    .input-row {
        flex-direction: column;
    }
    .services-grid {
        gap: 30px;
    }
    .showcase-visual {
        height: auto;
    }
}

@media (max-width: 576px) {
    .heading {
        font-size: 2.8rem;
    }
    .hero-glass-card {
        padding: 30px;
    }
    .section-heading {
        font-size: 2.5em;
    }
    .description-title {
        font-size: 1.8rem;
    }
    .overlay-menu a {
        font-size: 2rem;
    }
}
