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

:root {
    --bg-primary: #f5f0e8;
    --bg-secondary: #fff;
    --text-primary: #000;
    --text-secondary: #333;
    --accent: #7a8c6b;
    --accent-dark: #5a6c4b;
    --footer-bg: #000;
    --footer-text: #fff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --bg-opposite-primary: #3d2817;
    --text-opposite-primary: #f5f0e8;
}

body.dark-mode {
    --bg-primary: #3d2817;
    --bg-secondary: #2a1810;
    --text-primary: #f5f0e8;
    --text-secondary: #d0c8b8;
    --accent: #7a8c6b;
    --accent-dark: #5a6c4b;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --bg-opposite-primary: #f5f0e8;
    --text-opposite-primary: #000;
}

body {
    font-family: 'Georgia', serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

/* Header */
header {
    background: var(--accent);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: bold;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.7;
}

.theme-toggle {
    background: var(--accent-dark);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.theme-toggle:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-container {
    width: 350px;
    height: 350px;
    perspective: 1500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc-3d {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    transition: none;
}

.vinyl-front {
    width: 100%;
    height: 100%;
    backface-visibility: visible;
}

/* Floating and spinning animation on X-axis */
@keyframes floatAndSpin {
    0% {
        transform: rotateX(15deg) rotateY(0deg) translateY(0px);
    }

    25% {
        transform: rotateX(15deg) rotateY(90deg) translateY(-15px);
    }

    50% {
        transform: rotateX(15deg) rotateY(180deg) translateY(0px);
    }

    75% {
        transform: rotateX(15deg) rotateY(270deg) translateY(-15px);
    }

    100% {
        transform: rotateX(15deg) rotateY(360deg) translateY(0px);
    }
}

/* Fast spin animations */
@keyframes spinFastLeft {
    0% {
        transform: rotateX(15deg) rotateY(0deg) translateY(0px);
    }

    100% {
        transform: rotateX(15deg) rotateY(-1080deg) translateY(0px);
    }
}

@keyframes spinFastRight {
    0% {
        transform: rotateX(15deg) rotateY(0deg) translateY(0px);
    }

    100% {
        transform: rotateX(15deg) rotateY(1080deg) translateY(0px);
    }
}

/* Apply fast spin when triggered */
.vinyl-disc-3d.spin-left {
    animation: spinFastLeft 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.vinyl-disc-3d.spin-right {
    animation: spinFastRight 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.decorative-paint {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--accent);
    border-radius: 50% 30% 50% 30%;
    opacity: 0.3;
    z-index: -1;
}

.paint-1 {
    top: -30px;
    right: -30px;
}

.paint-2 {
    bottom: -30px;
    left: -30px;
    transform: rotate(45deg);
}

.hero-text h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #4a90e2;
}

.hero-text h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-text p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Projects Carousel Section */
.projects-section {
    padding: 80px 60px 120px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.projects-section h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

/* Decorative paint blobs */
.projects-section::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 60px;
    width: 180px;
    height: 180px;
    background: var(--accent);
    border-radius: 50% 40% 60% 50%;
    opacity: 0.2;
    z-index: 1;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 2000px;
    height: 550px;
    overflow: visible;
    user-select: none;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--text-primary);
    background: linear-gradient(to right,
            rgba(122, 140, 107, 0.15),
            rgba(122, 140, 107, 0.05),
            transparent);
    backdrop-filter: blur(8px);
}

.carousel-nav-right {
    background: linear-gradient(to left,
            rgba(122, 140, 107, 0.15),
            rgba(122, 140, 107, 0.05),
            transparent);
}

.carousel-nav:hover {
    opacity: 1;
}

.carousel-nav-left {
    left: 0;
    border-radius: 0 30px 30px 0;
}

.carousel-nav-right {
    right: 0;
    border-radius: 30px 0 0 30px;
}

.carousel-nav svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    width: 60px;
    height: 60px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    position: absolute;
    width: 350px;
    height: 420px;
    left: 50%;
    top: 50%;
    margin-left: -175px;
    margin-top: -210px;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 25px 60px var(--card-shadow), 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity, filter;
    transform-style: preserve-3d;
}

.carousel-item.flipped .card-front {
    transform: rotateY(180deg);
}

.carousel-item.flipped .card-back {
    transform: rotateY(0deg);
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    transition: transform 0.6s;
}

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

.card-back {
    transform: rotateY(-180deg);
    background: var(--bg-secondary);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.card-back h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.navigate-btn {
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px var(--card-shadow);
}

.navigate-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

/* Add floating shadow beneath cards */
.carousel-item::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 30px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.6s, width 0.6s;
}

.carousel-item.center {
    z-index: 100;
    opacity: 1;
    filter: blur(0) brightness(1);
    transform: scale(1);
    cursor: pointer;
}

.carousel-item.center::after {
    opacity: 1;
    width: 80%;
}

.carousel-item.side {
    z-index: 50;
    opacity: 0.7;
    filter: blur(0.5px) brightness(0.9);
    cursor: pointer;
}

.carousel-item.side::after {
    opacity: 0.7;
    width: 70%;
}

.carousel-item.far {
    z-index: 10;
    opacity: 0.4;
    filter: blur(1.5px) brightness(0.7);
    cursor: default;
}

.carousel-item.far::after {
    opacity: 0.4;
    width: 60%;
}

.carousel-item.hidden {
    opacity: 0;
    filter: blur(3px);
    pointer-events: none;
}

.carousel-item.hidden::after {
    opacity: 0;
}

.project-image {
    width: 100%;
    height: 240px;
    background: #c4b5a8;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 25px;
    background: var(--bg-secondary);
}

.project-info h3 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95em;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.dot:hover {
    background: #bbb;
    transform: scale(1.1);
}

.dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

/* Contact Section */
.contact {
    padding: 80px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.contact-image {
    position: relative;
}

.contact-image img {
    width: 100%;
    border-radius: 20px;
}

.decorative-blob {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50% 40% 60% 40%;
    opacity: 0.3;
    z-index: -1;
}

.blob-1 {
    background: var(--accent);
    top: -20px;
    right: -20px;
}

.blob-2 {
    background: #b8a896;
    bottom: -20px;
    left: -20px;
    transform: rotate(45deg);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.contact-form h3 {
    font-size: 1.8em;
    margin-bottom: 30px;
}

.contact-form h3 span {
    color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background: var(--accent-dark);
}

/* Resume Page */
.resume {
    padding: 80px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.resume-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.resume-sidebar {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
    text-align: left;
}

.resume-sidebar h3 {
    font-size: 2em;
    margin-bottom: 30px;
}

.profile-img {
    width: 240px;
    height: 240px;
    border-radius: 25%;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.badge {
    background: var(--accent);
    /* you can keep this, or use transparent */
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    text-align: center;
    border: 2px solid var(--accent);
    /* initial border same as background */
    transition: border-color 0.3s, color 0.3s;
    /* smooth hover effect */
}

.badge:hover {
    border-color: var(--bg-opposite-primary);
    color: var(--text-opposite-primary);
    background: var(--accent);
}

.section-title {
    font-size: 1.5em;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.education-card {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.education-item {
    padding: 15px;
    border-left: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.education-date {
    background: var(--accent);
    font-size: 0.9em;
    font-weight: bold;
    padding: 10px 10px;
    border-radius: 20px;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

.education-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1em;
}

.education-card:hover {
    border-color: var(--accent);
}

.skill-card {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.skill-item {
    display: grid;
    grid-template-columns: 50px 140px 1fr;
    /* icon | name | bar */
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.skill-card:hover {
    border-color: var(--accent);
}

/* Skill SECTION */
.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    justify-self: center;
}

.skill-name {
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 13px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.skill-progress {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
}

.resume-main {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

/* Experience SECTION */
.experience-card {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.experience-card:hover {
    border-color: var(--accent);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.experience-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.experience-img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 50%;
}

.experience-title {
    font-size: 1.3em;
    font-weight: bold;
}

.resume-date {
    background: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* References SECTION */
.references-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for 2x2 layout */
    gap: 20px;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 20px;
}

.reference-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.reference-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: border 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.reference-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.reference-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 2px solid var(--accent);
}

.reference-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.reference-info strong {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-primary);
}

.reference-title {
    font-size: 0.95em;
    color: var(--text-secondary);
}

.reference-contact {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.reference-contact a {
    display: none;
    /* hide individual links since whole card is clickable */
}

/* Responsive: stack cards on smaller screens */
@media (max-width: 768px) {
    .references-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    .reference-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .reference-photo {
        margin-bottom: 10px;
    }
}

/* Hobbies SECTION */
.hobbies {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 25px 10px;
}

.hobbies-card {
    background: var(--bg-primary);
    padding: 0px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    border: 3px solid transparent;
    transition: border 0.3s;
}

.hobbies-card:hover {
    border-color: var(--accent);
}

.hobby-item {
    text-align: center;
}

.hobby-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent);
    background-size: 75%;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto 10px;
}

.hobby-item span {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 560;
}

@media (max-width: 768px) {
    .hobbies {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .hobby-icon {
        width: 70px;
        height: 70px;
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 80px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card-image {
    width: 100%;
    height: 250px;
    background: #c4b5a8;
    background-size: cover;
    background-position: center;
}

.project-card-content {
    padding: 25px;
}

.project-card-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.project-card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Project Detail Page */
.project-detail {
    padding: 80px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-detail h1 {
    font-size: 3em;
    margin-bottom: 30px;
}

.project-detail-image {
    width: 100%;
    height: 400px;
    background: #c4b5a8;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    margin-bottom: 40px;
}

.project-detail-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.project-detail-content h2 {
    font-size: 2em;
    margin: 30px 0 15px;
}

.project-detail-content p {
    line-height: 1.8;
    margin-bottom: 20px;
}

/* About Page */
.about-section {
    padding: 80px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.about-section h1 {
    font-size: 3em;
    margin-bottom: 40px;
    text-align: center;
}

.about-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 60px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1em;
    font-weight: normal;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 0.7;
}

.footer-socials {
    margin-top: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.social-icon.linkedin {
    background: #0077b5;
}

.social-icon.github {
    background: #333;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.facebook {
    background: #1877f2;
}

.social-icon.youtube {
    background: #ff0000;
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--accent);
    border-radius: 12px;
    text-decoration: none;
    color: var(--footer-text);
    transition: all 0.3s;
    text-align: center;
}

.contact-link:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(122, 140, 107, 0.4);
}

.contact-link svg {
    width: 48px;
    height: 48px;
}

.contact-link span {
    font-size: 1.1em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {

    .hero,
    .contact-content,
    .resume-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hobbies {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        padding: 15px 20px;
    }

    nav {
        gap: 15px;
    }

    .carousel-container {
        height: 450px;
    }

    .carousel-item {
        width: 280px;
        height: 350px;
        margin-left: -140px;
        margin-top: -175px;
    }

    .project-image {
        height: 180px;
    }
}