:root {
    /* Color Palette */
    --bg-color: #0f0f0f;
    --surface-color: #171717;
    --surface-light: #242424;
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    --accent: #64748b;
    --accent-glow: rgba(100, 116, 139, 0.4);
    --border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Spacing & Sizes */
    --nav-height: 70px;
    --container-max: 1100px;
}

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

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Custom Cursor (hidden on mobile) */
.cursor-dot {
    position: fixed; top: 0; left: 0; width: 6px; height: 6px;
    background-color: var(--text-primary); border-radius: 50%;
    transform: translate(-50%, -50%); pointer-events: none; z-index: 9999;
}
.cursor-outline {
    position: fixed; top: 0; left: 0; width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%;
    transform: translate(-50%, -50%); pointer-events: none; z-index: 9998;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}
.cursor-outline.hover {
    width: 60px; height: 60px; background-color: rgba(255,255,255,0.05);
    backdrop-filter: blur(2px); border-color: rgba(255,255,255,0.1);
}

/* Typography Basics */
h1, h2, h3, h4 {
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-family: var(--font-serif); font-size: 3.5rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; font-weight: 500; }
p { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.7; }

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%; height: var(--nav-height);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%;
    background-color: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1000; border-bottom: 1px solid var(--border);
}
.nav-brand {
    font-size: 1.25rem; font-weight: 600; color: var(--text-primary); text-decoration: none;
}
.nav-links {
    display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
    text-decoration: none; color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; transition: color 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }

.menu-btn {
    display: none; background: none; border: none; color: var(--text-primary);
    font-size: 0.95rem; font-weight: 500; text-transform: uppercase; cursor: pointer; z-index: 1002;
}

/* Mobile Menu */
.overlay-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-color); z-index: 1001;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; visibility: hidden; transition: all 0.4s;
}
.overlay-menu.active { opacity: 1; pointer-events: auto; visibility: visible; }
.overlay-links { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 2.5rem; }
.overlay-links a {
    font-family: var(--font-serif); font-size: 3rem; color: var(--text-secondary); text-decoration: none;
}
.overlay-links a:hover { color: var(--text-primary); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2.5rem; font-size: 0.95rem; font-weight: 500;
    text-decoration: none; border-radius: 100px; transition: all 0.3s;
    border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background-color: var(--text-primary); color: var(--bg-color); }
.btn-primary:hover { background-color: var(--accent); color: var(--text-primary); }
.btn-outline { background-color: transparent; color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.btn-outline:hover { border-color: var(--text-primary); background-color: transparent; transform: translateY(-2px); }

/* Hero Section */
.hero {
    min-height: 90vh; /* Better on mobile */
    display: flex; align-items: center; padding-top: calc(var(--nav-height) + 2rem);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-secondary); margin: 1rem 0 2.5rem 0; max-width: 600px;
}
.hero-image-wrapper {
    display: flex;
    justify-content: flex-end;
}
.hero-photo {
    width: 100%;
    max-width: 380px;
    height: 520px;
    object-fit: cover;
    border-radius: 200px; /* Bentuk pill untuk menghindari desain yang mengotak */
    filter: grayscale(80%); /* Efek elegan */
    transition: filter 0.4s ease, transform 0.4s ease;
}
.hero-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.section-tag {
    display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem;
}

/* About Grid */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-text .lead { font-size: 1.35rem; color: var(--text-primary); margin-bottom: 2rem; line-height: 1.5; }
.about-visual p { border-left: 2px solid var(--border); padding-left: 1.5rem; }

/* Projects Grid */
.projects-grid { display: flex; flex-direction: column; }
.project-card {
    display: flex; text-decoration: none; color: inherit; background-color: transparent;
    border-bottom: 1px solid var(--border); border-radius: 0; padding: 4rem 1rem; transition: all 0.3s ease; position: relative;
    align-items: center; justify-content: space-between;
}
.project-card:hover { transform: translateX(10px); border-color: var(--text-secondary); background-color: transparent; }
.project-meta { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.project-info h3 { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 0.5rem; transition: color 0.3s; }
.project-tags { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

/* Contact */
.contact-box {
    text-align: center; max-width: 800px; margin: 0 auto;
    padding: 4rem 1rem; background-color: transparent; border: none;
}

/* Internal Layouts (About / Project Detail) */
.page-header { padding-top: calc(var(--nav-height) + 4rem); margin-bottom: 3rem; }
.content-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; }
.content-sidebar img { width: 100%; border-radius: 16px; object-fit: cover; filter: grayscale(100%); }

.content-section { margin-bottom: 4rem; }
.content-section h2 { font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem; }

/* Skills Grid */
.skills-grid {
    display: flex; flex-wrap: wrap; gap: 2rem;
}
.skill-item {
    font-size: 1.15rem; color: var(--text-primary); font-weight: 500;
    padding: 0; border: none; background: transparent;
}
.skill-item::before {
    content: '— ';
    color: var(--text-secondary);
}

/* Timeline (Exp/Edu) */
.timeline-list { display: flex; flex-direction: column; gap: 2.5rem; }
.timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; }
.timeline-year { font-size: 1rem; color: var(--text-secondary); }
.timeline-content h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.timeline-role { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; }

/* Project Hero */
.project-banner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.meta-col h4 { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 0.25rem; }
.meta-col p { font-size: 0.95rem; }
.hero-image { width: 100vw; height: 50vh; margin-left: calc(-50vw + 50%); object-fit: cover; margin-bottom: 4rem; }
.case-study { max-width: 800px; margin: 0 auto; }

/* Footer */
footer { padding: 3rem 0; text-align: center; border-top: 1px solid var(--border); }

/* Animations */
.fade-up {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* MOBILE RESPONSIVE (Stricter fixes to avoid messy layout) */
@media (max-width: 850px) {
    /* Hide specific desktop things */
    .nav-links { display: none; }
    .menu-btn { display: block; }
    .cursor-dot, .cursor-outline { display: none !important; }
    
    /* Font resizing */
    h1 { font-size: clamp(2.2rem, 8vw, 3rem); word-wrap: break-word; }
    h2 { font-size: clamp(1.75rem, 6vw, 2.2rem); word-wrap: break-word; }
    .hero-subtitle { font-size: 1rem; margin: 1rem auto 2rem auto; }
    .about-text .lead { font-size: 1.15rem; }
    
    /* Container & Sections */
    .container { padding: 0 1.25rem; }
    section { padding: 3rem 0; }
    
    /* Layouts to stack */
    .hero { min-height: auto; padding-top: calc(var(--nav-height) + 2rem); padding-bottom: 2rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .hero-image-wrapper { justify-content: center; order: -1; margin-bottom: 1rem; }
    .hero-photo { width: 100%; max-width: 260px; height: auto; aspect-ratio: 3/4; border-radius: 120px; }
    
    .about-grid, .content-layout { grid-template-columns: 1fr; gap: 2rem; }
    
    /* Fix Project Cards */
    .project-card { padding: 2rem 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
    .project-meta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .project-info h3 { font-size: 1.8rem; }
    .project-tags { margin-top: 0.5rem; }
    
    /* Fix Detail Pages */
    .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .project-banner { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
    .page-header { padding-top: calc(var(--nav-height) + 1.5rem); margin-bottom: 1.5rem; }
    
    /* Contact Box */
    .contact-box { padding: 2rem 0; }
    .contact-box p { font-size: 0.95rem; }
    .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
    .btn-outline { word-break: break-word; max-width: 100%; }
}