/* Base Styles */
:root {
    --foreground: #000000;
    --background: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --primary: #000000;
    --primary-foreground: #ffffff;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-standard: all 0.3s ease;
}

.dark {
    --foreground: #ffffff;
    --background: #0a0a0f;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #9ca3af;
    --gray-600: #d1d5db;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
    --primary: #ffffff;
    --primary-foreground: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.5;
    font-weight: 400;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    padding: 1.5rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
}

.logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.logo-box:hover {
    transform: scale(1.05);
}

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

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    border: none;
    cursor: pointer;
    color: var(--foreground);
    transition: var(--transition-standard);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

body:not(.dark) .sun-icon {
    opacity: 1;
    transform: rotate(0);
}

body:not(.dark) .moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

body.dark .sun-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body.dark .moon-icon {
    opacity: 1;
    transform: rotate(0);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-photo {
    position: relative;
    width: 160px;
    height: 200px;
    background-color: var(--gray-100);
    border-radius: 0.125rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transform: rotate(-2deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: rotate(0);
    box-shadow: var(--shadow-lg);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.profile-photo:hover img {
    filter: grayscale(0);
}

.greeting {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.headline {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-top: 2rem;
}

.dash {
    display: inline-block;
    margin-right: 1rem;
}

/* Section Styles */
section {
    padding: 4rem 0;
    border-top: 1px solid var(--gray-200);
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.section-title h3, .section-title-full {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-title-full {
    margin-bottom: 3rem;
}

.section-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.project-card {
    cursor: pointer;
}

.project-image {
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.project-image img {
    width: 100%;
    height: auto;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.project-card .client {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.project-card .description {
    font-size: 1.125rem;
}

.cta-center {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    transition: transform 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
}

/* Service Items */
.service-item, .experience-item {
    margin-bottom: 3rem;
}

.service-item:last-child, .experience-item:last-child {
    margin-bottom: 0;
}

.service-item h4, .experience-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.experience-item .company {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-intro {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

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

.contact-link {
    font-size: 1.25rem;
    text-decoration: underline;
    transition: transform 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    text-decoration: none;
    transform: translateX(5px);
}

.contact-location {
    font-size: 1.125rem;
    margin-top: 1rem;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.footer-social a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.footer-social a:hover {
    text-decoration: underline;
}

/* Projects Page */
.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.projects-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.projects-header h1 {
    font-size: 2.5rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background-color: var(--gray-100);
    color: var(--foreground);
    border: none;
    cursor: pointer;
    transition: var(--transition-standard);
}

.filter-btn:hover {
    background-color: var(--gray-200);
}

.filter-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.projects-grid.full {
    grid-template-columns: 1fr;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    background-color: var(--background);
    border-radius: 0.5rem;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-standard);
}

.close-modal:hover {
    background-color: #fff;
}

.modal-image {
    width: 100%;
    aspect-ratio: 4/3;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 1.5rem;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-info p {
    color: var(--gray-600);
}

/* Media Queries */
@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }
    
    .headline {
        font-size: 4.5rem;
    }
    
    .section-grid {
        grid-template-columns: 1fr 2fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .projects-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .headline {
        font-size: 5.5rem;
    }
    
    .projects-grid.full {
        grid-template-columns: repeat(3, 1fr);
    }
}
