:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4a4a4a;
    --background-color: #ffffff;
    --accent-color: #e1e1e1;
    --border-color: #e1e1e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 72px; /* Adjust this value based on your nav height */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--background-color);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 2rem;
}

nav .logo a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem; /* Space between links */
}

nav a {
    text-decoration: none; /* Remove underline */
    color: #333; /* Default link color */
    padding: 0.5rem 1rem; /* Add padding */
    border-radius: 5px; /* Rounded corners */
    transition: background 0.3s, color 0.3s; /* Smooth transition */
}

nav a:hover {
    background: rgba(0, 102, 204, 0.1); /* Light background on hover */
    color: #0066cc; /* Change color on hover */
}

/* Update hamburger styles */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    margin: 6px 0;
    background: var(--primary-color);
    transition: transform 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    padding: 1rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 72px);
}

/* Update text container styles */
.text-container {
    width: 100%;
    max-width: 900px;
    min-height: 100px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--secondary-color);
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    margin-right: 1rem;
    width: 150px; /* Set a fixed width for both buttons */
    text-align: center; /* Center text within the button */
}

.button:hover {
    opacity: 0.9;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
    max-width: 1200px;
    width: 100%;
}

.project-square {
    background-color: white;
    color: black;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 280px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-square:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Remove cursor pointer from desktop view */
@media (max-width: 768px) {
    .project-square {
        cursor: pointer;
    }
}

.project-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.project-front,
.project-description {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 20px;
}

.project-front {
    transform: rotateY(0deg);
}

.project-description {
    transform: rotateY(180deg);
    color: black;
}

.project-description p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: opacity 0.3s;
    margin-top: 0.5rem;
}

.project-link:hover {
    opacity: 0.8;
}

/* Desktop hover effect */
@media (min-width: 769px) {
    .project-square:hover .project-inner {
        transform: rotateY(180deg);
    }
}

/* Mobile click effect */
@media (max-width: 768px) {
    .project-inner.flipped {
        transform: rotateY(180deg);
    }
}

.project-front img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
    margin: auto;
}

/* Skills Section - Metro/Zune UI Style */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem auto;
    max-width: 1400px;
}

.skills-category {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.skills-category h3 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    padding: 1rem 1.5rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Metro color scheme - vibrant and bold */
.skills-category:nth-child(1) h3 {
    background: linear-gradient(135deg, #0078D4 0%, #0063B1 100%);
}

.skills-category:nth-child(2) h3 {
    background: linear-gradient(135deg, #00B294 0%, #009B7D 100%);
}

.skills-category:nth-child(3) h3 {
    background: linear-gradient(135deg, #8764B8 0%, #744DA9 100%);
}

.skills-category:nth-child(4) h3 {
    background: linear-gradient(135deg, #E74856 0%, #C72C41 100%);
}

.skills-grid-squares {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

.skill-square {
    background: white;
    padding: 0.9rem;
    text-align: center;
    border-radius: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    border-left: none;
    border-top: none;
    position: relative;
    overflow: hidden;
}

/* Remove borders on edges */
.skill-square:nth-child(3n) {
    border-right: none;
}

.skill-square:nth-child(n+4) {
    border-bottom: none;
}

.skill-square::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.skill-square:hover::before {
    left: 100%;
}

.skill-square:hover {
    color: white;
    transform: scale(1.08);
    z-index: 10;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Category-specific hover colors matching headers */
.skills-category:nth-child(1) .skill-square:hover {
    background: linear-gradient(135deg, #0078D4 0%, #0063B1 100%);
}

.skills-category:nth-child(2) .skill-square:hover {
    background: linear-gradient(135deg, #00B294 0%, #009B7D 100%);
}

.skills-category:nth-child(3) .skill-square:hover {
    background: linear-gradient(135deg, #8764B8 0%, #744DA9 100%);
}

.skills-category:nth-child(4) .skill-square:hover {
    background: linear-gradient(135deg, #E74856 0%, #C72C41 100%);
}

/* Add subtle animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skills-category {
    animation: slideIn 0.6s ease-out forwards;
}

.skills-category:nth-child(1) {
    animation-delay: 0.1s;
}

.skills-category:nth-child(2) {
    animation-delay: 0.15s;
}

.skills-category:nth-child(3) {
    animation-delay: 0.2s;
}

.skills-category:nth-child(4) {
    animation-delay: 0.25s;
}

/* Experience Section Updates */
.experience-description {
    margin-top: 1rem;
}

.experience-description > p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.project-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-highlights li {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.project-highlights li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.project-highlights strong {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* Experience Timeline */
.experience-grid {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Timeline center line */
.experience-grid::before {
    content: '';
    position: absolute;
    width: 3px;
    background: linear-gradient(180deg, #0078D4 0%, #8764B8 100%);
    top: 1rem;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.experience-item {
    position: relative;
    width: calc(50% - 2.5rem);
    margin: 1.5rem 0;
    background-color: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

/* Position items left and right */
.experience-item:nth-child(odd) {
    margin-left: auto;
    margin-right: 2.5rem;
}

.experience-item:nth-child(even) {
    margin-right: auto;
    margin-left: 2.5rem;
}

/* Timeline dots */
.experience-item::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0078D4;
    top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

/* Position dots */
.experience-item:nth-child(odd)::before {
    left: -3.25rem;
}

.experience-item:nth-child(even)::before {
    right: -3.25rem;
}

/* Timeline connectors */
.experience-item::after {
    content: '';
    position: absolute;
    width: 2rem;
    height: 2px;
    background: #0078D4;
    top: 2.5rem;
}

/* Position connectors */
.experience-item:nth-child(odd)::after {
    left: -2rem;
}

.experience-item:nth-child(even)::after {
    right: -2rem;
}

/* Hover effects */
.experience-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #0078D4;
}

/* Education Section */
.education-section {
    margin-top: 0;
}

.education-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.education-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.education-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #0078D4;
}

.education-logo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8e8e8;
}

.education-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.education-details {
    flex-grow: 1;
}

.education-details h3 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-details .degree {
    font-weight: 500;
    color: #0078D4;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.education-details .duration {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--background-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        pointer-events: none;
    }

    nav ul.show {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    nav ul li a {
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* When menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .container {
        padding: 12px 12px;
    }

    .model-wrapper {
        padding: 0;
        margin: 0;
        width: 100%;
        height: auto;
    }

    #model-container {
        width: 100vw !important; /* Match viewport width */
        height: 40vh !important; /* Set height to 40vh */
        max-width: 100% !important;
        max-height: none !important; /* Remove any max-height constraints */
        aspect-ratio: 1 !important; /* Force 1:1 ratio */
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
        overflow: hidden;
    }

    #model-container canvas {
        width: 100% !important;
        height: 100% !important;
        display: block;
    }

    .text-container {
        min-height: 150px; /* Adjust for smaller text on mobile */
    }

    .hero {
        padding: 1rem 0 4rem;
    }

    .hero h2 {
        font-size: 1.5rem; /* Adjust font size for mobile */
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-square {
        height: 200px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skills-category h3 {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .skills-grid-squares {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .skill-square {
        padding: 0.85rem 0.5rem;
        font-size: 0.85rem;
    }

    .experience-grid {
        padding: 0 1.5rem;
        margin: 1rem auto;
    }

    .experience-grid::before {
        left: 0;
        top: 0;
        bottom: 0;
    }

    .experience-item {
        width: calc(100% - 2rem);
        margin: 1.5rem 0 1.5rem 2rem !important;
        padding: 1.5rem;
    }

    .experience-item::before {
        left: -2.5rem !important;
        width: 12px;
        height: 12px;
        top: 1.5rem;
        transform: none;
    }

    .experience-item::after {
        left: -2rem !important;
        width: 2rem;
        top: 1.5rem;
        transform: none;
    }

    .education-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .education-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .education-details {
        width: 100%;
    }

    .education-details h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .education-details .degree {
        font-size: 1rem;
    }

    body {
        padding-top: 60px; /* Slightly smaller padding for mobile */
    }

    section {
        padding: 2rem 0;
        min-height: auto;
    }

    section h2 {
        margin: 0.5rem 0 1.5rem;
    }

    /* Add more space after each section on mobile */
    section:not(:last-child) {
        margin-bottom: 2rem;
    }

    /* Adjust education section spacing on mobile */
    .education-section {
        margin-top: 4rem;
    }
}

/* Regular view styles */
.model-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#model-container {
    width: 100% !important;
    height: 45vh !important;
    max-width: calc(100% - 40px) !important;
    position: relative;
    overflow: hidden;
    aspect-ratio: 21 / 9;
    margin: 0 20px !important;
    border-radius: 16px;
}

#model-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem; /* Reduced margin */
}

/* Update the dynamic text styles */
.dynamic-text {
    display: inline-block;
    color: var(--primary-color); /* Change to black color */
    font-weight: 500;
    position: relative;
    min-width: 1px; /* Ensures the container doesn't collapse */
}

/* Remove the cursor effect */
.dynamic-text::after {
    content: none; /* Remove the cursor */
}

/* Add these animations to your existing CSS */
@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(5px, 5px) rotate(2deg);
    }
    50% {
        transform: translate(0, 8px) rotate(0deg);
    }
    75% {
        transform: translate(-5px, 5px) rotate(-2deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Add/update these styles */
section {
    padding: 4rem 0 3rem;
    scroll-margin-top: 80px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

section h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.5rem;
    margin: 0 0 2rem;
    padding: 0;
    display: block;
    font-weight: 600;
    text-align: center;
}

/* Update regular view spacing */
.hero {
    min-height: calc(100vh - 72px);
    padding: 1rem 0;
}

#projects {
    padding: 3rem 0;
}

#skills {
    padding: 3rem 0;
    background: #f8f9fa;
}

#experience {
    padding: 3rem 0;
}

#education {
    padding: 3rem 0;
    background: #f8f9fa;
}

/* Update education section spacing */
.education-section {
    margin-top: 8rem;
    padding-top: 4rem;
}

.education-grid {
    margin: 4rem auto;
}

/* Add smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Update container padding */
.container {
    padding: 0 1rem;
}

/* Update spacing for contact section */
#contact {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
    text-align: center;
}

#contact p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

#contact a {
    color: #0078D4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

#contact a:hover {
    color: #0063B1;
    text-decoration: underline;
}

/* Update education section container */
.education-section .container {
    max-width: 100%;
    padding: 0;
}

footer {
    padding: 1rem 0;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    position: relative;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; /* Updated font */
}

footer p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.8rem; /* Smaller font size for footer */
    font-weight: 500; /* Optional: make it slightly bolder */
}