:root {
    /* LIGHT MODE */
    --primary: #6a11cb;
    --primary2: #2575fc;
    --accent: #f59e0b;
    --accent2: #f97316;

    --bg: #f5f7fb;
    --text: #1e293b;
    --text-soft: #64748b;

    --card: #ffffff;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

/* DARK MODE VARIABLES */
body.dark {
    --primary: #8b5cf6;
    --primary2: #3b82f6;
    --accent: #facc15;
    --accent2: #fb923c;

    --bg: #0f172a;
    --text: #e2e8f0;
    --text-soft: #94a3b8;

    --card: #1e293b;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

header {
    background-image: url('politeknik.webp');
    background-color: rgba(106, 17, 203, 0.85);
    /* background: linear-gradient(90deg, var(--primary), var(--primary2), var(--accent2)); */
    color: #fff;
    padding: 48px 0 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    /* tingkat kegelapan */
    z-index: 0;
}

header * {
    position: relative;
    z-index: 1;
}

header h1 {
    margin: 0;
    font-size: 2.8rem;
    letter-spacing: 2px;
    animation: fadeInDown 1s;
    background: linear-gradient(90deg, #fff, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    margin: 12px 0 0 0;
    font-size: 1.2rem;
    animation: fadeInUp 1.2s;
    color: #fffbe7;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    margin-top: 24px;
    box-shadow: var(--shadow);
    animation: popIn 1.3s;
    background: linear-gradient(135deg, var(--primary), var(--accent2));
    padding: 3px;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* NAVBAR PILL STYLE */

nav {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* LINK */

nav a {
    color: #0f172a;
    text-decoration: none;
    margin: 0 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    transition: 0.3s;
}

/* HOVER */

nav a:hover {
    background: linear-gradient(90deg, #ffb400, #ff6a00);
    color: white;
}

/* ACTIVE */

nav a.active {
    background: linear-gradient(90deg, #ffb400, #ff6a00);
    color: white;
}

/* DARK MODE */

body.dark nav {
    background: rgba(30, 41, 59, 0.85);
}

body.dark nav a {
    color: #e5e7eb;
}

main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 16px;
}

section {
    margin-bottom: 48px;
    animation: fadeInSection 1s;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.15);
    border: 2px solid var(--primary2);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.skill {
    background: linear-gradient(90deg, var(--primary), var(--primary2));
    opacity: 0.95;
    color: #fff;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.skill:hover {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 180, 0, 0.18);
    border: 2px solid var(--accent2);
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 6px 24px rgba(44, 62, 80, 0.13);
    border: 2px solid var(--primary2);
}

.project-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: var(--primary2);
    background: linear-gradient(90deg, var(--primary2), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card p {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-soft);
}

.project-card a {
    color: var(--accent2);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    transition: color 0.2s;
}

.project-card a:hover {
    color: var(--primary2);
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 32px 0 16px 0;
    color: var(--text-soft);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 600px) {

    .card,
    .project-card {
        padding: 16px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 0 4px;
    }
}

.social-icons {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

a {
    text-decoration: none;
}

.social-icons a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5f5;
    font-size: 18px;
    transition: 0.3s;
}

.social-icons a:hover {
    background: #38bdf8;
    color: #020617;
    transform: translateY(-5px);
}

.btn-icon:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* ===== THEME COLOR ===== */

:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --card: #ffffff;
    --accent: #ffb400;
}

body {
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
}

.card {
    background: var(--card);
}

/* DARK MODE */

body.dark {
    background: #0f172a;
    --text: #e5e7eb;
    --card: #1e293b;
    --accent: #38bdf8;
}

/* BUTTON */

.theme-toggle {
    margin-top: 20px;
    background: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #fff;
}

a {
    color: var(--primary2);
    text-decoration: none;
    transition: color .2s ease;
}

/* HOVER */
a:hover {
    color: var(--accent2);
}