/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.6;
    color: #1A1A1A;
    background-color: #FEFEFE;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    color: #1A1A1A;
}

h1 {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
}

h3 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 400;
}

p {
    margin-bottom: 16px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 200ms ease-out;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 200ms ease-out;
    letter-spacing: 0.02em;
    min-height: 48px;
    line-height: 1.5;
}

.btn-primary {
    background-color: #B8001F;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #8F0018;
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #FEFEFE;
    border-bottom: 1px solid #E5E5E0;
    z-index: 1000;
    height: 72px;
    transition: all 300ms ease-out;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo .logo-link {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1A1A1A;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #1A1A1A;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover {
    color: #B8001F;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #B8001F;
    transition: width 200ms ease-out;
}

.nav-link.active {
    color: #B8001F;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #B8001F;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: #1A1A1A;
    transition: all 200ms ease-out;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #FEFEFE;
    padding: 120px 0 80px;
}

.hero-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-avatar {
    margin-bottom: 32px;
}

.avatar-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #E5E5E0;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 21px;
    color: #4A4A4A;
    font-style: italic;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    margin-top: 32px;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 64px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #B8001F;
}

/* Portfolio Section */
.portfolio {
    padding: 96px 0;
    background-color: #F9F9F7;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    background-color: #FEFEFE;
    border: 1px solid #E5E5E0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.portfolio-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease-out;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 24px;
}

.portfolio-title {
    margin-bottom: 12px;
    color: #1A1A1A;
}

.portfolio-description {
    font-size: 16px;
    color: #6B6B6B;
    line-height: 1.6;
    margin-bottom: 16px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #4A4A4A;
    background-color: #F9F9F7;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #E5E5E0;
}

/* About Section */
.about {
    padding: 96px 0;
    background-color: #FEFEFE;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-paragraph {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 24px;
    color: #1A1A1A;
}

.skills-title {
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 24px;
}

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

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #E5E5E0;
}

.skill-name {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #1A1A1A;
}

.skill-level {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #4A4A4A;
    background-color: #F9F9F7;
    padding: 4px 12px;
    border-radius: 4px;
}

/* Work Experience Section */
.experience {
    padding: 120px 0;
    background-color: #FEFEFE;
}

.experience-timeline {
    max-width: 800px;
    margin: 48px auto 0;
}

.experience-item {
    padding: 32px 0;
    border-bottom: 1px solid #E8E8E8;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-header {
    margin-bottom: 12px;
}

.experience-title {
    font-size: 24px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.experience-company {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #B8001F;
    font-weight: 500;
}

.experience-period {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6B6B6B;
    margin: 8px 0;
}

.experience-description {
    font-size: 18px;
    line-height: 1.7;
    color: #4A4A4A;
    margin-top: 16px;
}

/* Education Section */
.education {
    padding: 120px 0;
    background-color: #F9F9F7;
}

.education-list {
    max-width: 800px;
    margin: 48px auto 0;
}

.education-item {
    padding: 32px 0;
    border-bottom: 1px solid #E8E8E8;
}

.education-item:last-child {
    border-bottom: none;
}

.education-header {
    margin-bottom: 12px;
}

.education-school {
    font-size: 24px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.education-degree {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #B8001F;
    font-weight: 500;
}

.education-period {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6B6B6B;
    margin: 8px 0;
}

.education-gpa {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6B6B6B;
    margin: 4px 0;
}

.education-description {
    font-size: 18px;
    line-height: 1.7;
    color: #4A4A4A;
    margin-top: 16px;
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background-color: #FEFEFE;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-description {
    font-size: 18px;
    line-height: 1.7;
    color: #1A1A1A;
    margin-bottom: 32px;
}

.contact-email {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #B8001F;
    display: inline-block;
    margin-bottom: 32px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 200ms ease-out;
}

.contact-email:hover {
    border-bottom-color: #B8001F;
}

.contact-cta {
    margin-top: 32px;
}

/* Footer */
.footer {
    padding: 48px 0;
    background-color: #FEFEFE;
    border-top: 1px solid #E5E5E0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-social {
    display: flex;
    gap: 24px;
}

.social-link {
    color: #4A4A4A;
    transition: color 200ms ease-out;
}

.social-link:hover {
    color: #B8001F;
}

.footer-copyright {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6B6B6B;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background-color: #FEFEFE;
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 300ms ease-out;
        border-bottom: 1px solid #E5E5E0;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
        min-height: 70vh;
    }
    
    .avatar-image {
        width: 120px;
        height: 120px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    /* Portfolio */
    .portfolio {
        padding: 64px 0;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .portfolio-item {
        margin: 0 16px;
    }
    
    /* Sections */
    .about,
    .contact {
        padding: 64px 0;
    }
    
    .section-title {
        margin-bottom: 48px;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer {
        padding: 32px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .portfolio-item {
        margin: 0;
    }
    
    .portfolio-content {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.contact-email:focus,
.social-link:focus {
    outline: 2px solid #B8001F;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navigation,
    .nav-toggle,
    .hero-cta,
    .contact-cta,
    .footer-social {
        display: none;
    }
    
    .hero {
        padding: 40px 0;
        min-height: auto;
    }
    
    .portfolio,
    .about,
    .contact {
        padding: 40px 0;
        break-inside: avoid;
    }
    
    .portfolio-item {
        break-inside: avoid;
        margin-bottom: 24px;
    }
}

/* Project Detail Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal.visible {
    opacity: 1;
}

.project-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.project-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: #FEFEFE;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 300ms ease-out;
}

.project-modal.visible .project-modal-content {
    transform: scale(1);
}

.project-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    color: #1A1A1A;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.project-modal-close:hover {
    background-color: #B8001F;
    color: #FEFEFE;
    transform: rotate(90deg);
}

.project-modal-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background-color: #F9F9F7;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.project-modal-info {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.project-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.project-modal-category {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #B8001F;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-weight: 600;
}

.project-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-modal-tags .tag {
    padding: 6px 12px;
    background-color: #F9F9F7;
    color: #4A4A4A;
    border-radius: 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.project-modal-description {
    font-family: 'Georgia', serif;
    font-size: 16px;
    line-height: 1.8;
    color: #4A4A4A;
    white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .project-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .project-modal-info {
        padding: 24px;
    }

    .project-modal-title {
        font-size: 24px;
    }

    .project-modal-image {
        max-height: 300px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}
