:root {
    --background: #cdd1f5;
    --surface: #ffffff;
    --surface-muted: #f8fafc;

    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #64748b;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;

    --dark-button: #0f172a;
    --border: #e2e8f0;

    --device: #0f172a;
    --device-screen: #2563eb;

    --radius: 8px;
    --container-width: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body {
    min-width: 320px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.hero {
    width: 100%;
    padding: 76px 28px 68px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 76px);

    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.hero-art {
    position: relative;
    isolation: isolate;

    width: 100%;
    max-width: 500px;
    height: 340px;

    margin: 0 auto;
}

.decoration {
    position: absolute;
    z-index: -1;

    width: 13px;
    height: 13px;

    background: var(--accent);
    opacity: 0.9;
}

.decoration-one {
    top: 8%;
    right: 30%;
}

.decoration-two {
    right: 18%;
    bottom: 19%;
}

.decoration-three {
    left: 42%;
    bottom: 19%;
}

.device {
    position: absolute;
    background: var(--device);
}

.laptop {
    z-index: 1;

    top: 8%;
    left: 2%;

    width: 65%;
    height: 57%;

    padding: 13px 13px 0;
    border-radius: 13px 13px 4px 4px;
}

.laptop-screen {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background: var(--device-screen);
    border-radius: 2px 2px 0 0;
}

.laptop-screen::before,
.phone::before {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(255, 255, 255, 0.12);
    clip-path: polygon(0 0, 0 100%, 72% 100%);

    pointer-events: none;
}

.screen-circle {
    position: absolute;

    left: 8%;
    bottom: 12%;

    width: clamp(42px, 9vw, 95px);
    aspect-ratio: 1;

    border: 1px solid var(--device);
    border-radius: 50%;

    background: #ffffff;
    background-image: url("../imagens/Logo-GR.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;

    box-shadow: 0 -12px 0 -1px var(--device-screen);
}

.screen-content,
.phone-content {
    position: absolute;

    display: flex;
    flex-direction: column;
}

.screen-content {
    top: 28%;
    right: 7%;

    width: 32%;
    gap: 7px;
}

.screen-content span,
.phone-content span {
    display: block;

    width: 100%;
    height: 3px;

    background: var(--device);
}

.screen-content i,
.phone-content i {
    display: block;

    width: 30%;
    height: 7px;

    margin: 7px auto 0;

    background: var(--device);
}

.laptop-base {
    position: absolute;

    left: -8%;
    right: -8%;
    bottom: -24px;

    height: 24px;

    background: var(--device);
    border-radius: 0 0 13px 13px;
}

.phone {
    z-index: 2;

    top: 24%;
    right: 7%;

    width: 20%;
    height: 52%;

    overflow: hidden;

    border: 6px solid var(--device);
    border-radius: 24px;

    background: var(--device-screen);
}

.phone-notch {
    position: absolute;
    z-index: 3;

    top: 0;
    left: 25%;

    width: 50%;
    height: 9px;

    background: var(--device);
    border-radius: 0 0 7px 7px;
}

.phone-content {
    top: 34%;
    left: 12%;
    right: 12%;

    gap: 6px;
}

.phone-content span {
    height: 2px;
}

.phone-circle {
    position: absolute;

    left: 20%;
    bottom: 6%;

    width: 55%;
    aspect-ratio: 1;

    border: 1px solid var(--device);
    border-radius: 50%;

    background: #ffffff;
    background-image: url(../imagens/Logo-GR.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
}

.intro {
    width: 100%;
    max-width: 500px;
    margin: 0;
    text-align: left;
}

.intro h1 {
    margin-bottom: 10px;

    color: var(--text);

    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;

    overflow-wrap: anywhere;
}

.intro h2 {
    margin-bottom: 22px;

    color: var(--accent);

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    line-height: 1.6;
}

.intro p {
    max-width: 500px;
    margin: 0 0 26px;

    color: var(--text-secondary);

    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.9;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 10px 16px;

    border: 1px solid var(--accent);
    border-radius: 5px;

    background: var(--accent);
    color: #ffffff;

    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.2px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.social-links a:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.social-links a:active {
    transform: translateY(1px);
}

.social-links .resume-button {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.social-links .resume-button:hover {
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.projects-section {
    width: 100%;
    max-width: var(--container-width);

    margin: 0 auto;
    padding: 0 28px 72px;
}

.projects-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;

    gap: 28px;
}

.project {
    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.project:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.project-cover {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 16 / 9;

    margin-bottom: 18px;

    overflow: hidden;

    border-radius: 4px;
    background: var(--surface-muted);
}

.project-cover img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;
    height: 100%;
    padding: 20px;

    background: var(--surface-muted);
    color: var(--text);

    text-align: center;
}

.cover-placeholder strong {
    max-width: 100%;

    color: var(--text);

    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.3;

    overflow-wrap: anywhere;
}

.cover-placeholder span {
    color: var(--muted);

    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.project h3 {
    margin-bottom: 10px;

    color: var(--text);

    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
}

.project-description {
    margin-bottom: 16px;

    color: var(--text-secondary);

    font-size: 0.82rem;
    line-height: 1.75;

    overflow-wrap: anywhere;
}

.project-tech {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 20px;
}

.tech-tag {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 4px;

    background: var(--surface-muted);
    color: var(--text-secondary);

    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.5;
}

.project-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: auto;
    padding-top: 2px;
}

.project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 9px 13px;

    border: 1px solid var(--accent);
    border-radius: 5px;

    background: var(--accent);
    color: #ffffff;

    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.project-button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.project-button.repository {
    background: var(--dark-button);
    border-color: var(--dark-button);
}

.project-button.repository:hover {
    background: #1e293b;
    border-color: #1e293b;
}

.project-button.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

footer {
    width: 100%;
    padding: 24px 20px;

    border-top: 1px solid var(--border);

    color: var(--muted);
    text-align: center;

    font-size: 0.78rem;
}

footer strong {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero {
        padding: 60px 24px 54px;
    }

    .hero-inner {
        gap: 30px;
    }

    .hero-art {
        height: 290px;
    }

    .intro h1 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }

    .intro h2 {
        font-size: 0.72rem;
        letter-spacing: 1px;
    }

    .intro p {
        font-size: 0.88rem;
        line-height: 1.8;
    }

    .projects-section {
        padding-right: 24px;
        padding-left: 24px;
    }

    .projects-grid {
        gap: 20px;
    }

    .project {
        padding: 13px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 34px 20px 44px;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .hero-art {
        width: 100%;
        max-width: 420px;
        height: clamp(210px, 58vw, 270px);

        margin: 0 auto;
    }

    .laptop {
        top: 8%;
        left: 2%;

        width: 65%;
        height: 55%;

        padding: 10px 10px 0;
    }

    .laptop-base {
        height: 18px;
        bottom: -18px;
    }

    .phone {
        top: 22%;
        right: 7%;

        width: 20%;
        height: 51%;

        border-width: 5px;
        border-radius: 19px;
    }

    .phone-notch {
        height: 7px;
    }

    .screen-content {
        gap: 5px;
    }

    .screen-content span {
        height: 2px;
    }

    .screen-content i {
        height: 5px;
        margin-top: 4px;
    }

    .phone-content {
        gap: 4px;
    }

    .phone-content span {
        height: 2px;
    }

    .phone-content i {
        height: 5px;
        margin-top: 4px;
    }

    .floating-circle {
        left: 23%;
        bottom: 0;

        width: 54px;
    }

    .intro {
        width: 100%;
        max-width: 480px;

        margin: 0 auto;
        text-align: center;
    }

    .intro h1 {
        margin-bottom: 10px;
        font-size: clamp(1.8rem, 7vw, 2.3rem);
        letter-spacing: -1px;
    }

    .intro h2 {
        margin-bottom: 17px;
        font-size: 0.7rem;
    }

    .intro p {
        margin-bottom: 23px;
        font-size: 0.88rem;
        line-height: 1.8;
    }

    .social-links {
        justify-content: center;
        gap: 10px;
    }

    .social-links a {
        min-height: 39px;
        padding: 9px 13px;
    }

    .projects-section {
        padding: 0 16px 40px;
    }

    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .project {
        padding: 14px;
    }

    .project-cover {
        margin-bottom: 15px;
    }

    .cover-placeholder strong {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    .project h3 {
        font-size: 0.88rem;
    }

    .project-description {
        font-size: 0.81rem;
        line-height: 1.7;
    }

    .project-button {
        min-height: 37px;
        padding: 9px 12px;
        font-size: 0.68rem;
    }
}

@media (max-width: 360px) {
    .hero {
        padding-right: 16px;
        padding-left: 16px;
    }

    .hero-art {
        height: 205px;
    }

    .intro h1 {
        font-size: 1.75rem;
    }

    .intro h2 {
        font-size: 0.65rem;
        letter-spacing: 0.8px;
    }

    .intro p {
        font-size: 0.84rem;
    }

    .projects-section {
        padding-right: 12px;
        padding-left: 12px;
    }

    .project {
        padding: 11px;
    }

    .project-actions {
        gap: 6px;
    }

    .project-button {
        padding-right: 9px;
        padding-left: 9px;
        font-size: 0.64rem;
    }
}

@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;
    }
}
