/* CSS Root Variables */
:root {
    /* Light Mode Colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #fff;
    --bg-tertiary: #f0f0f0;
    
    --text-primary: #333;
    --text-secondary: #555;
    --text-heading: #1a1a1a;
    --text-light: #b0b0b0;
    
    --accent-primary: #0066cc;
    --accent-hover: #004080;
    --accent-light: #4da3ff;
    --accent-lighter: #7fbfff;
    
    --border-primary: #e0e0e0;
    --border-secondary: #ddd;
    --border-dark: #3a3f48;
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    --logo-color: #0066cc;
}

body.dark-mode {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f28;
    --bg-tertiary: #2a2f38;
    
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-heading: #f5f5f5;
    --text-light: #b0b0b0;
    
    --accent-primary: #0156aa;
    --accent-hover: #004080;
    --accent-light: #4da3ff;
    --accent-lighter: #7fbfff;
    
    --border-primary: #2a2f38;
    --border-secondary: #3a3f48;
    --border-dark: #3a3f48;
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);

    --logo-color: #f5f5f5;
}

/* CSS Reset and Base Styles */

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4 {
    color: var(--text-heading);
    margin-bottom: 0.8rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 1rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

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

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-primary);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent-primary);
    margin: 15px auto;
}

/* Navigation */
nav {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nav-links-container {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.nav-logo {
    display: flex;
    align-items: center;
    height: 40px;
    gap: 12px;
}

.logo-container {
    display: flex;
}

.logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--logo-color);
    margin-left: 15px;
    text-decoration: none;
}

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

.nav-links li {
    margin-left: 20px;
    margin-right: 10px;
}



.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

.nav-container > .theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

.theme-toggle img {
    width: 24px;
    height: 24px;
    border-radius: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Scroll Progress Bar */
.scroll-progress-container {
    width: 100%;
    height: 4px;
    background: var(--border-primary);
    position: relative;
}

.scroll-progress-bar {
    position: relative;
    width: 100%;
    height: 100%;
}

.scroll-progress-fill {
    height: 100%;
    background: var(--logo-color);
    width: 0%;
    transition: width 0.1s ease-out;
}

.scroll-progress-icon {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 24px;
    height: 24px;
    transition: left 0.1s ease-out, opacity 0.3s ease-out;
    transform: translate(-50%, -50%) rotate(90deg);
    fill: var(--logo-color);
    opacity: 0;
    pointer-events: none;
}

.scroll-progress-icon.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100vh;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../data/images/cakrawala2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    z-index: 0;
    transform: scale(var(--hero-scale, 1.5));
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-image {
    flex: 0 0 auto;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
    color: #fff;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
    position: relative;
    width: 100%;
    padding-bottom: 40%;
    overflow: hidden;
}

.about-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex: 1;
}

.skill-bars {
    margin-top: 20px;
}

.skill {
    margin-bottom: 15px;
}

.skill-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.skill-bar {
    height: 10px;
    background: var(--border-primary);
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: var(--accent-primary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 20px;
}

.project-category {
    color: var(--logo-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.project-title {
    margin: 10px 0;
}

/* Skills & Experiences Section */
.exp-grid {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.exp-grid::-webkit-scrollbar {
    display: none;
}

.exp-container {
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

.exp-card {
    overflow: hidden;
    flex: 0 0 auto;
    width: 300px;
    border-radius: 10px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exp-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.exp-year {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    background: var(--accent-primary);
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 120px;
}

.exp-info {
    text-align: left;
    border-radius: 10px;
    padding: 20px;
    flex: 1;
}

.exp-info h3 {
    text-align: left;
    font-size: 1.15rem;
    color: var(--text-heading);
    font-weight: bold;
}

.exp-info h3:after {
    content: "";
    display: flex;
    height: 3px;
    background: var(--accent-primary);
    margin: 15px auto;
}

/* Scroll buttons styling */
.scroll-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.scroll-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
    transition: background 0.3s;
}

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

.featured-card {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
    will-change: transform;
}

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

.featured-info {
    text-align: center;
    border-radius: 10px;
    padding: 20px;
    flex: 1;
}

.featured-container {
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

.featured-img-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.featured-name {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

.featured-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 30px;
    padding: 20px 0;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-mask: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
    mask: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}

.featured-grid::-webkit-scrollbar {
    display: none;
}

.featured-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.featured-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

/* Leadership Section */
.leadership-grid {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.leadership-grid::-webkit-scrollbar {
    display: none;
}

.exp-img {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.leadership-info {
    text-align: left;
    border-radius: 10px;
    padding: 20px;
    flex: 1;
}

.leadership-info h3 {
    text-align: left;
    font-size: 1.5rem;
    color: var(--text-heading);
    font-weight: bold;
}

.leadership-tag {
    font-size: 1rem;
    text-align: left;
    color: var(--text-heading);
    font-weight: bold;
}

.leadership-tag:after {
    content: "";
    display: flex;
    height: 3px;
    background: var(--accent-primary);
    margin: 15px auto;
}

.leadership-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

/* Awards Section */
.awards-list {
    margin-top: 30px;
}

.award-item {
    display: flex;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.award-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.award-year {
    position: relative;
    width: 200px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.award-year-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.award-year-overlay {
    background: rgba(0, 102, 204, 0.7);
    color: #fff;
    padding: 20px;
    font-size: 25px;
    font-weight: bold;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.award-details {
    padding: 20px;
    flex: 1;
}

.award-title {
    margin-bottom: 5px;
}

.award-title:hover {
    color: var(--accent-primary);
}

.award-description {
    color: var(--text-heading);
}

/* Contact Section */
.contact-form {
    flex: 2;
    max-width: 600px;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-secondary);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

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

/* Contact Section Layout */
.contact-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin: 40px auto;
    align-items: stretch;
    justify-content: center;
    max-width: 1000px;
}

/* Social Media Updates Section */
.social-updates {
    flex: 1;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    max-width: 350px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.social-updates h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.update-text {
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.social-img {
    height: 250px;
    width: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

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

.footer-nav {
    margin-bottom: 20px;
}

.footer-nav a {
    color: #fff;
    margin: 0 15px;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-primary);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--accent-hover);
}

.load-more {
    margin-top: 50px;
    text-align: center;
}

.hidden {
    display: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
    }
    .hero-image {
        width: 200px;
        height: 200px;
    }
    .about-content {
        flex-direction: column;
    }
    .about-image, .about-text {
        flex: auto;
        width: 100%;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        align-items: center;
        position: relative;
        padding: 15px 20px;
        justify-content: space-between;
    }
    .nav-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .nav-logo.hidden {
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-links {
        flex-direction: row;
        width: 100%;
        margin-top: 0;
        display: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 15px 0;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-primary);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--border-primary) transparent;
    }
    .nav-links::-webkit-scrollbar {
        height: 4px;
    }
    .nav-links::-webkit-scrollbar-track {
        background: transparent;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--border-primary);
        border-radius: 2px;
    }
    .nav-links.show {
        display: flex;
    }
    .nav-links li {
        margin: 0;
        margin-left: 0;
        white-space: nowrap;
        padding: 0 20px;
        border-right: 1px solid var(--border-primary);
    }
    .nav-links li:last-child {
        border-right: none;
    }
    .mobile-menu-btn {
        display: block;
        margin-left: 5px;
    }
    .hero-text {
        text-align: center;
        padding: 0 40px;
    }
    .projects-grid, .leadership-grid, .exp-grid {
        grid-template-columns: 1fr;
    }
    .award-item {
        flex-direction: column;
    }
    .award-year {
        min-width: 100%;
        padding: 10px;
    }
    .hero {
        padding: 100px 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .contact-wrapper {
        flex-direction: column;
    }
    .social-updates {
        max-width: 100%;
    }
    .social-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animation */
.fade-in {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.15s ease;
}

.fade-in.appear {
    opacity: 1;
}
