/* ===== CSS Variables ===== */
:root {
    --bg-main: #FCF3E3;
    --bg-card: #BDD3CE;
    --color-primary: #708C69;
    --color-accent: #FAA258;
    --color-text: #2d3436;
    --color-text-light: #636e72;
    --color-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    --transition: 0.3s ease;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(252, 243, 227, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(112, 140, 105, 0.1);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.logo-bracket {
    color: var(--color-accent);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-light);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-role {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-info {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 480px;
    margin-bottom: 24px;
}

/* Code Preview */
.code-preview {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #2d2d2d;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27ca40; }

.code-filename {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
}

.code-content {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: #d4d4d4;
    overflow-x: auto;
}

.code-content .keyword { color: #569cd6; }
.code-content .variable { color: #9cdcfe; }
.code-content .function { color: #dcdcaa; }
.code-content .string { color: #ce9178; }
.code-content .comment { color: #6a9955; }
.code-content .property { color: #9cdcfe; }
.code-content .number { color: #b5cea8; }
.code-content .boolean { color: #569cd6; }

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
    position: relative;
    z-index: 2;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-lg);
}

.image-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(112, 140, 105, 0.3) 0%, transparent 70%);
    border-radius: var(--radius-full);
    z-index: 1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.image-border {
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius-full);
    opacity: 0.3;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-element {
    position: absolute;
    background: var(--color-white);
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 3;
    color: var(--color-primary);
}

.elem-1 {
    top: 20px;
    right: -20px;
    animation: float 3s ease-in-out infinite;
}

.elem-2 {
    bottom: 60px;
    left: -30px;
    animation: float 3s ease-in-out infinite 0.5s;
}

.elem-3 {
    bottom: 20px;
    right: -10px;
    animation: float 3s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stats-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--color-white);
    padding: 20px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--bg-card);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ===== Section Styles ===== */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
}

/* ===== Tentang Section ===== */
.tentang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.tentang-text {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.tentang-text strong {
    color: var(--color-text);
}

.tech-stack {
    margin-top: 32px;
}

.tech-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Terminal Window */
.terminal-window {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #2d2d2d;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    gap: 16px;
}

.line-number {
    color: #555;
    user-select: none;
    min-width: 24px;
}

.terminal-body .keyword { color: #569cd6; }
.terminal-body .variable { color: #9cdcfe; }
.terminal-body .string { color: #ce9178; }
.terminal-body .property { color: #9cdcfe; }
.terminal-body .boolean { color: #569cd6; }

/* ===== Skill Section ===== */
.skill {
    background: var(--bg-card);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--color-white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
    transform: scaleY(0);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-card:hover::before {
    transform: scaleY(1);
}

.skill-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 16px;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.skill-bar {
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 3px;
    width: 0;
    transition: width 1s ease-out;
}

.skill-card.animated .skill-progress {
    width: var(--progress);
}

.skill-percent {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ===== Project Section ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-icon {
    width: 52px;
    height: 52px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: var(--transition);
}

.project-card:hover .project-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.project-tag {
    padding: 6px 14px;
    background: var(--bg-card);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.project-desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.project-features h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.project-features ul {
    margin-bottom: 20px;
}

.project-features li {
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.project-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    padding: 4px 12px;
    background: var(--bg-main);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ===== Pengalaman Section ===== */
.pengalaman {
    background: var(--bg-card);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.experience-card {
    background: var(--color-white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.exp-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin: 0 auto 16px;
    transition: var(--transition);
}

.experience-card:hover .exp-icon {
    background: var(--color-accent);
    color: var(--color-white);
}

.experience-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.experience-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ===== Kontak Section ===== */
.kontak-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.kontak-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.kontak-info p {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--bg-card);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-text);
    padding: 40px 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 12px;
}

.footer-logo .logo-bracket {
    color: var(--color-accent);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .code-preview {
        text-align: left;
    }

    .tentang-grid,
    .kontak-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .image-wrapper {
        width: 260px;
        height: 260px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-main);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        transform: translateY(-150%);
        transition: var(--transition);
        border-bottom: 1px solid var(--bg-card);
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .section {
        padding: 60px 0;
    }

    .skill-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .floating-element {
        display: none;
    }

    .stats-card {
        padding: 16px 24px;
        gap: 16px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .image-wrapper {
        width: 200px;
        height: 200px;
    }

    .code-preview {
        display: none;
    }

    .terminal-window {
        font-size: 0.75rem;
    }

    .terminal-line {
        flex-wrap: wrap;
    }
}

/* ===== Animation Classes ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
