@import 'variables.css';

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-heading);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 4px;
    /* Slightly rounded */
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
    /* Subtle fill */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary);
    margin-left: 1rem;
}

.btn-secondary:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 2rem;
    /* clamp? */
    margin-bottom: 2.5rem;
    white-space: nowrap;
}

.section-title::after {
    content: "";
    display: block;
    width: 100%;
    /* Fill remaining width or fixed */
    max-width: 300px;
    height: 1px;
    background-color: var(--border-color);
    margin-left: 1.5rem;
    opacity: 0.5;
}

section {
    padding: 100px 0;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    background-color: rgba(10, 25, 47, 0.85);
    /* Use variables ideally, but need opacity */
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    transition: all 0.3s;
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links li {
    counter-increment: item 1;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 2rem;
    color: var(--text-primary);
    transition: color 0.3s;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 15%;
    /* Indent logic */
}

.hero-intro {
    font-family: var(--font-heading);
    /* Monospace could work nicely here too */
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.hero-name {
    font-size: clamp(40px, 8vw, 80px);
    color: var(--text-heading);
    /* Brighter in dark mode */
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-desc {
    max-width: 500px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.skills-list li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skills-list li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.about-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-wrapper {
    width: 250px;
    height: 250px;
    background-color: var(--surface-color);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: var(--primary-color);
    position: relative;
    border: 2px solid var(--primary-color);
    /* Image placeholder effect */
    box-shadow: 15px 15px 0 -2px var(--background-color), 15px 15px 0 0 var(--primary-color);
    /* Offset border effect */
    transition: all 0.3s;
}

.img-wrapper:hover {
    transform: translate(-3px, -3px);
    box-shadow: 20px 20px 0 -2px var(--background-color), 20px 20px 0 0 var(--primary-color);
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    padding-bottom: 0.2rem;
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--primary-color);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--surface-color);
    padding: 2rem 1.75rem;
    border-radius: 4px;
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-7px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.project-links a {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-left: 0.8rem;
}

.project-links a:hover {
    color: var(--primary-color);
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.7rem;
    color: var(--text-primary);
}

.project-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Pushes tech list to bottom */
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    /* Monospace vibe */
}

/* Contact */
.contact {
    text-align: center;
    margin-bottom: 50px;
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.social-links a {
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1.5rem;
    }

    .nav-links {
        display: none;
        /* Add mobile menu logic later if needed or simple hide */
    }

    .hero {
        padding: 0 1.5rem;
        align-items: flex-start;
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-img {
        margin-top: 2rem;
    }
}

/* Animations */
.hidden-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.show-section {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu Active State */
.nav-active {
    display: flex !important;
    position: absolute;
    top: 80px;
    right: 0;
    height: 100vh;
    width: 60%;
    flex-direction: column;
    background-color: var(--surface-color);
    /* Matches theme */
    transform: translateX(0%);
    transition: transform 0.5s ease-in;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
}

.nav-links.nav-active li {
    opacity: 1;
    margin: 1.5rem 0;
}

.hamburger {
    display: block;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Toggle Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.open {
    display: flex;
    /* Flex to center */
    opacity: 1;
}

.modal-content {
    background-color: var(--surface-color);
    margin: auto;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}