:root {
    --bg: #050505;
    --bg-soft: #12100a;
    --text: #f4f4f4;
    --muted: #c9c9c9;
    --accent: #c8a13a;
    --accent-soft: #f5d878;
    --accent-deep: #8a6a1e;
    --border: rgba(200, 161, 58, 0.5);
    --max-content: 1200px;
    --header-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: radial-gradient(circle at top right, rgba(96, 71, 18, 0.26) 0%, #131008 30%, var(--bg) 55%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    display: block;
}

section,
.about-me,
.service-section,
.portfolio-section,
.contact {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.container {
    width: min(100% - 2rem, var(--max-content));
    margin-inline: auto;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem clamp(1rem, 4vw, 3rem);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(200, 161, 58, 0.35);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.logo {
    margin: 0;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    cursor: default;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(200, 161, 58, 0.45);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
}

nav {
    flex: 1;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.8rem, 1.8vw, 1.5rem);
}

.navbar a {
    text-decoration: none;
    font-size: 0.98rem;
    color: var(--text);
    border-bottom: 2px solid transparent;
    padding-bottom: 0.2rem;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent);
    border-color: var(--accent);
}

.header-btn-container {
    display: flex;
    justify-content: flex-end;
}

.button-link,
.header-button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #f5d878 0%, #c8a13a 48%, #8a6a1e 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.2rem;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.btn-alt {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-alt:hover {
    background: rgba(255, 255, 255, 0.15);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.button-link:hover,
.header-button:hover,
.btn:hover {
    background: linear-gradient(135deg, #fde8a6 0%, #d9b251 50%, #9f7a26 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(245, 216, 120, 0.38), 0 10px 26px rgba(138, 106, 30, 0.4);
}

main {
    padding-top: calc(var(--header-height) + 1.5rem);
}

.hero-section {
    width: min(100% - 2rem, var(--max-content));
    margin-inline: auto;
    min-height: calc(100svh - var(--header-height));
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.2rem);
    padding-block: 2.25rem;
}

.featured-project {
    width: min(100% - 2rem, 980px);
    margin: 0 auto 1.5rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    background: linear-gradient(145deg, rgba(90, 67, 21, 0.7), rgba(22, 18, 9, 0.82));
    border: 1px solid rgba(245, 216, 120, 0.35);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(200, 161, 58, 0.2), 0 22px 42px rgba(0, 0, 0, 0.45);
}

.featured-image img {
    width: 100%;
    height: clamp(220px, 28vw, 300px);
    object-fit: cover;
}

.featured-content {
    padding: clamp(0.9rem, 2.2vw, 1.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-soft);
    font-size: 0.78rem;
}

.featured-content h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.featured-summary {
    margin: 0;
    color: var(--muted);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tech-badges span {
    display: inline-block;
    border: 1px solid rgba(245, 216, 120, 0.32);
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    font-size: 0.78rem;
    background: rgba(200, 161, 58, 0.14);
}

.hero-text h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--accent-soft);
    letter-spacing: 0.08em;
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 3.4rem);
    line-height: 1.15;
}

.hero-text h1 span {
    color: var(--accent);
}

.hero-text h3 {
    margin: 0.65rem 0 0.8rem;
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    color: #f5f5f5;
}

.hero-text p {
    margin: 0;
    color: var(--muted);
    max-width: 62ch;
}

.hero-actions {
    margin-top: 1.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.Hero-image {
    display: flex;
    justify-content: center;
}

.Hero-image img,
.About-image img {
    width: min(360px, 85vw);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 18px rgba(245, 216, 120, 0.3), 0 0 44px rgba(200, 161, 58, 0.45);
}

.social-icons {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.social-icons a:hover {
    background: var(--accent);
    box-shadow: 0 0 16px rgba(245, 216, 120, 0.38);
    transform: translateY(-2px);
}

.about-me {
    width: min(100% - 2rem, var(--max-content));
    margin-inline: auto;
    padding: 2.5rem 0 1rem;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 1.5rem 2.25rem;
    align-items: center;
}

.about-me h2,
.service-section h2,
.portfolio-section h2,
.contact h2 {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    margin: 0;
}

.about-me h2 {
    grid-column: 1 / -1;
    text-align: center;
}

.About-image {
    justify-self: center;
}

.about-me h2 span,
.service-section h2 span,
.portfolio-section h2 span,
.contact h2 span,
.My-skills h1 span {
    color: var(--accent);
}

.about-content {
    max-width: 760px;
    margin-inline: 0;
    text-align: left;
}

.about-content h3 {
    font-size: clamp(1.05rem, 2.6vw, 1.4rem);
    margin: 1rem 0 0.25rem;
}

.about-content p {
    margin: 0.8rem 0 1.2rem;
    color: var(--muted);
}

.My-skills {
    width: min(100% - 2rem, 980px);
    margin: 2rem auto 0;
    padding-bottom: 1rem;
}

.My-skills h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.skills-wrapper {
    margin-top: 1.25rem;
}

.skills-wrapper .bar {
    margin: 1rem 0;
}

.skills-wrapper .bar .bar-name {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
}

.skills-wrapper .bar .progress-bar {
    height: 12px;
    background: #2d2d2d;
    border-radius: 999px;
    overflow: hidden;
}

.skills-wrapper .bar .progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    border-radius: inherit;
    transition: width 1.2s ease;
}

.skills-wrapper .bar .progress-bar span.animate.html {
    width: 90%;
}

.skills-wrapper .bar .progress-bar span.animate.css {
    width: 85%;
}

.skills-wrapper .bar .progress-bar span.animate.python {
    width: 90%;
}

.skills-wrapper .bar .progress-bar span.animate.javascript {
    width: 80%;
}

.skills-wrapper .bar .progress-bar span.animate.java {
    width: 70%;
}

.skills-wrapper .bar .progress-bar span.animate.ml {
    width: 85%;
}

.skills-wrapper .bar .progress-bar span.animate.data {
    width: 85%;
}

.skills-wrapper .bar .progress-bar span.animate.backend {
    width: 88%;
}

.skills-wrapper .bar .progress-bar span.animate.frontend {
    width: 85%;
}

.skills-wrapper .bar .progress-bar span.animate.database {
    width: 82%;
}

.skills-wrapper .bar .progress-bar span.animate.git {
    width: 88%;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h3 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
    color: var(--accent-soft);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.competencies {
    width: min(100% - 2rem, var(--max-content));
    margin: 2.5rem auto 0;
    padding-bottom: 1rem;
}

.competencies h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.competencies h1 span {
    color: var(--accent);
}

.competency-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.competency-card {
    background: linear-gradient(135deg, rgba(200, 161, 58, 0.15), rgba(100, 80, 30, 0.1));
    border: 1px solid rgba(245, 216, 120, 0.3);
    border-radius: 16px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.competency-card h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--accent-soft);
}

.tech-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-list li {
    color: var(--muted);
    font-size: 0.93rem;
    padding-left: 1.2rem;
    position: relative;
}

.tech-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.skills-wrapper {
    margin-top: 1.25rem;
}

.service-section {
    width: min(100% - 2rem, var(--max-content));
    margin: 2.25rem auto 0;
    text-align: center;
}

.service-section h2 {
    margin-bottom: 1.25rem;
}

.service-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.service-box {
    background: linear-gradient(160deg, #f0d37a 0%, #c49a32 48%, #7f5f1a 100%);
    color: #fff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
}

.service-box h3 {
    margin: 0;
    font-size: 1.1rem;
}

.service-box p {
    margin: 0;
    font-size: 0.92rem;
}

.service-box .btn {
    margin-top: auto;
    align-self: flex-start;
    background: #111;
}

.service-box .btn:hover {
    background: #1f1f1f;
}

.portfolio-section {
    width: min(100% - 2rem, var(--max-content));
    margin: 2.25rem auto 0;
}

.portfolio-section h2 {
    text-align: center;
    margin-bottom: 1.25rem;
}

.project-container-1 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.project-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #141106;
}

.project-box img {
    width: 100%;
    height: clamp(220px, 26vw, 300px);
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-content {
    position: absolute;
    inset: 0;
    padding: 0.9rem;
    background: linear-gradient(to top, rgba(1, 9, 14, 0.95), rgba(1, 9, 14, 0.55));
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.project-content h3 {
    margin: 0;
    font-size: 1rem;
}

.project-content p {
    margin: 0.35rem 0 0.65rem;
    font-size: 0.88rem;
}

.project-box:hover img {
    transform: scale(1.06);
}

.project-box:hover .project-content,
.project-box:focus-within .project-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    box-shadow: inset 0 0 0 1px rgba(245, 216, 120, 0.22);
}

.contact {
    width: min(100% - 2rem, 820px);
    margin: 2.25rem auto 3rem;
}

.availability {
    text-align: center;
    color: var(--muted);
    margin: 0.45rem 0 0.7rem;
}

.quick-contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.quick-contact-links a {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    font-size: 0.86rem;
    background: rgba(255, 255, 255, 0.02);
}

.quick-contact-links a:hover {
    background: rgba(212, 175, 55, 0.18);
}

.contact h2 {
    text-align: center;
}

.contact form {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.contact form p {
    margin: 0;
    color: var(--muted);
}

.contact label {
    font-size: 0.95rem;
}

.contact input,
.contact textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: #111;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
}

.contact textarea {
    min-height: 170px;
    resize: vertical;
}

.contact button[type="submit"] {
    justify-self: start;
}

.form-status {
    min-height: 1.3rem;
    margin: 0.2rem 0 0;
    color: #f5d878;
    font-size: 0.9rem;
}

.form-status.error {
    color: #ffb3b3;
}

.testimonials,
.now-section {
    width: min(100% - 2rem, var(--max-content));
    margin: 2.25rem auto 0;
}

.testimonials h2,
.now-section h2 {
    text-align: center;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    margin: 0;
}

.testimonials h2 span,
.now-section h2 span {
    color: var(--accent);
}

.testimonials-grid {
    margin-top: 1.05rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.testimonial-card {
    border: 1px solid rgba(245, 216, 120, 0.3);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(150deg, rgba(200, 161, 58, 0.12), rgba(255, 255, 255, 0.01));
}

.testimonial-card p {
    margin: 0;
    color: #dbdbdb;
}

.testimonial-card h3 {
    margin: 0.8rem 0 0;
    font-size: 1rem;
}

.testimonial-card span {
    font-size: 0.85rem;
    color: var(--muted);
}

.now-section {
    text-align: center;
}

.now-section p {
    max-width: 66ch;
    margin: 0.7rem auto 1rem;
    color: var(--muted);
}

.now-section .tech-badges {
    justify-content: center;
}

footer {
    text-align: center;
    color: #c6c6c6;
    padding: 1rem 0 2rem;
    font-size: 0.92rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links,
.footer-socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 0.65rem;
}

.footer-links a,
.footer-socials a {
    text-decoration: none;
}

.footer-socials a {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Contact standalone page */
.contact-page {
    min-height: 100svh;
    padding: 2rem 1rem 3rem;
}

.contact-page .card {
    width: min(100%, 760px);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: clamp(1rem, 4vw, 2rem);
}

.contact-page .link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    margin-bottom: 1rem;
}

.contact-page .link-row a {
    color: var(--accent-soft);
}

@media (max-width: 1100px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding-block: 1.8rem;
    }

    .hero-text p {
        margin-inline: auto;
    }

    .hero-actions,
    .social-icons {
        justify-content: center;
    }

    .Hero-image {
        order: -1;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .service-container,
    .project-container-1,
    .testimonials-grid,
    .competency-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    :root {
        --header-height: 70px;
    }

    header {
        padding: 0.72rem 0.9rem;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .header-btn-container {
        display: none;
    }

    nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0.9rem;
        right: 0.9rem;
        width: auto;
        flex: 0 0 auto;
    }

    header.open nav {
        display: block;
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.75rem;
        border-radius: 12px;
        background: #0f0f0f;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.5);
    }

    .navbar a {
        width: 100%;
        padding: 0.5rem 0.3rem;
    }

    .service-container,
    .project-container-1,
    .testimonials-grid,
    .competency-grid {
        grid-template-columns: 1fr;
    }

    .featured-project,
    .competencies,
    .My-skills,
    .service-section,
    .portfolio-section,
    .testimonials,
    .now-section,
    .contact,
    .hero-section {
        width: min(100% - 1.2rem, var(--max-content));
    }

    .project-content {
        padding: 0.85rem;
    }

    .contact button[type="submit"] {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    .logo {
        font-size: 1.15rem;
    }

    .hero-text h1 {
        font-size: clamp(1.55rem, 8vw, 2.2rem);
    }

    .button-row {
        flex-direction: column;
    }

    .button-row .btn,
    .button-row .btn-alt {
        width: 100%;
    }

    .quick-contact-links {
        gap: 0.5rem;
    }
}

@media (hover: none), (pointer: coarse) {
    .project-content {
        opacity: 1;
        transform: translateY(0);
        position: static;
        background: #111;
        pointer-events: auto;
    }

    .project-box {
        background: #111;
    }
}
