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

:root {
    --primary-color-light: #0a66c2;
    --secondary-color-light: #7f8c8d;
    --background-color-light: #f0f2f5;
    --text-color-light: #333;
    --card-background-light: #ffffff;

    --primary-color-dark: #4a90e2;
    --secondary-color-dark: #bdc3c7;
    --background-color-dark: #1a1a1a;
    --text-color-dark: #ecf0f1;
    --card-background-dark: #2c2c2c;

    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2.5rem;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    background-image: radial-gradient(var(--secondary-color-light) 0.5px, transparent 0.5px);
    background-size: 15px 15px;
}

body.dark-mode {
    background-color: var(--background-color-dark);
    color: var(--text-color-dark);
    background-image: radial-gradient(var(--secondary-color-dark) 0.5px, transparent 0.5px);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 2rem;
}

header {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode header {
    background: transparent;
}

header.scrolled {
    padding: 0.5rem 0;
    background-color: var(--card-background-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body.dark-mode header.scrolled {
    background-color: var(--card-background-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

.logo h1 {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-color-light);
    font-size: clamp(1.5rem, 4vw, 1.8rem);
}

body.dark-mode .logo h1 {
    color: var(--primary-color-dark);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-links a.btn {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    color: white;
}

.nav-links a.btn:hover {
    color: white;
}

.nav-links a.btn::after {
    display: none;
}

.nav-links a.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color-light);
    transition: width 0.3s ease;
}

body.dark-mode .nav-links a::after {
    background-color: var(--primary-color-dark);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}


body.dark-mode .nav-links a {
    color: var(--text-color-dark);
}

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

body.dark-mode .nav-links a:hover {
    color: var(--primary-color-dark);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--primary-color-light);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

body.dark-mode .btn {
    background-color: var(--primary-color-dark);
}

.hamburger {
    display: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-color-light);
    margin: 5px;
    transition: all 0.3s ease-in-out;
}

body.dark-mode .hamburger .line {
    background-color: var(--text-color-dark);
}

.hamburger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.toggle .line2 {
    opacity: 0;
}

.hamburger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color-light);
    transition: transform 0.3s ease, color 0.3s;
}

#theme-toggle:hover {
    transform: scale(1.2);
}

body.dark-mode #theme-toggle {
    color: var(--text-color-dark);
}

main {
    padding-top: 100px; /* Default padding */
}

section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.section-title {
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--primary-color-light);
}

body.dark-mode .section-title {
    color: var(--primary-color-dark);
}

.card {
    background: var(--card-background-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.6s ease-out, transform 0.6s ease-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(20px);
}

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

body.dark-mode .card {
    background: var(--card-background-dark);
    border-color: #444;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}

body.dark-mode .card:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

#projects .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

#projects .card {
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, opacity 0.6s ease-out, transform 0.6s ease-out;
}

#projects .card:hover {
    border-color: var(--primary-color-light);
}

body.dark-mode #projects .card:hover {
    border-color: var(--primary-color-dark);
}

.skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skills-list li {
    background: var(--primary-color-light);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background-color 0.3s;
}

.skills-list li.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-list li:hover {
    background-color: #0855a0;
}

body.dark-mode .skills-list li {
    background: var(--primary-color-dark);
}

body.dark-mode .skills-list li:hover {
    background-color: #3a7cc0;
}

#contact-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: var(--background-color-light);
    color: var(--text-color-light);
    font-family: 'Roboto', sans-serif;
}

body.dark-mode #contact-form input, body.dark-mode #contact-form textarea {
    background: var(--background-color-dark);
    color: var(--text-color-dark);
    border-color: #444;
}

#contact-form button {
    padding: 1rem;
    background-color: var(--primary-color-light);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s ease;
    font-family: 'Roboto Mono', monospace;
}

#contact-form button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

body.dark-mode #contact-form button {
    background-color: var(--primary-color-dark);
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
}

body.dark-mode footer {
    border-top-color: #333;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-links a {
    color: var(--primary-color-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

body.dark-mode .contact-links a {
    color: var(--primary-color-dark);
}

.contact-links a:hover {
    text-decoration: underline;
}

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.2s ease;
}

#back-to-top.visible {
    opacity: 1;
}

#back-to-top:hover {
    transform: translateY(-2px);
}


/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 60%;
        max-width: 300px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: var(--card-background-light);
        transition: right 0.5s ease-in-out, background-color 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        gap: 2.5rem;
    }

    body.dark-mode .nav-links {
        background: var(--card-background-dark);
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    .controls {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    #contact-form {
        gap: 0.75rem;
    }

    #back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}
