/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 10px 0 0 0; /* reduced top padding to remove gap above header */
    /* Removed max-width and margin to allow full width */
    background-color: #000000;
    color: #93c5fd; /* lighter text for dark background */
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

/* Container for main content */
.container {
    /* Removed max-width and margin to allow full width */
    padding: 80px 0 0 0; /* add top padding to avoid content hidden behind fixed header */
    scroll-snap-type: y mandatory;
    scroll-padding-top: 60px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 0; /* remove margin-bottom since fixed */
    background: linear-gradient(90deg, #0f172a, #1e293b);
    padding: 20px 0; /* reduce vertical padding */
    border-radius: 0; /* removed border radius for full width look */
    box-shadow: 0 0 15px #3b82f6;
    z-index: 2000;
}

header h1 {
    margin: 0;
    color: #3b82f6; /* elegant blue */
    font-weight: 700;
    font-size: 2.5rem; /* reduced font size */
}

/* Update Hamburger Menu Styles */
.hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #3b82f6;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.close-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: #93c5fd;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-menu:hover {
    color: #3b82f6;
}

/* Nav Menu Styles */
.nav-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background-color: #1e293b;
    padding: 60px 30px;
    transition: left 0.3s ease;
    z-index: 1000;
}

.nav-menu.active {
    left: 0;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    width: 100%;
    margin-top: 140px; /* increased margin to push down from hamburger and close icon */
}

.nav-menu ul li {
    margin-bottom: 25px;
}

.nav-menu ul li a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
    background-color: #3b82f6;
    color: #0a0a0a;
}

/* Hide nav menu on larger screens and show inline */
@media (min-width: 900px) {
    /*
    .hamburger {
        display: none;
    }
    */
    .hamburger {
        left: 30px !important;
        top: 45px !important; /* lowered slightly for better alignment */
    }
    .nav-menu {
        position: fixed;
        width: 320px;
        height: 100vh;
        background-color: #1e293b;
        box-shadow: 2px 0 12px rgba(59, 130, 246, 0.7);
        padding: 40px 30px 80px 30px;
        overflow-y: auto;
        transition: left 0.4s ease;
        z-index: 1000;
        left: -320px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-menu ul {
        display: block;
        gap: 0;
        padding: 0;
        width: 100%;
        margin-top: 100px; /* reduced margin to bring nav links closer */
    }
    .nav-menu ul li {
        margin-bottom: 25px;
    }
    .nav-menu ul li a {
        padding: 12px 20px;
        font-size: 1.3rem;
        color: #93c5fd;
        background: none;
        border-radius: 8px;
    }
    .nav-menu ul li a:hover,
    .nav-menu ul li a.active {
        background-color: #3b82f6;
        color: #0a0a0a;
    }
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

nav a {
    text-decoration: none;
    color: #93c5fd; /* lighter blue */
    font-weight: 700;
    font-size: 1.3rem;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

nav a:hover,
nav a.active {
    color: #0a0a0a;
    background-color: #3b82f6;
}

/* Section Styles */
section {
    margin: 20px 0; /* consistent margin top and bottom */
    background-color: #1e293b;
    padding: 50px 40px; /* increased padding */
    border-radius: 12px;
    box-shadow: 0 0 20px #3b82f6aa;
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* opacity and transform removed for hero section only */
    margin-top: 20px;
}

h2 {
    margin-bottom: 20px;
    color: #60a5fa; /* medium blue */
    border-bottom: 4px solid #3b82f6;
    padding-bottom: 16px;
    font-size: 3rem; /* increased font size */
    font-weight: 700;
}

/* Blog Post Article */
article {
    margin-bottom: 30px;
    padding: 30px;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    background-color: #0f172a;
    box-shadow: 0 0 12px #3b82f6aa;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
}

article:hover {
    transform: scale(1.03);
}

article h3 {
    margin-bottom: 15px;
    color: #bfdbfe; /* light blue */
    font-size: 2.2rem; /* increased font size */
}

article small {
    color: #93c5fd;
    display: block;
    margin-top: 15px;
    font-size: 1rem;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #3b82f6;
    color: #93c5fd;
    font-size: 1rem;
    scroll-snap-align: end;
}

/* Form Styles for Adding Posts */
form#postForm {
    display: none;
}

/* Media Display Styles */
.post-media {
    margin-top: 25px;
}

.post-media img,
.post-media audio,
.post-media iframe,
.post-media object {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}

/* Post Media Styles */
.post-media {
    width: 100%;
    max-height: 400px;
    margin: 15px 0;
    border-radius: 8px;
    object-fit: cover;
}

/* Animation Container */
.animation-container {
    height: 200px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.animated-element {
    width: 50px;
    height: 50px;
    background: #3b82f6;
    position: absolute;
    border-radius: 50%;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(0);
        background: #3b82f6;
    }
    50% {
        transform: translateX(calc(100% - 50px));
        background: #60a5fa;
    }
}

/* Audio and Video Controls */
audio, video {
    width: 100%;
    border-radius: 8px;
    background: #0f172a;
}

/* Responsive */
@media (max-width: 900px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    body {
        padding: 20px 10px;
        max-width: 100%;
    }
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
    .skills-container,
    .projects-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    padding: 60px 40px; /* reduced top padding from 80px to 60px */
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 25px #3b82f6aa;
    margin-bottom: 30px; /* reduced margin-bottom to reduce gap to About Me */
    opacity: 1 !important; /* make hero visible immediately */
    transform: none !important; /* disable translateY animation */
    min-height: 90vh; /* slightly reduced min-height */
}

.hero-content {
    max-width: 700px; /* reverted max-width to original */
    margin: 0 auto;
    color: #93c5fd;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #3b82f6;
    margin-bottom: 30px;
}

/* Navigation */
nav ul li a {
    font-weight: 700;
    font-size: 1.3rem;
    color: #93c5fd;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

nav ul li a:hover,
nav ul li a.active {
    color: #0a0a0a;
    background-color: #3b82f6;
}

/* Skills Section */
.skills-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.skill {
    background-color: #0f172a;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 35px;
    width: 320px; /* increased width */
    box-shadow: 0 0 12px #3b82f6aa;
    transition: transform 0.3s ease;
}

.skill:hover {
    transform: scale(1.07);
}

.skill h3 {
    margin-bottom: 15px;
    color: #bfdbfe;
    font-size: 1.8rem; /* increased font size */
}

.progress-bar {
    background-color: #1e293b;
    border-radius: 12px;
    height: 20px;
    overflow: hidden;
}

.progress {
    background-color: #3b82f6;
    height: 100%;
    border-radius: 12px 0 0 12px;
    transition: width 1s ease-in-out;
}

/* Projects Section */
.projects-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.project-card {
    background-color: #0f172a;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 40px;
    width: 800px; /* increased width for better PDF viewing */
    box-shadow: 0 0 12px #3b82f6aa;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-card:hover {
    transform: scale(1.07);
}

.project-card h3 {
    margin-bottom: 15px;
    color: #bfdbfe;
    font-size: 1.6rem;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.project-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}

.project-link:hover {
    background-color: #3b82f6;
    color: #0f172a;
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    margin: 15px 0;
    background-color: #0f172a;
}

/* Contact Section */
#contact form {
    background-color: #1e293b;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px #3b82f6aa;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

#contact form label {
    display: block;
    margin-bottom: 12px;
    color: #93c5fd;
    font-weight: 700;
    font-size: 1.1rem;
}

#contact form input[type="text"],
#contact form input[type="email"],
#contact form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    background-color: #0f172a;
    color: #cbd5e1;
    font-size: 1.1rem;
    resize: vertical;
}

#contact form textarea {
    min-height: 140px;
}

#contact form button {
    background-color: #3b82f6;
    color: #0a0a0a;
    border: none;
    padding: 15px 35px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact form button:hover {
    background-color: #60a5fa;
}

/* Fade Animation Styles */
.fade-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero section should always be visible */
#home {
    opacity: 1 !important;
    transform: none !important;
}

/* Font Sample Styles */
.text-samples {
    padding: 25px !important;
}

.text-samples .fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-top: 30px;
}

.font-sample {
    margin: 0;
    padding: 25px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid #3b82f6;
    width: 350px;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.font-sample:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.font-sample h4 {
    font-size: 1.4rem;  /* Increased from 1.2rem */
    margin-bottom: 12px;
    color: #60a5fa;
    text-align: center;
}

.font-preview {
    width: 190px;  /* Unchanged - 5cm equivalent */
    height: 150px; /* Unchanged - 4cm equivalent */
    object-fit: cover;
    border-radius: 6px;
    margin: 10px auto; /* Center the image */
    display: block;
    background: #1e293b;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.font-preview:hover {
    transform: scale(1.05);
}

.font-sample p {
    font-size: 1rem;    /* Increased from 0.9rem */
    margin-top: 12px;
    line-height: 1.5;
    text-align: center;
    padding: 0 10px;
}

.preview-note {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin: 5px 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.modal-close:hover {
    color: #3b82f6;
}

/* Individual Font Styles */
.roboto h4, .roboto p { font-family: 'Roboto', sans-serif; }
.opensans h4, .opensans p { font-family: 'Open Sans', sans-serif; }
.lato h4, .lato p { font-family: 'Lato', sans-serif; }
.montserrat h4, .montserrat p { font-family: 'Montserrat', sans-serif; }
.raleway h4, .raleway p { font-family: 'Raleway', sans-serif; }
.merriweather h4, .merriweather p { font-family: 'Merriweather', serif; }
.ptsans h4, .ptsans p { font-family: 'PT Sans', sans-serif; }
.sourcesanspro h4, .sourcesanspro p { font-family: 'Source Sans Pro', sans-serif; }
.oswald h4, .oswald p { font-family: 'Oswald', sans-serif; }
.ubuntu h4, .ubuntu p { font-family: 'Ubuntu', sans-serif; }

.format-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 5px;
}

.format-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Contact Links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 30px 0;
    margin: auto 0;  /* This will push the content to vertical center */
}

#contact {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* This centers the entire contact section content */
    min-height: 100vh;
}

#contact h2 {
    margin-top: auto;  /* This will push the heading down */
    margin-bottom: 40px;  /* Increased space between heading and links */
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #93c5fd;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 15px 25px;
    border-radius: 8px;
    background: #0f172a;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.contact-item:hover {
    transform: translateY(-3px);
    background: #1e293b;
    color: #3b82f6;
}

.contact-item i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

@media (max-width: 600px) {
    .contact-item {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .contact-item i {
        font-size: 1.2rem;
    }
}