:root {
    --primary: #2D3E50;
    --accent: #E86A58;
    --bg-light: #F9F9F9;
    --bg-white: #FFFFFF;
    --text-main: #2D2D2D;
    --text-light: #666666;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --blob-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* --- Global Settings --- */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- Navigation Bar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-contact {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 50px;
    font-size: 0.9rem;
}

.btn-contact:hover {
    background: var(--primary);
    color: #fff;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    min-height: 90vh;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    background-color: var(--bg-light);
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.greeting {
    display: block;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--primary);
}

.hero h2 {
    font-family: var(--font-body);
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero p {
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 90%;
    font-size: 1.05rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 0 20px 0 20px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(45, 62, 80, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(45, 62, 80, 0.3);
}

.github-link {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.github-link:hover {
    color: var(--accent);
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.blob-shape {
    position: absolute;
    width: 450px;
    height: 450px;
    background: #FFEDEA;
    border-radius: var(--blob-radius);
    z-index: 1;
    animation: morph 8s ease-in-out infinite;
}

.hero-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: var(--blob-radius);
    z-index: 2;
    position: relative;
    box-shadow: 20px 20px 0px rgba(0, 0, 0, 0.05);
}

/* --- Skills Section --- */
.section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.sub-heading {
    font-family: var(--font-body);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.heading {
    font-size: 3rem;
    color: var(--primary);
}

.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border: 1px solid #f0f0f0;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Skill List Styles */
.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.8rem 0;
    border-bottom: 1px dashed #eee;
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list strong {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2px;
}

/* --- Projects Section --- */
.dark-bg {
    background-color: var(--bg-light);
}

.projects-container {
    margin-top: 2rem;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 5rem;
    margin-bottom: 8rem;
}

.project-item.reverse {
    flex-direction: row-reverse;
}

.project-text {
    flex: 1;
}

.project-year {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
    font-style: italic;
}

.project-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.project-desc {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-light);
}

/* Project Detail Bullets */
.project-details {
    list-style: none;
    margin-bottom: 2rem;
}

.project-details li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-main);
}

.project-details li i {
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--accent);
    font-size: 0.8rem;
}

.tech-tags {
    list-style: none;
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tech-tags li {
    padding: 0.5rem 1.2rem;
    background: #EFEFEF;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.project-link {
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 3px;
}

.project-link:hover {
    color: var(--accent);
}

/* Standard Project Visual Container */
.project-visual {
    flex: 1;
    height: 420px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 100px;
    overflow: hidden;
    transition: 0.3s;
}

.project-visual:hover {
    transform: scale(1.02);
}

.color-1 {
    background: #E3F2FD;
    color: #1565C0;
}

.color-2 {
    background: #E8F5E9;
    color: #2E7D32;
}

.color-3 {
    background: #F3E5F5;
    color: #7B1FA2;
}

.visual-content {
    text-align: center;
}

.visual-content span {
    display: block;
    margin-top: 1.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* --- Kasih App Showcase --- */
.app-visual-container {
    height: auto !important;
    padding: 2rem 1rem;
    min-height: 450px;
    align-items: center;
}

.visual-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Screenshot Display */
.app-screenshots {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.phone-mockup {
    width: 140px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 4px solid #fff;
    transition: transform 0.3s;
}

.phone-mockup:hover {
    transform: translateY(-5px) scale(1.02);
    z-index: 2;
}

/* QR Code Container */
.qrcode-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.qrcode-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.qrcode-box:hover {
    transform: translateY(-5px);
}

.qrcode-box img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}

.qr-label {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: #fff;
    padding: 6rem 5%;
    text-align: center;
}

.footer-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    margin: 2rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.email-link:hover {
    border-bottom: 2px solid #fff;
}

.social-links a {
    font-size: 1.8rem;
    margin: 0 1.5rem;
    opacity: 0.7;
    color: #fff;
}

.social-links a:hover {
    opacity: 1;
}

.copyright {
    opacity: 0.5;
    font-size: 0.9rem;
}

/* --- Animations & Responsive Design --- */
@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

@media (max-width: 968px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

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

    .hero-stats {
        justify-content: center;
    }

    .cta-group {
        justify-content: center;
    }

    .project-item,
    .project-item.reverse {
        flex-direction: column;
        gap: 2rem;
        align-items: stretch;
    }

    .project-visual {
        width: 100%;
        height: 300px;
        position: static;
    }

    .blob-shape,
    .hero-img {
        width: 300px;
        height: 300px;
    }

    /* Mobile adjustments for App Showcase */
    .app-screenshots {
        gap: 0.5rem;
    }

    .phone-mockup {
        width: 110px;
    }

    .app-visual-container {
        height: auto;
    }

    .qrcode-box img {
        width: 100px;
        height: 100px;
    }
}