/* ================================
   Reset and variables
================================ */
:root {
    --background: #0d1117;
    --surface: #111822;
    --text: #f0f6fc;
    --muted: #8b949e;
    --accent: #58a6ff;
    --green: #238636;
    --green-hover: #2ea043;
    --border: rgba(139, 148, 158, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(
            circle at 75% 35%,
            rgba(88, 166, 255, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 20% 80%,
            rgba(35, 134, 54, 0.06),
            transparent 28%
        ),
        #0d1117;

    color: white;
    font-family: Arial, Helvetica, sans-serif;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

/* ================================
   Navigation
================================ */

header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    z-index: 1000;

    background: rgba(13, 17, 23, 0.72);

    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    min-height: 58px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: #c9d1d9;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;

    transition: color 0.2s ease;
}

.external-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-links a:hover {
    color: var(--accent);
}

#about,
#projects,
#contact {
    scroll-margin-top: 80px;
}

main {
    padding-top: 58px;
}

/* ================================
   Hero
================================ */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 70px;
    min-height: calc(100vh - 80px);
    padding-block: 55px 70px;

    margin-bottom: 60px;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(52px, 6.2vw, 84px);
    line-height: 0.98;
    letter-spacing: -4px;
}

.hero h2 {
    margin-top: 18px;
    color: var(--muted);
    font-size: clamp(21px, 2vw, 28px);
    font-weight: 400;
}

.hero-description {
    max-width: 560px;
    margin-top: 18px;
    color: #b1bac4;
    font-size: 18px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 130px;
    padding: 13px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.primary-btn {
    background-color: var(--accent);
    color: var(--background);
}

.primary-btn:hover {
    background-color: #79b8ff;
    transform: translateY(-2px);
}

.secondary-btn {
    border: 1px solid var(--accent);
    color: var(--accent);

    gap: 6px;
}

.secondary-btn .external-icon {
    width: 16px;
    height: 16px;
}

.secondary-btn:hover {
    background-color: var(--accent);
    color: var(--background);
    transform: translateY(-2px);
}

/* ================================
   Hero image
================================ */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.image-wrap {
    position: relative;
    width: min(470px, 100%);
    height: 590px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.image-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 35px;

    width: 430px;
    height: 430px;

    transform: translateX(-50%);
    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(88, 166, 255, 0.34) 0%,
        rgba(88, 166, 255, 0.16) 38%,
        rgba(88, 166, 255, 0.06) 58%,
        transparent 72%
    );
}

.image-wrap img {
    position: relative;
    z-index: 1;
    width: 120%;
    max-width: none;
    height: 120%;
    object-fit: contain;
    object-position: center bottom;
    transform: translateY(25px);
}

/* ================================
   Lower sections
================================ */
.content-section {
    min-height: 85vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 100px 70px;
    margin-bottom: 40px;

    border: 1px solid var(--border);
    border-radius: 28px;

    background: rgba(17, 24, 34, 0.72);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
 }
/* section style  */

#about {
    background:
        radial-gradient(
            circle at 80% 30%,
            rgba(88, 166, 255, 0.10),
            transparent 35%
        ),
        rgba(17, 24, 34, 0.72);
}

#projects {
    background:
        radial-gradient(
            circle at 20% 70%,
            rgba(35, 134, 54, 0.10),
            transparent 35%
        ),
        rgba(17, 24, 34, 0.72);
}

#contact {
    background:
        radial-gradient(
            circle at 70% 40%,
            rgba(88, 166, 255, 0.08),
            transparent 35%
        ),
        rgba(17, 24, 34, 0.72);
}

/*=====================================*/
.section-label {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.content-section h2 {
    margin-bottom: 18px;
    font-size: clamp(34px, 4vw, 52px);

    max-width: 700px;
}

.content-section > p:last-child {
    max-width: 650px;

    color: #b1bac4;
    font-size: 18px;
    line-height: 1.7;


}
/* ================================
   ABOUT
================================ */
.section-heading {
    margin-bottom: 60px;
}

.section-heading h2 {
    max-width: 750px;
    font-size: clamp(44px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -3px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-text p {
    color: #b1bac4;
    font-size: 20px;
    line-height: 1.8;
}

.about-details {
    display: grid;
    gap: 28px;
}

.about-details div {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.about-details span {
    display: block;
    margin-bottom: 8px;

    color: var(--accent);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.about-details p {
    color: var(--text);
    font-size: 18px;
}

/* ================================
   PROJECTS
================================ */

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: rgba(13, 17, 23, 0.72);
}

.project-info {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 70px;
}

.project-number {
    margin-bottom: 22px;

    color: var(--accent);
    font-size: 13px;
    letter-spacing: 2px;
}

.project-info h3 {
    max-width: 520px;
    margin-bottom: 24px;

    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.project-description {
    max-width: 520px;

    color: #b1bac4;
    font-size: 18px;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 28px;
}

.project-tech span {
    padding: 8px 12px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);
    font-size: 13px;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 24px;

    margin-top: 34px;
}

.text-link {
    color: var(--text);
    font-weight: 600;
}

.text-link:hover {
    color: var(--accent);
}

.project-visual {
    position: relative;
    min-height: 560px;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        radial-gradient(
            circle at center,
            rgba(88, 166, 255, 0.20),
            transparent 55%
        ),
        #0a0f16;
}

.visual-grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(88, 166, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 166, 255, 0.08) 1px, transparent 1px);

    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, transparent, black, transparent);
}

.visual-content {
    position: relative;
    z-index: 1;

    text-align: center;
}

.visual-content p {
    color: var(--accent);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
}

.visual-content span {
    display: block;
    margin-top: 10px;

    color: var(--muted);
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ================================
   Contact
================================ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.contact-card {
    min-height: 190px;
    padding: 30px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: rgba(13, 17, 23, 0.72);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 166, 255, 0.6);
    background-color: rgba(17, 24, 34, 0.95);
}

.contact-type {
    display: block;
    margin-bottom: 12px;

    color: var(--accent);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-card h3 {
    max-width: 380px;

    color: var(--text);
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1.15;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.contact-card .contact-arrow {
    width: 24px;
    height: 24px;

    flex-shrink: 0;

    color: var(--accent);
}

.email-card {
    grid-column: 1 / -1;
    align-items: center;
}

#copy-email-btn {
    flex-shrink: 0;

    padding: 12px 22px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: transparent;
    color: var(--accent);

    font: inherit;
    font-weight: 600;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

#copy-email-btn:hover {
    background-color: var(--accent);
    color: var(--background);
    transform: translateY(-2px);
}

#copy-email-btn.copied {
    border-color: var(--green-hover);
    background-color: var(--green-hover);
    color: white;
}

/* ================================
   Responsive
================================ */

@media (max-width: 1100px) {

    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 90px;
        text-align: center;
    }

    .hero h1 {
        margin-inline: auto;
    }

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-wrap {
        width: min(440px, 100%);
        height: 520px;
        margin-top: 20px;
        overflow: hidden;
    }

    .image-wrap img {
        width: 100%;
        height: 100%;
        max-width: 100%;

        object-fit: contain;
        object-position: center bottom;

        transform: none;
    }
}


@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 90px;
        text-align: center;
    }

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-wrap {
    width: min(440px, 100%);
    height: 520px;
    margin-top: 20px;
    overflow: hidden;
}

    .image-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;

    object-fit: contain;
    object-position: center bottom;

    transform: none;
}

/* ABOUT */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

/* PROJECTS */

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-info {
        padding: 50px 32px;
    }

    .project-visual {
        min-height: 420px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .email-card {
        grid-column: auto;
    }

/* FOOTER */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 55px;
}

    .footer-navigation {
        max-width: 420px;
}
}





@media (max-width: 560px) {
    .container {
        width: calc(100% - 32px);
    }

    .nav-links {
    align-items: center;
    gap: 13px;
}

    .nav-links a {
    font-size: 13px;
    line-height: 1;
}

    .external-icon {
    width: 11px;
    height: 11px;
}

    .hero {
        min-height: auto;
        padding-top: 80px;
    }

    .hero h1 {
        font-size: clamp(44px, 15vw, 64px);
        letter-spacing: -3px;
    }

    .image-wrap {
    width: 100%;
    height: 470px;
    margin-top: 20px;
    overflow: hidden;
}

    .image-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;

    object-fit: contain;
    object-position: center bottom;

    transform: none;
}

    


    .content-section {
        min-height: auto;
        padding: 70px 24px;
        margin-bottom: 24px;
        border-radius: 22px;
    }
    
    .section-heading {
        margin-bottom: 45px;
    }

    .section-heading h2 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .about-text p {
        font-size: 18px;
        line-height: 1.7;
    }

    .about-grid {
        gap: 45px;
    }


}

/* ================================
   Footer
================================ */

footer {
    position: relative;
    margin-top: 90px;
    padding: 90px 0 35px;
    border-top: 1px solid var(--border);
}

footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;

    width: min(420px, 60%);
    height: 1px;

    transform: translateX(-50%);

    background: linear-gradient(
        90deg,
        transparent,
        rgba(88, 166, 255, 0.8),
        transparent
    );

    box-shadow: 0 0 22px rgba(88, 166, 255, 0.4);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 100px;
}

.footer-brand {
    max-width: 520px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;

    color: var(--text);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 3px;
}

.footer-brand p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.footer-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

.footer-navigation div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.footer-navigation span {
    margin-bottom: 5px;

    color: var(--accent);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-navigation a {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: #c9d1d9;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.footer-arrow {
    width: 14px;
    height: 14px;
}

.footer-navigation a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.footer-bottom p,
.back-to-top {
    color: var(--muted);
    font-size: 14px;
}

.back-to-top {
    transition: color 0.2s ease;
}

.back-to-top:hover {
    color: var(--accent);
}

/* ================================
   Final Mobile Overrides
================================ */

@media (max-width: 560px) {

    .footer-container {
        gap: 50px;
    }

    .footer-top {
        display: flex;
        flex-direction: column;
        gap: 45px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-brand p {
        font-size: 17px;
        line-height: 1.7;
    }

    .footer-navigation {
        width: 100%;

        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }


    .project-card {
       width: 100%;
       border-radius: 18px;
}

    .project-info {
       padding: 40px 24px;
}

    .project-info h3 {
       font-size: 38px;
       letter-spacing: -1.5px;
       overflow-wrap: anywhere;
}

    .project-description {
       font-size: 17px;
       line-height: 1.65;
}

    .project-links {
       flex-direction: column;
       align-items: stretch;
}

    .project-links .secondary-btn {
       width: 100%;
}

    .project-visual {
       min-height: 280px;
}

    .visual-content {
       padding: 20px;
}

    .visual-content p {
       font-size: 30px;
}
    .contact-card {
       width: 100%;
       min-height: 160px;
       padding: 26px 22px;
}

    .contact-card h3 {
       font-size: 25px;
       overflow-wrap: normal;
       word-break: normal;
}

    .email-card {
       flex-direction: column;
       align-items: stretch;
}

    #email-address {
       font-size: 22px;
       overflow-wrap: anywhere;
}

    #copy-email-btn {
       width: 100%;
       min-height: 48px;
}

}

/* ================================
   JS Scroll Reveal Animations
================================ */

.reveal {
    opacity: 0;
    transform: translateY(24px);

    transition:
        opacity 1s ease,
        transform 1s ease;
}

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

/* acessibility*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}