:root {
    --bg-primary: #bdbdbd;
    --bg-secondary: #aaaaaa;
    --text-color: #333;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
}

body.dark {
    --bg-primary: #222;
    --bg-secondary: #444;
    --text-color: #f5f5f5;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

body {
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#app {
    background-color: var(--bg-primary);
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 45px;
    transition: background-color 0.3s ease;
}

.typing-cursor::after {
    content: "|";
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#welcome-title {
    color: var(--text-color);
    font-size: 6rem;
    margin: 0;
    text-align: center;
    font-family: monospace;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 3px 3px 5px var(--shadow-light);
}

body.dark #welcome-title {
    text-shadow: 3px 3px 6px var(--shadow-dark);
}

#welcome-title:hover {
    text-shadow: 4px 4px 8px var(--shadow-dark);
}

.buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.btn-main {
    background-color: var(--bg-secondary);
    width: 20%;
    height: 300px;
    min-width: 250px;
    min-height: 80px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 8px var(--shadow-light);
    overflow: hidden;
    position: relative;
}

.btn-main:before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    transform: translateY(100%);
    z-index: 0;
}

.btn-main:hover {
    box-shadow: 6px 6px 12px var(--shadow-dark);
    transform: translateY(-5px);
}

.btn-main:hover:before {
    transform: translateY(0);
}

.btn-main i {
    font-size: 3.5rem;
    z-index: 1;
}

.btn-text {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

#contact-button,
#theme-toggle {
    width: 55px;
    height: 55px;
    border-radius: 5px;
    border: none;
    background-color: var(--bg-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 4px 4px 6px var(--shadow-light);
}

#contact-button:hover,
#theme-toggle:hover {
    box-shadow: 6px 6px 8px var(--shadow-dark);
}

.bi {
    color: var(--text-color);
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.hidden {
    display: none !important;
}

.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    color: var(--text-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 6px 6px 12px var(--shadow-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px var(--shadow-light);
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff5252;
}

.modal-body {
    max-height: 60vh;
    padding-right: 5px;
}

.modal-body::-webkit-scrollbar,
.tech-tab-content::-webkit-scrollbar,
.experience-timeline::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track,
.tech-tab-content::-webkit-scrollbar-track,
.experience-timeline::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 8px;
}

.modal-body::-webkit-scrollbar-thumb,
.tech-tab-content::-webkit-scrollbar-thumb,
.experience-timeline::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 8px;
}

#contact-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px var(--shadow-light);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    text-decoration: none;
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 5px var(--shadow-light);
}

.contact-link:hover {
    box-shadow: 4px 4px 8px var(--shadow-dark);
    transform: translateY(-1px);
}

.contact-link i {
    font-size: 1.5rem;
}

.project-tab-content {
    display: none;
}

.project-tab-content.active {
    display: block;
}

.project-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--bg-secondary);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.project-tab-btn:hover {
    color: var(--text-color);
    border-bottom-color: var(--bg-secondary);
}

.project-tab-btn.active {
    border-bottom-color: var(--text-color);
    font-weight: bold;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow-dark);
}

.project-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-name {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.project-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.4;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 0.75rem;
}

.project-links {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: auto;
    margin-left: 0.5rem;
}

.project-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.project-link:hover {
    opacity: 0.7;
}

.tech-tab-content {
    display: none;
}

.tech-tab-content.active {
    display: block;
}

.tech-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--bg-secondary);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tech-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tech-tab-btn:hover {
    color: var(--text-color);
    border-bottom-color: var(--bg-secondary);
}

.tech-tab-btn.active {
    border-bottom-color: var(--text-color);
    font-weight: bold;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    box-shadow: 3px 3px 5px var(--shadow-light);
}

.tech-item:hover {
    transform: translateY(-1px);
    box-shadow: 3px 3px 7px var(--shadow-dark);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tech-name {
    font-family: monospace;
    font-weight: bold;
    text-align: center;
}

.about-section {
    margin-bottom: 2rem;
}

.about-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    border-left: 4px solid var(--bg-secondary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header i {
    font-size: 1.3rem;
    margin-right: 0.75rem;
    color: var(--text-color);
}

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-family: monospace;
}

.section-content p {
    margin-top: 0.5rem;
    line-height: 1.6;
}

.about-quote {
    font-style: italic;
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    border-top: 1px solid var(--bg-secondary);
    border-bottom: 1px solid var(--bg-secondary);
}

.about-quote blockquote {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem;
}

.experience-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0px 3px 8px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.experience-card:hover {
    transform: translateY(-3px);
    box-shadow: 0px 5px 15px var(--shadow-dark);
}

.experience-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experience-icon {
    background-color: var(--bg-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.experience-icon i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.experience-title {
    flex: 1;
}

.experience-title h3 {
    margin: 0 0 0.25rem 0;
    font-family: monospace;
    font-size: 1.3rem;
}

.company-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.company-name {
    font-weight: bold;
    margin-right: 0.5rem;
}

.location {
    font-size: 0.9rem;
    opacity: 0.8;
}

.period {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

.experience-description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.experience-responsibilities h4,
.experience-technologies h4 {
    font-size: 1rem;
    margin: 0.5rem 0;
    font-family: monospace;
}

.experience-responsibilities ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.experience-responsibilities li {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.timeline-connector {
    width: 2px;
    height: 20px;
    background-color: var(--bg-secondary);
    margin-left: 25px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skill-item,
.project-tag {
    background-color: var(--bg-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.skill-item i,
.project-tag i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    color: #5cb85c;
}

@media (max-width: 768px) {
    .section-content p {
        font-size: 0.8rem;
    }

    .about-section {
        margin-bottom: 0.5rem;
    }

    .about-intro {
        font-size: 1rem;
    }

    .about-quote blockquote {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.2rem;
    }
    .modal-body {
        max-height: 55vh;
        overflow-y: auto;
    }

    .modal h2 {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    .skills-list {
        gap: 0.5rem;
    }

    .skill-item {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .experience-icon {
        width: 40px;
        height: 40px;
    }

    .experience-icon i {
        font-size: 1.25rem;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1110px) {
    .btn-main {
        width: 20%;
        height: 300px;
        min-width: 250px;
    }

    .btn-main i {
        font-size: 3.5rem;
    }

    .btn-text {
        font-size: 1.5rem;
    }
    .modal-body {
        max-height: 65vh;
        overflow-y: auto;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 900px) {
    .buttons-container {
        flex-wrap: wrap;
        width: 90%;
        max-width: 700px;
        gap: 15px;
    }

    .btn-main {
        width: 45%;
        min-width: 0;
    }
}

@media (min-width: 769px) and (max-width: 1109px) {
    #app {
        gap: 30px;
    }

    #welcome-title {
        font-size: 4.5rem;
    }

    .buttons-container {
        gap: 20px;
    }

    .btn-main {
        width: 22%;
        height: 220px;
        min-width: 200px;
    }

    .btn-main i {
        font-size: 3rem;
    }

    .modal-content {
        max-width: 90%;
    }
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.2rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #app {
        gap: 25px;
    }

    #welcome-title {
        font-size: 3.5rem;
    }

    .buttons-container {
        flex-wrap: wrap;
        width: 90%;
        max-width: 700px;
        gap: 15px;
        justify-content: center;
    }

    .btn-main {
        width: 45%;
        height: 180px;
        min-width: 0;
    }

    .btn-main i {
        font-size: 2.5rem;
    }

    .btn-text {
        font-size: 1.3rem;
    }

    #contact-button,
    #theme-toggle {
        width: 45px;
        height: 45px;
    }

    .modal-content {
        max-width: 90%;
        padding: 1.5rem;
    }

    .tech-tabs {
        margin-bottom: 1rem;
    }

    .tech-tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .modal-body {
        max-height: 55vh;
        overflow-y: auto;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .tech-icon {
        font-size: 2rem;
    }

    .tech-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #app {
        gap: 12px;
        height: 100vh;
        justify-content: center;
        padding: 55px 15px 15px;
        box-sizing: border-box;
        overflow: hidden;
    }

    #welcome-title {
        font-size: 2rem;
        margin-bottom: 20px;
        margin-top: -60px;
    }

    .buttons-container {
        flex-direction: column;
        width: 90%;
        gap: 10px;
        margin-top: 0;
    }

    .btn-main {
        width: 100%;
        height: 60px;
        min-width: 0;
        margin-bottom: 0;
        flex-direction: row;
        justify-content: flex-start;
        padding-left: 20px;
    }

    .btn-main i {
        font-size: 1.8rem;
        margin-right: 15px;
    }

    .btn-text {
        font-size: 1.2rem;
    }

    .top-controls {
        top: 10px;
    }

    .modal-content {
        padding: 1rem;
        width: 100%;
        max-width: calc(100% - 20px);
        max-height: 85vh;
    }

    .tech-tabs {
        gap: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
        margin-bottom: 0.75rem;
    }

    .tech-tabs::-webkit-scrollbar {
        height: 3px;
    }

    .tech-tabs::-webkit-scrollbar-thumb {
        background: var(--bg-secondary);
    }

    .tech-tab-btn {
        padding: 0.4rem 0.5rem;
        margin: 0 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .modal-body {
        max-height: 50vh;
        overflow-y: auto;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.6rem;
    }

    .tech-icon {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }

    .tech-name {
        font-size: 0.8rem;
    }

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

    .project-tabs {
        gap: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    .project-tab-btn {
        padding: 0.4rem 0.5rem;
        margin: 0 0.2rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .modal-content {
        padding: 0.75rem;
    }

    .tech-tab-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }

    .tech-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .tech-item {
        padding: 0.5rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .tech-icon {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }

    .tech-name {
        flex: 1;
        text-align: left;
        margin-bottom: 0;
    }

    .timeline-connector {
        margin-left: 20px;
    }
}

@media (max-height: 600px) {
    .modal-content {
        max-height: 95vh;
    }
    .modal-body {
        max-height: 45vh;
        overflow-y: auto;
    }

    .tech-grid {
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.5rem;
    }
}

@media (max-height: 480px) and (orientation: landscape) {
    #app {
        gap: 10px;
        padding: 10px 15px 10px;
    }

    #welcome-title {
        font-size: 2.2rem;
        margin-bottom: 10px;
        margin-top: 0;
    }

    .buttons-container {
        flex-wrap: wrap;
        width: 95%;
        gap: 10px;
        margin-top: 0;
        justify-content: center;
    }

    .btn-main {
        width: 23%;
        height: 110px;
        min-width: 0;
        padding: 10px;
    }

    .btn-main i {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .btn-text {
        font-size: 0.9rem;
    }

    .top-controls {
        top: 10px;
        right: 10px;
    }

    #contact-button,
    #theme-toggle {
        width: 40px;
        height: 40px;
    }

    .modal-content {
        padding: 1rem;
        max-height: 85vh;
    }

    .tech-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 0.5rem;
    }

    .tech-tab-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .modal-body {
        max-height: 35vh;
        overflow-y: auto;
    }

    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.4rem;
    }

    .tech-icon {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .tech-name {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }

    .close-btn {
        font-size: 1.2rem;
        top: 0.3rem;
        right: 0.5rem;
    }
}

.contact-modal {
    max-width: 500px;
}

@media (max-width: 600px) {
    .contact-modal {
        max-width: 90%;
        width: 90%;
    }
}
