@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --bg-main: #1b1a1e;
    --bg-header: #141e27;
    --text-white: #ffffff;
    --text-muted: #a0a0a0;
    --accent-red: #e60026;
    --accent-red-hover: #cc0022;
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --header-height: 85px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--bg-main);    
    color: var(--text-white);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.title h1,
.footer-title h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.titlehighlight {
    color: var(--accent-red);
}

.header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    min-height: var(--header-height);
    background-color: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    will-change: transform;
}

.navbar {
    display: flex;
    align-items: center;
    position: relative;
}

.menu-toggle-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-toggle {
    display: none;
    font-size: 32px;
    color: var(--text-white);
    cursor: pointer;
    user-select: none;
    padding: 8px;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-size: 17px;
    font-weight: 600;
    display: inline-block;
    padding: 12px 22px;
    border-radius: 4px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.nav-list a:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
    opacity: 1;
}

.nav-list:hover a {
    opacity: 0.5;
}

.nav-list a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.home {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-image: linear-gradient(#141e29 40%, var(--bg-main));
}

.hometitle {
    text-align: center;
}

.home h1 {
    font-size: clamp(2.5rem, 8vw, 7.5rem);
    letter-spacing: 2px;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.home h2 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: 3px;
    margin: 0;
    color: var(--text-muted);
}

.expertise,
.about,
.projects,
.contact {
    padding: 80px 5%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--bg-header);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 0, 38, 0.4);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.card-title h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-white);
}

.card-icon {
    font-family: monospace;
    font-size: 1.3rem;
    color: var(--accent-red);
    font-weight: bold;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.skill-tag:hover {
    background-color: rgba(230, 0, 38, 0.15);
    border-color: var(--accent-red);
    color: var(--text-white);
}

.about-card {
    background-color: var(--bg-header);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 40px;
}

.about-lead {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-white);
    margin: 0 0 20px 0;
}

.about-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 40px 0;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
}

.highlight-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.highlight-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-red);
    font-family: monospace;
    background-color: rgba(230, 0, 38, 0.1);
    padding: 6px 10px;
    border-radius: 4px;
    line-height: 1;
}

.highlight-item h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text-white);
}

.highlight-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-header);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 0, 38, 0.4);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-type {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-red);
}

.project-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.project-links a:hover {
    color: var(--text-white);
}

.project-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: var(--text-white);
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tech span {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    background-color: var(--bg-header);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 40px;
}

.contact-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: var(--text-white);
}

.contact-info p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0 0 30px 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-red);
    font-size: 1rem;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

a.detail-value:hover {
    color: var(--accent-red);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-white);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
    border-color: var(--accent-red);
    background-color: rgba(255, 255, 255, 0.07);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.submit-btn {
    padding: 14px 28px;
    background-color: var(--accent-red);
    color: var(--text-white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

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

.submit-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--accent-red);
    padding: 40px 5% 20px 5%;
    margin-top: auto;
    text-align: left;
}

.footer-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--accent-red);
    transform: translateY(-3px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.2fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-col h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.3rem;
    color: var(--text-white);
}

.footer-col .col-title {
    display: inline-block;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 4px;
}

.footer-bio, 
.footer-cta-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.footer-quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-quick-links li {
    margin-bottom: 10px;
}

.footer-quick-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-quick-links a:hover {
    color: var(--text-white);
    padding-left: 5px;
}

.footer-email {
    display: block;
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    cursor: default;
}

.footer-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: 25px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-btn:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
    color: #707070;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1024px) {
    .navbar {
        position: static;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-header);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
        visibility: hidden;
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
        border-bottom: 2px solid var(--accent-red);
    }

    .menu-toggle-checkbox:checked ~ .nav-list {
        max-height: 100vh;
        visibility: visible;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        display: block;
        width: 100%;
        font-size: 1.1rem;
        padding: 16px 5%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        text-align: left;
    }

    .nav-list:hover a {
        opacity: 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

@media (max-width: 800px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 25px;
    }
}

@media (max-width: 600px) {
    .about-card {
        padding: 25px;
    }
}