/* VARIABLES & RESET */
:root {
    --bg-color: #000; /* Black background */
    --text-color: #ECD9B0; /* Light beige/gold for main text and accents */
    --accent-color: #ECD9B0; /* Reusing text-color for accent consistency */
    --font-sans: 'Poppins', sans-serif; /* Changed to Poppins based on your HTML link */
    --font-serif: 'Playfair Display', serif; /* Serif font for headings */
    --dark-section-bg: rgba(0, 0, 0, 0.7); /* Slightly transparent dark background for sections */
    --dark-item-bg: rgba(40, 40, 40, 0.7); /* Darker background for list items */
    --border-color: rgba(229, 203, 165, 0.2); /* Subtle border color */
    --input-bg: rgba(255, 255, 255, 0.08); /* Light transparent background for inputs */
    --input-border: rgba(236, 217, 176, 0.3); /* Border for inputs */
    --input-text: #fff; /* White text in inputs for readability on dark background */
}

*, *::before, *::after {
    margin:0;
    padding:0;
    box-sizing: border-box;
}

body {
    background: var(--bg-color); /* Using variable */
    color: var(--text-color); /* Using variable */
    font-family: var(--font-sans); /* Using Poppins for body text */
    line-height: 1.7; /* Improved readability */
    overflow-x: hidden; /* Prevent horizontal scroll due to marquee */
    padding-top: 180px; /* Global padding to account for fixed header */
}

a {
    color: var(--text-color);
    text-decoration:none;
}

/* HEADER */
header {
    position: fixed; /* Fixed header at the top */
    top:0;
    width:100%;
    background:rgba(0,0,0,0.9); /* Slightly transparent background for header */
    border-top:5px solid var(--bg-color); /* Top border for design, using bg-color to blend */
    z-index:100; /* Ensure header stays on top */
}

.header-content { 
    max-width: 1200px;
    margin: auto;
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center items horizontally */
    padding: 1rem 0;
}

.header-top-row {
    width: 100%; /* Ensure it takes full width of its parent for centering */
    text-align: center; /* Center the h1 within this row */
    margin-bottom: 5px; /* Small space between name and nav */
}

.header-bottom-row {
    width: 100%; /* Ensure it takes full width */
    text-align: center; /* Center the nav within this row */
}

.site-title h1 { /* Styling for the name at the top */
    font-family: var(--font-serif); /* Changed to serif font */
    color: var(--accent-color);
    font-size: 2.5em; /* Adjusted size to match image more closely */
    margin-bottom: 0; /* Remove default h1 margin */
    font-weight: 700; /* Often bold for names/titles */
}

.site-title { /* Make the title clickable to home */
    text-decoration: none;
    color: inherit; /* Inherit color from h1 */
}

.nav {
    display:flex;
    justify-content:center; /* Center nav links */
    gap:2rem; /* Space between navigation items */
    padding:0.5rem 0; /* Adjusted padding for nav */
}

.nav a {
    font-family: var(--font-sans); /* Ensure nav links use Poppins */
    font-weight:600; /* Increased font-weight for nav links */
    font-size: 1.1em; /* Slightly increased font size for nav links */
    padding:0.25rem 0;
    position:relative;
    transition: color 0.3s ease; /* Smooth transition for hover */
}

.nav a:hover,
.nav a.active {
    color: var(--accent-color);
}

.nav a.active::after {
    content:'';
    position:absolute;
    height:2px;
    width:100%;
    background:var(--accent-color);
    left:0;
    bottom:-4px; /* Underline effect for active link */
}

/* MARQUEE (Scrolling Text) - Only exists in index.html */
.marquee {
    width:100%;
    overflow:hidden;
    background:var(--bg-color);
    padding-bottom: 20px; /* Add some space below marquee */
    box-sizing: content-box;
    margin-top: 0; 
}

.marquee__inner {
    display: flex;
    width: max-content;
    animation: marquee 50s linear infinite;
    font-size: 4rem;
    padding: 1rem 0;
    color: var(--text-color);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-sans);
}

.marquee__inner span {
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}


/* GENERAL CONTENT SECTIONS */
.section {
    padding:6rem 1rem; /* Padding for main content sections */
    max-width:1200px;
    margin:auto;
}

.container { /* General container for content within sections */
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HERO SECTION STYLING (Used on index.html) */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem; /* Adjusted for marquee + body padding */
    padding-bottom: 8rem;
    gap: 5rem;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
    text-align: center;
}

.hero-image-container {
    display: flex;
    justify-content: center;
}

.hero-photo {
    width: 400px;
    height: 400px;
    border-radius: 30px; 
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(236, 217, 176, 0.6);
}

.hero-right {
    text-align: center;
    flex-grow: 1;
}

.hero-right h2 {
    font-family: var(--font-serif);
    font-size: 2.5em;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}
.hero-right p {
    font-family: var(--font-sans);
    font-size: 1.1em;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* BUTTON */
.btn {
    display:inline-block;
    padding:0.75rem 1.5rem;
    background:var(--accent-color);
    color:var(--bg-color);
    font-weight:600;
    border-radius:999px;
    transition:opacity .3s;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn:hover {
    opacity:0.8;
}

/* WAVY DIVIDER */
.divider {
    width:100%;
    overflow:hidden;
    line-height:0;
    margin-top: 4rem;
}
.divider svg {
    position:relative;
    display:block;
    width:calc(150% + 1.3px);
    height:100px;
}
.divider .shape-fill {
    fill:var(--bg-color);
}

/* ABOUT PAGE SECTION STYLING (Applies to about.html) */
.about-page {
    text-align: center;
    padding-top: 0; /* Global body padding handles top space */
}

.about-page h2 {
    font-family: var(--font-serif);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 3rem;
}

.about-grid { 
    display: grid;
    grid-template-columns: 1fr; /* Default to stack on small screens */
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Ensure summary takes full width */
.about-summary {
    grid-column: 1 / -1; 
    text-align: center;
}

.about-summary, .skills-section, .experience-section, .resume-section {
    background: var(--dark-section-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.about-summary h3, .skills-section h3, .experience-section h3, .resume-section h3 {
    font-family: var(--font-serif);
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Skills List (for about.html) */
.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0;
    font-family: var(--font-sans);
}

.skills-list li {
    background: var(--dark-item-bg);
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    font-size: 1em;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.skills-list li:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-3px);
}

/* Experience (for about.html) */
.experience-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-item h4 {
    font-family: var(--font-serif);
    font-size: 1.5em;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.experience-date {
    font-family: var(--font-sans);
    font-style: italic;
    font-size: 0.9em;
    color: rgba(229, 203, 165, 0.7);
    margin-bottom: 1rem;
}

.experience-item ul {
    list-style: disc;
    margin-left: 1.5rem;
    padding: 0;
    font-family: var(--font-sans);
}

.experience-item ul li {
    margin-bottom: 0.5rem;
}

/* Resume Section (for about.html if it's a section there) */
.btn-download-resume {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.btn-download-resume:hover {
    background-color: #e0c89a;
    transform: translateY(-2px);
}

.small-text {
    font-size: 0.8em;
    color: rgba(229, 203, 165, 0.5);
    margin-top: 5px;
}


/* NEW STYLES FOR SKILLS PAGE (skills.html) */
.skills-page {
    text-align: center;
    padding-top: 0; /* Global body padding handles top space */
}

.skills-page h2 {
    font-family: var(--font-serif);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 2.5rem; /* Space between skill categories */
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.skills-category {
    background: var(--dark-section-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: left; /* Align text within categories */
}

.skills-category h3 {
    font-family: var(--font-serif);
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skills-list-detail {
    list-style: none; /* Remove default bullet points */
    padding: 0;
}

.skills-list-detail li {
    background: var(--dark-item-bg); /* Darker background for skill items */
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    font-size: 0.95em;
    border-left: 3px solid var(--accent-color); /* Add an accent bar */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.skills-list-detail li:hover {
    background: rgba(236, 217, 176, 0.1); /* Lighter on hover */
    border-color: #fff; /* White border on hover */
}

.skills-note {
    margin-top: 3rem;
    font-size: 1.1em;
    color: rgba(236, 217, 176, 0.8);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* NEW STYLES FOR RESUME PAGE (resume.html) */
.resume-page {
    text-align: center;
    padding-top: 0; /* Global body padding handles top space */
}

.resume-page h2 {
    font-family: var(--font-serif);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 3rem;
}

.resume-content-wrapper {
    background: var(--dark-section-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 900px; /* Limit width of resume container */
    margin: 0 auto;
}

.resume-intro {
    font-size: 1.1em;
    margin-bottom: 2rem;
    color: rgba(236, 217, 176, 0.9);
}

.resume-actions {
    margin-bottom: 2.5rem;
}

.resume-viewer {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Ensures iframe/image doesn't overflow */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.resume-viewer iframe {
    display: block; /* Remove extra space below iframe */
}

.resume-image { /* Style for image fallback, if you use it */
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    border-bottom: 1px solid var(--border-color); /* Separator for multi-page image resume */
}
.resume-image:last-child {
    border-bottom: none;
}


/* NEW STYLES FOR CONTACT PAGE (contact.html) */
.contact-page {
    text-align: center;
    padding-top: 0; /* Global body padding handles top space */
}

.contact-page h2 {
    font-family: var(--font-serif);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.contact-intro {
    font-size: 1.1em;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(236, 217, 176, 0.9);
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid for contact methods */
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.contact-method-card {
    background: var(--dark-section-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-icon {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 3em; 
}

.contact-method-card h3 {
    font-family: var(--font-serif);
    font-size: 1.6em;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.contact-method-card p {
    font-size: 0.95em;
    color: rgba(236, 217, 176, 0.7);
    margin-bottom: 1rem;
    flex-grow: 1; /* Allows paragraph to take available space */
}

.contact-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #fff; /* White on hover */
}

.contact-form-section {
    background: var(--dark-section-bg);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    margin: 0 auto;
    text-align: left; /* Align form elements to the left */
}

.contact-form-section h3 {
    font-family: var(--font-serif);
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 5px;
    color: var(--input-text);
    font-family: var(--font-sans);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4); /* Lighter placeholder text */
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(236, 217, 176, 0.3);
    outline: none;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing only */
    min-height: 120px;
}

.contact-form .btn { /* Style for the submit button */
    display: block; /* Make button full width of form */
    width: 100%;
    margin-top: 2rem;
    font-size: 1.1em;
    padding: 1rem 2rem;
}

.form-note {
    font-size: 0.9em;
    color: rgba(236, 217, 176, 0.6);
    margin-top: 1.5rem;
    text-align: center;
}


/* SOCIAL ICONS */
.social {
    display:flex;
    justify-content:center;
    gap:1rem;
    padding:2rem 0;
}

.social a {
    display:inline-flex;
    width:48px;
    height:48px;
    border:2px solid var(--text-color);
    border-radius:50%;
    align-items:center;
    justify-content:center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.social a:hover .fab, .social a:hover .fas {
    color: var(--bg-color);
}

.social .fab, .social .fas {
    font-size: 1.5em;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* FOOTER */
footer {
    text-align:center;
    padding:2rem;
    font-size:0.875rem;
    font-family: var(--font-sans);
}

/* PROJECTS OVERVIEW PAGE (projects.html) - ACCORDION STYLE */
.projects-page {
    text-align: center;
    padding-top: 0; /* Global body padding handles top space */
}

.projects-page .page-title { 
    font-family: var(--font-serif);
    font-size: 2.5em;
    color: var(--accent-color);
    margin-bottom: 1.5rem; 
}

.projects-page .intro {
    font-size: 1.1em;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(236, 217, 176, 0.9);
}

.projects-accordion {
    max-width: 800px; 
    margin: 0 auto;
    border: 1px solid var(--border-color); 
    border-radius: 10px;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-accordion-item {
    background: var(--dark-section-bg);
    border-bottom: 1px solid var(--border-color); 
}

.project-accordion-item:last-child {
    border-bottom: none; 
}

.project-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Align items vertically in center */
    padding: 1.5rem 2rem; /* Adjusted horizontal padding to match .project-accordion-content */
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.8); 
    transition: background-color 0.3s ease;
}

.project-accordion-header:hover {
    background-color: rgba(236, 217, 176, 0.1); 
}

.project-header-text { /* NEW: Wrapper for title and tech stack */
    display: flex;
    flex-direction: column; /* Stack title and tech stack */
    flex-grow: 1; /* Allow it to take available space */
    margin-right: 1rem; /* Space between text and arrow */
    /* Remove any explicit padding/margin from here if it's inherited from .project-accordion-header */
    /* padding-left: 0; /* Ensure no extra left padding here */
}

.project-accordion-header .project-title { /* Specific for title inside header */
    margin: 0; /* Remove default h3 margin */
    font-family: var(--font-serif);
    font-size: 1.8em; 
    color: var(--accent-color);
    text-align: left; 
    line-height: 1.3;
    margin-bottom: 0.5rem; /* Space below title for tech stack */
}

.project-header-tech-stack { /* NEW: Styling for tech stack in header */
    font-size: 0.85em; /* Smaller font size */
    color: rgba(236, 217, 176, 0.7); /* Lighter color */
    text-align: left;
    margin-bottom: 0; /* No bottom margin here */
    padding-left: 0; /* Ensure no extra left padding */
}

.project-header-tech-stack strong {
    color: rgba(236, 217, 176, 0.9); /* Slightly more prominent than regular text */
}

.accordion-icon {
    font-size: 1.2em;
    color: var(--accent-color);
    margin-left: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.project-accordion-header.active .accordion-icon {
    transform: rotate(180deg); 
}

.project-accordion-content {
    background: var(--dark-item-bg); 
    padding: 0 2rem; 
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.7s ease-out, padding 0.7s ease-out; 
    text-align: left; 
    display: flex; 
    flex-direction: column; 
}

.project-accordion-header.active + .project-accordion-content {
    max-height: 800px; 
    padding: 1.5rem 2rem 2rem; 
}

.project-preview-image {
    width: 100%;
    max-height: 250px; 
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.project-description {
    font-size: 1em;
    color: rgba(236, 217, 176, 0.8);
    margin-bottom: 1rem; 
}

.project-description strong {
    color: var(--text-color); 
}

/* The .tech-stack is no longer directly in accordion content, so this isn't strictly needed for project-accordion-content */
/* .tech-stack {
    font-size: 0.9em;
    color: rgba(236, 217, 176, 0.6);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.tech-stack strong {
    color: var(--text-color);
} */

.project-accordion-buttons { 
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem; 
    padding-bottom: 1rem; 
    flex-wrap: wrap;
}

.project-btn {
    display: inline-flex; 
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 999px; 
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.btn-details {
    background: var(--accent-color);
    color: var(--bg-color);
}

.btn-details:hover {
    background: #e0c89a; 
    transform: translateY(-2px);
}

.btn-code {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-code:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}


/* NEW STYLES FOR INDIVIDUAL PROJECT DETAIL PAGES (e.g., project1.html) */
.project-detail-page {
    background: var(--dark-section-bg); 
    padding-top: 0; 
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); 
    margin-top: 2rem; 
    margin-bottom: 4rem; 
}

.project-cover-image {
    width: 100%;
    max-height: 400px; 
    object-fit: cover;
    border-radius: 8px; 
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color); 
}

.project-detail-title {
    font-family: var(--font-serif);
    font-size: 3em; 
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 1.2em;
    color: rgba(236, 217, 176, 0.8);
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.project-tech-summary {
    display: block; 
    margin-top: 0.8rem;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-color);
}
.project-tech-summary i {
    margin-right: 5px;
    color: var(--accent-color);
}


.project-section-block {
    background: rgba(0, 0, 0, 0.5); 
    padding: 2.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2); 
    text-align: left; 
}

.project-section-block:last-of-type {
    margin-bottom: 0; 
}

.section-heading {
    font-family: var(--font-serif);
    font-size: 2em; 
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: left; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 0.5rem;
}

.project-section-block p {
    margin-bottom: 1rem;
    color: rgba(236, 217, 176, 0.9);
}

.project-section-block p:last-child {
    margin-bottom: 0;
}

.project-section-block ul.project-list { 
    list-style: disc;
    margin-left: 25px;
    padding: 0;
    margin-top: 1rem;
    color: rgba(236, 217, 176, 0.9);
}

.project-list li {
    margin-bottom: 0.5rem;
}
.project-list li strong {
    color: var(--text-color); 
}

.captioned-image {
    text-align: center;
    margin: 2.5rem 0; 
}

.captioned-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.img-caption {
    font-style: italic;
    font-size: 0.9em;
    color: rgba(236, 217, 176, 0.7);
    margin-top: 0.8rem;
}

.project-links-bottom {
    display: flex;
    justify-content: center; 
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap; 
}

.project-tech-summary-bottom { 
    background: var(--dark-section-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-top: 4rem; 
    text-align: left;
}
.project-tech-summary-bottom h3 {
    font-family: var(--font-serif);
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: center;
}
.project-tech-summary-bottom ul.tech-stack-list {
    list-style: none; 
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 10px;
    color: rgba(236, 217, 176, 0.9);
}
.project-tech-summary-bottom ul.tech-stack-list li strong {
    color: var(--text-color);
}


/* NEW STYLES FOR 404 PAGE (404.html) */
.error-404-page {
    text-align: center;
    padding-top: 0; 
    min-height: calc(100vh - 180px - 2rem - 6rem - 4rem - 2rem); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-family: var(--font-serif);
    font-size: 8em; 
    color: var(--accent-color);
    margin-bottom: 0.2em;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    line-height: 1; 
}

.error-message {
    font-family: var(--font-serif);
    font-size: 3em;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.1em;
    color: rgba(236, 217, 176, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.error-actions .btn { 
    padding: 0.8rem 1.8rem;
    font-size: 1em;
}

.error-suggestion {
    font-size: 0.95em;
    color: rgba(236, 217, 176, 0.7);
}

.error-suggestion a {
    color: var(--accent-color);
    text-decoration: underline;
}
.error-suggestion a:hover {
    color: #fff;
}


/* Responsive Adjustments for ALL Pages */
@media (min-width: 768px) {
    .hero-section {
        flex-direction: row;
        justify-content: center;
        gap: 5rem;
    }

    .hero-left {
        align-items: flex-start;
    }

    .hero-right {
        text-align: left;
    }

    .marquee__inner {
        font-size: 3.5rem;
    }

    /* ABOUT PAGE - For screens >= 768px, keep sections stacked */
    .about-grid { 
        grid-template-columns: 1fr; 
        gap: 4rem; 
    }

    .about-summary {
        grid-column: 1 / -1; 
        text-align: center;
    }
    
    /* SKILLS PAGE - Grid for 2 or 3 columns depending on content */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minminmax(280px, 1fr)); 
    }

    /* CONTACT PAGE - Grid for 2 columns for contact methods */
    .contact-methods-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    }

    /* PROJECTS OVERVIEW PAGE - Accordion is designed to be full-width, no special grid for items */

    /* PROJECT DETAIL PAGE */
    .project-detail-title {
        font-size: 3.5em; 
    }
    .project-subtitle {
        font-size: 1.3em;
    }
    .section-heading {
        font-size: 2.2em;
    }

    /* 404 Page Specifics */
    .error-code {
        font-size: 10em;
    }
    .error-message {
        font-size: 3.5em;
    }
    .error-actions .btn {
        padding: 1rem 2rem;
        font-size: 1.1em;
    }
}

@media (min-width: 992px) { 
    .marquee__inner {
        font-size: 4rem;
    }

    /* ABOUT PAGE - Continue stacking */
    /* No changes needed here */

    /* SKILLS PAGE - Force 3 columns if appropriate */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr); 
    }

    /* CONTACT PAGE - Grid for 3 columns for contact methods */
    .contact-methods-grid {
        grid-template-columns: repeat(3, 1fr); 
    }

    /* PROJECTS OVERVIEW PAGE - Accordion still full-width */

    /* PROJECT DETAIL PAGE */
    .project-detail-title {
        font-size: 4em; 
    }
    .project-subtitle {
        font-size: 1.4em;
    }
    .section-heading {
        font-size: 2.5em;
    }
    .project-tech-summary-bottom ul.tech-stack-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    }

    /* 404 Page Specifics */
    .error-code {
        font-size: 12em;
    }
    .error-message {
        font-size: 4em;
    }
}


/* Mobile Responsiveness for Header/Nav & Sections */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        padding: 0.8rem 0;
    }

    .site-title h1 {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .nav {
        flex-wrap: wrap;
        gap: 0.8rem;
        padding-top: 0;
    }

    .nav a {
        font-size: 1em;
        margin: 0 8px;
    }

    .marquee__inner {
        font-size: 2.5rem;
        padding: 0.5rem 0;
    }

    .section {
        padding: 3rem 0.5rem;
    }

    .about-page h2, .skills-page h2, .resume-page h2, .contact-page h2, .projects-page h2, .project-detail-page .project-detail-title, .error-404-page .error-message { 
        font-size: 2em;
        margin-bottom: 2rem;
    }
    .project-detail-page .project-subtitle {
        font-size: 1.1em;
        margin-bottom: 2rem;
    }
    .section-heading {
        font-size: 1.7em;
        margin-bottom: 1rem;
    }

    .about-summary, .skills-section, .experience-section, .resume-section, .skills-category, .resume-content-wrapper, .contact-method-card, .contact-form-section, .project-accordion-item, .project-detail-page .project-section-block, .project-detail-page .project-tech-summary-bottom { 
        padding: 1.5rem;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .skills-list-detail li {
        font-size: 0.9em;
    }

    .experience-item h4 {
        font-size: 1.3em;
    }

    .project-accordion-header {
        padding: 1rem 1.5rem; 
    }
    .project-accordion-header .project-title {
        font-size: 1.4em; 
    }
    /* Mobile specific style for tech stack in header */
    .project-header-tech-stack {
        font-size: 0.8em; /* Even smaller on mobile */
        margin-bottom: 0;
        margin-top: 0.3rem;
    }
    .project-accordion-content {
        padding: 1rem 1.5rem 1.5rem; 
    }
    .project-preview-image {
        max-height: 180px; 
    }
    .project-accordion-buttons {
        flex-direction: column; 
        gap: 0.8rem;
    }
    .project-btn {
        width: 100%; 
        justify-content: center;
    }

    /* Project Detail Page Mobile Specifics */
    .project-cover-image {
        max-height: 250px;
        margin-bottom: 1.5rem;
    }
    .project-tech-summary-bottom ul.tech-stack-list {
        grid-template-columns: 1fr; 
    }

    /* 404 Page Specifics */
    .error-code {
        font-size: 6em;
    }
    .error-message {
        font-size: 2.2em;
    }
    .error-actions {
        flex-direction: column;
        gap: 1rem;
    }
    .error-actions .btn {
        width: 100%;
        font-size: 1em;
    }
}