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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
}

#container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Header Styles */
header {
    background: #ffffff;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

#logo {
    position: relative;
    z-index: 2;
}

#logo a {
    display: inline-block;
    transition: transform 0.3s ease;
}

#logo a:hover {
    transform: scale(1.05);
}

#logo img {
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#mainimg {
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

#mainimg img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

#mainimg img:hover {
    transform: translateY(-5px);
}

/* Navigation Styles */
#menubar {
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

#menubar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

#menubar li {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menubar li a {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
}

#menubar li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

#menubar li a:hover::before {
    left: 0;
}

#menubar li a:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Content Styles */
#contents {
    padding: 3rem 2rem;
}

section {
    margin-bottom: 3rem;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Update Information Styles */
#new dl {
    margin-bottom: 1rem;
}

#new dt {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

#new dd {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
    padding: 1rem;
    border-radius: 0 10px 10px 0;
}

/* Project Grid Styles */
section:last-of-type {
    text-align: center;
}

section:last-of-type a {
    display: inline-block;
    margin: 1rem;
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

section:last-of-type a:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

section:last-of-type img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
}

section:last-of-type a:hover img {
    filter: brightness(1.1) contrast(1.1);
}

/* Footer Styles */
footer {
    background: #ffffff;
    color: #333;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain2" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain2)"/></svg>');
    pointer-events: none;
}

footer small {
    position: relative;
    z-index: 2;
    color: #333;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.pr {
    position: relative;
    z-index: 2;
    margin-left: 1rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    #container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header {
        padding: 1.5rem;
    }
    
    #logo img {
        max-width: 250px;
    }
    
    #menubar ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    #contents {
        padding: 2rem 1rem;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    section:last-of-type img {
        width: 150px;
        height: 150px;
        margin: 0.5rem;
    }
    
    footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    #logo img {
        max-width: 200px;
    }
    
    section:last-of-type img {
        width: 120px;
        height: 120px;
        margin: 0.25rem;
    }
    
    #new dd {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}
